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.

ADS1230: output data fluctuation

Part Number: ADS1230

hello everyone,

We are working on a weighing scale design with the following specifications.

  1. Load cell 500Kg 
  2. Load cell output 2mV/V
  3. Vref 5VDC
  4. input supply 5 VDC
  5. ADS Gain 128
  6. Data Rate 10SPS
  7. Interfacing with atmega328 controller

I am facing issue on ADC output count and output count continues fluctuated.

When I applied  0.00 VDC on +Ve pin and read ADC output,but data count still fluctuated.

Please help me to solving issues of ADC value fluctuation and how to measure noise?

#include<SPI.h>

int ADS1230_DOUT = 12; //Pin for DRDY/DOUT of ADS1230
int ADS1230_SCLK = 13; //Pin for SCLK of ADS1230
int ADS1230_NPDWN = 5; //Pin for nPDWN of ADS1230

float capacity = 500000;
float sensitivity = 2;



void readdata() {
  SPI.beginTransaction(SPISettings(400000, MSBFIRST, SPI_MODE1));
  int32_t sum = 0;
  int count = 0;
  for (int i = 0; i < 10; i++) {

    if (digitalRead(ADS1230_DOUT) == LOW)
    {
      int32_t sample = 0;
      sample |= SPI.transfer(0);
      sample <<= 8;
      sample |= SPI.transfer(0);
      sample <<= 8;
      sample |= SPI.transfer(0);
      sample <<= 8;
      sample /= 1L << 12;
      sum = sum + sample;
      count++;


    }
  }

  sum = sum / count;
  int32_t weight = (capacity * sum ) / ((1L << 20) * 128 * ((sensitivity / 1000)));

  Serial.println(weight);
  SPI.endTransaction();

}



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

  pinMode(5, 1);
  digitalWrite(5, 1);
  pinMode(ADS1230_DOUT, INPUT);
  SPI.begin();
}
void loop()
{
  readdata();
  delay(1000);
}

our ADC outputs,

