SSZTAW1 september 2016 ADS7040 , TLV341A , TMUX1308
As electronic devices become more self-aware, the need for voltage scaling increases. I’m not talking about artificial intelligence, like Hal from “2001: A Space Odyssey. I’m referring to are electronic devices that have more self-checks, which entail reading many voltages of various ranges.
Scaling an input voltage isn’t always as easy (or complex) as it first seems. In this post, I’ll walk through how I tackled this challenge in a recent signal chain design that needed to scale a +/-10-V signal down to a 0 to 2.5 V range to match all the other signals headed to the analog-to-digital converter (ADC). The transfer function to do this is linear: VOUT = VIN/8 + 1.25V.
Note: If you are looking for a solution for a specific voltage scaling need, visit this TI E2ETM support FAQ. It includes an Excel spreadsheet calculator that provides a circuit with ideal component values for just about any inverting or noninverting voltage scaling task.
The noninverting amplifier gain formula is (1 + RF/RG). For a gain of +1/8, the resistor ratio is negative. I can’t buy a -7k resistor, so that is big problem. My op amp will need an input common-mode range down to -10V; this is also a problem, because I don’t have a negative supply available. Clearly a noninverting op amp circuit is incompatible in this case, however it does work when the voltage gain needed is greater than one.
In my example, the gain is 1/8 and the offset is 1.25V. I’ll use the letters G and Z to represent gain and offset (output with zero input); thus, G = 1/8 and Z = 1.25V. My supply voltage, V, is 3.3V.
So what is the best way to solve for the values (or ratios) of resistors A, B and C? I could use the resistor-divider rule, VOUT = VIN * RI / (RG + RI), to calculate G and Z with Equations 1 and 2:
G = Gain = dVOUT/dVIN = (B||C) / (A+B||C) (1)
Z = Zero = VOUT[VIN=0V] = A||B / (C + A||B) * V (2)
The || symbol means “in parallel”; for example, x||y is x*y/(x+y) or 1/(1/x+1/y).
Solving these equations using the resistor-divider rule will be an ugly process, and it’s easy to make mistakes. I know – because I’ve done it.
A cleaner method involves using determinates to solve for three unknowns using three equations in the form of [ x1a +x2b + x3c = constant ].
To make my life easier, I changed resistance [A, B, C] into conductance [1/A, 1/B, 1/C] = [a, b, c].
I used Kirchhoff’s current law to create the first equation based on desired voltage gain. I set VIN=1VAC to make G = VOUT. See Figure 4. Equation 3 is the formula for AC current:
(G-1)*a + G*b + G*c = 0 (3)
I used Kirchhoff’s current law to create the second equation based on desired voltage offset. I set VIN = 0V, VOUT = Z, which is the output voltage with 0V input, see Figure 5. Thus, Equation 4 is:
Z*a + Z*b + (Z-V)*c = 0 (4)
You’ll need a third equation before you can solve three equations in three unknowns. Just about any equation will do; for example, setting resistor A to 10k gives you Equation 5:
1*a + 0*b + 0*c = 1/10,000 (5)
Now you can solve for all three resistors using determinates and convert the solved conductance [a, b, c] back to resistance [A, B, C] at the same time. Remember that G is gain and Z is output for 0V input, and V is the power-supply voltage. Figure 6 shows the solution using the three equations.
Solving determinates by hand can also lead to math errors, so let Microsoft Excel or some other math program do it for you. My solution was resistor [A, B, C] = [10k, 2.52k, 3.3k]. Rounded to the nearest 1%, the resistor is [10k, 2.55k, 3.3k].
If any resistance values come out negative, which indicates the the solution is not buildable, try changing the C resistor’s voltage supply (magnitude and polarity) and verify that the gain you need is less than 1.
The three-resistor solution is simple and accurate. However, keep in mind that the input impedance of the source signal and the load impedance placed on the output will become part of the scaler, and affect accuracy.
What’s your experience designing with resistors? Sign in and comment below.