# Arduino Forum

## Using Arduino => General Electronics => Topic started by: SW_guy on Dec 16, 2012, 09:30 pm

Title: Sensing negative voltage
Post by: SW_guy on Dec 16, 2012, 09:30 pm
I have a project that requires sensing voltage over a range of -2 volts to +2 volts.  The voltage will vary from + to - several times per second.  I cannot find that the Arduino analog pins can sense any voltage outside the range of 0 to +5 volts.  Is there any way to sense & measure negative voltage?

Thanks to anyone who can help
Title: Re: Sensing negative voltage
Post by: retrolefty on Dec 16, 2012, 09:48 pm

I have a project that requires sensing voltage over a range of -2 volts to +2 volts.  The voltage will vary from + to - several times per second.  I cannot find that the Arduino analog pins can sense any voltage outside the range of 0 to +5 volts.  Is there any way to sense & measure negative voltage?

Thanks to anyone who can help

Not directly. Usually in cases like yours one can use an external op-amp circuit to 'level shift' the -2 to +2 range to a say 0 to 4 volt or 1 to 5 volt range and then just factor out the offset in software.

Lefty

Title: Re: Sensing negative voltage
Post by: winner10920 on Dec 16, 2012, 10:16 pm
Are you talking about like an analog reading orjust positiveor negative? If the latter then just an optocoupler will work to tell you if you have negative voltage
Title: Re: Sensing negative voltage
Post by: Magician on Dec 16, 2012, 10:22 pm
Other option is to connect voltage divider (1:1) between input and +5V. Than negative -2 would be sensed as +1.5V, and +2V as 3.5V.
Title: Re: Sensing negative voltage
Post by: Tom Carpenter on Dec 16, 2012, 10:25 pm
Potential divider is the simplest approach. (EDIT: as Magician has said.)
Title: Re: Sensing negative voltage
Post by: mmcp42 on Dec 16, 2012, 10:56 pm

Other option is to connect voltage divider (1:1) between input and +5V. Than negative -2 would be sensed as +1.5V, and +2V as 3.5V.

very clever solution :)
Title: Re: Sensing negative voltage
Post by: Tom Carpenter on Dec 16, 2012, 11:21 pm
Just for completeness, attached is the proposed circuit.

The two values 'R' are the same, but the exact value depends on what sort of load resistance you can put on your signal. Ideally they should be no more than 32kOhm, which would present 64kOhm to your signal source.
Title: Re: Sensing negative voltage
Post by: MarkT on Dec 17, 2012, 02:08 pm

Other option is to connect voltage divider (1:1) between input and +5V. Than negative -2 would be sensed as +1.5V, and +2V as 3.5V.

Well since we don't know the source's impedance this isn't guaranteed to work - some more information about the source of the
+/- 2V signal would be useful.