28332
28213
28299
28340
28310
28265
28312
28310
28263
28245
28287
28273
28332
28291
28306
28327
28323
28286
28256
28323

  • Hi Nikhil,

    I will guess that this is a prototype using an Arduino.  If this is the case, then there can be a lot of noise pickup in wiring.  The noise can be picked up from EMI/RFI with the most common noise source being power line-cycle noise. 

    Do you have a schematic of your connections?  Are you using an RC filter at the ADS1230 inputs?

    In your code it appears you are attempting to average several conversions together, but you code is not working as intended.  In your readdata() function you have a for loop and on the first pass through the loop the ADS1230_DOUT will be low and the data will be read.  After the data are read, the DOUT will return high and each successive pass through the for loop will skip reading any new results.  The outcome will be that you are averaging 1 result instead of 10.

    To accurately determine the amount of noise, it would be better to capture the data as raw data without any computation.  So it would be better to see the value of 'sum' instead of 'weight' (although I guess you could print both) so that I can actually see the number of noise counts and determine if there is any specific noise signal present.  It would be good to see a minimum of 128 continuous and contiguous conversion results up to 1024.

    Best regards,

    Bob B

  • Hi Bob,

    Yes, we trying this with Arduino. We are following the circuits and schematics from circuitar website . I have attached the schematics.  

    Right now we are using libraries from the circuitar. but the same noise is appearing.

    So later we thought that we are not able to read data properly from ADS, so we added buffer as shown in Circuitar schematics.

    But same noise is appearing. 

    Best Regards,

    Nikhil

    weighing_scale.pdf

    Load_Cell_v1.0.pdf

    2043.data.txt
    -46
    -48
    -59
    -59
    -46
    -68
    -58
    -67
    -69
    -51
    -59
    -43
    -58
    -60
    -51
    -44
    -51
    -38
    -46
    -48
    -40
    -55
    -76
    -64
    -33
    -72
    -71
    -78
    -64
    -43
    -58
    -65
    -61
    -66
    -48
    -58
    -70
    -73
    -59
    -65
    -57
    -27
    -35
    -58
    -52
    -39
    -52
    -73
    -70
    -25
    -34
    -44
    -29
    -6
    -23
    -33
    -40
    -43
    -34
    -54
    -85
    -73
    -41
    -43
    -54
    -71
    -79
    -83
    -97
    -69
    -47
    -50
    -76
    -74
    -58
    -53
    -61
    -24
    -31
    -12
    -26
    -47
    -58
    -68
    -80
    -51
    -54
    -35
    -42
    -61
    -49
    -54
    -73
    -66
    -74
    -86
    -80
    -48
    -32
    -27
    -19
    -41
    -80
    -53
    -55
    -60
    -40
    -43
    -67
    -43
    -30
    -31
    -30
    -37
    -43
    -55
    -61
    -62
    -68
    -38
    -64
    -24
    -46
    -53
    -70
    -58
    -72
    -43
    -24
    -52
    -83
    -65
    -61
    -41
    -52
    -40
    -73
    -74
    -39
    -14
    -30
    -43
    -61
    -75
    -54
    -63
    -77
    -62
    -65
    -78
    -47
    -50
    -69
    -11
    9
    -12
    -58
    -77
    -40
    -48
    -21
    -33
    -41
    -50
    -52
    -44
    -74
    -83
    -46
    -52
    -52
    -6
    -11
    -39
    -60
    -112
    -56
    -77
    -45
    -46
    -74
    -83
    -83
    -60
    -51
    -70
    -38
    -57
    -75
    -38
    -48
    -79
    -32
    -24
    -56
    -7
    -14
    -18
    -55
    -65
    -69
    -74
    -52
    -23
    -32
    -29
    -37
    -65
    -48
    -35
    -43
    -72
    -89
    -26
    -17
    -37
    -105
    -108
    -53
    -37
    -37
    -50
    -57
    -45
    -45
    -67
    -67
    -59
    -77
    -59
    -64
    -69
    -48
    -31
    -49
    -70
    -65
    -44
    -42
    -7
    -19
    -64
    -56
    -56
    -56
    -71
    -73
    -41
    -44
    -52
    -54
    -34
    -46
    -72
    -52
    -47
    -76
    -70
    -47
    -67
    -65
    -69
    -44
    -59
    -75
    -51
    -33
    -31
    -36
    -44
    -54
    -77
    -76
    -68
    -64
    -57
    -105
    -109
    -90
    -78
    -67
    -75
    -61
    -18
    10
    -16
    -44
    -28
    -36
    -50
    -38
    -19
    -17
    -33
    -57
    -42
    -30
    -30
    -2
    -34
    -50
    -81
    -92
    -54
    -30
    -58
    -39
    -48
    -77
    -84
    -53
    -54
    -22
    -21
    -34
    -55
    -56
    -23
    -53
    -57
    -57
    -81
    -83
    -34
    -85
    -78
    -73
    -27
    -38
    -71
    -71
    -76
    -66
    -62
    -49
    -52
    -50
    -30
    -30
    -40
    -46
    -62
    -52
    -45
    -44
    -61
    -36
    -35
    -78
    -74
    -68
    -51
    -27
    -50
    -49
    -40
    -64
    -70
    -39
    -35
    -57
    -32
    -29
    -58
    -66
    -41
    -63
    -65
    -45
    -24
    -32
    -67
    -71
    -42
    -23
    -24
    -45
    -43
    -77
    -69
    -71
    -67
    -55
    -60
    -63
    -74
    -83
    -60
    -42
    -15
    -42
    -70
    

  • Hi Nikhil,

    For your 0V input I'm confused as to how you are doing this.  Make sure that you have a valid reference voltage to the ADS1230, and for the analog inputs you need to connect the inputs to the correct input range for the PGA otherwise you will see the effects of exceeding the range of the PGA. 

    The best way to check the ADS1230 noise is to create a voltage divider using equal sized resistors and powering the resistor divider with the same excitation you would use for the load cell.  At the junction of the two resistors connect both analog inputs to this point to effectively create a short to mid-supply.  The conversion results should match the noise tables given in the datasheet for the configuration you are using.

    If the noise is exceeding the table data, then you will need to determine the source of the noise.  This is usually being caused by a noisy supply or poor grounding.  After you achieve proper noise using the shorted input case, you can remove the voltage divider and replace with the load cell.

    If you are still seeing excessive noise you will need to discover the source of the noise.  Most likely the noise is being introduced by the load cell cabling.

    I did notice a few things in your schematic.  You should have a bypass cap on the DVDD supply pin and not just the AVDD pin to the ADS1230.  Also, I would recommend that you also add a 100nF cap across the REFP and REFN inputs to the ADS1230.  C8 on the CAP inputs should be a low impedance connection and the cap as close as possible to the input pins using a quality cap.  C13 and C15 should not be the same value as C14 as the common-mode filter may differ enough to cause a difference input.  C14 should dominate the filter and needs to be at least 10 times larger in value as compared to C13 and C15.  If C14 is 100nF, then C13 and C15 should be no larger than 10nF.

    Best regards,

    Bob B