Troubleshooting Analog Circuits--Operational Amplifiers (part 2)

Home | Articles | Forum | Glossary | Books

(cont. from part 1)

An Important Principle

For many years, I've been cautioning people: If you have a regulator or an amplifier circuit and it oscillates, do not just add resistors or capacitors until the oscillation stops. If you do, the oscillation may go away for a while, but after it lulls you into complacency, it will come back like the proverbial alligator and chomp on your ankle and cause you a great deal of misery.

Instead, when you think you have designed oscillation may disappear with heavier capacitive loads, and installed a good fix for the oscillation, BANG on the output with square waves of various amplitudes, frequencies, and amounts of load current. One of the easiest ways to perform this test is to connect a square-wave generator to your circuit through a couple hundred ohms in series with a 0.2-uF ceramic disc capacitor. Connect the generator to the scope, so you can trigger on the square-wave signal. Also, apply an adjustable DC load that's capable of exercising the device's output over its full rated output-current range or, in the case of an op amp, over its entire rated range for output voltage and current.

To test an op amp, try various capacitive loads to make sure it can drive the worst case you expect it to encounter. For some emitter-follower output stages, the worst case may be around 10 to 50 pF. The oscillation may disappear with heavier capacitive loads.

The adjacent figure does not show a recommended value for some of the parts. If you are testing a 5-A regulator, you may want a load resistor as low as an ohm or two. If you are evaluating a low-power amplifier or a micropower reference, a value of a megohm may be reasonable, both for the load resistor and for the resistor from the square-wave generator. Thinking is recommended. Heck, thinking is required.

When you bang a device's output and that output rings with a high Q, you know your "fix" doesn't have much margin. When the output just goes "flump" and doesn't even ring or overshoot appreciably, you know your damping is effective and has a large safety margin. Good! Now, take a hair dryer and get the circuit good and warm. Make sure that the damping is still pretty well behaved and that the output doesn't begin to ring or sing when you heat the capacitor or power transistor or control IC or anything.

