Introduction: Analog Discovery 2 USB Oscilloscope + LabVIEW(2016 Update)

Picture of 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

Picture of Materials

Hardware

Software

fw4f9eaiscbo0yr-medium

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

Picture of Software Setup
  1. Install WaveForm
  2. Install LabVIEW
    • Installing LabVIEW will allow you to both run and edit the LabForms project.
  3. Download and install the LabVIEW driver for the Analog Discovery 2
  4. Download LabForms2.vi (attached below)

Step 3: AD2 Setup

Picture of AD2 Setup
  1. 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”).
  2. Next, attach Scope Channel 2 Positive (Blue Wire labeled “2+” ) to Waveform Generator 2 Positive (Yellow and White Wire labeled “W2”).
  3. 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).
  4. Plug the Analog Discovery into one of your PC’s USB port.fvd74wxiscbo20e-medium

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

Picture of 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.

screen-shot-2016-09-15-at-10-05-20-am

  • 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.
  • Waveform Function: represents the standard signal types: DC, Sine, Square, Triangle.
  • Frequency: adjusts the generated waveform period.
  • Amplitude: shows the amplitude for the Carrier signal.
  • DC Offset: adjust the offset in volt units.
  • Duty Cycle: Specifies the percentage of time the waveform is in an active state.

Step 5: Power Supplies

Picture of Power Supplies

This instrument allows you to enable the device power supplies.

screen-shot-2016-09-15-at-10-04-34-am

  • 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.
  • Voltage fields: let you adjust values for the power supplies by either selecting a value from combo box, or typing it in.

Step 6: Oscilloscope

Picture of 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).

screen-shot-2016-09-15-at-10-02-52-am

Channels

Use the real channel (vertical controls) to position and scale the waveforms vertically using the offset and range controls for each channel.

screen-shot-2016-09-15-at-10-25-49-amscreen-shot-2016-09-15-at-10-25-57-am

  • 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.

Time group

screen-shot-2016-09-15-at-10-25-33-am

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.

Triggers

screen-shot-2016-09-15-at-10-25-14-am

  • 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.

Cursors

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.

screen-shot-2016-09-15-at-10-25-24-am

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

Picture of 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.

Comments

About This Instructable

3,541views

34favorites

License:

Bio: I graduated from Washington State University with a degree in Bioengineering.
More by Austin Stanton:LIRC - LabVIEW - Remote ReplacementLIRC - LabVIEW - Raspberry PiLIRC - LabVIEW - Sending a Remote Command From LabVIEW
Add instructable to: