Hello
I want to feed a -10v to +10v signal to one of the arduino 5v analog pins. I am pretty sure I can do this with an op amp but I am having trouble trying to figure out the resistors that will give me the proper gain and slope. Any help would be great!
Thank you
scaling +/- voltage to adc
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67454
- Joined: Thu Feb 11, 2010 2:51 pm
Re: scaling +/- voltage to adc
You don't need an op amp.. a plain old voltage divider will work:
A 3:1 voltage divider with one end tied to 3.33v will convert +/-10v input to 0-5v output.
That sounds abstract, but you can build the whole thing from four 10k resistors:
3.33v is 2/3 of 5v, so a 2:1 voltage divider will give you 3.33v.
Putting two 10k resistors in parallel will give you the equivalent of a 5k resistor. Putting that above a 10k will give you 3.33v from a 5v supply.
The center of any voltage divider has an effective resistance equal to the upper and lower resistors in parallel, which in this case works out as 3.33k. That's exactly 1/3 of a 10k resistor, so connecting a 10k resistor to the input will give us the 3:1 voltage divider necessary to convert the +/-10v input to 0-5v.
A 3:1 voltage divider with one end tied to 3.33v will convert +/-10v input to 0-5v output.
That sounds abstract, but you can build the whole thing from four 10k resistors:
3.33v is 2/3 of 5v, so a 2:1 voltage divider will give you 3.33v.
Putting two 10k resistors in parallel will give you the equivalent of a 5k resistor. Putting that above a 10k will give you 3.33v from a 5v supply.
The center of any voltage divider has an effective resistance equal to the upper and lower resistors in parallel, which in this case works out as 3.33k. That's exactly 1/3 of a 10k resistor, so connecting a 10k resistor to the input will give us the 3:1 voltage divider necessary to convert the +/-10v input to 0-5v.
- aaronmeyers
- Posts: 1
- Joined: Thu Dec 22, 2016 6:35 pm
Re: scaling +/- voltage to adc
Hi... I was looking for information on getting a +/- 5v signal to a 0-5v range and I came across this great circuit!
I was wondering if you could advise on how the resistors would change for my range of -5v to +5v.
Thanks!
-Aaron
I was wondering if you could advise on how the resistors would change for my range of -5v to +5v.
Thanks!
-Aaron
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: scaling +/- voltage to adc
Mike answers that question fairly often... Here is his latest:
viewtopic.php?f=25&t=107645&p=538491&hi ... er#p538491
viewtopic.php?f=25&t=107645&p=538491&hi ... er#p538491
Please be positive and constructive with your questions and comments.