# Measure both positive and negative voltages using ADC

I am looking into measuring both positive and negative voltages using ADC. My input voltage is in range from -55 to +55V, which is total of 110V. ADC I am using is MCP3424, since it is relatively easy to pair it with Raspberry Pi. MCP3423 is differential ADC with positive and negative inputs for each port. I am looking to connect negative(-) port to gnd, so I feed the voltage to the positive input. It gives me range from 0 to 2.048V. (readings of ADC are 18-bit)

I am looking to convert -55V to +55V range into 0 - 2.048V range. With some googling and my limited electronics knowledge I came into the following circuit:

simulate this circuit – Schematic created using CircuitLab

Questions/problems are:

• would this work fine?
• to which voltages I should connect op-amp voltage rails? OA1 to +5 and gnd, and OP2 to +55V and -55V? In that case, I would need high voltage op-amp, for example LTC6090?
• do I need protection diodes at input or at output?

Are there any other issues I am not seeing?

• What accuracy do you need? – Justin Aug 15 '16 at 13:37
• You have the outputs of two different op amps shorted to each other. That's a grim sign. – Scott Seidman Aug 15 '16 at 13:38
• Look at "summing amplifier" circuits. You attenuate the signal to something sensible (a potential divider will do) - say +/-1.024V. Then feed that signal into a summing amplifier circuit which adds a 1.024V bias. – Tom Carpenter Aug 15 '16 at 13:50
• - accuracy within 5% mistake is just OK. I do not need something very precise. - after googling, I see it's bad thing to do. Sorry! - seems like same thing as answer below. I will look into it right now, thanks! – davaradijator Aug 15 '16 at 14:02

@Andyaka's answer is basically the same as what I was going to put, but he used the inverting amp topology. So +1 to his answer.

Anyway, given I've already done the calculations, I'll post this too. The following non-inverting topology circuit should also work:

simulate this circuit – Schematic created using CircuitLab

The values of R3 and R4 can be calculated based on your supply voltage (simple potential divider). The values of R1 and R2 I have calculated based on E12 resistors. It may not be as accurate as you want - yielding a 0.175 to 1.94V output range for +/-55V input range.

If you use higher accuracy resistors, you can get closer. For example, the corresponding E48 series values (1%) will be 133k and 2.49k for R2 and R1 respectively. For that you need to generate a 1.04V reference using a potential divider of R3 and R4. You then get quite close to your desired range, getting an output range of 0.01V to 2.031V for a +/-55V input.

• Simulation with LT1677 gives great results. Now looking for cheaper rail-to-rail op-amp. Could you recommend? Thanks! – davaradijator Aug 15 '16 at 14:48
• Would a pair of potentiometers at R1 and R4 help improve the accuracy? Or, do they even sell pots with this much resistance? – John Dvorak Aug 15 '16 at 22:45
• @JanDvorak you can certainly get potentiometers that would help with tuning, the trouble is most of the trimmers are not always uniform, and can have quite a high temperature variance. The really nice trimmers that are high stability cost ~\$25 or more. Still for 5% you probably could get away with a pot. Alternatively a precision reference in place of R3/R4 could be used. – Tom Carpenter Aug 15 '16 at 23:55

My input voltage is in range from -55 to +55V

My first observation is that you must mean a slow moving signal; in other words, you have an input that can vary between -55 V and +55 V. I say "slow moving" because the ADC you have chosen is nominally aimed at low sampling rates. Yes it can do 240 Sps but this wouldn't be great at sampling a 50/60 Hz AC voltage because you can easily miss the peaks if not synchronized.

The range is 110 volts and this needs reducing to 2.048 volts, so a simple attenuation will do the trick (two resistors). Next, you need to bias (or offset) the range -1.024 V to +1.024 V up by +1.024 V and a simple op-amp summing circuit can do this.

All resistor values identical with point (a) fed with -1.024 V and point (b) fed with the attenuated signal. There will be a little bit more attenuation due to the loading effect of the resistor in the (b) line but this can be managed and can be a bit of a problem solver too given that ADCs don't have a perfect reliable input range as specified on the front sheet of the data sheet.

You will end up with an inverted output i.e. +1.024 V is represented by -1.024 V but that is trivial once digitized.

You need to also watch out for the internal reference accuracy and drift in the ADC - it's pretty crappy if you want accurate and reliable measurements.

For the op-amp I'd be considering a rail-to-rail type so that it can reach its output down towards 0V when the input signal is at one extreme.

• I don't even think there's a need to flip the sign digitally, the ADC seems to be balanced, so he can probably just connect the signal to the inverting input instead. – pipe Aug 15 '16 at 14:06
• The other option is to use the non-inverting topology instead (connect - to out, and the input potential divider to +). Something like 133k and 2.49k (both E48) should do, with a DC voltage of about 1.04V gives a 0.01V to 2.03V output. – Tom Carpenter Aug 15 '16 at 14:08
• Thank you on very detailed answer! Does that mean I need to create precise voltage reference point at (a) or I could, again, use voltage divider? At which voltage should I power the op-amp, is 5V and gnd OK? Could you suggest resistor values? btw. accuracy could be in +- 5%, so this will be just fine. – davaradijator Aug 15 '16 at 14:10
• @pipe - it's a pseudo differential input so that's not possible. – Andy aka Aug 15 '16 at 14:16
• Any problems with using a large-value resistor for (b) to accept the raw +/-55V signal? Once we get to the summing node, we're dealing with currents, not voltages. Given that, (a) doesn't have to be -1.024V either; anything that pulls the appropriate current from the summing node will do, like a mid-value resistor to the negative supply. These two changes would give a lower parts count - just the opamp and 3 resistors - at the expense of using 3 different resistors. – AaronD Aug 15 '16 at 17:25

You can use a passive divider also (I would add protection in this case, but the principle stands)

If $V_{i}=55$ V you want $V_o=V_H$ so there is no current in $R_2$ and so $$\frac{V_i-V_H}{R_1} = \frac{V_H}{R_3}$$

and if $V_i=-55$ V you want $V_o=0$ so you do not have current in $R_3$ and so $$\frac{-V_i}{R_1} = \frac{V_H}{R_2}$$

Fix $R_1$ to something reasonable as 100k, solve for $R_2$ and $R_3$ and you have an output range from 0 to $V_H$ for the input you need.