Go Down

Topic: Scaling ±5v to 0 - 5v for ADC input (Read 827 times) previous topic - next topic


I'm trying to build a voltage controllable digital oscillator. The control voltage will be around ±5v but I need to be able to scale that down to 0-5v or 0-3.3v or whatever the reference voltage of the ADC I end up using is.

I understand that I can use an inverting op-amp circuit to scale the voltage down to 2.5v, but I'm struggling from there. I have read a little about biasing, but I'm struggling to understand it.

Any help would be greatly appreciated.


Search for this application note it will tell you all you need to know:-

Application Report SLOA097 - February 2002
Designing Gain and Offset in Thirty Seconds


Thanks, I think I am beginning to understand it. Once I've given it a go I'll post my results.


I think I'm misunderstanding this.

Determining the type of function depends on the sign of two numbers: m (the gain of the stage) and b (the offset of the stage) - that are calculated now.
As I understand it, full scale and zero scale are the min and max voltages.

VoutFS = 5
VoutZS = 0

VinFS = 5
VinZS = -5

M = (5-0) / (5- -5) = 0.5
B = 0 - 0.5 x -5 = -2.5

Therefore, according to this sheet, I need the calculation for positive M and negative B.

Trying to calculate Rg gives me a negative number though, so I must be doing something wrong.


I figured it out. The calculation at the top of the page is a bit misleading, or I don;t understand it fully. I have a negative gain and a positive offset and simulating that circuit based on the calculated values works fine. I've had to invert the input using an inverting buffer but, at least in the simulator, it works as expected.

Here's the circuit adapted for -10 to 10v on the input.


Sep 02, 2019, 02:33 pm Last Edit: Sep 02, 2019, 02:35 pm by MarkT
Scaling down can be done with just 3 resistors, its a voltage divider between the input and a fraction of the
supply voltage (itself done with a voltage divider).

Three resistors from the analog pin:
20k input resistor,
20k to ground,
10k to 5V.
Midpoint will be 5V when input is 10V, 2.5V when input is 0V, and 0V when input is -10V.

For a +/-5V input only 2 resistor values are needed 10k input resistor, 10k to 5V
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


Thanks, that works too. I'm not sure if that's the right way to do it for my application though, since I'm told that I should use opamps for buffering. I suppose I could use a unity gain amp on the input.

Is there an advantage of doing it actively rather than passively?


Is there an advantage of doing it actively rather than passively?
With using an op-amp you get a higher input impedance and a lower output impedance.

Go Up