This is an old revision of the document!


Using the Spectrum Analyzer (Under Construction)

Introduction

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.


Prerequisites

  • A Digilent Test & Measurement Device with Analog Input and Output Channels
  • A Computer with WaveForms Software Installed

1. Opening the Spectrum Analyzer

1.1

Plug in your Test & Measurement Device, then start WaveForms and make sure your 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.


1.2

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.


1.3

Once the Spectrum instrument opens, the window contains the plot plane, the Control Bar above the plot plane, and the Configuration Panel to the right of the plot plane.


2. Using the Spectrum Analyzer

This section walks through setting up the Spectrum Analyzer tool to analyze the frequency response of a simple signal.

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.1 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 amplitude (2V peak-to-peak) 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.

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 subsequent sections. With the Spectrum tool running, the plot should show a large “spike” at 0.5MHz (the 500kHz sine wave from the WaveGen 1 channel) peaking close to 0dBV with all other frequencies between -80dBV and -120dBV (electronic 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” button 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, deselect the “Quick Measure: Vertical” () button. Normal and delta cursors are available by clicking on the “Add Cursor” button 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. 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. Located on the left side of the Control Bar, the Single and Run control buttons 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 algorithm used to determine the spectral composition of the sampled waveform. By default, the “Frequency Range”, “Start Frequency”, “Stop Frequency”, and “Resolution” fields can be seen. These options also configure the x-axis of the plot.

Additional configuration options can be found by clicking on the drop down arrow to the right of these fields. These options include alternate Center/Span frequency range configuration parameters, Logarithmic/Linear scale select, and frequency bin count selector.

Clicking on the gear button allows the user to select the acquisition algorithm (FFT or CZT).


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 dropdown, 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 options button opens a menu that allows the user to configure the analog input channels and trigger condition. 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

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 drop down arrow to the right of the Channel text field. The “Hold” channel can be used to preserve previously-captured data in the plot, for comparison to newly-captured data.

The Type dropdown is used to select the how and when the acquired 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.

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, with the Channel option changed to “Hold” (see above).

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. The reference manual is also hosted on the Digilent Wiki at this link: WaveForms Reference Manual.


3.3 Plot Pane

The Plot pane displays the spectrogram, breaking down the captured signal by frequency components. 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). 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. The 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 the previous five 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 Reference Manual.

Vertical reference cursors can be added to the plot using the “X” button and dropdown in the lower left corner of the plot pane.


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 allows the user to produce 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. A list of each view in the menu is listed 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.
  • Logging: Allows the user to log captured data directly to a file, over multiple acquisitions. Includes a scripting interface (JavaScript) with examples.
  • Notes: Creates a text editor pane that can be used to document configuration choices, or whatever other information could be useful to remember.


Next Steps

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.