SSZTAW1 september   2016 ADS7040 , TLV341A , TMUX1308

 

  1.   1
  2.   2
    1.     3
    2.     Solution #1:
    3.     Solution #2:
    4.     Solution #3:
    5.     Implementing Solution 3 into a Multiplexed Channel ADC Application:
    6.     Additional Resources

Ron Michallick

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.

Solution #1:

My first thought was to use a noninverting operational amplifier (op amp) circuit. After doing some quick math, I determined that the circuit, shown in Figure 1, needed a 1.43V offset supply and a feedback/ground-resistor ratio of -7/8.

GUID-B678D938-92A3-4AE6-8E79-85A6A5BED00F-low.png Figure 1 Solution #1 Simulates Well, but Is Impossible to Implement

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.

Solution #2:

The five-resistor op-amp circuit shown in Figure 2 is a difference amplifier with the inverting input grounded and the noninverting input terminated 1.25V. The gain is set to 1/8. The input common-mode range is 0V to 2.22V, so I can use a single-supply op amp.

GUID-11399637-B3D6-4910-88F6-EA5F79563EAB-low.png Figure 2 Solution #2 Works, but Could There Be a Better Solution?

Solution #3:

I don’t need an op amp to attenuate a signal. I can use three resistors – A, B and C – and a voltage source, V, to perform the desired scaling task. See Figure 3.

GUID-BFA279F0-0BB9-4FBC-92E4-C6A9D07BC835-low.png Figure 3 This Simple Solution Uses Just Three Resistors with an Existing Power Source

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)

GUID-2D541EDB-C29A-4388-BFD6-1A0546E10A66-low.png Figure 4 Kirchhoff’s Current Schematic for Equation 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)

GUID-C92E8CF6-3F32-4DA7-8E1E-89BAB86295B9-low.png Figure 5 Kirchhoff’s Current Schematic for Equation 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.

GUID-400D0DDE-40E1-4DAE-8D04-980349A754B7-low.png Figure 6 Solution for 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.

Implementing Solution 3 into a Multiplexed Channel ADC Application:

Figure 7 is my final circuit that scales the +/10V signal going to channel 1. The schematic also includes a TMUX1308 8-channel input multiplexer, TLV341A amplifier/buffer, and a ADS7040 ADC.

GUID-D0E9D112-062C-4DC5-9016-254CB5BF14C8-low.png Figure 7 Eight-channel Analog Scaling Solution (Two Inputs Shown)

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.

Additional Resources