You are on page 1of 11

Chapter 7L

Lab 7: Op Amps II

Contents

7L Lab 7: Op Amps II 1
7L.1 Integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
7L.1.1 Try the integrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
7L.1.2 Integrator Used to let one infer Ibias and Voffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
7L.1.3 Making a low-drift integrator, in two ways . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
7L.1.4 Apply the integrator: drive-motor position sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
7L.2 Differentiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
7L.3 Slew Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7L.3.1 Square wave input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7L.3.2 Sine input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7L.4 AC amplifier: microphone amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Time: Total time: 7L.4.1 Single-supply op-amp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
140 min. (2 hrs,
20min)

REV 21 ; August 31, 2015.

This lab introduces you to the sordid truth about op-amps: they’re not as good as we said they were last time!
Sorry. But after making you confront op-amp imperfections in the first exercise, § 7L.1 on the following
page, we return to the cheerier task of looking at more op-amp applications. There, once again, we treat the
devices as ideal.

On the principle that a person should eat his spinach before the mashed potatoes (or is it the other way round?)
let’s start by looking at the way that op-amps depart from the ideal model. The integrator exercise does what
it can to make the potentially-dull topics of offset-voltage and bias current less dull, by letting you undertake
1 Revisions: replace “op amp” wi “op-amp;” add pinout photo for microphone (2/15); insert Ray redrawings (10/14); add headerfile

(6/14); remove many exclamation points(!) (9/13); add index, cut reading (7/12); add small DC motors as alternative to disk drive
(8/10); use book format(9/09); make subscripts lower case, put V, I within mathmode (10/08); insert prettier opto drawings; add ’as you
measured Vos’ to sec. 1.3 text; suggest measuring Vos with DVM directly at input (7/07).

1
2 Lab 7: Op Amps II

a demanding task of integration—one that you could not carry out without first overcoming the effects of
these two op-amp imperfections.

Integrator
We want you to get to know the integrator as a circuit important in its own right. But it also serves well to
demonstrate the possibly-troublesome effects of op-amp errors that can sound negligibly small: bias currents
of picoamps, offset voltages below a millivolt. The integrator is unforgiving: it accumulates the effects of
such errors, of course, holding a grudge for picocoulombs of charge delivered in the distant past, many
milliseconds ago. We’ve also rigged a setup in which you get to integrate a signal from a piece of hardware (a
disc drive or DC motor), for a refreshing change from feeding always from a function generator. One could
almost imagine that this disc-drive motion integrator is a useful circuit.

7L.1 Integrator

7L.1.1 Try the integrator


Time: 15 min.

10M

0.1µF
22k
IN
OUT

Figure 1: Integrator

Keep this circuit set up after you finish the integrator section. You will use it again with the differentiator, in § 4 on
page 6.

Construct the active integrator shown above, using a ’411 op-amp. The pushbutton is redundant, at the
moment; the 10M feedback resistor will keep the output from wandering far astray. Soon, we will remove
the feedback resistor and rely on a manual pushbutton reset. But not yet.

Try driving your integrator with a signal in the range 50Hz to 1kHz—all three waveforms listed below. This
circuit is sensitive to small DC offsets of the input waveform (its gain at DC is about 500); the output is likely
to go into saturation near the 15 volt supplies. To prevent this, you will have to adjust the function generator’s
DC-offset control. That adjustment will be more manageable if you set the function generator’s attenuation
to 20dB.

Try a square wave, sine and triangle.

From the component values, predict the peak-to-peak triangle wave amplitude at the output that should result
from a 2V(pp), 50Hz square wave input. Then try it.

7L.1.1.1 Include Feedback Resistor: integrator tamed. . .

The 10M resistor tames this integrator—and somewhat corrupts it. The resistor can keep the output from
wandering off to saturation, if you adjust the function generator carefully. But it makes the integration not
Lab 7: Op Amps II 3

quite honest—and not good enough for longer-term integration like what we mean to attempt soon. The
feedback resistor permits a current to leak off the capacitor. For some applications this may not matter (the
ratio of Rfeedback to the input R is almost 500 to 1, so when Vout is comparable to Vin the error current caused
by Rfeedback is about 0.2% of the signal current). You’ll probably be grateful for this feedback resistor while
you try the integrator’s response to various waveforms.

