External components often determine an opamp's performance, and that's
why we spent the previous seven sections discussing them. But op amps aren't
always absolutely troublefree: Oscillations and noise are two possible areas
of difficulty, among others.
After many pages of fiddling around with many different components, we finally
arrive at the operational amplifier itself. And the good news is that half
of our op amp troubleshooting problems are already solved. Why? Because it's
the components around op amps that cause many of their problems. After all,
the op amp is popular because external components define its gain and transfer
characteristics.
So, if an amplifier's gain is wrong, you quickly learn that you should check
the resistor tolerances, not the op amp. If you have an AC amplifier or filter
or integrator whose response is wrong, you check the capacitors, not the
op amp. If you see an oscillation, you check to see if there's an oscillation
on the powersupply bus or an excessive amount of phase shift in the feedback
circuit. If the step response looks lousy, you check your scope or your probes
or your signal generator because they're as likely to have gone flaky as
the opamp is. These failures are the reason we studied so many passive components:
The overall performance of your circuit is often determined by those passive
components. And yet, there are exceptions. There are still a few ways an
op amp itself can goof up.
Don't Sweat the Small Stuff
Before we discuss serious problems, however, you should be aware of the
kinds of opamp errors that aren't significant. First of all, it generally
isn't reasonable to expect an opamp's gain to be linear, nor is its nonlinearity
all that significant. For example, what if an opamp's gain is 600,000 for
positive signals but 900,000 for negative signals? That sounds pretty bad.
Yet, this mismatch of gain slope causes a nonlinearity of about 10 pV in
a 20V pp unitygain inverter. Heck, the voltage coefficients and temperaturecoefficient
errors of the feedback resistors will cause a lot more error than that. Even
the best film resistors have a voltage coefficient of 0.1 ppm/V, which will
cause more nonlinearity than this gain error.
Recently I heard a foolish fellow argue that an op amp with a high DC gain
such as 2,000,000 or 5,000,000 has no useful advantage over an amplifier
with a DC gain of 300,000 because, unless your signal frequency is lower
than 0.1 Hz, you cannot take advantage of the high gain. Obviously, I don't
agree with thatif you have a step signal, the output settles to the precise
correct value in less than a millisecondnor 1 second or more. The amplifier
with the higher gain just settles to a more precise valueit does not take
any more time. I guess he just doesn't understand how op amps work. Especially
since he doesn't even want to talk about gain nonlinearity! Many amplifiers
such as the old OP07 had low DC gain and poor gain linearity, whereas more
modem amplifiers like the NSC OP07 and the LM607 (gain = 6,000,000 min)
have much less nonlinearity than older amplifiers.
Similarly, an op amp may have an offsetvoltage temperaturecoefficient
specification of 1 pVPC, but the op amp's drift may actually be 0.33 pV/
C at some temperatures and 1.2 pVPC at others. Twenty or thirty years ago,
battles and wars were fought over this kind of specsmanship, but these days,
most engineers agree that you don't need to sweat the small stuff. Most applications
don't require an offset drift less than 0.98 pV for each and every degreemost
cases are quite happy when a 1 pV/T op amp drifts less than 49 pV over 50
degrees.
Also, you don't often need to worry about bias current and its temperature
coefficient, or the gain error's TC. If the errors are well behaved and fit
inside a small box, well, that's a pretty good part.
There is one classical caveat, and I'll include it here because it never
got mentioned in the EDN series. I showed my typed draft to 45 people, and
then thousands of people looked at my articles, and nobody told me that I
had forgotten this. Namely:
If you run an op amp in a highimpedance circuit, so that the bias current
causes significant errors when it flows through the input and feedback resistors,
do not use the Vos pot to get the circuit's output to zero. Example, if you
have an LM741 as a unitygain follower, with a source impedance of 500 kOhm
and a feedback resistor of 470 kOhm, the 741's offset current of 200 nA
(worstcase) could cause an output offset of 100 mV. If you try to use the
VOS mm pot to mm out that error, it won't be able to do it. If you have only
20 or 40 mV of this I X R error, you may be able to trim it out, but the
TC and stability will be lousy. So, you should be aware that in any case
where the I_os X R is more than a few millivolts, you have a potential for
bad DC error, and there's hardly any way to trim out those errors without
causing other errors. When you get a case like this, unless you are willing
to accept a crude error, then these errors are trying to tell you that you
ought to be using a better op amp with lower bias currents.
And where did I find this reminder, not to trim out an I X R with a V_os
pot? There's a section in Analog Devices' Data Converter Handbookit's in
there (Ref. 1). Now, I've known about this trim problem for 25 years, but
this isn't a problem that a customer asks us about even every year, these
days, and I guess that's true for my colleagues, too. As it was not fresh
in anybody's mind, wellwe forgot to include itwe didn't notice it when
it was missing. It just shows why you have to write things down!
FIG. 1. If you run an op amp at such high impedances that lB X R is
more than 20 mV. you'll be generating big errors, and a V,, trimpot can't
help you cancel them out Please don't even try!
FIG. 2. The CMRR of an opamp can't be represented by a single number.
It makes more sense to look at the CMRR curve, Avos versus AVcM, and note
its nonlinearities, compared to a straight line with a constant slope of
1 part in 100,000.
An Uncommon Mode
A good example of misconstrued specs is the commonmode error. We often
speak of an op amp as having a CMRR (Common Mode Rejection Ratio) of 100
dB. Does this number mean that the commonmode error is exactly one part
in 100,000 and has a nice linear error of 10 pV per volt? Well, this performance
is possible, but not likely. It's more likely that the offsetvoltage error
as a function of commonmode voltage is nonlinear (FIG. 2). In some regions,
the slope of Avos will be much better than 1 part in 100,000. In other regions,
it may be worse.
It really bugs me when people say, "The op amp has a commonmode gain,
Avc, and a differential gain, Am, and the CMRR is the ratio of the two." This
statement is silly business: It's not reasonable to say that the opamp has
a differential gain or commonmode gain that can be represented by a single
number. Neither of these gain numbers could ever be observed or measured
with any precision or repeatability on any modem op amp. Avoid the absurdity
of trying to measure a "commonmode gain of zero" to compute that
your CMRR slope is infinite. You'll get more meaningful results if you just
measure the change in offset voltage, Vos, as a function of commonmode voltage,
VCM, and observe the linear and nonlinear parts of the curve.
What's a good way to measure the change in Vos versus VcMthe CMRR of an
op amp? I know of a really good test circuit that works very well.
First, How Not to Test for CMRR
The first thing I always tell people is how not to measure CMRR. In FIG.
3, if you drive a sine wave or triangle wave into point A, it seems like
the output error, as seen by a floating scope, will be (N+1) times [VcM divided
by the CMRR]. But that's not quite true: you will see (N+1) times [the CM
Error plus the Gain Error]. So, at moderate frequencies where the gain is
rolling off and the CMRR is still high, you will see mostly the gain error,
and your curve of CMRR vs. frequency will look just as bad as the Bode plot.
That is because if you used the circuit of FIG. 3, that's just what you
will be seeing! There are still a few opamp data sheets where the CMRR curve
is stated to be the same as the Bode plot. The National LF400 and LF401 are
two examples; next year we will correct those curves to show that the CMRR
is actually much higher than the gain at 100 or 1000 Hz. National is not,
by the way, the only company to have this kind of absurd error in some of
their data sheets....
Ah, let's avoid that floating scopelet's drive the sine wave generator
into the midpoint of the power supply, and ground the scope and ground point
A. (FIG. 4.)
Then we'll get the true CMRR, because the output will stay near groundit
won't have to swingright? Wrong! The circuit function has not changed at
all; only the viewpoint of the observer has changed. The output does have
to swing, referred to any power supply, so this still gives the same wrong
answer. You may say that you asked for the CMRR as a function of frequency,
but the answer you get is, in most cases, the curve of gain vs. frequency.
What about, as an alternative, the wellknown scheme shown in FIG. 5,
where an extra servo amplifier closes the loop and does not require the opamp
output to do any swinging?
FIG. 3. Is this a CMRR test? No, because V,, = V_out/CMRR + Vout/A
FIG. 4. Is this any better than the previous "CMRR Test"?
No, it's exactly the same! Still
V,,,, = V,,/CMRR + V,,/Av.
That's OK at DCit is fine for DC testing, and for ATE (Automatic Test Equipment),
for production test, and for stepped DC levels. And it will give the same
answer as my circuit at all low frequencies up to where it doesn't give the
same answer.
Now, what frequency would that be?? Nobody knows! Because if you have an
op amp with low CMRR, the servo scheme will work accurately up to one frequency,
and if you have an op amp with high CMRR, the servo scheme will work accurately
only up to a different frequency. Also, the servo amplifier adds so much
gain into the loop that ringing or overshoot or marginal stability at some
mid frequencies is inevitable.
That is much too horrible for me to worry aboutI will just avoid that,
by using a circuit which gives very consistent and predictable results.
Specifically, I ran an LF356 in the circuit of Fig. 3, and I got an error
of 4 mV pp at 1 kHza big fat quadrature error, 90 degrees out of phase with
the outputsee the upper trace in FIG. 6.
FIG. 5. This circuit is considered acceptable when used for DC CMRR
tests in ATE systems.
However, nobody ever tells you what are good values for the Rs and Cs, nor
whether it is valid up to any particular frequency.
FIG. 6. Trace (A) shows the CMRR error taken using the circuit
of FIG. 3.
But it's not the CMRR error, it's really the gain error you are looking
at, 4 mV pp at 1 kHz. Trace (B) shows the actual commonmode errorabout
1/20 the size of the gain errormeasured using the circuit of FIG. 7.
If you think that is the CM error, you might say the CMRR is as low as 5,000
at 1 kHz, and falling rapidly as the frequency increases. But the actual
CMRR error is about 0.2 mV ppsee the lower trace of Figure 6and thus
the CMRR is about 100,000 at 1 kHz or any lower frequency. Note also that,
on this unit, the CM error is not really linearas you get near 9 V, the
error gets more nonlinear. (This is a 9V/+12V CM range on a 12V supply;
I chose a +/ 12V supply so my function generator could overdrive the inputs.)
So, the business of CMRR is not trivial at least, not to do it right.
How to Do It Right...
As we discussed in the previous section, there are circuits that people
use to try to test for CMRR, that do not give valid results. Just how, then,
can we test for CMRR and get the right results?? FIG. 7 is a darned fine
circuit, even if I did invent it myself about 22 years ago.
It has limitations, but it's the best circuit I've seen. Let's choose R1
= R1 = 1 k, R2 = R12 = 10 k, and R3 = 200 k and R4 = a 500 ohm pot, singleturn
carbon or similar. In this case, the noise gain is defined as 1 + [Rf/Rin,],
or about 11. See discussion of noise gain. Let's put a
+/1V sine wave into the signal input so the CM voltage is about +/ 10V.
The output error signal will be about 11 times the error voltage plus some
function of the mismatch of all those resistors. Okay, first connect the
output to a scope in crossplot (XY) mode and trim that pot until the output
error is very smalluntil the slope is nominally flat. We don't know if the
CMRR error is balanced out by the resistor error, or what; but, as it turns
out, we don't care. Just observe that the output error, as viewed on a crossplot
scope, is quite small. Now connect in R100a, a nice low value such as 200
ohm. If you sit down and compute it, the noise gain rises from 11 to 111.
Namely, the noise gain was (1 + R2/R1), and it then increases to (1 + R2/R1)p
lus (R2 + R12)/R100. In this example, that is an increase of 100. So,
you are now looking at a change of V_out equal to 100 times the input error
voltage, (and that is V_cm divided by CMRR).
Of course, it is unlikely for this error voltage to be a linear function
of V_cM, and that is why I recommend that you look at it with a scope in
crossplot (XY) mode.
Too many people make a pretend game, that CMRR is constant at all levels,
that CM error is a linear function of V, so they just look at two points
and assume every other voltage has a linear error; and that's just too silly.
Even if you want to use some ATE (Automatic Test Equipment) you will want
to look at this error at least three placesmaybe at four or five voltages.
Another good reason to use a scope in the XY mode is so you can use your
eyeball to subtract out the noise. You certainly can't use an AC voltmeter
to detect the CMRR error. For example, in FIG. 6, the CM error is fairly
stated as 0.2 mV pp, not 0.3 mV pp (as it might be if you used a meter
that counted the noise).
Anyhow, if you have a good amplifier with a CMRR of about 100 dB, the CM
error will be about 200 pV pp, and as this is magnified by 100, you can
easily see an output error of 20 mV pp. If you have a really good unit with
CMRR of 120 or 140 dB, you'll want to clip in the R100b, such as 20 R, and
then the A (noise gain) will be 1000. The noise will be magnified by 1000,
but so will the error and you can see what you need to see. Now, I shall
not get embroiled in the question, are you trying to see exactly how good
the CMRR really is, or just if the CMRR is better than the datasheet value;
in either case, this is the best way I have seen.
FIG. 7. Here's how to evaluate CMRR with confidence and precision, both
AC and DC.
For use with ATE, you do not have to look with a scope; you can use a step
or trapezoidal wave and look just at the DC levels at the ends or the middle
or wherever you need. Note that you do not have to trim that resistor network
all the time, nor do you have to mm it perfectly. All you have to know is
that when the noise gain changes from a low value to a high value, and the
output error changes, it is the change of the output error that is of interest,
not really the pp value before or after, but the delta. You do not have
to trim the resistor to get the slope perfect; but that is the easy way for
the guy working at his bench to see the changes.
This is a great circuit to fool around with. When you get it running, you
will want to test every op amp in your area, because it gives you such a
neat highresolution view. It gives you a good feel for what is happening,
rather than just hard, cold, dumb numbers. For example, if you see a 22mV
pp output signal that is caused by a 22pV error signal, you know that the
CMRR really is way up near a million, which is a lot more educational than
a cold "119.2 dB" statement. Besides, you learn rather quickly
that the slope and the curvature of the display are important. Not all amplifiers
with the same "119.2 dB" of CMRR are actually the same, not at
all. Some have a positive slope, some may have a negative slope, and some
curve madly, so that if you took a twopoint measurement, the slope would
change wildly, depending on which two points you choose. (If you increase
the amplitude of the input signal, you can also see plainly where severe
distortion sets inthat's the extent of the commonmode range.)
Limitations: If you set the noise gain as high as 100, then this circuit
will be 3 dB down at F_GBW divided by 100, so you would only use this up
to about 1 kHz on an ordinary 1 MHz op amp, and only up to 100 Hz at a gain
of 1000. That's not too bad, really.
To look at CMRR above 1 kHz, you might use R100c = 2 k, to give good results
up to 10 kHz. In other words, you have to engineer this circuit a little,
to know where it gives valid data. Thinking is required. Sorry about that.
For really fast work, I go to a highspeed lowgain version where R1 = R11
= 5 k, R2 = R 12 = 5 k, and Rl00 = 2 k or 1 k or 0.5 k. This works pretty
well up to 50 kHz or more, depending on what gainbandwidth product your
amplifier has.
For best results at AC, it's important to avoid stray capacitance of wires
or of a real switch at the points where you connect to R100a or R100b. Usually
I get excellent results from just grabbing on to the resistor with a minigator
clip. You can avoid the stray pf that way; if you use a good selector switch,
with all the wires dressed neatly in the air (which is an excellent insulator)
you may be able to get decent bandwidth, but you should be aware that you
are probably measuring the AC CMRR of your setup, not of the op amp.
I was discussing this circuit with a colleague, and I realized the right
way to make this R100 is to solder, for example, 100 R to the + input and
100 ohm to the input, and then just clip their tips together to make 200
ohmbalanced strays, and all that.
If you have an opamp with low gain or low g,,,, you may want to add in
a buffer follower at ab, so the amplifier does not generate a big error
due to its low gain. The National LM6361 would need a buffer as it only has
a gain of 3000 with a load of 10 kohm, and its CMRR is a lot higher than
3000.
Altogether, I find this circuit has better resolution and gives less trouble
than any other circuit for measuring CM error. And the price is right: a
few resistors and a minigator clip.
SingleSupply Operation??
One of the biggest applications problems we have is that of customer confusion
about singlesupply operation. Every week or so, we get a call from a customer: "Can
I run your LM108 (or LF356 or LM4250) on a single power supply? Your data
sheet doesn't say whether I can..."
Sigh. We cheerfully and dutifully explain that you can run any operational
amplifier on a single supply. An LM108 does not have any "ground" pin.
It can't tell if your power supplies are labeled "+15 V and 15V" or "+30
V and ground," or "ground and 30 V." That is merely a matter
of nomenclaturea matter of your standpointa matter of which bus you might
choose to call ground.
Now it is true that you have to bias your signals and amplifier inputs in
a reasonable way. The LM108/LM308 can amplify signals that are not too close
to either supplythe inputs must be at least a couple volts from either supply
rail. So if you need a circuit that can handle inputs near the minus rail,
the LM108 is not suitable, but the LM324, LM358, LMC660, LMC662, and LM10
are suitable. If you need an amplifier that works near the + rail, the LM101A
and LM107 are guaranteed to work there. (The LF355 and LF356 typically work
well up there but are not guaranteed.) But if you keep the inputs biased
about halfway between the rails, just about any op amp will work "on
a single supply." It's just a matter of labels! Someday we plan to write
an applications note to get these silly questions off our back, and to answer
the customers' reasonable questions, but right now everybody's a little too
busy to write it.
Measure Bias Current Rather Than Impedance
Another opamp spec you don't need to worry about is the differential input
impedance.
Every year I still get asked, "How do we measure the input impedance
of an op amp?" And every year I trot out the same answer: "We don't.''
Instead, we measure the bias current. There's a close correlation between
the bias current and the input impedance of most op amps, so if the bias
current is low enough, the input impedance (differential and common mode)
must be high enough. So, let's not even think about how to measure the lowfrequency
differential input impedance (or, input resistance) because I haven't measured
it in the last seven years.
Generally, an ordinary differential bipolar stage has a differential input
impedance of 1(20 x I_b), where I_b is the bias current. But this number
varies if the op amp includes emitterdegeneration resistors or internal
biascompensation circuitry. You can easily test the commonmode input resistance
by measuring 1, as a function of Vcw. I've measured some input capacitances
and find the circuits of FIG. 8 to be quite useful. Inputcapacitance
data is nominally of interest only for highimpedance highspeed buffers
or for filters where you want to make sure that the secondsource device
has the same capacitance as the op amps that are already working okay.
FIG. 8
Recognize False "Error" Characteristics
Sometimes, an op amp may exhibit an "error" that looks like a
bad problem, but isn't.
For example, if you have your op amp's output ramping at 4.3 V/u sec, you
might be surprised when you discover that the inverting input, a summing
point, is not at ground. Instead, it may be 15 or 30 or 100 mV away from
ground. How can the offset voltage be so bad if the spec is only 2 or 4 mV?
Why isn't the inverting input at the "virtual ground" that the
books teach us? The virtual ground theory is applicable at DC and low frequencies,
but if the output is moving at a moderate or fast speed, then expecting the
summing point to be exactly at ground is unreasonable. In this example, dV,,,/dt
equals 2x times the unitygain frequency times the input voltage. So, 15
mV of Vi,, is quite reasonable for a mediumbandwidth op amp, such as an
LF356, and 50 or 70 mV is quite reasonable for an LM741. If you want an opamp
to move its output at any significant speed, there has to be a significant
error voltage across the inputs for at least a short time.
Also beware of op amp models and what they might mistakenly tell you. For
instance, the "standard" equation for a singlepole op amp's gain
is A = A,( 1/1 + j omega T).
This equation implies that when the DC gain, A_o, changes, the highfrequency
gain, A, changes likewise. Wrong! With the growing popularity of computer
modeling, I have to explain this to a wouldbe analyst every month. No, there
is almost no correlation between the highfrequency response and the spread
of DC gain, on any op amp you can buy these days. There are several ways
to get an op amp's DC gain to change: Change the temperature, add on or lift
off a load resistor, or swap in an amplifier with higher or lower DC gain.
Although the DC gain can vary several octaves in any one of these cases,
the gainbandwidth product stays about the same. If there ever were any op
amps whose responses did vary with the DC gain, they were abandoned many
years ago as unacceptable.
So, your opamp model is fine if it gives you a fixed, constant gainbandwidth
product. But if the model's gain at 1 MHz doubles every time you double the
DC voltage by reducing the load, you're headed for trouble and confusion.
I once read an opamp book that stated that when the DC gain changed, the
first pole remained at the same frequency. In other words, the author claimed
that the gainbandwidth product increased with the DC gain. Wrong. I wrote
to the author to object and to correct, but I never heard back from him.
I often see opamp spec sheets in which the openloop output impedance is
listed as 50 Q. But by inspecting the gain specs at two different loadresistor
values, you can see that the DC gain falls by a factor of two when a load
of 1 kOhm is applied. Well, if you have an op amp with an output impedance
of 1 kOhm, its gain will fall by a factor of two when you apply a 1 kOhm
load. But if its output impedance were 50 ohm, as the spec sheet claimed,
the gain would only fall 5%. So, whether it's a computer model or a real
amplifier, be suspicious of output impedances that are claimed to be unrealistically
low.
=========
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 squarewave generator to your circuit through a couple hundred ohms in
series with a 0.2uF ceramic disc capacitor. Connect the generator to the
scope, so you can trigger on the squarewave signal. Also, apply an adjustable
DC load that's capable of exercising the device's output over its full rated
outputcurrent 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 emitterfollower 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 5A regulator, you may want a load resistor as low
as an ohm or two. If you are evaluating a lowpower amplifier or a micropower
reference, a value of a megohm may be reasonable, both for the load resistor
and for the resistor from the squarewave 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.
=========
cont. to part 2 >>
