This version (04 Feb 2022 08:47) was approved by Harvey John De Chavez.The Previously approved version (04 Feb 2022 08:05) is available.Diff

EVAL-CN0548-ARDZ Shield Overview

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 EVAL-CN0548-ARDZ 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. 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.


  • Absolute maximum input rating of 80V, 14A
  • Configurable voltage and current setting
  • 16-bit ADC resolution with adjustable output data rate
  • Serial peripheral interface (SPI) digital output
  • Galvanic isolation from host controller
  • 3.3V and 5V compatible
  • Arduino form factor
  • Chip Select (CS) remappable (can be stacked with other shields)

Simplified Block Diagram

 CN0548 Block Diagram

Onboard Configuration

Configuring the Input Voltage Polarity and Current Direction

Before using the CN0548, the user must know the expected inputs and configure the board accordingly. The polarity as well as the direction of the inputs is an important aspect that should be noted by the user. Below is a table showing the maximum input rating depending on the configuration.

Mode Minimum Input Maximum Input
Unipolar 0V 80V
Bipolar -40V 40V
Unidirectional 0A 14A
Bidirectional -10A 10A

Jumper connections P12 and P13 configure the input current setting while jumpers P7 and P14 configure the input voltage setting. For a unipolar and unidirectional setting, the jumpers should be shorted to the GND pin. On the other hand, it should be connected to the 2.048V pin for a bipolar and bidirectional setting,.

Configuring the Absolute Input Voltage Range

The CN0548 is equipped with a precision wide voltage range gain selectable attenuating difference amplifier allowing it to have an adjustable input voltage range feature. The onboard jumpers P1, P3, P10, P8, P9, P11 should be configured accordingly to the desired maximum voltage range for a finer voltage resolution.

Shown here is guide on how to configure the gain jumpers. Using this guide, it can be inferred that the above sample jumper configuration corresponds to a maximum input voltage range of 16V.

Max Range P1 P3 P10 P8 P9 P11
80V Open Vin- Vin+ Open Vin+ Vin-
40V Vin+ Open Open Vin- Open Open
27V Vin- Open Vin+ Vin+ Open Vin-
20V Open Vin+ Open Open Vin- Open
16V Open Open Vin+ Open Open Vin-

Chip Select

As mentioned in the Features section earlier, the CN0548 has a remappable Chip Select feature allowing the board to be stacked with other shields. By default, jumper P15 is shunted but this can be modified accordingly depending on the shields stacked and the user's application.

Demo Requirements

A sample code for the board is already provided. The following is the list of items needed in order to run the given script.


  • EVAL-CN0548-ARDZ
  • Micro USB to USB cable
  • PC or Laptop with a USB port


Setting up the Hardware

  1. Attach the EVAL-CN0548-ARDZ shield to the EVAL-ADICUP3029 .
  2. Connect a micro-USB cable to the P10 connector of the EVAL-ADICUP3029 and connect it to a computer.

Flashing the Firmware/Program

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:

  1. Make sure that the on-board switches of the EVAL-ADICUP3029 are configured as shown on the table below:
  2. Connect the ADICUP3029 to the PC host via micro-USB cable.
  3. From the PC, open My Computer and look for the DAPLINK drive, if you see this then the drivers are complete and correct.
  4. Download the .hex file from the provided link below. Make sure to use the hex file corresponding to the input mode you configured. Simply drag and drop the .hex file to the DAPLINK drive in order to upload the program to the ADICUP3029. The DS2 (red) LED will blink rapidly. It will stop blinking and will stay ON once the uploading is done.
  5. Disconnect then reconnect the EVAL-ADICUP3029 to the host computer.

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:

Using CrossCore Embedded Studio

  1. Open CrossCore Embedded Studio and import the project into your workspace as detailed in cces_user_guide. This allows you to edit the software to fit your requirements.

    If this is your first time using CrossCore Embedded Studio, check the user guide to get you started

  2. Once ready, you can opt to generate your own .hex file and use the first method to program the EVAL-ADICUP3029 or you can use a debug session by following the quickstart guide.

Code Snippet from the CCES Project

In case you want to generate your own hex file to be used, there are two attributes from the AD7798/AD7799 family that you should note — the polarity and the gain.
 CCES code snippet
It is important to set the polarity of the ADC according to your configuration and application. When the polarity is set to unipolar, effectively restricting the user to follow the polarity of the terminals, the maximum bit resolution of the ADC is used in its conversion compared as to when the polarity is set to bipolar where the bit resolution is equal to (n-1) bits where n is the maximum bit resolution of the ADC.

The other important attribute is the gain. The gain attribute corresponds to the internal gain of the ADC. A user can apply an internal gain to the ADC allowing the differential ADC input to be amplified. This feature can come in handy when dealing with small signals but the user must take precaution as applying an internal gain effectively decreases the input rating of the board. It is highly recommended to read and consult the datasheet of the ADC before creating a customized hex file.


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.

Not yet familiar with PyADI-IIO? Click here to get started

Running the Example

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.

Starting a new session

  1. Download the given python script below and note where the file is located, you may opt to relocate the file to a different folder or directory. Using a terminal, navigate to the location of the file and run the script.

    Python script:

  1. Upon running the script, some general reminders regarding the board usage will be displayed. Make sure to read these reminders before proceeding. Press the Enter key to proceed.
  2. As mentioned earlier, the board has a memory feature that allows the user to quickly configure the sample code using the configuration from the last session. The user can decide whether to reuse the previous setting or set up a new configuration. The next items will discuss the program flow given that no session record file is found i.e. first run of the sample code.

  3. The user will be asked to specify the expected voltage and current inputs i.e. whether unipolar or bipolar for the voltage and unidirectional or bidirectional for the current. In a separate window, a jumper map will be created corresponding to the voltage and current setting specified by the user.
    You may close the jumper window upon configuring the board jumpers.

  4. After the board jumper configuration guide, the program will now begin its software configuration related queries. The table below shows the aspects that the user must configure.
  5. Lastly, the sample code will ask the user for the port where the ADICUP3029 is connected. If the port is found, the sample code is now ready to parse readings from the board. Press Enter key to start board operation.

    Regardless of whether the plot window is enabled or not, the board readings will be continuously displayed in the terminal.

    In the next two figures, the CN0548 was used to monitor the performance of a 5V regulator. The first figure shows a plot in tracking mode where all data points are displayed. The second figure on the other hand is in non-tracking mode where the last 50 samples are being displayed.

    Tracking Mode:
    Non-tracking Mode:
    Tracking mode allows the user to observe the overall characteristic of the signal being measured. However, it should be noted that the plot will continue to compress as more data points are added. Non-tracking mode on the other hand allows a more refined view as it only shows the most recent measurements as desired by the user.
Do note that the plot windows are created using the matplotlib package of python. Hence, you have the option to save a copy of the displayed waveform at any point in time. This comes in handy when an unexpected noteworthy event happens and the data logging feature was not enabled.

Data Logging

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]. Data is automatically written upon parsing. Hence, even if the program is prematurely terminated, all parsed data are recorded.

Memory Feature

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-Unidirectional mode and 2 will correspond to the Bipolar-Bidirectional mode. 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.

Video Guides



Running the Sample Script


Schematic, Layout, Bill of Materials

CN0548 Design & Integration Files

  • Schematic
  • Bill of Materials
  • Gerber Files
  • Allegro Project


Receive software update notifications, documentation updates, view the latest videos, and more when you register your hardware. Register to receive all these great benefits and more!

resources/eval/user-guides/circuits-from-the-lab/cn0548.txt · Last modified: 04 Feb 2022 08:10 by Harvey John De Chavez