This page gives an overview of using the ARM Mbed platform supported firmware example with Analog Devices AD7606 Evaluation board(s) and SDP-K1 controller board. This example code leverage the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD7606 family devices by providing a device debug and data capture support.
The overview of an entire system is shown below:
IIO oscilloscope is used as client application running on windows-os, which is ADI developed GUI for ADC data visualization and device debug. The interface used for communicating client application with firmware application (IIO device) is UART (Note: SDP-K1 can also support high speed VirtualCOM port @1Mbps or higher speed for faster data transmission). The firmware application communicates with IIO device (AD7606) using ADI No-OS drivers and platform drivers low level software layers. SDP-K1 is used as controller board, on which IIO firmware application runs and using above software libraries, the IIO firmware communicates with AD7606 IIO device. The AD7606B Eval board is used for development and testing of this application.
The AD7606 device is configured in “Serial Software” mode in the firmware. AD7606 uses SPI communication for device register access and data capture.
SDP-K1 is powered through USB connection from the computer. SDP-K1 acts as a Serial device when connected to PC, which creates a COM Port to connect to IIO Oscilloscope GUI running on windows-os. The COM port assigned to a device can be seen through the device manager for windows based OS.
Latest firmware (Use below link):
If you have some familiarity with the Mbed platform, the following is a basic list of steps required to start running the code, see below for more detail:
This library provides an abstracted library interface to communicate IIO device (AD7606) and IIO client application (IIO Oscilloscope) without worrying about the low level hardware details. Download and install below Libiio windows installer in your computer.
Libiio installer for Windows (Use below link):
This is a GUI (Graphical User Interface) based IIO client application for data visualization and device configuration/debugging. The data from IIO devices (ADCs/DACs) is transmitted over Serial/Ethernet/USB link to IIO Oscilloscope client through the abstracted layer of “libiio”. Download and install below IIO Oscilloscope windows installer in your computer.
IIO Oscilloscope installer for Windows (Use below link):
Open the IIO Oscilloscope application from start menu and configure the serial (UART) settings as shown below. Click on refresh button and AD7606 device should pop-up in IIO devices list. Click 'Connect' and select the AD7606 device from the drop down menu list of 'Device Selection'.
The IIO Oscilloscope allows user to access and configure different device parameters, called as 'Device Attributes“. There are 2 types of attributes:
How to read and write attribute:
DMM tab can be used read the instantaneous voltage applied on analog input channels. Simply select the device and channels to read and press start button.
*Note: The voltage is just instantaneous, so it is not possible to get RMS AC voltage or averaged DC voltage. Also, when using DMM tab, it is not encouraged to use Data Capture or Debug tab as this could impact data capturing.
To capture the data from AD7606 IIO device, simply select the device and channels to read/capture data. The data is plotted as “ADC Raw Value” Vs “Number of Samples” and is just used for Visualization. The data is read as is from device without any processing. If user wants to process the data, it must be done externally by capturing data from the Serial link on controller board.
*Note: The DMM or Debug tab should not be accessed when capturing data as this would impact data capturing.
ADC gain calibration can be done in 3 easy steps as mentioned below. The gain calibration needs to be done for selected gain filter register as specified in the datasheet (refer 'System Gain Calibration' section from the AD7606B/C datasheet). The gain calibration can be done for each channel depending upon the filter resistor placed in series with each channel analog input.
Reference: File: iio_ad7606.c, Function: get_chn_calibrate_adc_gain()
ADC offset calibration should only be done when ADC input is 0V. The purpose is to reduce any offset error from the input when analog input is at 0V level. The ADC offset calibration can be done for each input channel.
To perform ADC offset calibration, select the 'calibrate_adc_offset' attribute. It should automatically perform the calibration. Also, if 'Read' button is pressed, the calibration should happen one more time.
Reference: File: iio_ad7606.c, Function: get_chn_calibrate_adc_offset()
AD7606B device provides an open circuit detection feature for detecting the open circuit on each analog input channel of ADC.
There are 2 modes to detect open circuit on analog inputs (Refer AD7606B datasheet for more details):
The manual open circuit detection needs 'Rpd' to be placed at analog input as shown in figure below. The firmware is written to perform the open circuit detection @50Kohm of Rpd value. The common mode change threshold has been defined as 15 ADC count in the firmware at above specified configurations (as specified in the datasheet).
Reference: File: iio_ad7606.c, Function: get_chn_open_circuit_detect_manual()
The auto open circuit detection on each individual ADC channel can be done by performing 3 easy steps mentioned in below screenshot.
Reference: File: iio_ad7606.c, Function: get_chn_open_circuit_detect_auto()
Using diagnostic multiplexer on AD7606B/C devices, the internal analog inputs can be sampled to provide a diagnostic voltages and parameters on IIO client application such as reference voltage (vref), DLO voltage (ALDO/DLDO), temperature and drive voltage (vdrive).
*Note: The diagnostic mux control must operate when input range is +/-10V
This file can be used to:
This file defines the user configurations for the AD7606, such as SPI parameters (frequency, mode, etc) and other init parameters used by No-OS drivers to initialize AD7606 device (e.g. required GPIOs, software/hardware mode, etc). These are the parameters loaded into device when device is powered-up or power-cycled.
This file defines getter/setter functions for all the device and channel specific attributes (related to AD7606 devices) to read/write the device parameters. The majority of device specific functionality is present in this module.
This file defines the data capture implementation of AD7606 for visualizing adc raw data on IIO oscilloscope.
The no-os drivers provide the high level abstracted layer for digital interface of AD7606 devices. The complete digital interface (to access memory map and perform data read) is done in integration with platform drivers.
The functionality related with no-os drivers is covered in below 2 files: