Using the Spectrum Analyzer
This guide explains the use of the Spectrum instrument in WaveForms. This instrument is used to measure different-frequency components of a captured analog input signal.
- A Digilent Test & Measurement Device with Analog Input and Output Channels
- A Computer with WaveForms Software Installed
1. Opening the Spectrum Analyzer
Plug in the Test & Measurement Device, then start WaveForms and make sure the device is connected.
If no device is connected to the host computer when WaveForms launches, the Device Manager will be launched. Make sure that the device is plugged in and turned on, at which point it will appear in the Device Manager's device list (1). Click on the device in the list to select it, then click the Select button (2) to close the Device Manager.
Note: “DEMO” devices are also listed, which allow the user to use WaveForms and create projects without a physical device.
Note: The Device Manager can be opened by clicking on the “Connected Device” button in the bottom right corner of the screen (3.), or by selecting “Device Manager” from the “Settings” menu at the top of the screen.
Once the Welcome page loads, in the instrument panel at the left side of the window, click on the Spectrum button to open the Spectrum Analyzer instrument.
Once the Spectrum instrument opens, the window contains the plot plane, the Control Bar (1) above the Plot Pane (2), and the Configuration Panel (3) to the right of the plot pane.
2. Using the Spectrum Analyzer
This section walks through setting up the Spectrum Analyzer instrument to analyze a signal in the frequency domain.
2.1 Hardware Setup
In order to measure a signal with the Spectrum instrument, there must first be a signal to measure. To this end, step 2.2 of this guide describes setting up a simple loopback circuit that connects the Test & Measurement Device's Waveform Generator and Oscilloscope pins.
Connect the Test & Measurement Device>'s scope Channel 1 pin (orange wire) to the device's wavegen Channel 1 output pin (yellow wire). For devices that use differential input channels, such as the Analog Discovery Studio with MTE cables, make sure to connect the scope Channel 1 negative pin (orange wire with white stripes) to the ground pin associated with wavegen Channel 1 (black wire).
2.2 Input Signal
With the loopback circuit set up, a signal must now be applied to the analog output pins. WaveForms' Wavegen instrument will be used to accomplish this.
From the Spectrum instrument, opened in step 1.2, return to WaveForms' Welcome page by clicking on its tab at the top of the screen. In the Welcome tab, open the Wavegen instrument (noted by the red arrow in the image at right). Click the Run button () in the control bar near the top of the window (red box in image at right) to begin outputting a signal. With default settings, a 1V (2VPP), 1kHz sine wave is applied to the wavegen Channel 1 output pin. Change the Frequency to 500kHz by selecting the value from the drop-down menu or by typing into the text field, including the SI prefix.
For more detail on how to use the Wavegen instrument, please see the Using the Waveform Generator guide.
Return to the Spectrum instrument by clicking on its tab in the bar at the top of the screen.
2.3 Begin Capturing Data
Click the Run button () button in the control bar near the top of the window to begin capturing data on the analog input channels. Captured data will appear in the plot pane as a set of colored lines. The yellow line (labeled 1 in the image to the right) corresponds to the signal captured on analog input channel 1. The blue line (2) corresponds to the signal captured on analog input channel 2.
Since analog input channel 2 was left “floating” (not connected) while making connections in step 2.1, it can be disabled by clicking the checkbox in the “Channel 2” box (3) in the configuration panel at the right side of the window.
2.4 Plot Pane Axes
By default, the plot vertical axis units are decibel volts (dBV) from -200dBV to 0dBV and the horizontal axis is frequency from 0MHz to 1MHz. To change these values, use the Control Bar located above the plot plane or the Configuration Panel located to the right of the plot plane which are discussed in section 3.1. With the Spectrum tool running, the plot will show a “spike” at 0.5MHz (the 500kHz sine wave from waveGen Channel1) peaking close to 0dBV with all other frequencies between -80dBV and -120dBV (electrical noise).
2.5 Quick Measure Cursors
To take a quick measurement of the period and frequency of the sine wave, click the Quick Measure: Vertical icon () at the top right side of the plot pane. Move the cursor over the plot pane, and observe the values displayed. If the values change too quickly to make out, the capturing of data can be stopped by clicking on the Stop button () in the control bar near the top of the window. To remove this cursor, click the Quick Measure: Vertical button again.
3. Spectrum Analyzer User Interface Overview
This section describes the various controls present in the Spectrum instrument.
3.1 Control Bar
The Control Bar is located above the plot plane. The Single and Run control buttons, located on the left side of the Control Bar, will start measurements with either a single acquisition or a continuous acquisition, respectively.
Several fields, to the right of the control buttons, can be used to configure the Spectrum Analyzer. By default, the Frequency Range, Start frequency, and Stop frequency fields can be seen. These options also change the x-axis of the plot.
Additional configuration options can be found by clicking on the green down arrow () to the right of these fields. These options include alternate Scale types, Center frequency, Span frequency, number of frequency BINs, Algorithm, number of Samples to take, and Resolution. Check the WaveForms Help tab (to the right of the Welcome tab) for more information about these options.
Clicking on the Gear button () allows the user to set the plot update rate.
3.2.1 Configuration Pane - Magnitude
To the right of the plot is the Configuration Pane.
In the Magnitude section of the Configuration Pane, the plot's vertical axis units and range can be changed by selecting a value out of the particular field's drop-down, or by typing a new value, with units and SI prefix, into the field.
3.2.2 Configuration Pane - Range
The Range field, below the Magnitude configuration options, can be used to specify the voltage range for the analog input channels. Selecting larger ranges may reduce the sample resolution.
3.2.3 Configuration Pane - Channel Options
Clicking on the “Channel Options” drop-down allows the user to configure the analog input channels and trigger conditions. The voltage offset, voltage range, attenuation, and sampling modes of each analog input channel can be configured.
The Trigger section of the Channel Options menu allows the user to specify a trigger event, around which samples will be captured and analyzed in the plot pane. By default, the instrument is configured to capture and analyze data whenever the signal applied to analog input Channel 1 rises above 0V.
3.2.4 Configuration Pane - Traces
Additional Traces can be added to the Spectrum Analyzer instrument by clicking on the “Add Trace” button (). Adding a “Reference Trace” copies an already-existing trace and changes the Channel option to “Hold” (see below).
Below the Channel Options and Add Trace buttons are the Trace configurations.
By default, Trace 1 and Trace 2 correspond to analog input Channel 1 and analog input Channel 2, respectively. To change the Trace's input channel, click the Channel drop-down menu. Selecting Hold channel can be used to preserve previously-captured data in the plot, for comparison to newly-captured data.
The Type drop-down is used to select how and when the data is updated, including various kinds of averaging schemes. By default the trace is updated whenever new data is captured.
The Gear icon in the top right of the Trace window can be used further configure the Trace, with color, name, label, and windowing technique options. To remove a Trace, click the red X to the right of the Gear icon.
For more information on Trace configuration, please see the WaveForms reference manual, available through the Help menu in WaveForms, in the menu bar at the top of the screen. An online version of the WaveForms Reference Manual is also available.
3.3 Plot Pane
The Plot pane displays the spectrogram. The horizontal axis of the plot represents the frequencies of measured components. The vertical axis represents the ratio between the input signal's AC voltage and the component signal's AC voltage. Each trace has its own vertical scale, which can be selected by clicking on their identifiers in the top left corner of the plot pane (T1, T2, etc.).
Capture status information can be found next to the channel select buttons, including a state string (Stop / Runnning / Busy). Information about the capture being displayed can be found to the right of the channel select buttons, including the sample rate, and timestamp for the latest capture (when the instrument is stopped).
Another set of buttons can be found in the upper right corner of the plot pane.
Two “Quick Measure” tools, Free () and Vertical () can be used to modify how the mouse cursor acts on the plot, presenting several different sets of information depending on the tool used. The Show Entire Capture button ()zooms the plot all of the way out.
The Gear button next to these buttons can be used to change how the plot is displayed, including adding labels, changing the background between light and dark, and others. For more information on these options, refer to the WaveForms Help menu or the Reference Manual.
Normal and delta cursors are accessible by clicking on X button/drop-down menu located in the bottom left corner of the plot plane. Click and hold the cursor icon to drag it to a point of measurement in the plot plane. To change the cursor's position, delta, reference, and/or color parameters or to delete the cursor, click the arrow on the right side of the cursor icon and update these parameters as necessary.
3.4 View Menu
The File menu can be used to save or load configurations of the Spectrum Analyzer instrument, export acquired data, or close the instrument.
Saving a project (with or without any acquisitions) allows the user to close WaveForms without losing the instrument configuration. In addition to this, projects can be shared with others to aid in group projects and guided learning.
Exporting data as an image produces a screenshot of the entire Spectrum Analyzer instrument. Alternatively, captured data can be exported in a variety of different file formats, including CSV, TXT, and TDMS.
3.5 View Menu
A wide variety of different panes can be added to the user interface using the View menu in the toolbar above the Single/Run/Stop buttons. Each pane, once opened, can be closed by clicking the “X” button in the top right corner of its pane. Each view is described below:
- Time: Used to view the captured signal in the time domain.
- Measurements: Used to create a list of characteristics of captured signals. Includes a wide variety of different constant and dynamic values.
- Components: Lists spectral components of captured signals, sorted with respect to magnitude.
- Cursors: Lists all frequency reference cursors that have been added to the plot in table form. (See Section 3.3 of this guide for more information on reference cursors)
- Markers: Used to create and view marker labels, attached to a specific trace. Each marker represents a frequency/magnitude pair on a trace.
- Notes: Creates a text editor pane that can be used to document configuration choices, or whatever other information could be useful to remember.
For more guides on how to use the Digilent Test & Measurement Device, return to the device's Resource Center, linked from Instrumentation page of this wiki.
For more information on WaveForms visit the WaveForms Reference Manual.
For technical support, please visit the Scopes and Instruments section of the Digilent Forums.