<<

AN-937

APPLICATION NOTE One Way • P. O. Box 9106 • Norwood, MA 02062-9106, U.S.A. • Tel: 781.329.4700 • Fax: 781.461.3113 • www.analog.com

Designing Circuits: How to Avoid Common Problems by Charles Kitchin

INTRODUCTION down toward the negative supply. The bias is amplified When compared to assemblies of discrete , by the closed-loop dc of the amplifier. modern operational (op amps) and instrumenta- This process can be lengthy. For example, an amplifier with a tion amplifiers (in-amps) provide great benefits to designers. field effect (FET) input, having a 1 pA bias current, Although there are many published articles on circuit coupled via a 0.1-μF , has an IC charging rate, I/C, of applications, all too often, in the haste to assemble a circuit, 10–12/10–7 = 10 μV per sec basic issues are overlooked leading to a circuit that does not function as expected. This application note discusses the most or 600 μV per minute. If the gain is 100, the output drifts at common design problems and offers practical solutions. 0.06 V per minute. Therefore, a casual lab test, using an ac- coupled scope, may not detect this problem, and the circuit MISSING DC BIAS CURRENT RETURN PATH may not fail until hours later. It is important to avoid this One of the most common application problems encountered is problem altogether. the failure to provide a dc return path for bias current in ac- +VS coupled op amp or in-amp circuits. In Figure 1 a capacitor is C1 connected in series with the noninverting (+) input of an op 0.1µF VIN R1 amp. This ac is an easy way to block dc OP AMP VOUT associated with the input voltage (VIN). This is especially useful in high gain applications, where even a small dc voltage at 0.1µF amplifier input can limit the or even result in R3 –V output saturation. However, into a high- S impedance input without providing a dc path for current R2 DESIGN EQUATIONS flowing in the positive input leads to problems. –3dB INPUT BW = 1/(2π R1 C1) R1 IS TYPICALLY SET EQUAL TO +VS THE COMBINATION OF R2 AND R3.

07034-002 0.1µF Figure 2. Correct Method for AC- Coupling an Op Amp Input for VIN Dual-Supply Operation OP AMP VOUT Figure 2 shows a simple solution to this common problem. In

0.1µF this example, a is connected between the op amp input and to provide a path for the input bias current. To R3 –VS minimize offset voltages caused by input bias currents, which

R2 track one another when using bipolar op amps, R1 is usually set

7034-001 equal to the parallel combination of R2 and R3. 0 Figure 1. A Nonfunctional AC-Coupled Op Amp Circuit Note, however, that this resistor always introduces some The input bias current flows through the coupling capacitor, into the circuit, so there is a trade-off between circuit input charging it, until the common-mode voltage rating of the impedance, the size of the input coupling capacitor needed, and amplifier’s input circuit is exceeded or the output is driven into the Johnson noise added by the resistor. Typical resistor values limits. Depending on the polarity of the input bias current, the are generally in the range of about 100,000 Ω to 1 MΩ. capacitor charges up toward the positive supply voltage or

Rev. 0 | Page 1 of 8 AN-937

TABLE OF CONTENTS Introduction ...... 1 Correctly Providing In-Amp Reference Voltage...... 4 Missing DC Bias Current Return Path ...... 1 Preserving PSR When Amplifiers Are Referenced from the Supplying Reference Voltages for In-Amps, Op Amps, and Supply Rail Using Voltage Dividers ...... 5 ADCs...... 4 Decoupling Single-Supply Op Amp Circuits ...... 6

Rev. 0 | Page 2 of 8 AN-937

A similar problem can affect an in-amp circuit. Figure 3 shows Simple solutions for these circuits are shown in Figure 5 and in-amp circuits that are ac-coupled using two , with- Figure 6. A high value resistance (RA, RB) is added between each out providing an input bias current return path. This problem input and ground. This is a simple and practical solution for is common with in-amp circuits using both dual- dual-supply in-amp circuits. The provide a discharge supplies (Figure 3a) and single-power supplies (Figure 3b). path for input bias currents. In the dual-supply example, both

