|Home Analog Devices Feedback Subscribe Archives 简体中文 日本語|
A Deeper Look into Difference Amplifiers
By Harry Holt
College electronics courses illustrate applications for ideal op amps, including inverting and noninverting amplifiers. These are then combined to create a difference amplifier. The classic four resistor difference amplifier, shown in Figure 1, is quite useful and has been described in textbooks and literature for more than 40 years.
Figure 1. Classic difference amplifier.
The transfer function of this amplifier is
With R1 = R3 and R2 = R4, Equation 1 simplifies to
This simplification occurs in textbooks, but never in real life, as the resistors are never exactly equal. In addition, other modifications of the basic circuit can yield unexpected behavior. The following examples come from real application questions, although they have been simplified to show the essence of the problem.
In a 1991 article, Ramón Pallás-Areny and John Webster showed that the common-mode rejection, assuming a perfect op amp, is
where Ad is the gain of the difference amplifier and t is the resistor tolerance. Thus, with unity gain and 1% resistors, the CMRR is 50 V/V, or about 34 dB; with 0.1% resistors, the CMRR is 500 V/V, or about 54 dB—even given a perfect op amp with infinite common-mode rejection. If the op amp's common-mode rejection is high enough, the overall CMRR is limited by resistor matching. Some low-cost op amps have a minimum CMRR in the 60 dB to 70 dB range, making the calculation more complicated.
Low Tolerance Resistors
Figure 2. Low-side sensing with high noise gain.
For very low value current shunts, use a 4-terminal, Kelvin sense resistor. With a high-accuracy 0.1-Ω resistor, make the connections directly to the resistor, as a few tenths of an inch of PCB trace can easily add 10 mΩ, causing more than 10% error. But the error gets worse; the copper trace on the PCB has a temperature coefficient greater than 3000 ppm.
The value of the sense resistor must be chosen carefully. Higher values develop larger signals. This is good, but power dissipation (I2R) increases, and could reach several watts. With smaller values, in the milliohm range, parasitic resistance from wires or PCB traces can cause significant errors. To reduce these errors, Kelvin sensing is usually employed. A specialized 4-terminal resistor (Ohmite LVK series, for example) can be used, or the PCB layout can be optimized to use standard resistors, as described in "Optimize High-Current Sensing Accuracy by Improving Pad Layout of Low-Value Shunt Resistors." For very small values, a PCB trace can be used, but this is not very accurate, as explained in "The DC Resistance of a PCB Trace."
Commercial 4-terminal resistors, such as those from Ohmite or Vishay, can cost several dollars or more for 0.1% tolerance with very low temperature coefficients. A complete error budget analysis can show where the accuracy can be improved for the least increase in cost.
One complaint regarding a large offset (31 mV) with no current through the sense resistor was caused by a "rail-to-rail" op amp that couldn't swing all the way to the negative rail, which was tied to ground. The term rail-to-rail is misleading: the output will get close to the rail—a lot closer than classical emitter follower output stages—but will never quite reach the rail. Rail-to-rail op amps specify a minimum output voltage, VOL, of either VCE(SAT) or RDS(ON) × ILOAD, as described in "MT-035: Op Amp Inputs, Outputs, Single-Supply, and Rail-to-Rail Issues." With a 1.25-mV offset and a noise gain of 30, the output will be:
Another Low-Side Sensing Application
Figure 3. Low-side sensing, example 2.
High Noise Gain
Figure 4. High-side current sensing.
Single Capacitor Roll-Off
Figure 5. Attempt to create a low-pass response.
To match the impedance ratios Z1 = Z3 and Z2 = Z4, capacitor C4 must be added. It's easy to buy 0.1% or better resistors, but even 0.5% capacitors can cost more than $1.00. At very low frequencies the impedance may not matter, but a 0.5-pF difference on the two op amp inputs caused by capacitor tolerance or PCB layout can degrade the ac CMR by 6 dB at 10 kHz. This can be important if a switching regulator is used.
Monolithic difference amplifiers, such as the AD8271, AD8274, or AD8276, have much better ac CMRR because the two inputs of the op amp are in a controlled environment on the die, and the price is often lower than that of a discrete op amp and four precision resistors.
Capacitor Between the Op Amp Inputs
Figure 6. Input capacitor decreases high-frequency feedback.
On a Bode plot, the open-loop gain of the op amp is decreasing at –20 dB/dec, but the noise gain is increasing at +20 dB/dec, resulting in a –40 dB/dec crossing. As taught in control systems class, this is guaranteed to oscillate. As a general guideline: never use a capacitor between the inputs of an op amp. (There are very few exceptions, but they won't be covered here.)
Miller, Eric M. The DC Resistance of a PCB Trace.
O'Sullivan, Marcus. "Optimize High-Current Sensing Accuracy by Improving Pad Layout of Low-Value Shunt Resistors." Analog Dialogue, Volume 46, Number 2, 2012.
Pallás-Areny, Ramón and Webster, John G. Common Mode Rejection Ratio in Differential Amplifiers. IEEE Transactions On Instrumentation and Measurement, Volume 40, Number 4, August 1991. Pages 669–676.
MT-035 Tutorial. Op Amp Inputs, Outputs, Single-Supply, and Rail-to-Rail Issues.
Share this article
Copyright 1995- Analog Devices, Inc. All rights reserved.