# Transform one voltage range to another

I have a 0-12V voltage range (Vin) that I need to transform to a 100mV-900mV voltage range (Vout). The 0-12V input is fixed from another system, and my analog circuitry needs the 100mV-900mV for proper operation of the IC to which I must supply this voltage. I have tried following this guide (Application Report SLOA097 from TI) called Designing Gain and Offset in Thirty Seconds. I have calculated the linear transformation to be Vout(Vin) = m * Vin + b => Vout(Vin) = 66.66mV * Vin + 100 mV. This works out fine. A few discrete values as examples: Vout(0) = 100mV, Vout(3) = 300mV, Vout(6) = 500mV, Vout(9) = 700mV & Vout(12) = 900mV, which maps the input range to the output range perfectly. My problem comes from the actual implementation of the circuitry. The TI app note specifies a biased voltage divider and non-inverting amplifier circuit combination for positive m and positive b. My transformation has m = 66.66mV and b = 100 mV, so these are both positive.

Using a seed value of R1 = 10kOhm and a Vref of 3.3V, I calculate R2 = 22kOhm. Using a seed value of Rf = 10kOhm gives a Rg value of -11kOhm. I haven't been able to purchase a -11kOhm resistor anywhere :) I guess the issue arises because my m value is between 0 and 1, i.e. non-inverting but attenuating. I am looking for circuit implementation suggestions to solve this problem, any recommendations are greatly appreciated.

You need another resistor (from the non-inverting input to ground) if attenuation is required. Call that Rs.

Let's pick R1||R2||Rs = 10K

Then we can immediately write:

(12V/R1)*10K = 0.8V so R1 = 150K

The output will be zero when the input is -(1/8)*12V or -1.5V.

So Vref/R2 = 1.5/150K by KCL. Say Vref is 5V then R2 = 500K (499K is closest E96 value)

And finally Rs is 1/(1/10K - 1/150K - 1/500K) = 10.95K.

(and Rf = 10K, Rg = open) -- Rf = 10K cancels out offset component from input bias currents if they are equal.

simulate this circuit – Schematic created using CircuitLab

• This works perfectly! Thank you very much. Aug 20 '20 at 6:16
• I have to expand the range from 100mV-900mV to 50mV-950mV. I have tried to redo the math, but I struggle with the step: "The output will be zero when the input is -(1/8)*12V or -1.5V." Where does 1/8 come from and what changes when the range is expanded? Thank you in advance! Aug 24 '20 at 10:09
• It’s linear so calculate the intercept (theoretical). In this case it had to go down 100mV and the gain is 12V:800mV. This makes the calculation much easier because Rs disappears and it’s substitution rather than solving a system of two equations in two unknowns. Aug 24 '20 at 10:47
• The linear transformation, for a 50mV-950mV range, becomes Vout(Vin)=75mV+50mV. The intercept must then be Vout(Vin)=0 => Vin = -0,667V. Redoing the math, as per your previous equations, give me R1 = 133kOhm, R2 = 1 MegOhm and Rs = 10K9 Ohm. I dont see how Rs disappears as I still need attentuation, as in the previous case? Aug 24 '20 at 13:23
• I mean that Rs disappears for the calculation of R2. Then Rs drops out from the parallel combination resistance. Because the - input = + input = output = 0V, then Rs is not doing anything much at that particular special point only. Aug 24 '20 at 15:04