4 Op Amps I Due date: Monday, September 21 (midnight) Reading: HH Sections 4.01–4.10 (pgs. 175-188) The operational amplifier (op amp) is the single most important active circuit component for analog electronics work. We will spend several labs on it. 4.1 Installation The pin-out designations for a standard 8-pin dual-inline package (DIP) op amp are shown in Fig. 1. When counting pins on a DIP device, always start by locating the “top” of the package. This can be identified by a semi-circular indentation, a small circle, or both, as illustrated in Fig. 2. The pins are labled starting in the top left corner and proceeding counter-clockwise, as shown. Place an LF411 op amp on your breadboard, top up, straddling one of the central columns. With the board power off, wire the vertical ‘+’ and ‘-’ columns with ±15 V respectively, and then connnect these power buses to the +VS and −VS pins of the package. This is sufficient, but it is always good practice to filter the power supplies connections using a capacitor to ground. This helps maintain a steady voltage if the input current changes quickly; without it, the inductance of the line from the power supply can lead to instability. Here, use a 1 µF tantalum capacitor, one from the +VS pin to ground and another from the −VS to ground. These capacitors have a polarity, with the lead that must be positive marked with a +. Be careful to install them correctly. We will not be using the “offset null” pins today. 4.2 Open-Loop Test An op-amp is nothing more than a high gain amplifier with high input impedance. You can observe this amplification with the circuit of Fig. 3. Is the behavior consistent with the gain specification of 200 V/mV? Can you see why an op-amp is essentially never used in this “open loop” configuration? offset null inverting non-inverting 1 8 no connection 2 7 3 6 4 5 out offset null Figure 1: Pin-out diagram for a standard 8-pin op-amp package. 1 Figure 2: How to count pins on an integrated circuit chip. out Figure 3: Op amp as an open loop amplifier. 4.3 Inverting Amplifier Assemble the inverting amplifier circuit of Fig. 4. Drive it with a 1 kHz sine wave. What is the gain (in dB)? What is the maximum output voltage range? Try varying the frenquency. Drive the amplifier with a triangle, and see if the amplifier is linear. Drive it with a square wave and see how it responds to a sharp step. Replace the 10k feedback resistor with a 100k pot, and vary the gain. Can you take the gain all the way to zero (-∞ dB)? If you kept increasing the feedback resistance, what do you think is the maximum gain you could achieve? Measure the input impedance of the amplifier circuit by adding another 1k resister in series with the input. Does the result make sense? Verify that the output impedance of the circuit is very low by driving a 10 Ω load. You’ll need to use a small input signal, because the op-amp can only supply about 25 mA of current before saturating. This is an important limitation, but the output impedance is properly defined for small signals, where saturation is not occuring. Don’t try too hard to get a value for the output impedance. The best answer in the end is that the impedance is low enough to treat as zero in practice. 4.4 Non-inverting Amplifier Assemble the non-inverting amplifier shown in Fig. 5. What is the voltage gain? Replace the 10k resistor with a pot, and observe the range of gains achievable. Try to measure the circuit’s input impedance by putting a 1M resistor in series with the in out in out Figure 4: Inverting amplifier Figure 5: Non-inverting amplifier 2 Vin Vin LF411 Vout LF411 Vout (b) (a) Figure 6: The follower (a) and an application (b). input. (Note that if you get 1 MΩ or 10 MΩ, you’re making a mistake.) Don’t work too hard at this either, because eventually it’s not clear whether the impedance will be limited by the op amp or the breadboard. You should easily be able to convince yourself that the output impedance of this amplifier is the same as that of the inverting amplifier. 4.5 Follower You may be surprised to discover that the single most common op-amp circuit is probably the follower of Fig. 6(a). By applying the op-amp rules, you can show that this circuit apparently does nothing: Vout = Vin . What, however, about the input and output currents? The point of the follower is that its input impedance is very high, while it’s output impedance is very low. We’ve seen already that when you hook a load to a source, you need to make sure the load input impedance is large compared to the source output impedance, if you want to avoid degrading your signal. If you need to hook a low impedance load up to a high impedance source, you have a problem. The follower solves that problem, as in Fig. 6(b). As a simple example, repeat an experiment you did in Lab 1, where you cascaded two voltage dividers. There, you had to use small resistors in the first divider and large resistors in the second, in order to avoid loading effects. Build a circuit now that uses a 1:3 divider driving a follower, driving an identical 1:3 divider. By eliminating the problem of loading, the follower makes circuit design much easier. 3 1 out 2 Figure 7: Summing amplifier. 4.6 Summing Amplifier Another useful trick is shown in Fig. 7. This circuit takes two inputs V1 and V2 and produces the (inverted) sum −(V1 + V2 ). What if you don’t want the inversion? Simply follow it by an inverting amplifier with gain -1. To get some practice with the idea, design and build a circuit to add a ±5 V variable DC offset to your function generator signal. The offset should be set using a 10k pot. (Does the circuit need to include a follower after the pot?) 4.7 Current Sources We have mostly thought of power supplies as voltage sources: a ‘good’ source is one with a low output impedance, that maintains its voltage regardless of what load you apply. However, current sources can also be useful. This describes a supply that produces a constant current, no matter what load you apply. The obvious use is in applications that depend specifically on current. For instance, you might want a good current source to produce a stable magnetic field from an electromagnet coil. As the coil heats up, its resistance will change, so a voltage source would not be as desireable. Another common application is to generate a linear voltage ramp by applying a current source to a capacitor. Of course, a real voltage source can’t produce unlimited current when you apply it to a short circuit (= zero resistance) load. Similarly, no current source can generate infinite voltage in response to an open circuit (= infinite resistance) load. So if you turn on a current source with no load attached, it will simply ramp up to it’s maximum possible voltage and sit there. But if you turn it on with a short circuit load, the current source will drive exactly the current specified, for as long as you like. Interestingly, the output impedance of a perfect current source is infinite: the Thevenin equivalent circuit is a very large voltage driving a very large internal resistance. Any finite load resistance you apply is neglible compared to the internal resistance, and thus has no effect on the current. More generally, a supply of finite impedance Z acts as a current source for loads with impedance much less than Z, and a voltage source for loads with impedance much greater than Z. 4 100k V- in 100k R LF411 V+ Iout= (V+ - V- )/R 100k 100k LF411 Figure 8: Current source with floating load. Figure 9: Current source with arbitrary load. An op amp can be used to make a simple current source using the circuit of Fig. 8. Wire this up with a 10k pot as a load, and with your DMM ammeter in series with the pot. You can use the varible power supply to set Vin . Does the circuit accurately maintain Iload = Vin /R as you change the pot? In Fig. 8, the load is floating with respect to ground. Unfortunately, loads that must be referenced to ground are fairly common. (An oscilloscope is one example.) An op amp circuit that works as a current source to ground is shown in Fig. 9; you get to analyze it in your homework assignment. Note that this circuit is quite flexible: it will deliver the specified current to a load referenced to any (reasonable) voltage, not just ground. Wire it up and test it with a few different input voltages and loads. Verify that it doesn’t matter whether the load is returned to ground or to the +5 V supply. 4.8 Current to Voltage Converter Another function at which op amps excell is converting a current to a voltage. At first glance, this seems trivial, since that is just the job of a resistor: V = IR. However, if you want a large ‘gain’ (ie, a large voltage for a given current), then you need a large resistor. This would, of course, have a large input impedance, and for a current source, large load impedances are difficult to handle. An example where this comes up is the detection of light with a photodiode. Photodiodes have the property that, under illumination, they produce a current propotional to the light intensity. The output impedance of a photodiode, however, is very low. (In fact, the output impedance is nonlinear, since the photodiode is, of course, a diode. What is most relevant, however, is that the output voltage starts to saturate at just a tenth of a volt or so.) Figure 10 shows how an op amp can boost the voltage produced without presenting a large impedance to the photodiode. In fact, since the inverting input of the op amp is at ground, the photodiode ‘sees’ a short circuit, the perfect load for a current source. The feedback resistor can be made very large to produce a large signal. Wire up the circuit using a PNZ335 photodiode, and use it to observe the room lights. 5 If you attach the photodiode to the end of a cable and hold it up to the screen of a scope displaying the output signal, you can observe some interesting feedback effects. Try reversing the diode orientation. For reference, the formal name of a current to voltage converter is a transimpedance amplifier. The gain of a transimpedance amplifier is specified in ohms. out Figure 10: A photodiode amplifier. 6