This page gives an overview of using the ARM Mbed platform supported firmware example with Analog Devices AD4110 Evaluation board(s) and SDP-K1 controller board. This example code leverage the ADI developed IIO (Industrial Input Output) ecosystem to evaluate the AD4110 family devices by providing a device debug and data capture support.
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 (AD4110) 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 AD4110 IIO device. The AD4110-1 Eval board is used for development and testing of this application.
Please refer to the EVAL-AD4110-SDZ user guide. to know the jumper connections to the EVAL board
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. SDP-K1 can also support high speed VirtualCOM port UART interface if “USE_VIRTUAL_COM_PORT” macro is defined in the firmware (in app_config.h file).
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 (AD4110) 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 AD4110 device should pop-up in IIO devices list. Click 'Connect'.
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.
There firmware supports various demo modes- Voltage, Current, RTD, Field Power Supply and Thermocouple modes. The expected output quantity for each mode is as follows:
The demo modes shall be invoked by re-defining the ACTIVE_DEMO_MODE_CONFIG macro seen in the app_config.h. The list of permissible demo modes have been defined in the same file.
To capture the data from AD4110 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.
This tab is used to access the device registers in byte mode. Enter the register address in the 'Address' field and click on the 'Read' button to read the contents of the register, or 'Write' button in case of write to the chosen register.
Data capture can be achieved with clients other than the IIO Oscilloscope as well. A possible option using ADI's pyadi-iio library in python has been demonstrated in the forthcoming sections. The ad4110_data_capture.py is capable of achieving the same.
*Make sure to install additional support packages by running requirements.txt file using command “python -m pip install -r requirements.txt from “scripts/” directory”
While executing the ad4110_data_capture.py, the command prompt requests for the number of samples to be entered by the user.
On Entering the number of samples n, on successful completion of capturing n samples, the data points are stored in a csv as adc_data_capture.csv in the folder where the script is present.
The below block diagram shows the AD4110 IIO firmware layer. The firmware and the device together supports five different modes of operations - Voltage, Current, Field Power Supply, RTD and the Thermocouple mode.
This file can be used to:
This file defines the pin mappings for the peripherals for any mbed based board. The 'Arduino' connector has been enabled as the default. The macro definition 'ARDUINO' in the file header needs to be commented out in case the SDP-120 header on the SDP-K1 is to be used.
This file is included on selecting the Voltage Mode, which has been defined as the default mode.
This file is included on selecting the Current Mode configuration.
This file is included on selecting the Field Power Supply Mode configuration.
This file is included on selecting the RTD Mode configuration.
This file is included on selecting the RTD Mode configuration.
This file defines getter/setter functions for all the device and channel specific attributes (related to AD4110 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 AD4110 for visualizing ADC raw data on IIO oscilloscope.
The no-os drivers provide the high level abstracted layer for digital interface of AD4110 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: