Wiki

This version is outdated by a newer approved version.DiffThis version (10 Jun 2021 09:28) is a draft.
Approvals: 0/1

This is an old revision of the document!


EVAL-CN0552-PMDZ Overview

The EVAL-CN0552-PMDZ is a PMOD form-factor evaluation board for the AD7746, a high resolution, Σ-Δ capacitance-to-digital converter (CDC). The architecture features inherent high resolution (24-bit no missing codes, up to 21-bit effective resolution), high linearity (±0.01%), and high accuracy (±4 fF factory calibrated).

Figure 1. EVAL-CN0552-PMDZ

The AD7746 has two capacitive inputs with each channel can be configured as single-ended or differential. The capacitance input range is ±4pF (changing), while it can accept up to 17pF common-mode capacitance (not changing), which can be balanced by a programmable on-chip, digital-to-capacitance converter (CAPDAC).

Figure 2. AD7746 Block Diagram

The AD7746 communicates via a 2-wire, I2C-compatible serial interface. It can operate with a single power supply from 2.7V to 5.25V.

Figure 3. I2C Connection

The Digital communication on the EVAL-CN0552-PMDZ is accomplished using a new standard I2C PMOD port.

Connector P2
Description Pin(s)
INT 1
RST 2
SCL 3
SDA 4
GND 5
IOVDD 6

Features

  • New standard in single chip solutions
  • Interfaces to single or differential floating sensors
  • Resolution down to 4aF (that is, up to 21 ENOB)
  • Accuracy: 4fF
  • Linearity: 0.01%
  • Common mode (not changing) capacitance up to 17pF
  • Full-scale (changing) capacitance range: ±4pF
  • Tolerant of parasitic capacitance to ground up to 60pF
  • Update rate: 10Hz to 90Hz
  • Simultaneous 50Hz and 60Hz rejection at 16Hz

Device Driver Support

There are two device driver solutions that are provided for controlling the EVAL-CN0552-PMDZ using the no-OS device driver on the EVAL-ADICUP3029 platform and Linux device driver on the Raspberry Pi platform.

1. EVAL-ADICUP3029

  • The ADICUP3029 example application uses the AD7746 no-OS driver and emulates the Linux IIO framework through the tinyiiod daemon library. The application communicates with the host computer via the serial backend, over a USB-UART physical connection. This facilitates rapid application development on a host computer, independent from embedded code development.

2. Raspberry Pi

  • The Linux driver uses the Industrial Input/Output (IIO) framework, greatly simplifying the development of application code via the cross-platform Libiio library, which is written in C and includes bindings for Python, MATLAB, C#, and other languages. Application code can run directly on the platform board, communicating with the device over the local backend, or from a remote host over the network or USB backends.

Similarly, utility software such as iio_info, IIO Oscilloscope, PyADI-IIO, and etc. can be used for both the EVAL-CN0552-PMDZ on Raspberry PI and on ADICUP3029.

General Setup Using ADICUP3029

The EVAL-CN0552-PMDZ can be used with ADICUP3029.

Figure 4. Software Architecture

Demo Requirements

The following is the list of items needed in order to replicate this demo.

  • Hardware
    • EVAL-ADICUP3029
    • EVAL-CN0552-PMDZ
    • Micro-USB to USB Cable
    • PC or Laptop with USB Port
  • Software

There are two basic ways to program the ADICUP3029 with the software for the CN0552.

  1. Dragging and Dropping the .Hex to the Daplink drive
  2. Building, Compiling, and Debugging using CCES


Using the drag and drop method, the software is going to be a version that Analog Devices creates for testing and evaluation purposes. This is the EASIEST way to get started with the reference design.

Importing the project into CrossCore is going to allow you to change parameters and customize the software to fit your needs, but will be a bit more advanced and will require you to download the CrossCore toolchain.

The software for the ADICUP3029_CN0552 demo can be found here:

Prebuilt CN0552 Hex File

Complete CN0552 Source Files

To build the project from source, follow the instructions in the no-os wiki.

Setting up the Hardware

  1. Connect EVAL-CN0552-PMDZ board at connector P9 of the EVAL-ADICUP3029.
  2. Connect a micro-USB cable to the P10 connector of the EVAL-ADICUP3029 and connect it to a computer. The final setup should look similar to the picture below.

Figure 5. Hardware Setup

Flashing the Firmware/Program

  1. Make sure the following switches are as shown from the table below:
  2. Connect the ADICuP3029 to the PC host via micro-USB cable as shown below. Figure 6. Switch Confuguration
  3. From your PC, open My Computer and look for the DAPLINK drive, if you see this then the drivers are complete and correct.  Figure 7. DAPLINK Drive
  4. Simply extract the provided zip file. Once extracted, you will see the pre-built hex file for the CN0552 demo. Then drag and drop this Hex file to the DAPLINK drive and your ADICUP3029 board will be programmed. The DS2 (red) LED will blink rapidly.
  5. The DS2 will stop blinking and will stay ON once the programming is done.

General Setup Using Raspberry Pi

The EVAL-CN0552-PMDZ can be used with a Raspberry Pi.

Demo Requirements

The following is a list of items needed in order to replicate this demo.

  • Hardware
    • EVAL-CN0552-PMDZ
    • Raspberry PI Zero, Zero W, 3B+, or 4
    • 16GB (or larger) Class 10 (or faster) micro-SD card
    • 5Vdc, 2.5A power supply with micro USB connector (USB-C power supply for Raspberry Pi 4)
    • Electrical connection hardware (choose one):
    • User interface setup (choose one):
      • HDMI monitor, keyboard, mouse plugged directly into Raspberry Pi
      • Host Windows/Linux/Mac computer on the same network as Raspberry Pi

