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.

ADS8699: random reading spikes

Part Number: ADS8699

I'm getting semi-repeatable voltage conversions on a 9v battery. I don't think a battery should be this noisy (note the 9333 mV reading). I'm at the point where I don't have an idea of where the problem might be (program or electronics error). I'll attach both the short example program (3 files total) and the schematic pdf. The platform is an Arduino (AdaFruit Feather M0 LoRa). Not in the schematic, but I've added decoupling capacitors to the positive and negative battery connections.

Thank you for any guidance,

Brecky

22:53:48.053 -> voltage: 9340.969 mV

22:53:49.145 -> voltage: 9344.484 mV

22:53:50.228 -> voltage: 9341.156 mV
22:53:51.319 -> voltage: 9340.406 mV
22:53:52.417 -> voltage: 9340.453 mV
22:53:53.505 -> voltage: 9333.141 mV
22:53:53.505 -> voltage: 9340.688 mV
22:53:54.597 -> voltage: 9341.109 mV
22:53:56.788 -> voltage: 9340.969 mV
22:53:56.788 -> voltage: 9340.875 mV
22:53:57.906 -> voltage: 9340.828 mV
22:53:58.985 -> voltage: 9340.875 mV
22:54:00.070 -> voltage: 9340.875 mV
22:54:01.165 -> voltage: 9340.734 mV

6428.TI_ADS8699.cpp8875.TI_ADS8699.h

readvoltage.c
/*
Brecky Morris and UCSC, 6.22.2020
*/

#include <TI_ADS8699.h>
#include <stdio.h>
#include <SPI.h>

// Set Constants
#define ADC_CHIP_SELECT   A1  // set pin 10 as the chip select for the ADC
#define ADC_RESET         A2  // reset gets set to high

TI_ADS8699 adc(ADC_CHIP_SELECT, ADC_RESET);

//Start setup function:
void setup() {

  Serial.begin(115200);

  delay(5000);

  Serial.println("Hello");

  // disable the LoRa radio
  pinMode(8, OUTPUT);
  digitalWrite(8, HIGH);

  adc.begin();

  // a couple of bad readings at first
  for (int index = 0; index < 10; index++) {
    adc.readADC(UNIPOLAR_3x_VREF);
  }
}

/* range selection
BIPOLAR_3x_VREF                     1 // 0000b = ±3 × VREF
BIPOLAR_2POINT5x_VREF               2 // 0001b = ±2.5 × VREF
BIPOLAR_1POINT5x_VREF               3 // 0010b = ±1.5 × VREF
BIPOLAR_1POINT25x_VREF              4 // 0011b = ±1.25 × VREF
BIPOLAR_POINT625x_VREF              5 // 0100b = ±0.625 × VREF
UNIPOLAR_3x_VREF                    6 // 1000b = 3 × VREF
UNIPOLAR_2POINT5x_VREF              7 // 1001b = 2.5 × VREF
UNIPOLAR_1POINT5x_VREF              8 // 1010b = 1.5 × VREF
UNIPOLAR_1POINT25x_VREF             9 // 1011b = 1.25 × VREF
*/

void loop() {

  double voltageSum = 0.0;
  for (int index = 0; index < 1; index++) {
    double voltage = adc.readADC(UNIPOLAR_3x_VREF);
    voltageSum += voltage;
  }

  double voltageAverage = voltageSum / 1.0;
 
  Serial.print("voltage: ");
  Serial.print(voltageAverage, 3);
  Serial.println(" mV");

  delay(1000);
}
feather.sch