I am using an ADS1115 with a ESP32 and see strange responses, which make me think that only 12 bits are used instead of 16. Since this lib was extended from the 12 bit ADS1015, I am wondering whether something has been forgotten in the lib for the 16 bit variant? Or is the chip defect? I have tried three different ones, all from one shipment, all with the same problem.
I am feeding some ~1.6V - half the 3.3V supply, obtained via a 10:10k divider - to channel A0 of the ADS1115 and measure single-ended with gain GAIN_TWO
.
Most of the time I get ADC readouts of 26368 (= 1.648V). I would expect to get some jitter of at least 1 bit up and down, but the only other readout I get is 26352 on 2 of the 3 chips, which is lower by 16, or I get 26384 on 1 of the 3 chips, which is higher by 16.
// #include <Adafruit_ADS1015.h>
// Adafruit_ADS1115 ads; /* Use this for the 16-bit version */
// 2 out of 3 chips:
AIN(0): 26352, Voltage: 1647.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26352, Voltage: 1647.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26352, Voltage: 1647.000 mV
// 1 out of 3 chips
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26384, Voltage: 1649.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26384, Voltage: 1649.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26384, Voltage: 1649.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26384, Voltage: 1649.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
AIN(0): 26368, Voltage: 1648.000 mV
which I believe confirms it as a ADS1115.