This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1256: ADS1256 Noise with Arduino

Part Number: ADS1256

Hello everyone,

I'm Marc and I'm new in the forums (I have been exploring them for years but never commented)

I work with LDRs with extremely low sensitivity so noise is an important issue. Normally I use DACs but I wanted to go to a small board for demo purposes. Then I purchased an ads1256 and an Arduino.

For now I'm just checking the noise level of A0 connected to the ground of the Arduino and I find a noise of 6e-5 V or around 100 units.

What is the recommended way to interface the ads1256? Would it be better to get a USB to ISP converter? Is that the noise expected for this chip?

If anyone else has worked with it or has had a similar problem help would be appreciated.

Thanks

Marc

  • Hi Marc,

    Did you build your own PCB with the ADS1256 or are you using and ADS1256EVM as your hardware?

    Depending on how you designed and connected your circuit, it would be preferable to ground the analog inputs to the ADC's ground (AGND) net instead of the Arduino. The expected noise performance of the ADS1256 is given by Tables 1 and 4 in the ADS1256 datasheet, and depend on the configured data rate and gain. If yo aren't able to match these noise figures then likely the issue is related to PCB layout or power supply noise.

    Regarding your question:

    marc montagut marques said:
    What is the recommended way to interface the ads1256? Would it be better to get a USB to ISP converter?

    I'm not sure what you mean by a "USB to ISP"  converter. If you don't mind pointing me to a link on some information I'd appreciate it.

    The ADS1256 has a SPI digital interface, so between the ADC and MCU you'd only have SPI and GPIO pins to interface between these device. Between the Arduino and a PC, for example, the interface is entirely up to you.

     

  • Hello Christopher,

    I'm using this breakout board. I will try to re read the datasheet and change those values in the Arduino programming.

    I thought about the USB to ISP converter because I own several USB to I2C converters from TI. Still I don't know how to program with this kind of devices, normally I just use software from your web page.

    Thanks for your help

    Marc

  • So, I have been trying to change the data rate this morning but it seems like the code either does nothing or breaks the data readout. Also while reading the datasheet I found interesting to change PGA gain which is also not working.

    I will explain myself better using the code I have:

    I added some lines to edit register 3 (remarked with a big comment), using the table I tried every sample rate, it either does nothing or weird numbers start to appear.

    I guess you are well experienced with any issue regarding this chip and code so if you may have a quick solution I will be thankful. In any case I bought ADS1256EVM just to make sure everything will work.

    /* ADS1256, datasheet: www.ti.com/.../sbas288j.pdf
      compare: github.com/.../ads12xx.cpp
        connections to Atmega328 (UNO)
    
        CLK  - pin 13
        DIN  - pin 11 (MOSI)
        DOUT - pin 12 (MISO)
        CS   - pin 10
        DRDY - pin 9
        RESET- pin 8 (or tie HIGH?)
        DVDD - 3V3
        DGND - GND
    */
    
    #define cs 10 // chip select
    #define rdy 9 // data ready, input
    #define rst 8 // may omit
    
    #define SPISPEED 1250000
    // 1700000
    
    #include <SPI.h>
    int ledState = LOW;
    const long interval = 200;
    unsigned long previousMillis = 0;
    
    void setup()
    {
      Serial.begin(9600);
      pinMode(A0, OUTPUT);
      pinMode(cs, OUTPUT);
      digitalWrite(cs, LOW); // tied low is also OK.
      pinMode(rdy, INPUT);
      pinMode(rst, OUTPUT);
      digitalWrite(rst, LOW);
      delay(1); // LOW at least 4 clock cycles of onboard clock. 100 microsecons is enough
      digitalWrite(rst, HIGH); // now reset to deafult values
    
      delay(500);
      SPI.begin(); //start the spi-bus
      delay(500);
    
    
      //init
    
      // digitalWrite(cs, LOW);
      while (digitalRead(rdy)) {}  // wait for ready_line to go low
      SPI.beginTransaction(SPISettings(SPISPEED, MSBFIRST, SPI_MODE1)); // start SPI
      delayMicroseconds(10);
    
      //Reset to Power-Up Values (FEh)
      SPI.transfer(0xFE);
      delayMicroseconds(100);
    
      byte status_reg = 0 ;  // address (datasheet p. 30)
      //PGA SETTING
      //1 ±5V
      //2 ±2.5V
      //4 ±1.25V
      //8 ±0.625V
      //16 ±312.5mV
      //32 ±156.25mV
      //64 ±78.125mV
      byte status_data = 0x01; //status: Most Significant Bit First, Auto-Calibration Disabled, Analog Input Buffer Disabled
      SPI.transfer(0x50 | status_reg);
      SPI.transfer(0x00);   // 2nd command byte, write one register only
      SPI.transfer(status_data);   // write the databyte to the register
      delayMicroseconds(10);
    
    
      byte adcon_reg = 2; //A/D Control Register (Address 02h)
      byte adcon_data = byte adcon_data = 0b00100110; // 0 01 00 110 => Clock Out Frequency = fCLKIN, Sensor Detect OFF, gain 64
      SPI.transfer(0x50 | adcon_reg);
      SPI.transfer(0x00);   // 2nd command byte, write one register only
      SPI.transfer(adcon_data);   // write the databyte to the register
      delayMicroseconds(10);
    
    
    /////////////////////////THIS IS SUPOSED TO CHANGE THE DATA RATE!!!!/////////////////////////////////////
    byte drate_reg = 3; //drate byte drate_data = 0b00010011; // 5SPS SPI.transfer(0x50 | adcon_reg); SPI.transfer(0x00); // 2nd command byte, write one register only SPI.transfer(drate_data); // write the databyte to the register delayMicroseconds(10); // digitalWrite(cs, HIGH); Serial.println("configured, starting"); } void loop() { unsigned long currentMillis = millis(); unsigned long adc_val = 0; // store reading // digitalWrite(cs, LOW); SPI.beginTransaction(SPISettings(SPISPEED, MSBFIRST, SPI_MODE1)); // start SPI delayMicroseconds(10); //The most efficient way to cycle through the inputs is to //change the multiplexer setting (using a WREG command //to the multiplexer register MUX) immediately after DRDY //goes low. Then, after changing the multiplexer, restart the //conversion process by issuing the SYNC and WAKEUP //commands, and retrieve the data with the RDATA //command. while (digitalRead(rdy)) {} ; byte channel = 0; byte data = (channel << 4) | (1 << 3); //AIN-channel and AINCOM SPI.transfer(0x50 | 1); // MUX register SPI.transfer(0x00); // 2nd command byte, write one register only SPI.transfer(data); // write the databyte to the register delayMicroseconds(10); //SYNC command 1111 1100 SPI.transfer(0xFC); delayMicroseconds(10); //WAKEUP 0000 0000 SPI.transfer(0x00); delayMicroseconds(10); SPI.transfer(0x01); // Read Data 0000 0001 (01h) delayMicroseconds(10); adc_val = SPI.transfer(0); adc_val <<= 8; //shift to left adc_val |= SPI.transfer(0); adc_val <<= 8; adc_val |= SPI.transfer(0); delayMicroseconds(10); // digitalWrite(cs, HIGH); SPI.endTransaction(); //The ADS1255/6 output 24 bits of data in Binary Two's //Complement format. The LSB has a weight of //2VREF/(PGA(223 − 1)). A positive full-scale input produces //an output code of 7FFFFFh and the negative full-scale //input produces an output code of 800000h. if (adc_val > 0x7fffff) { //if MSB == 1 adc_val = (16777215ul - adc_val) + 1; //do 2's complement } Serial.println(adc_val); // digitalWrite(cs, HIGH); }

    This is the data output in the arduino serial monitor with time stamps when it works at 5sps for example, not even one second has passed and I have multiple readouts.

    16:10:04.528 -> 5019
    16:10:04.528 -> 4997
    16:10:04.528 -> 5016
    16:10:04.528 -> 4995
    16:10:04.528 -> 5032
    16:10:04.528 -> 5041
    16:10:04.562 -> 4994
    16:10:04.562 -> 5061
    16:10:04.562 -> 4992
    16:10:04.562 -> 5022
    16:10:04.562 -> 5007
    16:10:04.596 -> 5026
    16:10:04.596 -> 5004
    16:10:04.596 -> 5000
    16:10:04.596 -> 5024
    16:10:04.596 -> 5015
    16:10:04.596 -> 5032
    16:10:04.630 -> 4992
    16:10:04.630 -> 5076
    16:10:04.630 -> 5036
    16:10:04.630 -> 5020
    16:10:04.630 -> 4997
    16:10:04.664 -> 5004
    16:10:04.664 -> 5038

  • Hi Marc,

    Have you tried reading back the register settings to make sure that they match what your sending? I'd recommend doing this to help verify that the SPI communication is working as expected.

    Also, do try looking at the SPI communication and the /DRDY pin on an oscilloscope. It might be that the /DRDY period is changing at the expected period, but that the display data is incorrect.
  • In the end it looks like most of our noise problems don't come from the ads1256 readout but from our amplifier board.

    We will work on that, thanks for your help.

    Marc