# How to measure external voltage differential with single ended ADC?

I would like to measure voltages from external circuits with the single ended ADC from an Atmega324.

The plan is to power the Atmega324 with 3.3V and use a 1.024 or 2.048 voltage reference. The voltages to be measured are 0...5V and 0...24V, DC with 1kSPS. In the end, I want to utilize all eight ADC Inputs of the Atmega while measuring all of them simultaniously, so using differential mode of the Atmega wouldn't work, at least from my understanding, since they only work against specific channels,like AIN0...7 against AIN1 and AIN0...7 against AIN2. Instead of measuring all voltages in reference to the ADC circuits GND, I'd like to be able to use it more like a voltage meter.

The external circuit to be measured could, as a simple example, look like this:

simulate this circuit – Schematic created using CircuitLab

In order to measure the voltages, I had to connect the probes like this:

simulate this circuit

Here are the things that bug me:

1. If I use the ADC as single ended, like in the schematic, wouldn't I short out R2 via the GND connection from Probe2 to the ADC and back to Probe4?

2. According to the datasheet, "The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or less.". That means the voltage divider and the impedance i want to measure combined had to be below that. So the voltage divider would heavily influence the circuit I want to measure, depending of its nature.

Now I'd like to ask for tips on how to tackle the issues I see. Regarding issue 2, the resistor impedance, I read that you could create the voltage divider with high resistance values, in the range of a few MegOhm and either a) add a ~100nF capacitor next to the lower resistor (R2/R4 of the second schematic) in order to supply the internal S/H capacitor with that. or b) use a OPAmp in a buffer configuration (one that can handle the high inputvoltage relative to GND for measuring the 24V)

I am not sure about issue 1. Would a differential ADC be able to measure the voltages properly without a GND connection? But then I would need an external ADC chip that offers 8 differential inputs. A buffer opamp would have to be isolated internally, or you have the connected GND again. Since else the opamp wouldn't work, without current going into it.

What would be a good solution to this problem?

• You have $3.3\:\text{V}$ and $5\:\text{V}$ supply rails. Are their other supply rails? Or just those two? Will the individual nodes always be between $0\:\text{V}$ and $5\:\text{V}$? Or? Examples only help illustrate. They don't specify. Also, how often do you need to take the measurements? Is it always 1 k s/s? Are you willing to use an opamp for each differential measurement? (Some come in quad packs.) What resolution do you really need? How much offset and gain error can you accept? What limitations haven't you told us about? So we need more details, I think. – jonk May 19 '18 at 1:18
• Why not take each measurement single-ended using a single common 'ground' reference and then subtract in software? – brhans May 19 '18 at 1:28
• @brhans I think the OP said they have 8 differential measurements to take and 8 analog inputs that can be muxed to the ADC. Maybe I misunderstood, though. – jonk May 19 '18 at 1:39