+VS +VS inputs are referenced to ground. In the single-supply example, the inputs can be referenced either to ground (VCM tied to 0.1µF ground) or to a bias voltage, usually one-half the maximum VOUT VOUT input voltage range. VIN IN-AMP VIN IN-AMP VREF V REF +VS 0.1µF VS/2 0.1µF –VS RA VOUT IN-AMP a). DUAL SUPPLY b). SINGLE SUPPLY 07034-003 RB VREF Figure 3. Nonfunctional AC-Coupled In-Amp Circuits 0.1µF The problem can also occur with coupling, as in –VS 07034-006 Figure 4, if no dc return path to ground is provided in the Figure 5. Correct Method for Transformer Input Coupling to an In-Amp transformer’s secondary circuit. The same principle can be used for transformer-coupled inputs +VS (Figure 5) unless the transformer secondary winding has a

0.1µF center tap, which can be grounded or connected to VCM. In

VOUT these circuits, there is a small offset voltage error due to IN-AMP mismatches between the resistors and/or the input bias VREF 1 th 0.1µF currents. To minimize these errors, a third resistor, about /10 their value (but still large compared to the differential source

–VS 07034-004 resistance), can be connected between the two in-amp inputs Figure 4. A Nonfunctional Transformer-Coupled In-Amp Circuit (thus bridging both resistors).

+VS +VS

0.1µF 0.1µF

RA VOUT RA VCM VOUT VIN IN-AMP VIN IN-AMP RB RB VREF VREF 0.1µF NORMALLY VS/2

–VS VCM CAN BE GROUND OR, FOR MAXIMUM INPUT DYNAMIC RANGE, SET VCM TO THE CENTER OF THE MAXIMUM INPUT RANGE. a). DUAL SUPPLY b). SINGLE SUPPLY 07034-005 Figure 6. A High Value Resistor Between Each Input and Ground Supplies the Necessary Bias Current Return Path

Rev. 0 | Page 3 of 8 AN-937

SUPPLYING REFERENCE VOLTAGES FOR IN-AMPS, For example, a popular in-amp design configuration uses three OP AMPS, AND ADCS op amps connected as shown in Figure 8. The overall Figure 7 shows a single-supply circuit where an in-amp is gain is driving a single-ended analog-to-digital converter (ADC). The ⎛ R R6 ⎞⎛ R ⎞ amplifier reference provides a bias voltage corresponding to ⎜ 5 ⎟⎜ 2 ⎟ G ⎜1 ++= ⎟⎜ ⎟ zero differential input, and the ADC reference provides the ⎝ R RGG ⎠⎝ R1 ⎠ scale factor. A simple RC low-pass antialiasing filter is often where: used between in-amp output and ADC input to reduce out-of- band noise. Often designers are tempted to use simple R R 2 = 4 approaches, such as resistance dividers, to supply the in-amp R1 R3 and ADC reference voltages. This can to errors with some The gain for the reference input (if driven from low impedance) in-amps. is unity. However, in this example, the in-amp has its reference 5V 5V pin tied directly to a simple . This unbalances the

0.1µF 0.1µF symmetry of the subtractor circuit and the division ratio of the ADC voltage divider. This reduces the in-amp’s common-mode OUTPUT R DIFFERENTIAL IN-AMP INPUT AD7685 rejection and its gain accuracy. However, in some cases, R4 is C accessible, thus its resistance value can be reduced by an

REFERENCE amount equal to the resistance looking back into the paralleled TYPICALLY 2.5V REFERENCE TYPICALLY legs of the voltage divider (50 kΩ in this case). In this case, the 2.5V TO 5V TYPICAL VALUES FOR RC circuit behaves as though a low impedance equal LP FILTER R = 50Ω TO 200Ω to one-half the supply voltage is applied to the original value of SET C TO PROVIDE DESIRED –3dB CIRCUIT BANDWIDTH USING R4. In addition, the subtractor accuracy is maintained. C = 1/(2π R F)

07034-007 Figure 7. An In-Amp Drives an ADC in a Typical Single-Supply Circuit This approach can not be used if the in-amp is provided as a closed single package (an IC). Another consideration is that the CORRECTLY PROVIDING IN-AMP REFERENCE temperature coefficients of the resistors in the voltage divider VOLTAGE should track those of R4 and the other resistors in the A common assumption is that the in-amp reference-input subtractor. Finally, the approach locks out the possibility of terminal is at , since it is an input. Therefore, a having the reference be adjustable. If, on the other hand, one designer may be tempted to connect a high impedance source, attempts to use small resistor values in the voltage divider to such as a resistive divider, to the reference pin of an in-amp. make the added resistance negligible, this increases power This can introduce serious errors with some types of supply current consumption and increases the of instrumentation amplifiers (see Figure 8). the circuit. Such brute force is not a good design approach. Figure 9 shows a better solution, using a low power op amp buffer between the voltage divider and the in-amp reference input. This eliminates the and temper- ature tracking problem and allows the reference to be easily adjustable.

