6 OP AMPS II 6 Op Amps II In the previous lab, you explored several applications of op amps. In this exercise, you will look at some of their limitations. You will also examine the op amp integrator and differentiator circuits. This lab will require two days. Reading: HH Sections 4.11 4.13, 4.19 4.20 (pgs. 189-212, 222 224) 6.1 Output Capacity The most significant practical limits to what you can do with an op amp derive from the fact that the output voltage and current are limited. You saw in the previous exercise that the output voltage is constrained by the supply voltages driving the op amp, and that the output cannot generally swing all the way from one supply voltage to the other. In addition, the current that the op amp can supply is limited. These effects can be observed with the circuit of Fig. 1. For any practical V in, the output voltage will be clamped at one of its limits. The voltmeter thus measures how large an output voltage is achievable. As the potentiometer resistance is lowered, the op amp must supply more current to maintain its output. Eventually, this causes the output voltage to decline, necessarily reaching zero when the load resistance is zero. By varying the potentiometer setting, measure and plot the output voltage vs. output current for both signs of the input voltage. Measure and record the power supply voltages, for comparison. Note that the LF411 is designed to withstand being shorted to ground indefinitely, so you shouldn t damage anything. Not all amplifiers have that property, however, so in general you should check before doing an experiment like this. You should see that at low current, the output should swing to within a volt or so of the supplies (or rails ). Some op amps are designed to minimize this offset, and are called rail-to-rail designs. One important application is to single-sided operation, where all the signals of interest are positive and V S- is set to ground. If you tried to do that with an LF411, the op amp would be unable to produce 0 V out. If you need more voltage or current than an LF411 can handle, higher power op amps are available or you can boost the output power using a discrete transistor amplifier. in Figure 1: Measuring limits on output voltage and current 6-1
6.2 Offset Voltage 6 OP AMPS II in out Figure 2: 60 db amplifier. Figure 3: Offset trimming circuit. 6.2 Offset Voltage Ideally, if you present the same voltage to both inputs of an op amp, the output voltage will be zero. However, a real op amp gives zero output for some small but nonzero input voltage difference, V OS. To observe this, construct the 1000 amplifier of Fig. 2. If you ground the input, you should observe a non-zero output, equal to V OS times the amplifier gain. Compare your measured value to the specification V OS < 2 mv. As seen here, the offset voltage is large enough to be significant in a high-gain circuit. When this is a problem, it can be handled using the offset adjustment inputs, pins 1 and 5. Fig. 3 shows the standard offset trimming network. Wire this into your circuit and adjust the pot until the output voltage is zero. As handy as this is, V OS unfortunately varies over time and with temperature. You should be able to observe this by warming the chip up with your finger for a few seconds. Record your observations. 6.3 Bias Current An ideal op amp allows no current to enter its inputs. For ac signals, this is subverted by capacitive coupling between the inputs. However, even at dc, a small bias current is present. The size of the current depends very much on the op amp construction; for the LF411 it is specified to be below 100 pa. It can can be observed with the same circuit of Fig. 2. First, convince yourself that with the input grounded, any bias current (on the V + input) makes a neglible contribution to the output signal. That s why we didn t need to worry about the bias current while we were measuring V OS. With the offset voltage nulled as well as possible, attach V in to ground through a 1 MΩ resistor. You should be able to see a shift in the output level when measured with your DMM. Use the measured voltage to determine the bias current. Is it consistent with the op amp specifications? 6.4 Johnson Noise If you observe the output voltage from the previous circuit on the oscilloscope, rather than a DMM, you will notice that it appears quite noisy when the 1 MΩ resistor is in place. This isn t a fault of the op amp, but it is a general problem that arises when you are trying 6-2
6.5 Slew Rate 6 OP AMPS II to make a very precise circuit: resistors are noisy. The effect is known as Johnson noise, and comes from thermal excitation of the electromagnetic field in the resistor. Consulting a statistical mechanics text will give you the formula: V rms = 4k B T R f where k B = 1.38 10 23 J/K is Boltzmann s constant, T is the temperature of the resistor, R is the resistance, and f is the bandwidth of the noise detector (in Hz). (If it ever comes up, you should replace R with the real part of the impedance when you need to find the Johnson noise across a complex network.) Unfortunately, it is difficult to determine the root-mean square noise amplitude from the signal on your scope, and the bandwidth f is not clear. However, by replacing the 1 MΩ input resistor by a 100 kω you should see the noise level decrease by about a factor of 10. Include a rough estimate of the noise level for each resistor in your report. We can make a better measurement using ELVIS. Open up the spectrum analyzer instrument, which is labelled DSA in the toolbar. Make sure the source channel is set to SCOPE CH 0, and hook your circuit output (with the 1 MΩ resistor on the input) into the CH 0 input on the side of the ELVIS board. Set the frequency span to 20 khz, and the voltage range to ±500 mv. Then run the analyzer. It will display the noise spectrum, defined as the amount of noise present at each sampled frequency. The signal is the rms noise, which is what we need to compare to the Johnson noise formula. Here the bandwidth f is the frequency range corresponding to each point displayed. You can determine it by dividing the frequency span by the number of points, here somewhat unfortunately called the Resolution (lines). Compare the measured values to the calculation, using the noise level observed around 1 khz range. (At lower frequencies, you can be fooled by dc offsets, and at higher frequencies, the gain of the amplifier is reduced.) How well does your observation correspond to the Johnson formula? Note that the noise level in dbv rms is defined as 20 log(v rms /1 V). Here the 1 V appears as a sort of normalization constant specifying what 0 dbv rms means. 6.5 Slew Rate Another important limitation of real op amps is that they can only respond at a finite speed. One reflection of this is the op amp s slew rate, which measures the rate at which the output voltage can change, typically in V/µs. Measure the slew rate with a simple follower, Fig. 4. Observe the output on the scope, at drive amplitudes of both 2 Vpp and 10 Vpp. The datasheet gives a minimum specification of 8 V/µs and typical value of 15 V/µs. Are your observations consistent with this? 6.6 Frequency Response The slew rate is one limit on an op amp s frequency response, but it is mostly important for large-amplitude output signals. Even for small signals, the op amp can only respond at finite speed, which leads to phase delays and reduced gain at high frequencies. This behavior can be quantified using the Bode plots we introduced in Lab 2. 6-3
6.7 Integrator 6 OP AMPS II 1k V in 100 LF411 V out out 1k 10k Figure 4: Follower for measuring slew rate Figure 5: Divider and non-inverting amplifier. Unfortunately, the ELVIS Bode instrument is too slow for what we want to see, so you will need to take the data by hand. Set up the non-inverting amplifier shown in Fig. 5. Note the divider on the input, which makes it easier to get a sufficiently small drive signal. Set the function generator amplitude to 1 Vpp, and monitor V in and V out on your scope. Measure the gain and phase shift from 50 Hz to 5 MHz. You can take steps of a factor of 10 in regions where the phase is approximately constant, but use factors of 2-3 where something interesting is occuring. Note that you can increase the input amplitude at the higher frequencies, but make sure to keep the output amplitude below 1 V or so. Also, you will need to be careful to keep the traces centered on the scope; the dc level may shift at high frequencies due to nonlinear effects. (Using the scope s ac coupling feature might be useful here.) Plot your data (both gain in db and phase in degrees vs. log f) in your report. The unity gain point is defined as the frequency where the op amp gain drops to 0 db. Find this point and compare to the op-amp specification of 4 MHz. Now replace the 10k feedback resistor by a 100k resistor, making it a 101 amplifier. To compensate, turn the function generator amplitude down to 0.1 V. Measure the gain and phase over the same range as before. Add the data to the same Bode plots as the 11 circuit for comparison. This should illustrate how the frequency response of an op-amp circuit depends on both the intrinsic op-amp gain and the feedback network. 6.7 Integrator Construct the integrator circuit of Fig. 6. Drive it with a 500 Hz square wave from your function generator, but get everything, including the drive and scope, set up before you turn the circuit power on. Observe what happens when you do apply power. Why does the level drift? The circuit is a true integrator, so the output will ramp in response to a dc input. Perhaps the function generator outputs a small dc component, or perhaps it is just the offset voltage we encountered in section 6.2. In any case, the integrator is doing what it is supposed to, but the dc drift makes it hard to look at the waveform that 6-4
6.8 Differentiator 6 OP AMPS II in out Figure 6: Integrator. we are interested in. Try to adjust the dc offset on the function generator to keep the output signal near zero. Is it possible? One way to think about this problem is that a true integrator has infinite gain at dc, so it will eventually rail in response to any finite dc input. Instead of trying to eliminate that input, a better fix is to reduce the dc gain. This can be achieved by putting a large resistor in parallel with the capacitor. Try a 1 MΩ resistor. What then is the dc gain? Below what frequency does the circuit stop acting like an integrator? If you observe the signal your scope, you can now try various input wave forms and verify that the output is the integral (so long as the input frequency isn t too low.) Apply a 500 Hz square wave with a 2 Vpp amplitude. Does the amplitude of the output agree with what you calculate? Observe the output produced by triangle wave and sine wave as well. Do they agree with your qualitative expectations? Use the ELVIS tool to obtain the Bode plot for this circuit, including the 1 MΩ roll-off resistor, over a frequency range from 1 Hz to 10 khz. To make the phase easier to interpret, change the Op Amp Polarity setting to Inverted (since the circuit produces the negative integral of the input.) Also, make sure that the input amplitude is set low enough: think about what the maximum gain of the amplifier will be, and make sure the output won t exceed the supply voltages at that point. Verify that you understand the features in the plot, and put the data in your report. Take three more Bode plots, under the following conditions: (a) with a 1 nf capacitor instead of 10 nf (b) with a 1 MΩ input resistor instead of 100 kω (c) with a 100 kω roll-off resistor, instead of 1 MΩ (Only make the one change each time; for instance, in (b) and (c), use a 10 nf capacitor.) Overlay all four plots in Excel, plotting the data with lines to make it legible. Do the differences make sense? 6.8 Differentiator An ideal differentiator circuit is shown in Fig. 7(a). Unfortunately, the circuit as shown is unstable. Nominally, the gain increases at high frequencies, but the since the op-amp can only respond at a finite speed, it will eventually fail. The practical differentiator circuit is 6-5
6.8 Differentiator 6 OP AMPS II R 100 pf V in C LF411 V out V in 1k 10 nf 100k LF411 V out Figure 7: (a) Ideal and (b) practical differentiator circuits. shown in Fig. 7(b). Here the extra components serve to roll off the gain at high frequencies. Given the component values shown, at what frequency should this circuit stop acting like a differentiator? Construct the circuit, and drive it with a 500 Hz triangle wave with 2 Vpp amplitude. Does the amplitude of the square wave output agree with what you calculate? Do the results for square wave and triangle wave inputs agree qualitatively with what you expect? Use ELVIS to measure the Bode plot for the differentiator, from 100 Hz to 100 khz. Again, set the op amp polarity to be negative, and think about what input voltage to use. (At what frequency will the gain be largest for this circuit?) Does the high frequency roll-off appear where you expect? Does the gain cross zero db where you expect? Plot the data in your report. 6-6