This is an old revision of the document!
Testing and evaluating power systems in industrial and communications settings often requires multiple voltage and current measurements. Individual supplies may be referenced to different grounds, have either positive or negative polarity, or may be galvanically isolated with respect to other power domains. Such scenarios necessitate either individual floating multimeters, or multichannel meters with per-channel isolation, which are physically cumbersome and expensive. The circuit shown in figure 1 is a complete, isolated current and voltage measurement system for industrial, telecommunications, instrumentation, and automated test equipment (ATE) applications. The system is galvanically isolated from the host controller and will tolerate up to +/-250V between the host computer and measurement system grounds. The current input range is +/-10 amps, and voltage input range is selectable between +/-16V and +/-80V. Both voltage and current inputs feature 16-bit resolution with adjustable output data rate and signal bandwidth, including modes that reject both 50Hz and 60Hz line noise. CN0548 is compatible with 3.3V and 5V Arduino form-factor platform boards. Isolation circuitry includes both digital data and power; no additional power source is required from the circuit being measured. The digital interface is SPI (Serial Peripheral Interface) with options for remapping the CS (chip select) signal for compatibility with additional stacked Arduino shields. When paired with the ADICUP3029 and open-source firmware example, application software can easily communicate with the CN0548 over the industry-standard Industrial Input/Output (IIO) libiio library, which includes bindings for C, C#, MATLAB, Python, and LabVIEW.
1. Connect the USB micro cable to EVAL-ADUCM3029 to PC. Unzipped the provided file folder “ad7799_prj.zip” and navigate to firmware “EVAL_CN0548_ARDZ.hex. Drag and drop the firmware on the DAPLINK folder.
2. Follow the figure below for the position of shunt jumpers for headers P1, P3, P10, P8, P9, and P11. Make sure that is set at 16V max input for the voltage sensing, follow jumper settings stated in the table below encircled in red for 16V maximum input.
4. Referring to step 1, where you uploaded the .hex file firmware to ADICUP3029. Now run the executable GUI “ad7799_py_new.exe” located inside “ad7799_app” folder. It will take for about a minute before the CN0548 app will show up on your PC display. Please see figure 6 for CN0548 GUI upon start. Once the application is running, determine the comport at your device manager window and type it in the “COMPort “ number. See figure below for device manager comport number. Then input the correct comport number then press “connect” button see figure 8 for successful connection.
A sample code for the board is already provided. The following is the list of items needed in order to run the given script.
The easiest way to get started with the CN0548 board is by using the pre-built hex file for the EVAL-ADICUP3029. Follow the steps provided:
For advanced applications, you may opt to build, compile, and debug the given project by installing the CrossCore Embedded Studio (CCES) environment. This method will allow you to explore the board capabilities in detail as well as have a customized project to fit your needs.
The software for the ADICUP3029_CN0548 demo can be found here:
Prebuilt CN0548 Hex File
Complete CN0548 Source Files
PyADI-IIO is a python abstraction module for ADI hardware with IIO drivers to make them easier to use. This module provides device-specific APIs built on top of the current libIIO python bindings. These interfaces try to match the driver naming as much as possible without the need to understand the complexities of libIIO and IIO.
Install PyADI-IIO using one of the methods in PyADI-IIO.
git clone https://github.com/analogdevicesinc/pyadi-iio.git
pip install -r requirements.txt
We will also be needing the matplotlib package for the plotting of data:
pip install matplotlib
python setup.py install
The sample code provided already comes with a number of useful features for the convenience of the user. Upon startup, it will provide a simple graphic aid in order to help the user configure the board jumpers for the user's desired specification. Aside from displaying the numerical readings of the board, the sample code already has built-in data logging and real-time plot features. It also has a memory feature that allows the user to reuse the configuration of the previous session and immediately start sensing data.
Below is a copy of the python script:
to be updated
The data logging feature allows the user to log all measurements into a csv file. If enabled, the csv file will be created in the same folder where the sample code is located and will follow the naming scheme CN0548_[timestamp]. However, the saving of data is slightly different when the plot window is enabled.
When the plot window is not utilized, new data measurements are immediately saved into the csv file as new data points are read from the board. On the other hand, when the plot window is active, data points will only be saved upon closing the plot window. This is done in order to facilitate a smoother environment. Note that premature termination of the program by directly closing the terminal will result to loss of data. This reminder is also displayed in the plot window whenever data logging is enabled.
The memory feature of the board allows the user to quickly configure the sample code using the setup from the previous session in order to begin sensing data immediately. This is done by saving all user input and creating a session_record text file in the same directory where the sample code is located. Note that the contents of the session record file is not encrypted and is easily understandable. Each line begins with a number which corresponds to a certain setting. For instance, 1 corresponds to the Unipolar voltage setting and 2 will correspond to the Bipolar voltage setting. Hence, if the user just wants to reconfigure a minor aspect of the setup (use tracking mode instead non-tracking, adjust the sampling rate, enable or disable data logging, etc.), the user can quickly reconfigure the sample code by editing the session_record file. The program is able to detect whether the set of specifications in the session record is valid or not. If the configuration set by the user is not valid, the program will still proceed as usual and will assume no session record file was detected.
If the user chooses to use the configuration loaded from the session record, the only query left to be answered is the port where the ADICUP3029 is attached. The program does not save the previous port used since the device might be connected in a different port of the machine.