INVERTING INPUT 3 R1 R2 A1 1 2 R5

2 VOUT 6 RG A3 3 +VS

R6 REFERENCE 6 100kΩ R3 R4 INPUT VOLTAGE A2 7 DIVIDER 5 INPUT OUTPUT 100kΩ NONINVERTING SECTION SECTION INPUT 7034-008

0 Figure 8. Incorrect Use of a Simple Voltage Divider to Directly Drive the Reference Pin of a 3 Op amp Instrumentation Amplifier

Rev. 0 | Page 4 of 8 AN-937

INVERTING INPUT

R1 R2 A1

R5

VOUT RG A3 +VS R6 REFERENCE R3 R4 INPUT 100kΩ A2 VOLTAGE INPUT OUTPUT DIVIDER SECTION SECTION OP AMP BUFFER 100kΩ

NONINVERTING INPUT 07034-009 Figure 9. Driving the Reference Pin of an In-Amp from the Low Impedance Output of an Op Amp

PRESERVING PSR WHEN AMPLIFIERS ARE In Figure 10, a large capacitor is added to the voltage divider to REFERENCED FROM THE SUPPLY RAIL USING filter its output from variations and preserve PSR. VOLTAGE DIVIDERS The −3 dB pole of this filter is set by the parallel combination of R1/R2 and Capacitor C1. The pole should be set approximately An often-overlooked consideration is that any noise, transients, 10 times lower than the lowest of concern. or drift of power supply voltage, VS, fed in through the +VS +VS reference input adds directly to the output, attenuated only by BRIDGE the divider ratio. Practical solutions include bypassing and 0.1µF filtering, and even generating the reference voltage with a IN-AMP OUTPUT precision reference IC, such as the ADR121, instead of tapping AD8221 off VS. REFERENCE INPUT +VS +VS This consideration is important when designing circuits with R1 100kΩ both in-amps and op amps. Power supply rejection (PSR) 0.1µF techniques isolate an amplifier from power supply hum, noise, VS/2 CF OP AMP 100µF R2 and any transient voltage variations present on the power rails. OP1177 100kΩ This is important because many real world circuits contain, R3 connect to, or exist in environments that offer less than ideal 50kΩ supply voltage. In addition, ac present on the supply 0.01µF lines can be fed back into the circuit, amplified, and, under the right conditions, stimulate a parasitic . DESIGN EQUATIONS CF = 1/((2π) 50kΩ × FREQUENCY IN Hz) COOKBOOK VALUES: 10µF (0.3Hz) TO 100µF (0.03Hz) Modern op amps and in-amps provide substantial low R3 = PARALLEL COMBINATION OF R1, R2 frequency power supply rejection as part of their design. This is C = 1/(2πR3f), R3 = 50kΩ, f = –30dB FREQUENCY IN Hz F 7034-010 0 something that most engineers take for granted. Many modern Figure 10. Decoupling the Reference Circuit to Preserve PSR op amps and in-amps have PSR specs of 80 dB to over 100 dB, reducing the effects of power supply variations by a factor of The cookbook values shown in Figure 10 provide a −3 dB pole 10,000 to 100,000. Even a modest PSR specification of 40 dB frequency of approximately 0.03 Hz. The small (0.01 μF) isolates supply variations from the amplifier by a factor of 100. capacitor across R3 minimizes resistor noise. Nevertheless, high frequency bypass capacitors (such as those The filter takes time to charge up. Using the cookbook values, in Figure 1 through Figure 7) are always desirable and often the at the reference input is several time constants essential. In addition, when designers use a simple resistance (where T = R3Cf = 5 s), or about 10 to 15 seconds. divider on the supply rail and an op amp buffer to supply a The circuit in Figure 11 offers a further refinement. In this case, reference voltage for an in-amp, any variations in power supply the op amp buffer operates as an , which allows the voltage are passed through this circuitry with little attenuation use of much smaller capacitors for the same amount of power and add directly to the in-amp output level. Therefore, unless supply decoupling. In addition, the active filter can be designed low-pass filtering is provided, the normally excellent PSR of the to provide a higher Q and thus give a quicker -on time. IC is lost.

Rev. 0 | Page 5 of 8 AN-937

