This project demonstrates how to use the Analog Discovery Pro in Linux mode to run the automated test on Digilent PmodAD5, an SPI-enabled analog to digital converter (ADC). The test is utilized Digilent WaveForms Software Development Kit (SDK) to measure analog signals going into the Pmod AD5 and SPI controls to read data out, comparing the two results.
The ADP3450 ADP3450 and ADP3250ADP3250 are the first in the line of Analog Discovery Pro devices and take the analog and digital instruments from the internationally popular Analog Discovery and turn up key functionalities to meet the growing need for professional-level home electronics test benches. At the heart of each device is a four or two-channel high-resolution oscilloscope, offering 14-bit resolution at up to 0.5 GS/s. Additionally, to meet the needs of an increasingly digital world, 16 dedicated digital channels make the Analog Discovery Pro a true mixed-signal oscilloscope. With the included digital power supply, digital outputs, two-channel arbitrary waveform generator, and two dedicated external triggers the Analog Discovery Pro come with 12 instruments ready to analyze mixed-signal systems through our free software, WaveForms. For this project, besides the Analog Discovery Pro, Pmod AD5 is used. The Pmod AD5 Pmod AD5 is an analog-to-digital converter that utilizes a fourth-order sigma-delta modulator, a programmable gain array, and on-chip digital filtering, all powered by the Analog Devices AD7193.
Hardware Set-up
Plug the BNC connector of the scope probe into Oscilloscope Channel 1 and the MTE cable into the digital MTE connector. Connect the DIO channels, ground, and VIO from the Analog Discovery Pro to the PmodAD5 as shown in the below image. Connect the Analog Discovery Pro to a host computer via USB. The DIO channel connections are provided for reference below.
- DIO0 connected to pin 1 on the Pmod AD5
- DIO1 connected to pin 4 on the Pmod AD5
- DIO2 connected to pin 2 on the Pmod AD5
- DIO3 connected to pin 3 on the Pmod AD5
Software Configuration
Open Digilent WaveForms and select Linux mode. We are going to use the terminal emulator (e.g. PuTTY or TeraTerm), so you need to find out which serial port is connected to Analog Discovery Pro in the host computer. The serial port needs to be configured as 115200 Baud, 8 data, 1 stop, and no parity bits. The test script file is ready to be downloaded on Digilent reference page. Put the downloaded file on a USB drive. Then, plug the drive into the USB host (at the back of the Analog Discovery Pro). Next, you can find the path of the USB drive and mount it in the terminal emulator.
How does the test work?
The test is written in Python. In the beginning, various instruments in Analog Discovery Pro are initialized and the Pmod AD5 is configured and calibrated. The test is started by beginning an analog acquisition to measure the voltage at the thermocouple junction. With the acquisition underway, the ADC is instructed to perform a conversion. The data given by the PmodAD5 is converted into proper voltage values and the average of the acquired samples is calculated before the result is displayed. The test runs continuously until Ctrl+C is pressed and the device is closed.
When you run the script in Python, it issues a read command over SPI, records the results, and continues to the next voltage until there are none left.
Get the project details and the documented script on the Digilent Reference Page.