Introduction

     I have a module on an ADS1256 chip. I bought this module for experimenting with homemade geophones. But since spare parts for geophones will be arriving for a long time, I decided to experiment with this module on Arduino and try to assemble an oscilloscope.

 

Description of the ADS1256 chip (Description taken from datasheet)

     The ADS1256 is an extremely low noise 24-bit 4th order delta-sigma (A/D) converter. The amplifier (PGA) also provides gain from 1 to 64 in binary steps. The programmable filter optimizes between a resolution of up to 23 bits without interference and a data rate of up to 30K samples per second (SPS). Communication is carried out via SPI.

 

Description of the module on ADS1256

     1. Module diagram:

 

     2. Module characteristics:

    • On-board ADR03 2.5V datum voltage source chips
    • Data output rates up to 30ksps, nonlinearity is low to ±0.0010%
    • The module can be configured as either 8 single-ended inputs or 4 differential inputs
    • ADS1256 module is suitable for measuring analog voltage within 3V
    • Module operating voltage is 5V

 

 

     3. Pins description:

 

PinDescription
5v5V power input
GNDGround
SCLK(Serial Clock) clock signal.
DIN(SPI communication Interface) MISO
DOUT(SPI communication Interface) MOSI
DRDYADS1256 data be ready output (Active low level)
CS(SPI communication Interface) Chip Select
PDWNADS1256 Sync / Turn off the power input (Active low level)
AIN0-AIN7Analog voltage input, it can be configured as either 8 single-ended inputs or 4 differential inputs

 

     4. Precautions:

     Because the voltage of ADS1256 is 5V, and the measured voltage should be 2V below the supply voltage, so the module is only suitable for measuring analog voltages within 3V.

 

Connecting to Arduino

I used the Arduino UNO board, the table shows which pins to connect the module to.

ADS1256 ModuleArduino UNO
5v5v
GNDGND
SCLKpin 13 (SCK)
DINpin 11 (MOSI)
DOUTpin 12 (MISO)
DRDYpin 9
CSpin 10

 

Code

     For this example, you will have to download the ADS1256.h and ADS1256.cpp libraries (https://github.com/adienakhmad/ADS1256). The module has a 7.68 MHz quartz resonator, so we indicate this in the clockMHZ variable and in the vRef variable we indicate the reference voltage, it should be 2.5 volts.

 

#include <SPI.h>
#include "ADS1256.h"

float clockMHZ = 7.68;
float vRef = 2.5;

ADS1256 adc(clockMHZ,vRef,false);

float channel1;

void setup()
{
  Serial.begin(115200);

  // Start the ADS1256 with data rate of 15 SPS
  // Other data rates: 
  // ADS1256_DRATE_30000SPS
  // ADS1256_DRATE_15000SPS
  // ADS1256_DRATE_7500SPS
  // ADS1256_DRATE_3750SPS
  // ADS1256_DRATE_2000SPS
  // ADS1256_DRATE_1000SPS
  // ADS1256_DRATE_500SPS
  // ADS1256_DRATE_100SPS
  // ADS1256_DRATE_60SPS
  // ADS1256_DRATE_50SPS
  // ADS1256_DRATE_30SPS
  // ADS1256_DRATE_25SPS
  // ADS1256_DRATE_15SPS
  // ADS1256_DRATE_10SPS
  // ADS1256_DRATE_5SPS
  // ADS1256_DRATE_2_5SPS
  // 
  /* 
     NOTE : Data Rate vary depending on crystal frequency. 
            Data rates listed below assumes the crystal frequency is 7.68Mhz 
            for other frequency consult the datasheet.    
  */
  //Posible Gains: 
  //ADS1256_GAIN_1 
  //ADS1256_GAIN_2 
  //ADS1256_GAIN_4 
  //ADS1256_GAIN_8 
  //ADS1256_GAIN_16 
  //ADS1256_GAIN_32 
  //ADS1256_GAIN_64
  adc.begin(ADS1256_DRATE_2000SPS,ADS1256_GAIN_1,false); 
}

void loop()
{ 
  adc.waitDRDY();
  adc.setChannel(0,1);
  channel1 = adc.readCurrentChannel();

  Serial.println(channel1,10);
}

 

    

     I searched the Internet for a long time for a program for outputting data and in the end settled on the PowerGraph program from the Disoft company. The site has a paid and a free version. In principle, this software for industrial use operates in the recorder mode and in the pure oscilloscope mode. This program is designed for:

1. Collecting data from various measuring devices and instruments.

2. Registration, visualization and processing of signals in real time.

3. Editing, mathematical processing and analysis of data.

4. Storage, import and export of data.

This is a small part of what she can do. Also in this program there is a driver for outputting information with COM, it's time.

 

     When the program starts, the device selection window pops up, select the COM port. And in the list of ports we select the port to which the Arduino is connected, I have this COM3.

 

In the lower right corner, press the start button and the data will be immediately displayed in the main window.

 

Links:

Datasheet ADS1256: https://www.ti.com/lit/SBAS288

Library ADS1256: https://github.com/adienakhmad/ADS1256

PowerGraph: http://www.powergraph.ru/soft/demo.asp