Introduction: Analog Discovery 2 USB Oscilloscope + LabVIEW(2016 Update)
In this Instructable, we will go over how to connect an Analog Discovery 2 USB Oscilloscope to LabVIEW. To do so we will be using a LabVIEW project I made called LabForms. This project lets you access the analog scope and wavegen functionalities of the Analog Discovery through LabVIEW. The LabVIEW code uses the LabVIEW driver for the Analog Discovery 2. In this instructable I also walk you through the Labforms user interface, the goal of this project was to create a project similar to Digilent Waveforms in LabVIEW.
Step 1: Materials
NOTE: Installing LabVIEW requires you create an NI account. Your LabVIEW installation and any NI software keys you use will be tied to this account.
Step 2: Software Setup
Step 3: AD2 Setup
- Using some of the jumper pins supplied with the Analog Discovery to connect the Scope Channel 1 Positive (Orange Wire labeled “1+” ) to Waveform Generator 1 Positive (Yellow Wire labeled “W1”).
- Next, attach Scope Channel 2 Positive (Blue Wire labeled “2+” ) to Waveform Generator 2 Positive (Yellow and White Wire labeled “W2”).
- Attach Scope Channel 1 Negative(Orange and White Wire Labeled "1-") and Scope Channel 2 Negative (Blue and White Wire Labeled "2-") to the 2 ground wires(Black wires labeled with a downward arrow).
- Plug the Analog Discovery into one of your PC’s USB port.
Note: It is important you plug the Analog Discovery into your PCs USB port before you proceed to the next step.
Step 4: Waveform Generator
The Wavegen tab allows you to generate electronic waveforms. The resulting waveforms can be input into a device being tested and analyzed with the Oscilloscope as they progress through the device. This is useful for confirming the proper operation of the device or pinpointing a fault in the device.
- Channels: selects the channel(s) to be controlled. For every channel you select, a configuration form and a signal preview plot are displayed.
- Channel 1 is Waveform Generator channel 1
- Channel 2 is Waveform Generator channel 2.
Step 5: Power Supplies
This instrument allows you to enable the device power supplies.
- Master Enable is ON/OFF button: the master ON/OFF switch for the power supplies.
- Positive/Negative Supply button: the enable switches for each supply.
- Rdy is shown when the master switch is on and the supply is also enabled.
- OFF is shown when the supply is not enabled.
Step 6: Oscilloscope
An oscilloscope (or “scope”) allows you to view signal voltages, typically in a two-dimensional graph where one or more electrical potential differences (on the vertical axis) are plotted as a function of time or of some other voltage (on the horizontal axis).
Use the real channel (vertical controls) to position and scale the waveforms vertically using the offset and range controls for each channel.
- Offset: The offset (vertical position) control lets you move the waveform up or down to exactly where you want it on the screen. The offset is the voltage difference between the center line of the oscilloscope screen and the actual ground. This difference is generated by an internal offset voltage source.
- Range: The range (volts/division) controls to determine the vertical scale of the graph drawn on the oscilloscope screen. The volts/div setting is a scale factor. For example, if the volts/div setting is 2 volts, then each of the ten vertical divisions represents 2 volts, and the entire screen can show 20 volts from bottom to top. If the setting is 0.5 volts/div, the screen can display 5 volts from bottom to top, and so on. The maximum voltage you can display on the screen is the volts/div setting multiplied by the number of vertical divisions.
Base: The time base (seconds/division) setting from the channel configuration toolbar lets you select the rate at which the waveform is drawn across the screen. This setting is a scale factor. For example, if the setting is 1 ms, each horizontal division represents 1 ms and the total screen width represents 10 ms (ten divisions). Changing the sec/div setting allows you to visualize longer or shorter time intervals of the input signal.
Sample Rate: Adjusts the sampling frequency.
- Trigger level: specifies, in volts, the levels at which to trigger
- Trigger Instance: specifies the trigger instance. This parameter accepts only A as an input
- Trigger Slope: Specifies on which edge of the source signal to trigger
- Trigger Hysteresis: specifies, in volts, a window below Trigger level.
- If the edge is rising, the input voltage must pass below Trigger Level minus Trigger Hysteresis before the input voltage is recognized as a trigger.
- Hysteresis can improve measurement accuracy when the signal contains noise or jitter.
The Cursors are used to measure the amplitude, to indicate certain places on the waveform. Using delta cursors, you can make measurements that deal with power change with frequency or time.
These can be added by switching on the "Cursor 1" or "Cursor 2" switches" above the plot. The first cursor is by default added as a normal cursor, if you turn on both cursors you will not only see the X and Y position of each cursor, but you will also see the Delta, showing the difference between the position of each cursor. The cursors position can be modified by mouse drag.
Step 7: The End
Thank you for reading my instructable, if you are interested in making this project yourself but don't have the right supplies you can purchase LabVIEW 2014 home bundle for only 50 dollars and if you are a student the Analog Discovery 2 has an academic discount available. Please comment with any questions or comments you may have.