Arduino ADC and ADS1115 ADC readings different

I have a MC33172 opamp connected to +/12V supplies arranged in the non-inverting configuration. From the output there is a 10 turn 50k potentiometer to ground. The wiper is set to a position to output 5V when the opamp output is 12V (a resistor divider of 29.2k:20.8k). The wiper is connected to the input of an ADC.

For testing I have 2 AA batteries connected to the opamp input. The batteries read 3.12V on my DVM (I have two, and they read within a few mV of each other)

The output of the opamp reads 3.12V.
With nothing connected to the potentiometer wiper, the DVM reads 1.31V
When connected either to Arduino A1 or ADS1115 A2, the DVM reads 1.30V
When connected to Arduino A1, the voltage computes 1.21V (248 counts *5V / 1024) or 10mV lower than my DVMs.
When connected to the ADS1115, the voltage computes to 0.92V (7360 counts * 4.096/32768).

For the Arduino ADC, I'm using the DEFAULT analog reference (5V) per the Arduino docs and is a 10-bit ADC (1024)
For the ADS1115, I'm following the Adafruit code which indicates to use 4.096V as the maximum and 32768 count (16-bit) for a gain of 1.

I'm looking for information on why the Arduino ADC is reading 10mV low, the ADS1115 is reading almost 40mV low when compared to my DVMs or 30mV lower compared to the Arduino 10-bit ADC.

What is the actual measured Vcc of the Arduino?

groundFungus:
What is the actual measured Vcc of the Arduino?

I had checked, and knew when reading is was very close to 5V. I checked again for accurate number. 4.99V

For "weird" problems, it's best to post complete schematics and hardware photos.

aarg:
For "weird" problems, it's best to post complete schematics and hardware photos.

I thought the opamp description may cause problems. I don't have access to a camera that can post or CAD. Being a modular system it is easy to just connect modules following the sections in the manuals.
In total this is what they show.

ADC Ckt.jpg

NOTICE THE OR. I am NOT ocnnecting both at once. I am not even using the same sketch, I have one sketch for the Arduino ADC and one for the ADS1115.

ADC Ckt.jpg

Got some eggnog? I'll come over. :slight_smile:

aarg:
Got some eggnog? I'll come over. :slight_smile:

:disappointed_relieved: Sorry. Not an eggnog person.

That is the extent of the circuit.

I was wondering if the GAIN_ONE command for the ADS1115 wasn't taking, but the default 6.144 would make the reading much higher, 1.38V (calculated)

Divide and conquer. Apply some different test reference voltage (i.e. from a completely different circuit/ device) and see what happens.

aarg:
Divide and conquer. Apply some different test reference voltage (i.e. from a completely different circuit/ device) and see what happens.

Looking for linear or absolute offset? I'll see if I can find some more batteries.

Wire the batteries directly to the ADS1115 and see what you get when driven from a low impedance source. Also, the common of the battery needs to terminate at the ADS board, not on the Uno, otherwise you have the digital current riding on the analog signal. That break out board sucks, design wise. 16 bit resolution at 0.256 volts and shared grounds. Yeah, that will work.

Edit: you could/should check it in differential mode and eliminate the ground issue.

WattsThat:
Wire the batteries directly to the ADS1115 and see what you get when driven from a low impedance source. Also, the common of the battery needs to terminate at the ADS board, not on the Uno, otherwise you have the digital current riding on the analog signal. That break out board sucks, design wise. 16 bit resolution at 0.256 volts and shared grounds. Yeah, that will work.

Breakout board ground design is irrelevant. The chip has only one ground pin, both both the analog ground and the I2C ground WILL be the same ground.

WattsThat:
Edit: you could/should check it in differential mode and eliminate the ground issue.

The problem will come back as I need 4 analog inputs.

aarg:
Divide and conquer. Apply some different test reference voltage (i.e. from a completely different circuit/ device) and see what happens.

DVM - Computed - Pot Wiper - Diff(DVM-Comp)
1.269 - 0.91 - 0.524 - 0.359
1.284 - 0.93 - 0.531 - 0.354
2.554 - 2.20 - 1.07 - 0.354
3.827 - 3.48 - 1.618 - 0.347
5.11 - 4.75 - 2.16 - 0.36
At least the differential is the same (or close enough for today).