7L.1.1.2 . . . Remove Feedback Resistor: integrator less tame but truer

When you remove the 10M resistor, the circuit will help you get a real gut feeling for the meaning of an
integral. In fact, the attempt to adjust the generator’s DC offset so as to keep Vout from saturating could drive
you crazy. Don’t suffer for long. Don’t forget that the pushbutton can at least restore Vout to zero, for a fresh
start.

7L.1.2 Integrator Used to let one infer Ibias and Voffset


Time: 25 min.

7L.1.2.1 Drift; causation ambiguous

Ground the integrator’s input, zero the output with the pushbutton, then release the button and watch the drift
of Vout . You’ll need a very slow scope sweep rate. Try 1sec/div. (This is a good time to switch to using a
digital scope, if one is available.) Note the drift rate:__________. But note, also, that both Ibias and Voffset
can contribute to this effect. To make things worse, the two effects may reinforce each other, or one may
subtract from the other. Let’s peel them apart.

7L.1.2.2 Infer Ibias from drift rate, with the effect of Voffset removed

Removing the effect of Voffset happens to be extremely easy: just float the input. Now Voffset does not force
a current through the input resistor. So, Voffset does not contribute to the current that charges the capacitor.
Given this simplification, see if your drift rate implies a value for Ibias that is in the ’411’s specified range:
50pA typical, 200pA max. You will need to be patient to measure this drift rate. Note it, if you can get a
reading: __________; and calculate the value of Ibias that this drift rate implies: __________.

7L.1.2.3 Infer Voffset from drift rate

Now you should be in a position to estimate Voffset from the overall drift rate you saw a few minutes ago as
you started § 7L.1.2.1. (You’ll need to pay attention to the sign of each of these drift rates.) Compare your cal-
culated value to the ’411’s specification: 0.8mV typical, 2.0mV max. Your inferred Voffset : __________.

7L.1.3 Making a low-drift integrator, in two ways

7L.1.3.1 Trim Voffset to a minimum (’411)

We hope you found that Voffset accounts for most of your integrator’s drift. Let’s now solve that problem.
Add the offset trim network of fig. 2. Ground the integrator’s input, zero the output initially, with the reset
pushbutton, then try to minimize the drift rate of the output.
4 Lab 7: Op Amps II

‘411 5
1

22k 22k
10k

-15V
Figure 2: Offset-trim network for ’411 op-amp

The trimming is a fussy task. Start with modest scope sensitivity—say, 1V/div—and gradually increase
sensitivity as you adjust Voffset down toward zero. Reset the integrator from time to time with the pushbutton.
See if you can get the drift rate down to a few millivolts/second. When you’ve got it about as low as you can
manage, see what residual Voffset your drift rate implies: __________.

Now, lest you think that trimming is a really-satisfactory remedy for bad VOS specs, heat or cool the ’411
(with a heat gun, perhaps, or a can of component cooler), and see how good the drift looks. (In fairness to the
’411, we should admit that even the good low Voffset chopper, coming soon, doesn’t much like big changes
of temperature. If you’re energetic, you can repeat this test when you’ve wired up the chopper.)

7L.1.3.2 Use a self-trimming op-amp: “chopper” amp, LTC1150

A “chopper” like the LTC1150 uses a second op-amp to drive a “nulling” input on the main amplifier—a
single input that accomplishes what our manual offset-trim did, driving the difference between the two inputs
of the main amplifier toward zero.2 Try this amplifier in place of the ’411.

The pinout of this op-amp is the same as for the ’411, so you can drop it into the circuit you wired for the
’411—except that you must remove the trimming potentiometer, so as to leave pins 1 and 5 open.

Ground the input—at the non-inverting input.3 Watch the drift rate.

As for the ’411, at this point, the cause of drift is uncertain. Separate the effects of Ibias and Voffset, by
eliminating the effect of Voffset, as you did for the ’411. Then infer the op-amp’s Voffset from the drift rate
that you saw with input grounded: __________. The LTC1150 promises typical VOS of ±0.5µV , max. 10
µV . We were chagrined to get values slightly above the specified maximum. We hope you’ll do better!4

