Back to Learning the Art of Electronics
6L Lab: Op-Amps I The Chapter_6_Lab_Parts_List cost is modest but you will need a +/-15V power supply, low frequency sinewave generator, multimeter and an oscilloscope to complete the lab. Here is a spreadsheet of parts (less the resistor kit) you can upload to Digikey or other electronics distributor to create an order. 6L.1 A few preliminaries First a few reminders. Mini-DIP package: You saw a DIP 1 in the previous lab. Fig. 6L.1 shows another, this time an 8-pin mini-DIP, housing the operational amplifiers that we will meet in this and later labs. Figure 6L.1 Op-amp mini-DIP package. The pinout (best represented by the rightmost image of Fig. 6L.1) was established by op-amps even earlier than the classic LM741 2 and is standard for single op-amps in this package. You will meet this pinout again in Lab 7L when you use the ’741 and also the much more recent LT1150. Such standardization is kind to all of us users. Unfortunately, as parts get smaller, DIP parts are becoming scarce. Many new designs are issued in surface-mount packages only. Power: Second, a point that may seem to go without saying, but sometimes needs a mention: the op-amp always needs power, applied at two pins; nearly always that means ±15 V in this course. We remind you of this because circuit diagrams ordinarily omit the power connections. On the other hand, many op-amp circuits make no direct connection between the chip and ground. Don’t let that rattle you: the circuit always includes a ground in the important sense: a common reference treated as 0 V. Decoupling: You should always “decouple” the power supplies with a small ceramic capacitor (0.01– 0.1 F), as suggested in Fig. 6L.2 and as we said in Lab 4L. If you begin to see fuzz on your circuit outputs, check whether you have forgotten to decouple. Most students don’t believe in decoupling until they see that fuzz for the first time. Op-amp circuits, using feedback in all cases, are peculiarly vulnerable to such “parasitic oscillations.” Op-amps are even more vulnerable to parasitic oscillations than the transistor circuits that evoked our warning in Chapter 4. 1 “Dual in-line package.” 2 The pinout appears at least as early as the A709, a Fairchild device introduced in 1965.
6L.2 Open-loop test circuit 281 Figure 6L.2 Decouple the power supplies. Otherwise your circuits may show nasty fuzz (unwanted oscillations). 6L.2 Open-loop test circuit Astound yourself by watching the output voltage as you slowly twiddle the pot in the circuit of Fig. 6L.3, trying to apply 0V. Is the behavior consistent with the 411 specification that claims “Gain (typical) =200V/mV?” Don’t spend long “astounding yourself” however; this is a most abnormal way to use an op-amp. Hurry on to the useful circuits! Figure 6L.3 Open-loop test circuit 6L.3 Close the loop: follower Build the follower shown in Fig. 6L.4, using a 411. Check out its performance. In particular, measure (if possible) in and out , using processes to be described in later in this section. Figure 6L.4 Op-amp follower. 6L.3.1 Input impedance Try to measure the circuit’s input impedance at 1 kHz, by putting a 1 M resistor in series with the input. Here, watch out for two difficulties: Beware the finding “10 MΩ”. 3 in is so huge that in dominates. You can calculate what in must be, from the observed value of 3dB . Again make sure that your result is not corrupted by the scope probe’s impedance (this time, it’s the probe’s capacitance that could throw you off). 3 It’s very easy to be so deceived, because this is the first circuit we have met that shows an input resistance much larger than in for the oscilloscope-with-probe. That in is 10 MΩ.
282 Lab: Op-Amps I 6L.3.2 Output impedance The short answer to the value of the follower’s output impedance is “low.” It’s so low that it is difficult to measure. Rather than ask you to measure it, we propose to let you show yourself that it is feedback that is producing the low output impedance. Here’s the scheme: add a 1k resistor in series with the output of the follower; treat this (perversely) as a part of the follower, and look at out with and without load attached. This is our usual procedure for testing output impedance. No surprises here: out had better be 1k. Now move the feedback point from the op-amp’s output to the point beyond the 1k series resistor – to apply “feedback #2,” in Fig. 6L.5. What’s the new out ? How does this work? (Chapter 6N sketches an explanation of this result.) Figure 6L.5 Measuring R out – and effect of feedback on this value. If you’re really determined, you can try to measure the output impedance of the bare follower (without series ). Note that no blocking capacitor is needed (why? 4 ). You should expect to fail, here: you probably can do no more than confirm that out is very low. Do not mistake the effect of the op-amp’s limited current output for high out . You will have to keep the signal quite small here, to avoid running into this current limit. The curves in Fig. 6L.6 say this graphically. They say, concisely,that the current is limited to ±25mA over an output voltage range of ±10 V, and you’ll get less current if you push the output to swing close to either rail (“rail” is jargon for “the supply voltages”). This current limit is a useful self-protection feature designed into the op-amp. But we need to be aware of it. Figure 6L.6 Effects of limit on op-amp output current (LF411). 4 No blocking cap because there’s no DC voltage to block.
6L.4 Non-inverting amplifier 283 6L.4 Non-inverting amplifier Wire up the non-inverting amplifier shown in Fig. 6L.7. You will recognize this as nearly the follower – except that we are tricking the op-amp into giving us an output bigger than the input. How much bigger? 5 Figure 6L.7 Non-inverting amplifier. What is the maximum output swing? How about linearity (try a triangle wave)? Try sinewaves of different frequencies. Note that at some fairly high frequency the amplifier ceases to work well: sine in does not produce sine out. We are not asking you to quantify these effects today, only to get an impression of the fact that op-amp virtues fade at higher frequencies. In Lab 7L you will take time to measure the slew rate that imposes this limit on output swing at a given frequency. We are still on our honeymoon with the op-amp, after all; it is still ideal. “Yes, sweetheart, your slewing is flawless”. No need to measure input and output impedances again. Later, you will learn that you have traded away a little of some other virtues in exchange for the increased voltage gain; still, this amp’s perfor- mance is pretty spectacular. 6L.5 Inverting amplifier Construct the inverting amplifier drawn in Fig. 6L.8. If you are sly, you will notice that you don’t need to start fresh: you can use the non-inverting amplifier, simply redefining which terminal is input, which is grounded. Note: Keep this circuit set up: you will use it again in §§6L.6 and 6L.7. Figure 6L.8 Inverting amplifier. Drive the amplifier with a 1kHz sinewave. What is the gain? Is it the same as for the non-inverting amp you built a few minutes ago? Now drive the circuit with a sinewave at 1 kHz again. Measure the input impedance of this amplifier 5 Feeding back 1/11, we get out = 11 × in . Looks familiar, from the final circuit of Lab 5L, does it not?
284 Lab: Op-Amps I circuit by adding 1k in series with the signal source (simulating a source of crummy out ). This time, you should have no trouble making the measurement. If you suppose that the 1k in series with your signal source represents out for your source, then what is the inverting amp’s gain for such a source? 6 Take advantage of the follower you built earlier, to solve the problem that we have created for you, the signal source’s poor out . With the follower’s help, your inverting amp’s overall gain should jump back up to its original value (10). 6L.6 Summing amplifier Modify the inverting amplifier slightly, to form the circuit shown in Fig. 6L.9. This circuit sums a DC level with the input signal. Thus it lets you add a DC offset to a signal. (Could you devise other op-amp circuits to do the same task? 7 ) Figure 6L.9 Summing circuit: DC offset added to signal. 6L.7 Design exercise: unity-gain phase shifter AoE §2.2.8A 6L.7.1 Phase shifter I: using V in and its complement The circuit in Fig. 6L.10 applies a signal and its inverse to an and in series. By varying , one can make out more similar to in or similar to its complement, in-inverted . Thus phase can be adjusted over a range of 180 . So far, so simple. Figure 6L.10 Phase shifter, basic design. The subtlety and cleverness of this circuit lies in the fact that the amplitude of the output always equals in , regardless of phase shift. (This is radically different from the behavior of, say, a lowpass filter, whose phase shift also can vary quite widely: between zero and almost 90 . But as the filter’s phase shift varies, with changes of frequency, so does amplitude out.) Figure 6L.11 helps to explain this happy and surprising result. 6 That’s right: gain falls to half of what it was, because the effective “ 1 ” is doubled, in the gain equation = 2 / 1 . 7 Probably; but we doubt they’d be as simple as this one.
6L.7 Design exercise: unity-gain phase shifter 285 Figure 6L.11 Phasor diagram of phase shifter in Fig. 6L.10 (borrowed from AoE). The input amplitude, fed to the series , is 2×, and this is shown on the horizontal (“real”) axis of Fig. 6L.11. The voltages R and C are 90 out of phase; this behavior is familiar to us from our experience with  filters. The voltages R and C sum to 2×. This relation is shown in the figure as the triangle whose hypotenuse – the sum – is the horizontal 2×. The really nifty element in this result is the fact that out , represented as the distance from ground to the junction of and , is always equal to in or “.” (The point we describe as “ground” is simply the midpoint on the horizontal axis, midway between in and its complement.) To put this another way, the junction lives on a semicircle of radius . That radius is shown, in Fig. 6L.11, as a phasor arrow joining origin to that junction. Now design your own op-amp adjustable phase shifter and try it out. As you choose your values for and , note that you want your maximum (the pot value) to be much larger than C at the driving frequency. Don’t feel disappointed when you notice that at a given pot setting, phase shift varies with input frequency. That’s just the way this circuit works. 6L.7.2 Phase shifter II: phase shifter with voltage control Figure 6L.12 is a less obvious route to the same goal. The advantage of this circuit over the one you designed in §6L.7.1 is the fact that the phase shift can be adjusted by varying a resistance to ground. This feature renders straightforward the use of an electronic signal (rather than your hand adjusting a pot) to control phase shift. You could, for example, use a JFET in its resistive range to serve as adjustable resistor; 8 then let a repeating waveform drive the FET to sweep the phase shift. If you were to mix that signal with the non-shifted original signal, the result might sound like a “flanger.” You could try this today, if you have some time on your hands. (Not likely!) Compare AoE §6.3.5 How does it work? This is a subtler version of the phase shifter that you designed in §6L.7.1. To see how it works, imagine taking the variable value to extremes: when = 0, this is just an inverting amp, unity gain; and when C , out = in . These are the phase extremes, 180 apart. 9 Between these extremes, the phase at the non-inverting input is adjustable. The surprising virtue of constant amplitude results from essentially the argument that explains the simpler shifter (AoE §2.2.8A). We leave our explanation at that – a bit incomplete, “leaving the exercise to the reader” – because we don’t want to stop you, at lab time, with a long digression on this topic. 8 See §12L.4. You will also find such voltage-controlled resistance circuits discussed in AoE in §3.2.7. 9 This circuit is similar to the “follower-to-inverter” circuit of AoE §4.3, Fig. 4.20.
286 Lab: Op-Amps I Figure 6L.12 Phase-shifter: second design. 6L.8 Push–pull buffer AoE §4.3.1E, Fig. 4.26 Build the circuit shown in Fig. 6L.13. Drive it with a sinewave of 100–500Hz. Look at the output of the op-amp, and then at the output of the push–pull stage (make sure you have at least a few volts of output, and that the function generator is set for no DC offset). You should see classic crossover distortion. Figure 6L.13 Amplifier with push–pull buffer. Listen to this waveform on the breadboard’s 8 Ω speaker – or on a classier speaker, if you can find one. Your ears (and those of people near you) should protect you from overdriving the speaker. But it would be prudent, before driving the speaker, to determine the maximum safe amplitude given the speaker’s modest power rating. The transistors are tough guys, but you can check whether you need to lower the power-supply levels on your breadboard, to keep the transistors cool, given the following power ratings: transistors: 75 W – if very well heat-sunk, so that case remains at 25 C. Much less (0.6 W) if no heat-sink is used, as is likely in your setup. speaker: 250 mW. Now reconnect the right side of the feedback resistor to the push–pull output (as proposed near the end of Chapter 6N), and once again look at the push–pull output. The crossover distortion should be eliminated now. If that is so, what should the signal at the output of the op-amp look like? Take a look. (Doesn’t the op-amp seem to be clever?) Listen to this improved waveform: does it sound smoother (more flute-like) than the earlier wave-
6L.9 Current-to-voltage converter 287 form? Why did the crossover distortion sound harsh and metallic, more like a clarinet than like a flute – as if a higher frequency were mixed with the sine? 10 If you increase signal frequency, you will discover the limitations of this remedy, as of all op-amp techniques: you will find a glitch beginning to reappear at the circuit output. 11 6L.9 Current-to-voltage converter In earlier exercises we met and solved a “problem” presented by the inverting amplifier: its in is relatively low. Once in a while, this defect of the inverting amp becomes a virtue. This happens when a signal source is a current-source rather than the much more common voltage-sources that we are accustomed to. A photodiode is such a signal source, and is delighted to find the surprising in at the inverting terminal of the op-amp: what is that in value? 12 Photodiode: Use a BPV11 or LPT100 phototransistor as a photodiode in the circuit of Fig. 6L.14. These devices are most sensitive in near-infrared (around wavelength of 850 nm) but show about 80% of this sensitivity to visible red light. Look at the output signal. If the DC level is more than 10V, reduce the feedback resistor to 4.7M or even to 1M. Figure 6L.14 Photodiode photometer circuit. Figure 6L.15 A less good photodiode circuit. If you see fuzz on the output – oscillations – put a small capacitor in parallel with the feedback resistor. The is so big that a tiny cap should do: even 22pF causes circuit gain to fall off at an 3dB (1/2) of less than a kilohertz. In the phototransistor circuit in Fig. 6L.16, with its smaller feedback , you would need a proportionately (100×) larger . Why does this capacitor douse the oscillation? Because the oscillation can’t persist if the circuit gain is gone at the (high) frequency where the circuit “wants” to oscillate. It wants to oscillate up there because there it finds large, troublesome phase shifts; in Lab 9L we’ll see much more of this problem. What is the average DC output level, and what is the percentage “modulation?” (The latter will be relatively large if the laboratory has old-fashioned fluorescent lights, which flicker at 120Hz; much smaller with contemporary 40 kHz fluorescents, or with incandescent lamps.) What input photocurrent 10 Well, because a higher frequency is mixed with the sine. The abrupt edges visible in the step from below to above the input waveform, as the latter crosses zero volts, include high-frequency components. Your ears recognize this, even if you have for a moment forgotten the teachings of Fourier. 11 The circuit requires the op-amp to snap its output from a diode drop below in to a diode drop above, as the output crosses zero volts. That excursion of about a volt takes time. The op-amp can “slew” its output only so fast – and here that rate is much lower than the maximum “slew rate” that you will measure next time, because the op-amp input is not strongly overdriven during this brief transition. While this slewing is occurring, the op-amp is not able to make the output do what it ought to do. The glitch becomes visually noticeable in the scope display when the output waveform is steep and scope sweep rate is high. 12 Yes, ideally this in is zero. In fact, it is very small (later, in Chapter 9N, you’ll learn to calculate it as feedback / , where is the op-amp’s “open-loop gain”).
288 Lab: Op-Amps I does the output level correspond to? Try covering the phototransistor with your hand. Look at the “summing junction” (point X) with the scope, as out varies. What should you see? 13 Make sure you understand how this circuit is preferable to a simpler “current-to-voltage converter,” a resistor, used as in Fig. 6L.15. 14 Phototransistor: Now connect the BPV11 as a phototransistor, as shown in Fig. 6L.16 (the base is to be left open, as shown). Look again at the summing junction. Keep this circuit set up for the next stage. Figure 6L.16 Phototransistor photometer circuit. Applying the photometer circuit: For some fun and frivolity, if you put the phototransistor at the end of a cable connected to your circuit, you can let the transistor look at an image of itself (so to speak) on the scope screen. (A BNC cable with grabbers on both ends is convenient; note that in this circuit neither terminal is to be grounded, so do not use one of the breadboard’s fixed BNC connectors.) Such a setup is shown in Fig. 6L.17. The image appears to be shy: it doesn’t like to be looked at by the transistor. Notice that this scheme brings the scope itself within a feedback loop. Figure 6L.17 Photosensor sees its own image. You can make entertaining use of this curious behavior if you cut out a shadow mask, using heavy paper, and arrange things so that the CRT beam just peers over the edge of the mask. In this way you can generate arbitrary waveforms. If you try this, keep the “amplitude” of your cut-out waveform down to an inch or so. Have fun: this will be your last chance, for a while, to generate really silly waveforms: 13 The “summing junction” is a virtual ground and should sit at 0V. If it does not, then something has gone wrong. Most likely, the op-amp output has hit a limit (“saturated”), making it impossible for feedback to drive that terminal to match the grounded non-inverting input. 14 The difference results from the photodiode’s “disliking” large voltage variation. The passive circuit allows a changing voltage across the photodiode, and the diode varies its current somewhat in response. This variation distorts the relation between light intensity and diode current.
6L.10 Current source 289 say, Diamond Head, or Volkswagen, or Matterhorn. You will be able to do such a trick again – at least in principle – once you have a working computer, which can store arbitrary patterns in memory in digital form. Practical arbitrary waveform generators use this digital method. 6L.10 Current source Try the op-amp current source shown in Fig. 6L.18. What should the current be? Vary the load pot and watch the current, using a digital multimeter. This current source should be so good that it’s boring. Now substitute a 10k pot for the 1k and use a second meter or a scope to watch the op-amp’s output voltage as you vary load (in this case, just the 10k variable ). This second meter should reveal to you why the current source fails when it does fail. Figure 6L.18 Current source. Note that this current source, although far more precise and stable than our simple transistor current source, has the disadvantage of requiring a “floating” load (neither side connected to ground); in addition, it has significant speed limitations, leading to problems in a situation where either the output current or load impedance varies at microsecond speeds. The circuit of Fig. 6L.19 begins to solve the first of these two problems: this circuit sources a current into a load connected to ground. Figure 6L.19 Current source for load returned to ground. Watch the variation in out as you vary load . Again, performance should be so good that it bores you. The 10K resistor will cause the current source to fail when you dial up to about 2k. You can see why if you use a second meter to watch CE . You may not see any current variation using the bipolar transistor: a 2N3906. If you manage to discover a tiny variation, then you should try replacing the ’3906 with a ZVP3306, BS250P or VP0106
290 Lab: Op-Amps I MOSFET (the pinouts are equivalent, so you can plug any of these in exactly where you removed the 2N3906). Should the circuit perform better with FET or with a bipolar transistor? 15 Do you find a difference that confirms your prediction (that difference will be extremely small)? With either kind of transistor the current source is so good that you will have to strain to see a difference between FET and bipolar versions. Note that you have no hope of seeing this difference if you try to use a VOM to measure the current; use a DVM. 15 The FET version performs a little better. The feedback circuit monitors E , whereas C is the output; the difference is B –a small error. The FET shows no equivalent to B : its input current is zero. So, in the FET version the output current is the same as the current monitored.
Back to Learning the Art of Electronics