Measure Negative voltage with interntal ADC arduino uno

Hi,
I tried to measure voltage that changes between -4v to 4v with a sensitivity of 100mv ( could be 80 values) the problem is that the ADC is Unipolar and I have only idea to do it with a voltage divider with resistors, but I can not distinguish between the positive voltage.
Does anyone have any other ideas? maybe to add an op-amp outside the circuit?
Thanks.

What's your problem with a 1:1 voltage divider between Vcc and the signal?

The problem is that I cant distinguish between positive and negative voltage, If I convert negative voltage to positive for example -3V to 3V I don't know if it's real 3v or -3v ...

Of course you can determine the voltage and the sign.

Choose 2 x 10K resistors, with one connected to 5V and one connected to the Vin, then the ADC voltage is (5-Vin)/2 + Vin, ranging from 0.5 (Vin = -4V) to 4.5V (Vin = 4V).

1 Like

op amp summing amplifier

Good grief... the tech term is DC offset. Once you can speak the language, Google can expand your knowledge:

Arduino Analog offset circuit for voltages - Google Search

I can think of 3 possible solutions -

There is a "standard solution" for audio (AC swinging positive & negative) and that's a bias circuit that puts the analog input at 2.5V and then the audio input is added & subtracted. You can simply subtract-out the bias in software.

Audio Input Schematic

But - You'd have to replace the capacitor with a resistor. Normally the capacitor blocks the bias from getting-back into the audio circuit (but it also blocks DC from the signal-side). The added resistor needs to have a high-enough value that it doesn't have too much effect on the source circuit, and you'll have to figure-out the 3-way voltage divider. You'll also have to calculate the voltage divider to knock-down the 8V peak-to-peak voltage, or you can add another voltage divider for that.

Another solution would be an inverting op-amp circuit going-into another analog input. Most op-amp circuits need a positive & negative power supplies, especially if you want accurate output near zero, and that means the outputs will swing negative & positive and you'll need to add protection circuits at the Arduino inputs.

Or, you can make a summing amplifier with an op-amp to sum a positive voltage with the voltage you're measuring. Again it can have a gain of less than 1 so you don't need a voltage divider and the different inputs can have different gains, and you'd want to subtract-out the bias in software. You may still need a protection circuit. This is probably the "best" solution.

ATmega328P (Arduino Uno) can measure voltages between Gnd and AVCC range (i.e. 0 to 5V) without any voltage divider resistors network.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.