Loading Image on SD Card

In order to control the EVAL-CN0552-PMDZ from the Raspberry Pi, you will need to install ADI Kuiper Linux on an SD card. Complete instructions, including where to download the SD card image, how to write it to the SD card, and how to configure the system are provided at Analog Devices Kuiper Linux.
Write the image and follow the system configuration procedure.

Configuring the SD Card

Follow the Hardware Configuration procedure under Preparing the Image: Raspberry Pi in the Analog Devices Kuiper Linux page, substituting the following lines in config.txt:

dtoverlay=rpi-cn0552

Setting up the Hardware

To set up the circuit for evaluation, consider the following steps:

Do note that the I/O pins of the Raspberry Pi board are only 3.3V tolerant. Any peripheral to be attached should be powered by a source not exceeding 3.3V.
  1. Connect EVAL-CN0552-PMDZ board at male header connector of the Raspberry Pi.
  2. Burn the SD card with the proper ADI Kuiper Linux image. Insert the burned SD card on the designated slot on the RPi.
  3. Connect the system to a monitor using an HDMI cable through the mini HDMI connector on the RPi.
  4. Connect a USB keyboard and mouse to the RPi through the USB ports.
  5. Power on the RPi board by plugging in a 5V power supply with a micro-USB connector. The final setup should look similar to the picture below.

Software (both ADICUP3029 and Raspberry Pi)

Connection

To be able to connect your device, the software must be able to create a context. The context creation in the software depends on the backend used to connect to the device as well as the platform where the EVAL-CN0552-PMDZ is attached. Two platforms are currently supported for the CN0552: Raspberry Pi using the ADI Kuiper Linux and the ADICUP3029 running the no-OS AD7746 demo project. The user needs to supply a URI which will be used in the context creation.

The Libiio is a library for interfacing with IIO devices.

Install the Libiio package on your machine.

The iio_info command is a part of the libIIO package that reports all IIO attributes.

Upon installation, simply enter the command on the terminal command line to access it.

For RPI Direct Local Access:

iio_info


For Windows machine connected to Raspberry Pi:

iio_info -u ip:<ip address of your ip>

Example:

  • If your Raspberry Pi has the IP address 192.168.1.7, you have to use iio_info -u ip::192.168.1.7 as your URI
Do note that the Windows machine and the RPI board should be connected to the same network in order for the machine to detect the device.

For Windows machine connected to ADICUP3029:

iio_info -u serial:<serial port>

Examples:

  • In a Windows machine, you can check the port of your ADICUP3029 via Device Manager in the Ports (COM & LPT) section. If your device is in COM4, you have to use iio_info -u serial:COM4 as your URI.
  • In a Unix-based machine, you will see it under the /dev/ directory in this format “ttyUSBn”, where n is a number depending on how many serial USB devices attached. If you see that your device is ttyUSB0, you have to use serial:/dev/ttyUSB0 as your URI.

IIO Commands

There are different commands that can be used to manage the device being used. The iio_attr command reads and writes IIO attributes.

analog@analog:~$ iio_attr [OPTION]...

Example:

  • To look at the context attributes, enter this code on the terminal:
analog@analog:~$ iio_attr -a -C


The iio_reg command reads or writes SPI or I2C registers in an IIO device. This is generally not needed for end applications, but can be useful in debugging drivers. Note that you need to specify a context using the -u qualifier when you are not directly accessing the device via RPI or when you are using the ADICUP3029 platform.

analog@analog:~$ iio_reg -u <context> <device> <register> [<value>]

Example:

  • To to read the device ID (register = 0x02) of an AD7746 interfaced via RPI from a Windows machine, enter the following code on the terminal:
iio_reg -u ip:<ip address> ad7746 0x02


IIO Oscilloscope

Make sure to download/update to the latest version of IIO-Oscilloscope found on this linkhttps://github.com/analogdevicesinc/iio-oscilloscope/releases
  1. Once done with the installation or an update of the latest IIO-Oscilloscope, open the application. The user needs to supply a URI which will be used in the context creation of the IIO Oscilloscope and the instructions can be seen from the previous section.
  2. Press refresh to display available IIO Devices, once ad7746 appeared, press connect.

 AD7746 Oscilloscope Configuration

Debug Panel

Below is the Debug panel of AD7746 wherein you can directly access the attributes of the device.  AD7746 Debug Panel

DMM Panel

Access the DMM panel to see the instantaneous reading of the input capacitances and the device temperature.  AD7746 DMM Panel

PyADI-IIO

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.

Follow the step-by-step procedure on how to install, configure, and set up PYADI-IIO and install the necessary packages/modules needed by referring to this link.

Running the example

After installing and configuring PYADI-IIO in your machine, you are now ready to run python script examples. In our case, run the ad7746.py found in the examples folder.

 (cn0552) D:\pyadi-iio>python examples/ad7746.py 

Press enter and you will get these readings.

Schematic, PCB Layout, Bill of Materials

EVAL-CN0552-PMDZ Design & Integration Files

  • Schematics
  • PCB Layout
  • Bill of Materials
  • Allegro Project
  • <ADD other things specific to your project if desired>

Reference Demos & Software

End of Document

resources/eval/user-guides/circuits-from-the-lab/cn0552.1623310091.txt.gz · Last modified: 10 Jun 2021 09:28 by Zuedmar Arceo