7L.1.4 Apply the integrator: drive-motor position sensor


Time: 15 min.

A person might reasonably ask, after watching an integrator in action, “But why would I want to integrate?”
We have contrived one example of a signal that seems to want integrating, to begin to answer this legitimate
question. We’ll admit that we cooked it up because it’s kind of fun, rather than because it’s useful. But it may
set your imagination to conceiving other possible uses for an integrator.

Casting about for a signal whose integral might be interesting, we5 thought of signals from coils moving in
a changing magnetic field. The output voltage should be proportional to the rate at which the flux through
the coil changes. We first tried pushing on a big audio speaker—and then thought of using the so-called
2 Ask Paul: true? What of necessary difference between inputs, for large V out?
3 We found that the location of our grounding connection, on the breadboard, caused drift-rate variations of more than a factor of
two. The small currents flowing in the ground line seem to account for these microvolt variations at the input. Connecting directly to the
non-inverting input point on the breadboard provides the most honest shorted-input connection: zero in the sense that the op-amp sees
zero.
4 The voltage errors we are meeting here, on the microvolt level, get us into the range of effects such as thermal EMF that arises

when dissimilar metals meet. If the tinning of a connection wire happened to be worn so as to expose bare copper, the copper-tin-alloy
junction could show such an effect. We are only guessing, here.
5 Well, “we” means the Royal Paul.
Lab 7: Op Amps II 5

“voice coil” of a hard disc drive. The voice-coil (so-called because the basic design was borrowed from audio
speakers) is a simple motor that drives the drive head along the radius of the disc, so as to find or follow a
disc track.

If opening up a dead disk drive is too much trouble, you can watch the same effect with the low-budget
version shown on the left side of fig. 3. Those are two cheap little DC motors, to which we glued an arm cut
from the plastic rotor at the far left. That rotor came from a hobby “servo motor” (a device that we will meet
again in a late micro lab). The smaller motor is a 9V device; the larger is a 3.3V to 5V device.6 Almost any
DC motor will do, since you can adjust the integrator’s sensitivity to your convenience (how?7 ).
leads from voice coil

read/write head

permanent magnet

voice coil and


pivot point (coil
not visible
under magnet)

poor man’s DC-voltage source… …fancy DC-voltage source: disk drive ‘voice coil’
Figure 3: Alternative signal sources: DC motors; Hard disc, with “voice coil” that positions drive head

We will use the DC motor not as a motor but as a generator. Instead of applying a voltage to move the disk-
drive’s ‘head’—or to spin the little DC motor—we will move the head by hand, so as to generate a voltage
proportional to velocity of the head, or to the spin rate of the little motor. Integrating this signal, we should
get a voltage proportional to the head’s position (or the motor shaft’s).

Query: moving the head fast, or spinning the shaft fast, produces a large voltage input, moving either one
slowly produces a small voltage input. If you move the head quickly from position A to position B—or rotate
the motor shaft from angular position C to D—does the rate at which you make this movement affect the
integrator’s output?8

In this exercise our goal is to show this position on the scope screen. We don’t want the display to wander
appreciably, over the span of several seconds. So, we need a low-drift integrator like the two that we have
just put together.

Let’s apply your integrator—probably the most recent circuit, using the LTC1150, since that should still be
wired up—to the signal put out by the disc-drive’s voice coil. Watch the input signal (the signal from the two
wires brought out from the disc’s coil) and the integrator output. Try 2V/division on the integrator output.
Zero the integrator, and then move the disc head, inward and outward on the radius. We hope you like what
you see coming from your integrator. We hope that you find you have built a circuit that displays the head’s
radial position—or the rotary position of the DC motor’s shaft.

If you’re not worn out, swap in the ’411 for the chopper amplifier, and restore the trimming pot. (If you’re
lucky, your trim may still be good; if not, adjust it till you get an acceptably-slow drift from your integrator,
and then apply the disc-drive’s signal.) See how the trimmed ’411 does at displaying the drive’s head position.