Breakout board ground design is irrelevant. The chip has only one ground pin, both both the analog ground and the I2C ground WILL be the same ground.

What a brilliant observation! Thanks for sharing that.

I did a test with the ADS1115 measuring the voltage over a 2.0 zener diode. I got exactly the same voltage as voltmeter show. If you have a zener available, you could also try to measure it and see if you get different results.

thehardwareman:
I did a test with the ADS1115 measuring the voltage over a 2.0 zener diode. I got exactly the same voltage as voltmeter show. If you have a zener available, you could also try to measure it and see if you get different results.

I did not. I don't have a zener smaller than 5.1V. I did the battery-direct-to-ADS1115 test as well. All of the readings have a about a 400mV difference.

adwsystems:
I have a MC33172 opamp connected to +/12V supplies arranged in the non-inverting configuration. From the output there is a 10 turn 50k potentiometer to ground. The wiper is set to a position to output 5V when the opamp output is 12V (a resistor divider of 29.2k:20.8k). The wiper is connected to the input of an ADC.

For testing I have 2 AA batteries connected to the opamp input. The batteries read 3.12V on my DVM (I have two, and they read within a few mV of each other)

The output of the opamp reads 3.12V.
With nothing connected to the potentiometer wiper, the DVM reads 1.31V
When connected either to Arduino A1 or ADS1115 A2, the DVM reads 1.30V
When connected to Arduino A1, the voltage computes 1.21V (248 counts *5V / 1024) or 10mV lower than my DVMs.
When connected to the ADS1115, the voltage computes to 0.92V (7360 counts * 4.096/32768).

For the Arduino ADC, I'm using the DEFAULT analog reference (5V) per the Arduino docs and is a 10-bit ADC (1024)
For the ADS1115, I'm following the Adafruit code which indicates to use 4.096V as the maximum and 32768 count (16-bit) for a gain of 1.

I'm looking for information on why the Arduino ADC is reading 10mV low, the ADS1115 is reading almost 40mV low when compared to my DVMs or 30mV lower compared to the Arduino 10-bit ADC.

Its reading 100mV low, not 10mV.
I suspect you may have significant IR drops somewhere in the ground wiring - you can use the DVM to
check that all the ground nodes are at the same potential. Cheap hook-up wires and breadboards can
lead to significant resistance compared to a decently wired up system - give all the connections a good wiggle and recheck the meter readings?

MarkT:
Its reading 100mV low, not 10mV.
I suspect you may have significant IR drops somewhere in the ground wiring - you can use the DVM to
check that all the ground nodes are at the same potential. Cheap hook-up wires and breadboards can
lead to significant resistance compared to a decently wired up system - give all the connections a good wiggle and recheck the meter readings?

Thanks for catching the math error. I would not be posting if it was only 10mV.

That is a get thing to check. For everyone. You pick the best ground closest to the power supply to ground your meter. Then measure to every ground point (using the most sensitive DC V setting, in my case 400mV). They should all read 0 or darn close to. If they do not then then you have a resistance in the ground between your to probes.

There are only 4 ground connections (technically 5 if you count the USB ground). UNO-> ADS1115, ADS1115->pot, and PS GND->pot. Given it is a bread board, each of those connections are doubled (one into the board and one out). The wires are as short as possible (about 6" total combined length). I read less than 2mV from a ground on the UNO PCB (not the headers) to the ADS1115 ground pin on the board and/or to the pot ground-side.

This problem will remain contained with yourself, unless you share complete schematics (not a Fritzing diagram) and photos (if possible, showing the actual DMM while it is taking readings).

aarg:
This problem will remain contained with yourself, unless you share complete schematics (not a Fritzing diagram) and photos (if possible, showing the actual DMM while it is taking readings).

If I had access to CAD, what would it show that diagram does not? (OK, it would include pin numbers for the op amp but the volt readings prove it is working and wired correctly)

I have drawn schematics in the past and can read them fine. In a schematic drawn by me, the ADS1115 module and the UNO module would be represented by blocks (ie., not every component of the module included). Beyond that you are left with two components, the opamp and the potentiometer. That diagram is a complete as the schematics would be.

Sorry, I have no way to post photos.

Sorry, I have no way to post photos.

Odd statement. Please explain.

The forum provides such an option and even first time posters manage to find and use it.