I don't mean to imply that you shouldn't do a full analysis of AC loop stability. But the approach I have outlined here can give you pretty good confidence in about five minutes that your circuit will (or won't) pass a full set of exhaustive tests.


Watch Out for Real Trouble

What real trouble can an op amp get you into without much help from the components? Well, you could have a part with a bad Vas. Or if the temperature is changing, the thermocouples of the op amp's Kovar leads may cause small voltage differences between the op amp leads and the copper of the PC board. Such differences can amount to 1/10 or 1/20 of a Celsius degree times 35 pV per degree, which equals 2 to 3 pV. A good way to avoid this problem is to put a little box over the amplifier to keep breezes and sunshine off the part. That's very helpful unless it's a high-power opamp. Then just repeat after me, "Heat is the enemy of precision," because it is.

After all, when an IC has to handle and dissipate a lot of power, it's not going to be nearly as accurate as when it is not overheating, and when all the components around it get heated, too.

You should remember, too, that not all op amps of any one type have the exact same output-voltage swing or current drive or frequency response. I get phone calls every four or five months from customers who complain, "We have a new batch of your op amps, and they don't have as good an output swing (or output current or frequency response) as the previous batches." When I check it out, 98% of the time I find that a part with extremely good performance is just a random variation. The customer had got into the habit of expecting all the parts to be better than average.

When they got some parts that were still much better than the guaranteed spec but worse than average or "typical," they found themselves in trouble. It's always painful to have to tell your friends that you love them when they like you and trust you, but they really shouldn't trust your parts to always be better than average. Maybe in Lake Wobegon, all the kids are better than average, but you can't go shopping for op amps and complain when they are not all "better than average."

Oscillations Do Occasionally Accompany Op Amps

One of the most troublesome problems you can have with op amps is oscillation. Just as you can build an oscillator out of any gain block, then you must admit that any gain block can also oscillate when you don't want it to. Opamps are no exception.

Fortunately, most op amps these days are well behaved, and you only need to take four basic precautions to avoid oscillations.

First, always use some power-supply bypass capacitors on each supply and install them near the op amp. For high-frequency op amps, the bypass capacitors should be very close to the device for best results. In high-frequency designs, you often need ceramic and tantalum bypass capacitors. Using bypass capacitors isn't just a rule of thumb, but a matter of good engineering and optimization.

Second, avoid unnecessary capacitive loads; they can cause an op amp to develop additional phase shift, which makes the op-amp circuit ring or oscillate. These effects are especially noticeable when you connect a 1 X scope probe or add a coaxial cable or other shielded wire to an op amp, to convey its output to another circuit. Such connections can add a lot of capacitance to the output. Unless you're able to prove that the opamp will be stable driving that load, you'd better add some stabilizing circuits. It doesn't take a lot of work to bang the op amp with a square wave or a pulse and see if its output rings badly or not. You should check the opamp's response with both positive and negative output voltages because many op amps with pnp-follower outputs are less stable when V_out is negative or the output is sinking current. Refer to the box, "Pease's Principle."

I've seen pages of analysis that claim to predict capacitive-loading effects when the op amp's output is resistive, but as far as I am concerned, they're a complete waste of time: The output impedance of an op amp is usually not purely resistive.

And if the impedance is low at audio frequencies, it often starts to rise inductively at high frequencies, just when you need it low. Conversely, some op amps (such as the NSC LM6361) have a high output impedance at low frequency, which falls at high frequencies--a capacitive output characteristic, so when you add more capacitance on the output, the op amp just slows down a little and doesn't change its phase very much. But if an op amp is driving a remote, low-resistive load that has the same impedance as the cable, the terminated cable will look resistive at all frequencies and capacitive loading may not be a problem. (But you still have to be able to drive that low-impedance 75-ohm load!)

You can decouple an inverter's and integrator's capacitive load as shown in FIG. 9. If you choose the components well, any op amp can drive any capacitive load from 100 pF to 100 pF. The DC and low-frequency gain is perfectly controlled, but when the load capacitor gets big, the op amp will slow down and will eventually just have trouble slewing the heavy load. Good starting-point component values are R1 = 47 to 470 ohm and CF = 100 pF. These values usually work well for capacitive loads from 100 pF to 20,000 pF. If you have to make an integrator or a follower, you'll need an additional 4.7-k-ohm resistor as indicated in FIG. 9(d).

FIG. 9. You can easily modify the basic inverter (a) and integrator (b) to decouple capacitive loads (c)and (d).

FIG. 10. By adding just a single resistor, you can tailor the noise gain of a standard integrator.

FIG. 11. By manipulating the noise gain of an amplifier, you can stabilize unity-gain followers while maintaining the desired closed-loop gain.

In some cases, as with an LM110 voltage follower, the feedback path from the output to the inverting input is internally connected and thus unavailable for tailoring.

In this case, we can pull another trick out of our bag: The tailoring of noise gain.

Noise gain is defined as 1/β, where p is the attenuation of an op amp's feedback network, as seen at the op amp's inputs, referred to the output signal. For instance, the p of the standard inverter configuration (FIG. 10a) equals Z1/(Z1 + Z2), so the noise gain equals N + 1. You can raise the noise gain as shown in FIG. 10b.

If you're using a low-noise-gain op-amp configuration (such as a unity-gain follower that has a noise gain of 1 (FIG. 1 la)), it's well known that for good stability, the op amp and its feedback network can't have appreciable unwanted phase shift out near its unity-gain frequency. If you can increase the noise gain to 4 or 5, the requirement for low phase shift eases considerably. No, you don't have to change the signal gain to 5. A noise gain of 5 or greater is easy to achieve (FIG. 11b) while maintaining a gain of 1 for the signal. Even the unity-gain follower with a wire from the output to the inverting input can be saved, as illustrated in Figures 11C and d.

You'll find a more complete description of these circuits in Ref. 2, which I wrote in 1979, but meanwhile, if you are having stability problems with followers, just go ahead and try these techniques--it's as easy as adding a resistor box or a pot to your existing circuit. I should also mention that some of these concepts were used by Glenn DeMichele in his Design Idea for which he won EDN's 1988 Design Idea award (Ref. 3).

My third recommendation to prevent oscillation in general-purpose op amps is to add a feedback capacitor across RF unless you can show that this capacitor isn't necessary (or is doing more harm than good). This capacitor's function is to prevent phase lag in the feedback path. Of course there are exceptions, such as the LF357 or LM349, which are stable at gains or noise gains greater than 10. Adding a big feedback capacitor across the feedback paths of these op amps would be exactly the wrong thing to do, although in some cases 1/2 or 1 pf may be helpful ....

Recently I observed that a number of National Semiconductor op-amp data sheets were advising feedback capacitor values of:

CF= -Cin Rin/RF

But, if you had an ordinary op amp whose C1, was 5 pF and an inverter with a gain of -0.1, with RF = 1 M-ohm and R,, = 10 MR, this equation would tell you to use a CF of 50 pF and accept a frequency response of 3 kHz. That would be absurd! If you actually build this circuit, you'll find that it works well with CF = 1.5 pF, which gives the inverter a bandwidth of 100 kHz. So, we at NSC have just agreed to deep-six that equation. We have a couple new formulas, which we've checked carefully, and we have found that you can get considerably improved bandwidth and excellent stability.

For high values of gain and of R,, use the following equation:

C_F = _/[C_in/GBWxR-F)

where GBW is the gain-bandwidth product. In those cases in which the gain or impedance is low, such as where

(1 + R_F/R_in) < = 2_/(GBW x R_F x C_in )

...use the following equation ...

C_F = C_in /( 2+ 2R_F/ 2R_in)

I won't bore you with the math, but these equations did come from real analytical approaches that have been around for 20 years--I championed them back at Philbrick Researches. The value of CF that you compute is not that critical; it's just a starting point. You really must build and trim and test the circuit for overshoot, ringing, and freedom from oscillation. If the equation said 1 pF and you get a clean response only with 10 pF. you'd be suspicious of the formula. Note that when you go from a breadboard to a PC board, the stray capacitances can change, so you must recheck the value of CF. In some cases, you may not need a separate capacitor if you build 0.5 pF into the board. In any case, you certainly don't have to just trust my equations--build up your breadboard and fool around with different values of CF and check it out for yourself. See if you don't agree.

My last recommendation is that when you think the circuit is okay--that is, free from oscillation--test it anyway per Pease's Principle to make sure it's as fast or stable as you expect. Be sure that your circuit isn't ringing or oscillating at any expected operating condition or load or bias.

Noises, Theoretical and Otherwise

In addition to oscillatory behavior, another problem you might have when using op amps is noise. Most opamps have fairly predictable noise. It's often right down at theoretical levels, especially at audio frequencies. There's a pretty good treatment of noise and its effects in various applications in Thomas Frederiksen's book (Ref. 4).

Also, if you want to optimize the noise for any given source resistance or impedance.

National Semiconductor's Linear Applications Note AN222 (Ref. 5) has some good advice, as does the article in Ref. 6.

You'll have difficulty with noise when it's unpredictable or when op amps of a particular type have varying noise characteristics. This problem rarely happens at audio frequencies but is likely to happen sporadically at low frequencies, such as 10 or 100 Hz or even lower frequencies. Every manufacturer of transistors and amplifiers tries to keep the noise low, but occasionally some noisy parts are built.

Sometimes the manufacturer is able to add tests that screen out the noisy parts. But these tests aren't cheap if they take even one second of tester time, which may cost three cents or more. We are trying to add some 0.3-second tests to some of our more popular amplifiers, but it's not trivially easy.

Here's a tip-we find that true RMS testing for noise is a big waste of time, because amplifiers that are objectionably noisy have much worse p-p noise than you would guess from their RMS noise data. So the p-p test is the best discriminator. We get the best resolution with a bandwidth from around 30 Hz to 3 kHz, after we roll off the broadband noise. A sample time of 0.1 second works pretty well; the ones that pass a 0.1 -second test but fail a 0.5-second test are uncommon.

Popcorn Noise Can Rattle Sensitive Circuits

Flicker noise, also known as l/f noise, is AC noise that exists at low frequencies. And even more insidious than l/f noise is popcorn noise-a type of electrical noise in which bursts of square steps are added to the normal thermal noise at random times.

Popcorn noise occurs rarely these days, but, unfortunately, it's not at 0%, not even with the cleanest processing and the best manufacturers. I've been chastised and told that some of my amplifiers are noisy compared with those of certain competitors. But when I look at the competitor's data and plots, I see l/f and popcorn noise lurking unnoticed in a comer. On high-performance parts, we try to screen out the noisy ones. But when a few parts have a spacing of 2 to 10 seconds between bursts of popcorn, it's not cost-effective to look for those parts. Only a small percentage of our customers would want to reject that one noisy part and pay for the testing of all the good parts, too. Remember, 10 seconds of testing time equals 30 cents; time equals money.

Although oscillation and noise problems may be the most common ones you'll encounter when you use op amps, there's a host of other characteristics that are wise to look out for. These characteristics include overload or short-circuit recovery, settling time, and thermal response. Many op amps have a fairly prompt recovery from overdrive when you make the output go into the stops-that is, when you force the output into the power-supply rails. For most op amps, this recovery characteristic is not defined or specified. One recently advertised op amp claims to require only 12 ns to come out of the stops. Just about all other op amps are slower to one degree or another. The recovery time for chopper-stabilized amplifiers can be seconds.

Even if you have a fast op amp that doesn't have a delay coming out of limit, there may be circuits, such as integrators, that take a long time to recover if you overdrive the output and inputs. To avoid these cases, a feedback bound made of zeners and other diodes may be helpful (Ref. 7). However, if you have a differential amplifier, you may not be able to use any zener diode feedback limiters. I recall the time I designed a detector circuit using a fast, dielectrically isolated opamp. When I went to put it into production, nothing worked right. It turned out that the manufacturer had just recently redesigned the chip to cut the die size by 50%. The new and improved layout just happened to slow down the op amp's overdrive-recovery time. I wound up redesigning the circuit to use an LM709. I saved a lot of pennies in the long run, but the need to change parts didn't make me very happy at the time.

Rely Only on Guaranteed Specs

Don't rely on characteristics that aren't specified or guaranteed by the manufacturer.

It's perfectly possible for you to test a set of samples and find that they feature some desired performance characteristic that is not specified by the manufacturer. But if the next batch doesn't fulfill your requirements, whom are you going to get angry at? Don't get mad at me, because I'm warning you now. Any unspecified conditions may cause a test result to vary considerably compared to a guaranteed tested specification.

If you have to work in an unspecified range, you should keep a store of tested good ICs in a safe as insurance. If a new batch comes in and tests "bad" you'll have some backup devices. I recall a complaint from a user of LM3046 transistor arrays: A fraction of the parts failed to log accurately over a wide range. The "bad" ones turned out to have a beta of 20 at a collector current of 50 PA, versus a beta of 100 for the "good' ones. I convinced the user that keeping a few hundred of these inexpensive parts in a safe (yes, literally) would be a lot cheaper than getting the manufacturer to sort out high-P devices.

Op amps and other linear ICs can also have errors due to thermal "tails." These tails occur when the change of heat in one output transistor causes a thermal gradient to sweep across the chip. This change occurs gradually, often over milliseconds, and causes uneven heating of input transistors or other sensitive circuits. Many high-power circuits and precision circuits, such as the LM317, LM350, LM338, LM396, LM333, and LM337, have been tested for many years for thermally caused error.

These tests aren't performed only on power ICs, but also on precision references such as LM368 and LM369, and on instrument-grade op amps. In fact, a recent article by a Tektronix engineer (Ref. 9) points out that thermal tails can be a major source of error in fast signal amplifiers and that innovative circuit design can minimize those overdrive-recovery errors.

If you have ever studied the gain errors of older OP-07-type amplifiers, you have probably recognized that these errors and nonlinearities were caused by thermal errors-which were related to a bad layout. These days, most OP-07s have a better layout, and the thermal distortions have been banished.

Another characteristic that is not specified or discussed is the change of offset voltage vs. stress. This is most noticeable on B E T amplifiers, as the FETs are much more sensitive to stresses in the silicon die than bipolar transistors are. When you install and solder a plastic DIP op amp in a PC board, and then warp the board, you can monitor the V,, and watch it shift. Some amplifiers are better than others of similar types. It has a lot to do with the layout and also with the die attach. If you need the lowest offset, watch out for this. If the board is vibrated, the AC warping and stress can cause microphonic AC noises, too. CER-DIP amplifiers have a stronger ceramic base, and have a little less of a problem.

Here's where it gets really wild: Buy your BIFET amplifiers in an SO (Small Outline, surface-mount) package. The smaller plastic package is able to take up even less of the stress, and the die gets warped even more, and the change of VOs gets even worse than in ordinary DIPS. So, when you think you can pack even more of a good thing onto a board by going to surface-mount (Small-Outline) packages, you may also pack in more trouble. There is no specification on this on any data sheet. So a SPICE analysis has no way to warn you about this potential problem. Even a breadboard does not necessarily tell you about this. The actual prototype units, on the real PC boards, must be checked out.

These days, just about every manufacturer's monolithic op amps will survive a short from the output to ground. (Hybrids are often unprotected.) But it's not always clear whether an op amp will survive a short circuit to the positive or negative supply or, if so, for how long. You may have to ask the manufacturer, and you can expect some kind of negative answer. You'll be told to avoid overheating the device above its absolute maximum junction temperature. Even if an amplifier or regulator does recover fairly quickly from current limit, nobody will guarantee that it won't oscillate when in current limit. Nor will the manufacturer have much knowledge about how the circuit recovers from the thermal gradients caused by current limit. If an op amp survives a high-power overload, it's not fair to ask the device to recover its full accuracy very quickly. The most you really can ask for is that it survives with no degradation of reliability-that's the standard.

Some op amps (such as LM12 and LM10) and most voltage regulators (and other power ICs) have an on-chip temperature limiter. Thermal shutdown circuits can improve reliability. If a heavy overload is applied for a long time, or there is no heat sink, or the ambient is just too hot, these circuits detect when the chip's temperature exceeds 150 C and then turn off the output. The thermal-limiter circuit in the LM117 (and other early power ICs) sometimes just decreased the output current to a safe DC value to hold the die temperature to around 160 C. In other cases, where the load is lighter and the thermal gradient transients are different, these thermal limiters oscillate ON and OFF with a duty cycle that ensures the 160 C chip temperature. As I was about to design the LM137, I looked back and decided the latter characteristic was preferable, so I designed about 5 C of thermal hysteresis into the thermal-limit circuit. That way, the circuit makes a strong attempt to restart its heavy load with a repetition rate of about 100 Hz. If the regulator makes only a feeble attempt, it may be unable to start some legal loads.

So, we actually designed an oscillation into this thermal-limit circuit, but we never bothered to mention it on the data sheet. H'mmm ... we shouldn't be so sloppy. I apologize. I'll do better next time. (This situation has a bearing on one of my pet peeves: Bad data sheets. I get really cross about bad ones, and I really do try hard and work hard to make good ones. Refer to "How to Read a Data Sheet" because bad data sheets can get the user into trouble.)

Different Methods Uncover Different Errors

Now that you know some op-amp problems to look out for, how do you actually troubleshoot an op-amp circuit? I usually split my plan along two lines: AC and DC problems. Examples of AC problems include oscillations and ringing; DC problems include bad DC output errors and pegged outputs, which are outputs stuck at either the positive or negative supply rail. Obviously, you need a scope to be sure the circuit isn't oscillating. It always makes me nervous when I find out that the customer I'm trying to help doesn't even have a scope. I can understand if an engineer only has a crummy scope, but there are certain problems you cannot expect to solve-nor can you even verify a design-if you don't have any scope at all.

If the problem is an AC problem, I first make sure that the input signals are well behaved and at the values I expect them to be. Then I put my scope probes on all the pins and nodes of the circuit. Sometimes it's appropriate to use a 10 X probe, and other times I shift to 1 X mode. Sometimes I will AC-couple the scope: sometimes I will DC couple it. I check all the pins, especially the power-supply pins. Then--depending on what clues I see--I will poke around and gather symptoms by adding capacitors or RC boxes to assorted circuit nodes. I try to use two probes to see if the input and output have an interesting phase relationship, and I simultaneously verify that the output is still oscillating.

Many of the techniques I use depend on whether the circuit is one I've never tried before or one that I see all the time. Sometimes I find an unbelievable situation, and I make sure that I understand what's going on before I just squash the problem and proceed to the next. After all, if I'm fooling myself, I really ought to find out how or why, so I won't do it again.

If the op amp exhibits a DC error or a peg, I first check with my scope to see that there's no oscillation. Then I bring in my 5-digit DVM and scribble down a voltage map on a copy of the schematic. On the first pass, I'm likely to just keep the numbers in my head to see if I can do a quick diagnosis of a problem that's obvious, such as a bad power supply, or a ground wire that fell off, or a missing resistor. Failing that, I start writing meticulous notes to help look for a more insidious problem. I look at the numbers on the schematic and try to guess the problem. What failure could cause that set of errors? A resistor of the wrong value? A short? An open? Then I try to cook up a test to confirm my theory. Sometimes I have to disconnect things, but I try to minimize that. Sometimes adding a resistor or voltage or current will yield the same result, and it's much easier than disconnecting components.

If an amplifier circuit isn't running at all, sometimes the right thing to do is to reach into the circuit and "grab" one amplifier's input and force it to go above and below the other input. If the output doesn't respond at all, you have a dead amplifier, an amplifier with no connections, or a stuck output. It is not obvious to try this open-loop test-no book tells you that this is a good idea-but after you try it, you will agree that its results usually tell you an obvious story. Refer to Figure 1 in Section 14 for more detailed techniques and notes on troubleshooting basic op-amp circuits.

Many of these op-amp troubleshooting tips are applicable to other components as well. The next section will continue with buffers, comparators, and related devices.


1. Data Converter Handbook, Analog Devices, P.O. Box 9106, Norwood MA 02062, 1974.

2. Pease, Robert A., "Improved unity-gain follower delivers fast, stable response," EDN, February 20, 1979, p. 93. (Also available as LB-42 in NSC's Linear Applications Book, 1980, 1986, 1989, etc., "Get Fast Stable Response from Improved Unity-Gain Followers.")

3. DeMichele, Glenn, "Compensate op amps without capacitors," EDN, July 21, 1988, p. 331

4. Frederiksen, Thomas M., intuitive Operational Amplifiers, McGraw-Hill, New York, NY. 1985.

Available from Heath Company, P.O. Box 8589, Benton Harbor, MI 49022. (800) 253-0570 (Part NO. EBM-I), $19.95.

5. Nelson, Carl T., Super Matched Bipolar Transistor Pair Sets New Standards for Drift arid Noise, Application Note AN-222, Linear Applications Databook, p. 517. National Semiconductor, Santa Clara, CA, 1986.

6. Pease, Robert A., "Low-noise composite amp beats monolithics," EDN, May 5, 1980. p. 179.

(Also available as LB-52 in NSC's Linear Applications Databook, 1982, 1986, 1989. etc. as "A Low-Noise Precision Op Amp.")

7. Pease, Robert A., "Bounding, clamping techniques improve on performance," EDN, November 10. 1983, p. 277.

8. Pease, Bob, and Ed Maddox, "The Subtleties of Settling Time," The New Lightning Empiricist, Teledyne Philbrick, Dedham, MA, June 1971.

9. Addis, John, "Versatile Broadband Analog IC." VLSI Systems Design, September 1988. p. 18.

10. Pease, Robert A., "How To Get The Right Information From A Datasheet," EE Times, April 29, 1985, p. 31. (Also available as Appendix F in NSC's General-Purpose Linear Devices Databook, 1988, 1989, etc.)

Top of Page

PREV.   NEXT Related Articles HOME