6 If you want to buy a motor that we have tried, you can get the larger one, here, from many sources. It is a Mabuchi FF-130RH. We

happened to buy ours from All Electronics, for a little more than $1.
7 We know you know the answer: by adjusting the value of the integrator’s input resistor.
8 Nope. Quick movement does drive the integrator harder—but for a shorter time than the slower movement (by definition of “quick”

and “slower”!). So, the integrator output honestly measures the position of head or motor shaft. It does not care about rate of change of
that position: it integrates the input voltage, but that voltage is the time-derivative of position—in case you like speak of simple things
in fancy mathematical terms, as we do not.
6 Lab 7: Op Amps II

7L.2 Differentiator
Time: 25 min.

Figure 4: Differentiator, including extra R and C for stability

The circuit above is an active differentiator. Try driving it with a 1kHz triangle wave.

The differentiator is most impressive when it surprises you. It may surprise you if you apply it to a sine
from the function generator: you might expect a clean cosine—unless you noticed the contrary result back in
Lab 2. In fact, some generators (notably the Krohn-Hite generators that we prefer in our lab) will show you,
when their sine is differentiated, a waveform that reveals the purported sine to be a splicing of more-or-less
straight-line segments. This strange shape reflects the curious way the sine is generated: it is a triangle wave
with its point whittled off by a ladder of four or five diodes. The diodes cut in at successively higher voltages,
rounding it more and more as the triangle approaches its peak

Figure 5: Sketch of standard function-generator technique for generating sine from triangle

You may even be able to count the diodes revealed by the output of the differentiator–though we’ve never
been able to spot evidence of all the diodes.

A note on stability (preview of work to come): AoE §4.5.6

Here we are obliged to mention the difficult topic of stability, a matter treated more fully in a later lab (Lab
9, op-amps 4). A simple differentiator—one with a single R and a single C. . .

Figure 6: Simple differentiator (unstable)

. . . necessarily lives at the edge of instability (sounds like a soap opera, doesn’t it), because such a differen-
tiator has a gain that rises at 6dB/octave (∝ f). To build the differentiator as simply as in fig. 6 would violate
the stability criterion for feedback amplifiers (see AoE §4.9.3.)

In order circumvent this problem, it is traditional to include both a series input resistor and a capacitor parallel
to the feedback resistor, as shown in fig. 4. This additional R and C convert the differentiator to an integrator
Lab 7: Op Amps II 7

above some cutoff frequency.

You saw a sketch of this frequency-response in a class-notes Figure, Fig. N9.7. To save you the labor of
flipping back a few pages, we show that figure again:

Figure 7: Frequency response of practical op-amp differentiator: compromised to achieve stability (class note figure repeated here)

This compromising of the differentiator’s performance is disappointing. You can watch the effect of this
network by noting the phase shift between input and output, as you gradually raise fin from zero toward the
break-over frequency and beyond. At ‘breakover’ the phase shift should go to zero. At still higher frequencies
you should see the phase shift characteristic of an integrator.

Incidentally, a faster op-amp (one with higher fT ) would perform better: the switch-over to integrator must
be made, but the faster op-amp allows one to set that switchover point at a higher frequency.

Integrate the Derivative?

A more intriguing way to see the imperfection of the differentiator is to feed its output to the integrator you
built earlier, then compare original against output waveforms. Ideally, they would be identical—at least in
phase (that is, apart from gain artifacts). Are they? Does the answer depend on input frequency?9

Sweeping Frequencies (optional)

You might also enjoy watching the frequency response of the op amp differentiator, to confirm the pattern pre-
dicted in the sketch above: does the circuit show first gain that rises with frequency (differentiator behavior),
then gain that falls (integrator behavior)?

7L.3 Slew Rate


Time: 15 min.

Figure 8: Slew rate measuring circuit. (The series resistor prevents damage if the input is driven beyond the supply voltages)

Begin by measuring slew rate and its effects, with the circuit above. We ask you to do this in two stages:

9 It should. The integrator is honest, but the differentiator differentiates only up to its breakover frequency, which you can calculate

from its R’s and C’s. Use either pair.


8 Lab 7: Op Amps II

