03_Op_Amps-JAGv6

advertisement
P309 Intermediate Lab, Indiana University Dept. of Physics
Lab #3: Operational Amplifiers
Goal: So far we have looked at passive circuits composed of resistors, capacitors and
inductors. The problem with passive circuits is that the real part of the impedance always
decreases the amplitude of voltage and current in the circuit. Often we wish to take a small
voltage or current and amplify it, so that we can measure it with greater precision. We might
also want to add, subtract, integrate or differentiate two or more voltage or current
amplitudes. Amplifiers allow us to perform all of these linear mathematical operations and
more on an AC or DC voltage or current. The operational amplifier (op-amp) is a type of
integrated circuit amplifier with properties that makes implementing these functions
particularly simple. In this laboratory, you will learn the basic properties of an ideal opamp, how to use operational amplifiers with various types of feedback control to perform
simple transformations of an input signal and also some of the limitations of real op-amps.
You will also apply the integrator circuit to measure the amplitude and direction of earth’s
magnetic field in the laboratory. For a good primer on op-amps, see Wikipedia
(https://en.wikipedia.org/wiki/Operational_amplifier).
Equipment: OP07 op-amp, proto-board, assorted resistors and capacitors, DMM,
oscilloscope, large inductor coil.
1
Introduction:
A classical amplifier has two inputs: a ‘non-inverting’ input labeled “+,” and an ‘inverting’
input labeled “–.” Call the voltage at the “+” input +𝑉 and at the “−“ input −𝑉 . The openloop voltage output of the output of amplifier is:
π‘‰π‘œπ‘’π‘‘ = πΊπ‘Žπ‘–π‘› × (+𝑉 − −𝑉 ).
(eq. 1)
For a normal amplifier, like a stereo amplifier, πΊπ‘Žπ‘–π‘› is
adjustable and we operate the amplifier with the output
completely separate from the inputs.
Operational amplifiers have a very high gain,
πΊπ‘Žπ‘–π‘›~106 , which is not too useful in an open-loop
configuration, unless you are looking at an input Figure 1: Amplifier in openvoltage in the micro-Volt range. Indeed, in an ideal circuit mode, showing +, −
op-amp, we assume that πΊπ‘Žπ‘–π‘›~∞, in which case, and π‘‰π‘œπ‘’π‘‘ connections.
π‘‰π‘œπ‘’π‘‘ ~ ± ∞, unless +𝑉 = −𝑉 . Negative feedback
between output and input allows many practical op-amp applications, where the amplifier
has linear response over more conditions than an open-loop amplifier (e.g. we can design
the feedback so that the gain does not change despite changes in temperature). In most
useful op-amp circuits, we determine the negative feedback by connecting the output of
the op-amp to one or both inputs via appropriate passive components (resistors, capacitors,
inductors,…). Figure 2 shows the simplest such configuration. As in all stable circuits using
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
1
P309 Intermediate Lab, Indiana University Dept. of Physics
op-amps, the amplifier will set π‘‰π‘œπ‘’π‘‘ to be whatever is necessary to make +𝑉 = −𝑉 . The
arrangement of the feedback determines the function of the op-amp circuit. Negative
feedback is an important and somewhat counter-intuitive concept. Please review it at:
https://en.wikipedia.org/wiki/Negative_feedback
We can determine the function of an ideal op-amp circuit from two ‘golden’ rules:
ο‚·
ο‚·
No current flows in or out of either of the two inputs to the op-amp.
π‘‰π‘œπ‘’π‘‘ in any negative-feedback configuration strives to make the voltage difference
between the two inputs zero, i.e., +𝑉 = −𝑉 .
Our op-amp is an OP07, an integrated circuit with dozens of transistors, packaged in an 8pin plastic DIP (Dual In-Line Package). You will find a data sheet for the OP07 at the end
of this document. Unlike the other components you have studied so far, the op-amp is an
active device: it requires a power supply to operate. The OP07 op-amp requires powersupply voltages of ±15 V. If the output wants to exceed the supply voltage, the signal is
‘clipped,’ i.e., if equation 1 predicts π‘‰π‘œπ‘’π‘‘ > 15V, then the actual π‘‰π‘œπ‘’π‘‘ = 15V, and if
equation 1 predicts π‘‰π‘œπ‘’π‘‘ < −15V, then the actual π‘‰π‘œπ‘’π‘‘ = −15V. Clipping is one of the
differences between a real and an ideal op-amp.
Question: What is the open-loop gain of the OP07 op-amp (look at the data sheet at the end
of this write-up)?
2
Inverting Amplifier
We will first build a circuit to multiply the input signal by a fixed negative πΊπ‘Žπ‘–π‘›. Follow
figure 2 to build this circuit. In this op amp configuration, connect the input signal through
the series input resistor R1 to the inverting input ‘−‘ and also connect the feedback resistor
R2 to the inverting input ‘−‘. Connect the non-inverting input ‘+’ to ground.
The op-amp gain is given by
Vout
R2
(eq. 2)
πΊπ‘Žπ‘–π‘› = V ο€½ο€­R .
in
1
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
2
P309 Intermediate Lab, Indiana University Dept. of Physics
Question: derive equation 2 for this circuit starting with the two golden rules.
Using the Proto Board, build the inverting amplifier as shown in figure 2. Pick R1 and R2
to have nominal resistances of 1kΩ and 10kΩ so that πΊπ‘Žπ‘–π‘›~ − 10. Use a DMM to
R
2
DIP, top view
_
R
V+
1
-
V
in
+
V-
Vout= - V R / R
in
2
1
Figure 2. Inverting amplifier circuit. The figure shows the two power supply pins to
the op-amp, 𝑉+ and 𝑉− . Most op-amp schematics do not show these pins, but you
always must connect the power supply to these pins for the op-amp to function.
Remember that the + and − pins are not the same as the 𝑉+ and 𝑉− power supply pins.
measure the actual resistance of the resistors and calculate the expected value for πΊπ‘Žπ‘–π‘›.
Refer to the photo in Figure 5 to see what your configuration will look like. Use a simple
color scheme to help you remember the function of the different wires on the breadboard;
e.g., red for power, green for ground, white or blue for signals. Use a signal generator to
produce a 1kHz sine wave of 1V peak-to-peak amplitude with no DC offset for 𝑉𝑖𝑛 . Use
𝑉
the oscilloscope to measure 𝑉𝑖𝑛 and π‘‰π‘œπ‘’π‘‘ simultaneously. Determine the gain π‘Žπ‘–π‘› = π‘‰π‘œπ‘’π‘‘ .
𝑖𝑛
𝑅
Questions: Compare your measured πΊπ‘Žπ‘–π‘› to the theoretical value πΊπ‘Žπ‘–π‘›π‘‘β„Žπ‘’π‘œπ‘Ÿπ‘’π‘‘π‘–π‘π‘Žπ‘™ = − 𝑅2.
1
Change the frequency of the function generator to 100Hz and 10kHz and measure the gain
again. Is the gain independent of frequency? Change the input peak-to-peak voltage to
0.1V, 0.2V, 0.5V and 1.5V. Is πΊπ‘Žπ‘–π‘› independent of the input voltage (i.e. is the amplifier
linear)?
Increase the signal generator amplitude until you observe clipping of π‘‰π‘œπ‘’π‘‘ . At what output
voltage do you see clipping?
An ideal op-amp has an output voltage that changes instantly as the input voltage changes.
A real op-amp has a maximum change in output voltage/second called the slew rate.
Estimate the slew rate of your op-amp by setting the function generator to produce a square
wave signal. Display both the square wave input voltage and the output voltage on the
oscilloscope. Increase the frequency of the signal until the two traces are clearly different.
𝑑𝑉
Bow sketch or record the traces and measure the maximum 𝑑𝑑 for the op-amp. Compare
this result to the slew-rate quoted in the data sheet for the op-amp.
Question—How can the finite slew rate of an op-amp affect its function? Suppose you had
a sine-wave input signal to the op-amp of a fixed peak-to-peak amplitude, 𝑉𝑖𝑛 =
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
3
P309 Intermediate Lab, Indiana University Dept. of Physics
𝑉𝑝−𝑝
sin(πœ”π‘‘). Calculate the theoretical output voltage of the op-amp circuit as a function
of the πΊπ‘Žπ‘–π‘›, the slew rate, 𝑉𝑝−𝑝 and πœ”. Repeat your experiment with a sine-wave input for
2
𝑉𝑝−𝑝
three different 𝑉𝑝−𝑝 ( 10 , 𝑉𝑝−𝑝 π‘Žπ‘›π‘‘ 10 𝑉𝑝−𝑝 ). For each 𝑉𝑝−𝑝 sweep the frequency in
powers of 10 and measure the output peak-to-peak voltage. Compare your results to your
theoretical calculation.
For an ideal op-amp, π‘‰π‘œπ‘’π‘‘ = 0V if +𝑉 = −𝑉 . A real op-amp, will have π‘‰π‘œπ‘’π‘‘ = a small offset
voltage 𝑉𝑂𝑆 , when +𝑉 = −𝑉 . Measure the offset voltage of the OP07. Use the circuit in
Figure 2, and pick R1 and R2 to have nominal resistances of 10Ω and 10kΩ so that
πΊπ‘Žπ‘–π‘›~ − 1000. As usual, measure both 𝑅1 and 𝑅2 to calculate πΊπ‘Žπ‘–π‘›π‘‘β„Žπ‘’π‘œπ‘Ÿπ‘’π‘‘π‘–π‘π‘Žπ‘™ . Connect
−𝑉 to ground to set 𝑉𝑖𝑛 = 0V. Now measure π‘‰π‘œπ‘’π‘‘ with a DMM.
Question: Consider R1 and R2 as a voltage divider. What is 𝑉− ? Compare the measured
offset voltage with 𝑉𝑂𝑆 specified in the OP07 data sheet.
3
Non-inverting Amplifier
What if we don’t want to have the output voltage inverted with respect to the input voltage?
Consider the non-inverting linear amplifier circuit in Figure 3. Here the input voltage
connects to the non-inverting input and the voltage divider returns a fraction of the output
voltage to the inverting input. Use the same resistors that you used in Section 2 for a
nominal πΊπ‘Žπ‘–π‘›~ − 10 to construct the circuit. Measure Vin and Vout, determine the actual
gain.
Question: Using the golden rules for op-amps show that the theoretical value for the gain
of this circuit is:
π‘‰π‘œπ‘’π‘‘
𝑅2
(eq. 3)
πΊπ‘Žπ‘–π‘› =
= 1+ .
𝑉𝑖𝑛
𝑅1
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
4
P309 Intermediate Lab, Indiana University Dept. of Physics
Compare your experimental and theoretical results. Change the frequency of the function
generator to 100Hz and 10kHz and measure the gain again. Is the gain independent of
frequency? Change the input peak-to-peak voltage to 0.1V, 0.2V, 0.5V and 1.5V. Is πΊπ‘Žπ‘–π‘›
independent of the input voltage (i.e. is the amplifier linear)?
No connection here
R
2
_
R
1
V
+
in
Vout𝑉
=π‘œπ‘’π‘‘
V (1
= +𝑉R𝑖𝑛 / R1)+
in
2
1
𝑅2
𝑅1
Figure 3. Non-inverting amplifier circuit. The figure does not show the two power
supply pins to the op-amp, 𝑉+ and 𝑉− , but you always must connect the power supply
to these pins for the op-amp to function. Note that the wire to 𝑅1 does not connect to
the wire from 𝑉𝑖𝑛 .
4 Integrator
Op-amps can be used to construct a circuit that integrates an electrical signal over time
(Figure 4). A capacitor serves as the memory of the integrator. To clear the memory, we
simply short circuit the capacitor by closing a switch. When we open the switch, the
integration starts (𝑑 = 0).
Question—Use the two golden rules, to show that for a time-dependent input voltage, π‘‰π‘œπ‘’π‘‘
𝑑
1
(𝑑) =
∫ 𝑉𝑖𝑛 (𝑑′)𝑑𝑑 ′ .
𝑅𝐢
(eq. 4)
0
Switch
C
_
R
+V
Vin
+
Vout
R1
pin 1
R
pin 8
V
Figure
4. Basic voltage integrator circuit. Remember to connect the power supply to
0
the op-amp.
20k pot.
0
+V
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
5
P309 Intermediate Lab, Indiana University Dept. of Physics
First reset the integrator by briefly pressing the switch on the 2μF capacitor. Connect
nothing to 𝑉𝑖𝑛 . Since the voltage on the “−“ input is 0V, π‘‰π‘œπ‘’π‘‘ should remain zero for an
ideal op-amp. Usually, however, the output will drift because the golden rules are not
exactly true. Measure the drift rate in Volts/second from your oscilloscope trace.
To reduce this drift, the OP07 provides an offset trim that allows you to adjust the balance
Switch
C
_
R
+V
Vin
+
Vout
R1
pin 1
V
R
pin 8
0
20k pot.
0
+V
Figure 5. Voltage integrator circuit with drift control. Attach a potentiometer
connected to a +15V power supply to pins 1 and 8 of the integrated circuit. Remember
to connect the power supply to the op-amp.
of the two inputs. Build the circuit in Figure 5, by installing the offset trim, connecting a
20kΩ potentiometer (variable resistor) between pins 1 and 8 of the op-amp. Connect the
adjustable contact of the potentiometer to the +15V supply. Adjust the potentiometer until
the drift of the integrator is as near zero as possible. Use the white adjusting tool to rotate
the potentiometer. Determine the residual drift rate in Volts/second (you will need this
result in Section 5).
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
6
P309 Intermediate Lab, Indiana University Dept. of Physics
To show that the circuit integrates the input voltage as in equation 3, build the circuit in
Figure 6 and apply a constant voltage 𝑉0 to the input. In this case, equation 3 tells us that
the output voltage is a linear function of the time. Use a voltage divider to generate a small
𝑉0 ~10mV, so π‘‰π‘œπ‘’π‘‘ takes about 30s to increase from 0V to 15V. Select the divider resistors
accordingly.
Switch
_
_
C C
R R
- +V+V
Vin Vin
+ +
VoutVout
R 1R 1
pinpin
1 1
pinpin
8 8
V V0
0
20k20k
pot.pot.
R R0
0
+V+V
Figure 6. Voltage integrator circuit with drift control and small voltage applied to the
input via a voltage divider (𝑅1 and 𝑅2 ). Remember to connect the power supply to the
op-amp.
Question—Why should 𝑅0 be less than 𝑅?
Measure the rate of increase of π‘‰π‘œπ‘’π‘‘ from the oscilloscope trace. Compare with the rate
calculated from the values of the resistors and the capacitor in the circuit. Change 𝑅1 and
repeat your measurement. Do the two results agree with equation 3?
Questions— As shown in Figure 7, use the function generator to apply a square-wave of
frequency = 1kHz and π‘‰π‘π‘’π‘Žπ‘˜−π‘π‘’π‘Žπ‘˜ = 2V as 𝑉𝑖𝑛 . Calculate the expected output signal π‘‰π‘œπ‘’π‘‘
from equation 3 and compare to your experimental π‘‰π‘œπ‘’π‘‘ . You will need to periodically reset
the integrator by pushing the discharge button on the capacitor because the average voltage
from the function generator is not exactly 0𝑉 and the drift compensation on your op-amp
is not perfect. Repeat the derivation and comparison for a square-wave and a triangle wave
at your three frequencies. You may either save the oscilloscope outputs to a file or take
pictures with your cell phone. If you have time, repeat for a sine-wave input.
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
7
P309 Intermediate Lab, Indiana University Dept. of Physics
Switch
C
_
R
-
Function V
in
Generator
+V
R1
+
pin 1
V
R
Vout
pin 8
0
20k pot.
0
+V
Figure 7. Voltage integrator circuit with drift control and alternating voltage applied to
the input. Remember to connect the power supply to the op-amp.
5
The Magnetic Field of the Earth
We will now use the integrator in Section 3 to measure the magnetic field of the earth. The
magnetic field of the earth varies in amplitude and direction with geographical position. A
classical compass measures only the field direction in the π‘₯𝑦 direction. We will measure
the full magnetic field vector in the laboratory. A large many-turn inductor coil is an
excellent transducer for magnetic-field measurements because of Faradays law, which
states that an electromotive force πœ€ is induced in the coil when the magnetic field flux
changes. When the coil is flipped by 180°, in a fixed magnetic field, the flux changes by
twice the starting value. Thus, integrating the change in voltage suffices to determine the
flux, according to:
π‘‰π‘“π‘–π‘›π‘Žπ‘™ = −
1 𝑑 ′
𝐴𝑁𝐡
∫ πœ€(𝑑 )𝑑𝑑 ′ = −2
,
𝑅𝐢 0
𝑅𝐢
(4)
where 𝐡 is the component of the magnetic field in the direction of the coil axis, 𝑁 is the
number of turns of the coil and 𝐴 the effective coil area. The average area of a multi-layer
coil, whose mean radius is π‘Ÿ and whose maximum and minimum radii are π‘Ÿ ± 𝛿 , is:
1
𝐴 = πœ‹ (π‘Ÿ 2 + 3 𝛿 2 ).
(5)
Choose the input resistor 𝑅 such that a single flip of the coil causes a π‘‰π‘œπ‘’π‘‘ that you can
measure with at least 10% accuracy with the DMM. Note that any drift in the integrator is
faster when 𝑅 is smaller. You need not completely eliminate the drift; just make it small
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
8
P309 Intermediate Lab, Indiana University Dept. of Physics
compared to the final value for π‘‰π‘œπ‘’π‘‘ . Make a series of measurements flipping the coil by
180°. Repeat your measurement three times to measure: 𝐡𝑧 with the coil axis vertical,
𝐡π‘₯ with N-S horizontal coil axis (along the lab room), and 𝐡𝑦 with horizontal E-W axis
(perpendicular to both). Combine the three components to get the magnitude of the B
vector.
The S.I. unit for 𝐡 (appropriate for equation 4) is 1T (Tesla). 1T = 104 G.
Questions—List possible sources for uncertainties. Evaluate the error of the three
individual field measurements. Combine the errors to get the uncertainty of the magnitude
𝐡 of the field.
Question—Compare your measurement of the earth’s magnetic field with the accepted
value: http://ngdc.noaa.gov/seg/geomag/jsp/struts/calcPointIGRF.
Figure 8. Photo of the apparatus for the magnetic field measurement. Use the white
plastic adjustment tool to set the 20kΩ potentiometer to minimize the drift in the
integrator. Using a color scheme for the wires can help you keep track of the wiring.
The 2uF capacitor has a push-button reset switch attached.
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
9
P309 Intermediate Lab, Indiana University Dept. of Physics
Last revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/16/15
10
11
Last Revised by Mike Hosek, Sunny Nigam and James A. Glazier 9/10/15
Download