This circuit was tested with the component values shown in DECOUPLING SINGLE-SUPPLY OP AMP CIRCUITS Figure 11, with 12 V applied, and a 6 V filtered reference Single-supply op amp circuits require of the input voltage provided to the in-amp. A 1 V p-p sine wave of varying common-mode level to handle the positive and negative swings frequency was used to modulate the 12 V supply, with the in- of ac signals. When this bias is provided from the power supply amp gain set to unity. Under these conditions, as frequency was rail using voltage dividers, adequate decoupling is required to decreased, no ac signal was visible on an , at VREF, preserve PSR. or at the in-amp output, until approximately 8 Hz. Measured A common, though incorrect, practice is to use a 100 kΩ/100 supply range for this circuit ranged from 4 V to greater than kΩ resistor divider with a 0.1 μF bypass capacitor to supply 25 V, with a low level input signal applied to the in-amp. VS/2 to the noninverting pin of the op amp. Using these values, Circuit turn-on time was approximately two seconds. power supply decoupling is often inadequate because the pole frequency is only 32 Hz.

+VS BRIDGE +VS SENSOR 0.1µF

IN-AMP OUTPUT AD8221 C1 REFERENCE 2µF INPUT +VS +VS R1 DESIGN EQUATIONS R3 200kΩ Q = C1/4C2 0.1µF 100kΩ

2πf = 1/ R C1C2 VS/2 ( ) OP AMP C2 1µF R2 WHERE R = R3 OP1177 200kΩ AND R1 AND R2 = 2R3 FOR C1 = C2 Q = 0.5 R4 FOR C1 = 2C2 Q = 0.707 200kΩ OP-AMP BUFFER DRIVE TO IN-AMP REFERENCE PIN 0.01µF WITH BUILT-IN ACTIVE FILTER 07034-011

Figure 11. An Op Amp Buffer Connected as an Active Filter Drives the Reference Pin of an In-Amp

+V +V S S 0.1µF 1µF 1 BW1 = R A * * 2π (1/2RA) C2 100kΩ RIN 100kΩ V /2 1 S BW2 = 2π R C VOUT IN IN C2 RB 100kΩ OP1177 1 BW3 = COUT 2π R1 C1 RLOAD 1 R2 BW4 = V /2 150kΩ 2π R C S LOAD OUT V IN CIN FOR RA = RB R1 AND BW1 = 1/10TH BW2, BW3, AND BW4 C1 TO MINIMIZE INPUT BIAS CURRENT ERRORS, R2 SHOULD EQUAL R + (1/2 R ) *STAR IN A GROUND VOUT = (VS/2) + VIN (1 + (R2/R1)) WHERE XC1 << R1 07034-012 Figure 12. A Single-Supply Noninverting Amplifier Circuit Showing Correct Power Suppy Decoupling. Midband Gain = 1 + R2/R1

Rev. 0 | Page 6 of 8 AN-937

Circuit instability (motor boating) Figure 12 (noninverting) biases the output to the same voltage. Coupling Capacitor C1 and Figure 13 (inverting) show circuits to accomplish VS/2 rolls the low frequency gain down toward unity from BW3. decoupled biasing for best results. In both cases, bias is A good rule of thumb when using a 100 kΩ/100 kΩ voltage provided at the noninverting input, causes the divider, as shown in Figure 12, is to use a C2 value of at least inverting input to assume the same bias, and unity dc gain 10 μF for a 0.3 Hz −3 dB roll-off. A value of 100 μF (0.03 Hz pole) should be sufficient for practically all circuits.

+V +V S S 0.1µF 1µF

R 1 A * * BW1 = 100kΩ 2π (1/2RA) C2 VS/2 1 BW2 = VOUT 2π R1 C1 C2 RB 100kΩ OP1177 V /2 C 1 S OUT BW3 = 2π RLOAD COUT RLOAD R2 C1 FOR RA = RB R1 50kΩ AND XC2 << XC1

VOUT = (VS/2) + VIN (R2/R1) *STAR GROUND WHERE XC1 << R1 TO MINIMIZE INPUT BIAS CURRENT ERRORS, R2 SHOULD EQUAL 1/2 RA 07034-013 Figure 13. Proper Decoupling for a Single-Supply Inverting Amplifier Circuit. Midband Gain = –R2/R1

Rev. 0 | Page 7 of 8 AN-937

NOTES

©2007 Analog Devices, Inc. All rights reserved. Trademarks and registered trademarks are the property of their respective owners. AN07034-0-11/07(0)

Rev. 0 | Page 8 of 8