7L.3.1 Square wave input

Drive the input with a square wave, in the neighborhood of 1kHz, and look at the output with a scope. Measure
the slew rate by observing the slope of the transitions. Note that full slew rate appears only when the op-
amp’s input stage is strongly unbalanced. So, if the slew rate seems low, make sure your input amplitude is
sufficient.

7L.3.2 Sine input

Switch to a sine wave, amplitude a volt or so, and measure the frequency at which the output waveform begins
to distort (this is roughly the frequency at which amplitude begins to drop, as well). Is this result consistent
with the slew rate that you measured using a square wave, just above? Watch out for a refinement, here: you
will not see the op-amp’s full slew rate until the op-amp inputs are radically unbalanced. A large square wave
achieves this effect easily; a sine wave may not, unless it is both large and quick.

Now go back and make the same pair of measurements (slew rate, and sine at which its effect appears) with
an older op-amp: a 741. The 741 claims a “typical” slew rate of 0.5V/µs; the 411 claims 15V/µs. How do
these values compare with your measurements?

7L.4 AC amplifier: microphone amplifier


20 min.

7L.4.1 Single-supply op-amp

In this exercise you will meet a “single-supply” op-amp, used here to allow you to run it from the +5V supply
that later will power your computer. This op-amp, the ’358 dual (also available as a “quad,” the 324) can
operate like any other op-amp, with V+ = + 15V, V− = −15V. But, unlike the ’411, it can also be operated
with V− = GND, since the input operating common-mode range includes V− , and the output can swing all
the way to V− .

Our application here does not take advantage of that hallmark of a single-supply op-amp, its ability to work
right down to its negative supply. Often that is the primary reason to use a single-supply device. The op-
amp millivoltmeter described in worked example 7W does exploit this capacity of the ’358, unlike today’s
microphone amplifier.

NOTE: build this circuit on a private single breadboard strip of your own, so that you can save the circuit for later use: it will feed your
computer. Be sure to put your name on your breadboard.

Here the ’358 is applied to amplify the output of a microphone—a signal of less than 20 mV—so as to
generate output swings of a few volts. The “AC amplifier” configuration, you will notice, is convenient here:
it passes the input bias voltage to the output without amplification because gain at DC is one.
Lab 7: Op Amps II 9

Figure 9: Single-supply microphone amplifier

The microphone is an “electret” type (the sound sensor is capacitive: sound pressure varies the spacing
between two plates, thus capacitance; charge is held nearly constant, so V changes with sound pressure,
according to Q = CV). The microphone includes a high-input-impedance field-effect transistor (“FET”) within
the package, to buffer the electret.

The FET’s varying output current is converted to an output voltage by the 2.2k pullup resistor. So, the output
impedance of the microphone is just the value of the pull-up resistor: 2.2k.

Try isolating the power supply of the microphone—whose pin definitions are shown in fig.10—thus:10

this terminal is tied to case...

...and should be tied to ground

Figure 10: Quieting power supply to microphone

You may find, after your best efforts, that your amplifier still picks up pulses of a few tens of millivolts, at
120Hz. The pulses look like this:

Figure 11: Ground noise on PB503 breadboard: caused by current pulses recharging filter capacitor

Probably you will have to live with these, unless you want to go get an external power supply (the adjustable
supply you used in Lab 1 will do fine, here). These pulses show the voltage developed in the ground lines
when the power supply filter capacitor is recharged by the peaks of the rectifier output. They shouldn’t be
there, but they are hard to get rid of. They appear because of a poor job of defining ground in powered
breadboards like the PB503, and you can’t remedy that defect without rewiring the innards of the PB503.

10 The photo shows PUI Audio AOM-6738P-R, available from Digikey.


10 Lab 7: Op Amps II

(lab op2 headerfile june14.tex; August 31, 2015)


Index

electret microphone (lab), 9

LM358 (lab), 8
LTC1150 (lab), 4

operational amplifier
differentiator (lab), 6–7
integrator (lab), 2–5
offset trim, 3
self-trimming op amp, 4
single-supply AC amplifier (lab), 8–9
slew rate (lab), 7–8

11

You might also like