Go Down

### Topic: How to read a negative voltage (Read 18988 times)previous topic - next topic

#### Jassper

#15
##### Oct 06, 2009, 03:35 pm
Ok, I understand the concept here, but would anyone want to explain to me what is actually happening with this divider on an elementury level? I like to understand the "why" instead of just "because".

Thanks, and thanks for both youe help.

#### Pepe34

#16
##### Oct 06, 2009, 04:00 pm
Voltage divider is simple :
Let have two voltages : Vminus and Vplus, if I understand you have them as -5V and +5V. Mark resistors as Ra and Rb.
A current through divider is I = (Vplus - Vminus) / (Ra + Rb)
It creates a voltage drop on Ra resistor : Vdrop = I * Ra
So you have on analog input pin : Vminus + I * Ra

#### Pepe34

#17
##### Oct 06, 2009, 04:06 pm
Practical example, with your values -5V and +5V and let say both 10 kOhm resistors :
I = (5 - - 5) / (10 + 10) = 10 / 20 = 0.5mA
Voltage on resistor V = 0.5mA * 10 kOhm = 5V
Added to -5V you have  -5 + 5 = 0 V
-----------
Let your input voltage is 0V :
I = (5 - 0) / (10 + 10) kOhm = 0.25mA
On resistor V = 0.25 mA * 10 kOhm = 2.5V
Added to OV : 0 + 2.5 = 2.5V

#### Pepe34

#18
##### Oct 06, 2009, 04:09 pm
Practical remark : to have stable results, +5V supply must be stabilized nad 2.5V reference voltage (TL 431, LM336 ...) is recomended for full range conversion result.

#### Jassper

#19
##### Oct 06, 2009, 04:58 pm
Thanks Pepe34, single voltage dividers I know, but I couldn't get the math right with the neg voltage.

#### Jassper

#20
##### Oct 06, 2009, 07:07 pmLast Edit: Oct 06, 2009, 07:10 pm by Jassper Reason: 1
After plugging that formula into Excel, this is what I get

V Ref      Ra      Vsig      Rb      Vin
5      10000      0      10000      -5
5      10000      2.5      10000      0
2.5      10000      -1.25      10000      -5
2.5      10000      1.25      10000      0
10      10000      2.5      10000      -5
10      10000      5      10000      0

So the 5v and the 10v ref voltage give me the same range. I played with the resitor values a bit and it looks like about the best I can get is a 2.5 volt range.

#### azi

#21
##### Mar 13, 2010, 03:53 pm
Hmmm, what about maybe doing something like this to get a full range, tell me if this concept is ok

What about measuring the positive voltage, and whenever the voltage hits the 0 which means it will be going to the negative, you use transistor to switch + with -, and then programaticly you just substract the 1023 value (because the reading will be positive again), and then you have the negative reading?

Go Up

Please enter a valid email to subscribe

To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy