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.

ADS1258: ADC values too well correlated, too close together

Part Number: ADS1258
Other Parts Discussed in Thread: MSP430F5529

Hi

I have a few questions concerning the ADS1258.

I am in the early prototyping and evaluation phase of a data logger for some sensors. In the first phase I want to specify a few of the sensors individually using single ended mode.
I reactivated my ADS1258 board with an MSP430f5529.

At first I was happy to see that the sensors correlated quite well with the temperature, but upon closer analysis I am not so sure.

Four sensors were connected to A0, A4, A8 and A23, measured with a multimeter, their output is between 2.47 V and 2.53 V.
(a span of >50 mV for which I would expect the signals to lie about 800000 units apart (or 400000 if full scale is from -5 to +5 V, but I am measuring single ended??)

I connected the sensors to GND and 5.0 V of the power supply(E36103A so hopefully stable enough), and connected this to REFN and REFP on the ADS1258-EVM as well as to GND (next to A8).
For the temperature, a DS18B20 was used.

1    28.81250 458659 7429 59 51 458723 7423 85 88 458176 7399 89 98 458484 7424 86 66
2    28.75000 461399 7481 59 43 461457 7440 58 53 460148 7438 89 70 460452 7474 85 85
3    28.75000 458834 7435 86 73 458929 7401 57 39 457988 7404 83 64 458366 7430 77 78
4    28.75000 458504 7441 88 94 458701 7436 77 56 458040 7409 85 76 458208 7424 69 66
5    28.75000 458862 7420 80 75 458543 7445 126 86 457862 7419 78 66 458103 7425 80 65
6    28.75000 459794 7426 72 95 458457 7439 104 92 458133 7405 90 76 458269 7427 82 71
7    28.75000 458419 7432 46 38 458606 7399 56 65 458354 7416 79 69 458347 7433 82 69
8    28.75000 461163 7483 62 37 461295 7449 55 61 460694 7446 103 84 460995 7466 84 75
9    28.75000 458488 7437 94 70 458464 7414 62 52 457984 7410 85 81 458220 7430 67 68
10    28.75000 460924 7473 100 90 461309 7462 85 48 460711 7461 85 77 460959 7466 64 77
11    28.75000 458583 7442 91 97 459042 7453 103 95 458599 7430 82 77 458286 7437 71 66
12    28.75000 458305 7413 44 54 458278 7404 115 105 457907 7425 85 58 458343 7419 74 76
13    28.75000 458138 7425 31 44 458475 7405 71 75 458184 7413 90 74 458165 7433 73 81
14    28.75000 458238 7423 90 68 458540 7407 63 66 457812 7401 76 59 458762 7422 77 69
15    28.75000 458333 7434 68 77 458914 7427 60 57 457933 7400 77 75 458130 7420 81 59
16    28.75000 458349 7427 115 110 458510 7453 95 101 458024 7418 82 77 458914 7427 70 58
17    28.75000 458291 7427 57 74 458580 7440 117 105 457985 7411 83 75 458337 7423 96 91
18    28.75000 459795 7462 44 38 459044 7417 65 51 459820 7432 83 96 460044 7436 77 82

The Status Byte:7 was 1, indicating the results were settled and valid.


In these data, some force was applied to one the sensor connected to A0 after the first few measurements and then released before the last three, which should have yielded an increased value of just the value A0.
In the graph, the values show much too close together and are all correlated. I am not sure if I overlooked something in the configuration.

The other ADC values (all left floating) bunch around 7400 and 80, one would (maybe) expect a bigger span of these noise values too?

I would be grateful for any hints.

Thank you very much,

Pio Bättig

Library used: github.com/.../ADS12xx-Library
Code used:

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

#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 4

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);

#ifdef ENERGIA
int  START = 6;
int  CS = 8;
int  DRDY = 5;
#endif

#ifndef ENERGIA
int  START = 6;
int  CS = 8;
int  DRDY = 2;
#endif

int LEDPin = P1_0; //green P4_7 red P1_0 msp430f5529

//int RESET_PIN = 9;

//Define which ADC to use in the ads12xx.h file

ads12xx ADS;



void setup()
{
  pinMode(LEDPin, OUTPUT);
  Serial.begin(115200);
  while (!Serial) {}
  Serial.println("Serial online");
  ADS.begin(CS, START, DRDY);  //initialize ADS as object of the ads12xx class

  ADS.Reset();

  delay(10);
  sensors.begin();

  //  test_PulseRead();
  test_continuousRead();

}

void loop() {

}




void test_continuousRead() {
  //  uint8_t statuses[8] = {};
  int32_t results[16]  = {};
  uint8_t statusByte;
  uint8_t channel;
  uint8_t valid;
  int32_t regData;
  ADS.SetRegisterValue(CONFIG0, MUXMOD_AUTO | CLKENB_ENABLE | STAT_ENABLE | CHOP_DISABLE | BYPAS_EXT); //CHOP_ON, external bypass on (for putting an external amplifier)
  ADS.SetRegisterValue(CONFIG1, IDLMOD_SLEEP | DLY2_on | DLY1_on | DLY0_on | DRATE_0);
  ADS.SetRegisterValue(MUXDIF, 0x00);
  ADS.SetRegisterValue(MUXSG0, 0xFF);
  ADS.SetRegisterValue(MUXSG1, 0xFF);
  //Data sheet ADS1258 P25 : 1 LSB=V_REF/780000h
  //0x780000=7864320 dec
  statusByte = 0;
  while (1) {

    //  Serial.print("Sensor Resolution: ");
    //  Serial.println(sensors.getResolution(), DEC);

    //Get Temperatures
    sensors.requestTemperatures(); // Send the command to get temperatures
    delay(1000);
    Serial.print(sensors.getTempCByIndex(0), 5);

    //Get 16 conversions, put them into the correct slot of the array for single ended conversions
    for (uint8_t i = 0; i < 16 ; i++) {
      ADS.GetConversion1258(&statusByte, &regData);
      //      Serial.println(statusByte, BIN);

      //Single ended: 0x08:ch0, 0x17: ch15
      channel = (statusByte << 3);//4
      channel = (channel >> 3) - 8;
      //      Serial.println(channel);

      results[channel] = regData;
    }
    //   Serial.print(millis());
    for (uint8_t k = 0; k < 16; k++) {
      Serial.print(" ");
      //      Serial.print((double)(5.0 * results[k] / (7864320)), 6);
      //       Serial.print((double)(5.0 * results[k] / (16777216)), 6);
      Serial.print(results[k]);
    }
    Serial.println();
    delay(1000);
  }
}

  • Hi Pio!

    Where do you have the AINCOM pin on the ADS1258 connected?  Is it tied to GND?

  • Hi Tom,

    thank you very much, that helped! I am using the external power supply for also providing REFP and REFN, the following is a quick measurement:

    Now I'm running a series till wednesday, taking one measurement every five seconds, in addition to my sensors I also put a Pt-100 with a reference resistor so I can check the temperature dependence of my sensors.

    Thank you very much.

    Pio