Laboratory Exercise 5
–
Operational Amplifiers 1
–
Basic Op Amp Circuits
We
had
a tiny
“
taste
”
of what transistors
can
do in the previous lab
.
It
was probably clear to you
that to get
highly
functional transistor circ
uits
you have to use more than one tra
nsistor
.
The
complexity of the circuits
(and number of transistors used)
can increase almost without bound in
search of the most desirable combination of effects
–
comp
u
ters
being an extreme example.
In
this
exercise
we will start
using
inexpensive
operati
onal amplifiers (
op amps
)
and
learn
that
they
can
do most
of the
jobs
that transistor circuits
can
do, with a lot less
work on our part
.
Naturally,
t
his savings in effort for
us
comes at the cost of someone else’s
work
(sort of the engineering
version of t
he first law of thermodynamics)
.
There are
thousands of op amps available
and
new
designs show up all the time, with
different
combinations of advantages and limitations
. We will
use a technically “obsolete” design that is nevertheless a good old reliable
workhorse
.
The
differential amplifier circuit that you put together
near the end of the last
exercise
is about ¼ of
the total circuitry inside of one of
the
little 8 pin DIP package op amps
that we’ll use in this lab
.
The
schematic symbol
for a
n
op amp i
s shown above
.
This one is a particular type, the old “tried
and true” Fairchild 741, b
ut
the symbol
is
generic
–
it
is used to
represent any op amp
.
This
may
be
the only time you will see
the symbol
drawn this way, with the up and down
(plus and minus)
li
nes
coming out of the middle of it
.
These lines represent connections
(or
terminals
)
to power
supply voltages external to the chip.
T
hey a
re often omitted from the schematic for simplicity,
but they always have to be connected for the real circuits to work
.
Most of the op amp
s
that
we
will use
require
both
negative and positive voltage power supplies, but there are single supply
models available
.
For the single supply op amps, ground is the “other” voltage
.
Recall
(
from the
transistor
exercise)
the caution
about amplifiers not
doing well
near the
rails
;
this also applies to
op amps, although there are some
that will work with outputs or inputs that are
very
near the
power supply voltages
–
referred to as “rail to rail” performance
.
The point of using both th
e plus
and minus supplies is
to move the rails away from
ground,
making it easier
to work
with
low
voltage
or DC signals, where “zero” might be the right answer
.
T
here are three other terminals
(besides the power terminals)
on the symbol
that are
the
key
to
using
the op amp
.
Op amps are differential amplifiers,
so they
have two inputs and one output
(the one at the end of the triangle)
.
There is
an important
difference between the two inputs: the
one marked with a plus sign is referred to as the non

inver
ting input, while the one marked with a
minus sign is the inverti
ng input
.
The significance of
those names will be apparent shortly
.
S
ome
op amps also have terminals for
balancing
the
inputs and
output
(exactly zero output for no
differential input)
.
These
aren’t
used
often in instruments
, so w
e
won’t
consider
them
in this
class
.
The key to the usefulness of op amps lies in the concept of
negative feedback
.
For stable
operation
there has to be something
connected
to
both
of the inputs of
the
op amp,
and
t
he output
needs to
be connected
(
the
feedback
loop
) to the
inverting
input
in some way
.
F
eedback (which
gives
stab
ility
) comes at the cost of gain (which we
usually
also
want
)
so there is an inherent
compromise
.
In
the
case
of op amps
this
isn’t a problem
though
, because the gain of op amps is
intentionally made
very large
.
A typical
spec for
the
maximum
voltage gain (V
out
/V
in
)
for an op
amp is 200 V/mV.
Concept Question 1
–
What is the
theoretical
voltage gain
(unitless number)
for an open loop op
amp
(ma
ximum gain possible)
with the above spec (200 V/mV)
?
What is the
theoretical
power
(P = I V)
gain
of the above op amp
if the input resistance is 10 M
and the output resistance is 1
KΩ
?
Obviously, the power gain can’t result in more
actual
output power than the power supplies can
provide
.
U
sually it’s significantly less
, even at maximum amplification
.
Likewise, the output
voltage can not exceed either of the power supply voltages.
The signal processing and control capabilit
ies of op amps are well suited
for use in chemical
instrumentation because of their high accuracy and versatility
.
They can be used for
amplification, addition, subtraction, integration, differentiation, and ac
tive filter
ing
(all of which
we will demonstrate)
.
Feedback control of experimental parameters, such as temperature and pH
is also possible
.
We’ll start off with some basic circuits in this lab to show you how things work
(and when they don’t) and then nex
t lab we will focus on some useful op amp circuits and their
application to measurement of physical and chemical properties.
We’ll use t
wo popular types of integrated circuit op amps
in the lab
: the 741 and the 3140
.
You’ll
see that in a lot of circuits
these two op amps can be used interchangeably, and in fact many other
types could be used as well
.
Standardization of the pin layout of the packages is helpful in this
regard
.
T
he major difference between
the 741 and the 3140
is the input stage
: t
he 741 us
es a BJT
(bipolar junction tran
s
istor
) differential pair, while the 3140 uses a differential pair of p

channel
MOSFET
s
.
Th
e input resistance of the 3140
is
large
enough
(>
1GΩ)
to
allow us to
measure pH
with a glass electrode
.
The glass electrode
is a good
example of a badly conditioned voltage
source

i
ts output resistance is
several
megaohms.
The Golden Rules
Analysis of op amp circuits is
easy
using the two golden rules
.
It
’
s even easy to see where the
analysis
fail
s
by realizing that the two golden
rules aren’t perfect
.
This version of the golden rules
is from Hayes and Horowitz, but it
’
s pretty standard stuff
.
1.
The output tries to do whatever is necessary to keep the two inputs at the same voltage.
2.
The inputs don’t draw (
source
or sink) any current.
One
amplifier
circuit
that
we will build, the inverting amplifier, is shown below
.
Let’s think
through the analysis
as an example
.
The non

inverting input is ground
ed
, so the op amp wants the inverting input to be
at ground
too
(Rule 1
).
The current f
lowing into the inverting input from the input source (V
in
/R
1
) can’t go into
the op amp (Rule 2)
.
Therefore, the output has to
“push”
current through the feedback loop (R
2
)
to cancel out the input current
.
Since those currents need to be equal in magnitude
, but opposite
in sign,

V
out
/R
2
= V
in
/R
1
or V
out
=

R
2
/R
1
V
in
.
T
he input resistance of this
circuit
is R
1
because that’s what the input would “see” looking
toward the op amp. (
Think about what the
op
amp wants the voltage at the inverting input to be
.
)
We
often
call this point
in the circuit (the inverting input)
“virtual ground”
.
To get
a large
input
impedance,
you
c
hoose a
large
resistor
for R
1
which lowers the gain for a given R
2
, or
you
use
a
different circuit
that we
will build
in
the first circuit
exercise
.
T
he ou
t
put impedance
in this case
is
that
of the op amp, which varies a little from device to device, but
is
small

so small we’d
have a hard time measuring it.
The Follower
Remember this
circuit
from the transistor
lab
? It makes a
copy of th
e signal from a “bad”
high
output impedance source
so that it
look
s
like
it came from
a nice low output impedance one
.
T
he
amplifier
needs to present high input impedance to the real
source to avoid loading it
and provide
the low impedance output for the r
est of the circuit
.
Circuit Exercise 1
–
This is a
n easy one

the op amp follower
.
Set up the op amp follower
shown below
using a 741
and verify that it gives an output that
mimics
the input by driving the
input with a slow (1
00
Hz) sine wave
.
The 10
KΩ
resistor is just to protect the input of the op
amp, it’s not really part of the function of the circuit
.
There’s a big difference between this circuit and the
inverting amp
above
.
What is the input
impedance in this case? (Don’t try to measure it,
just say where it comes from.)
What
determines
the output impedance?
Simulate a “bad” (high output imped
ance) source by putting in a 1
0
M
resistor
between the
function generator and the
10
KΩ
resistor
(in series
).
Do you see any differences at all?
If you
put
your other scope probe between the 1 M
and 10
KΩ
resistors, you will see the loading that
the scope would normally produce under these conditions.
This is a
usefu
l
circuit in
instrum
entation, even if it looks like it doesn’t do anything
.
We
’ll
get a
little
more
use out of it
be
fore we move on
by demonstrating one of the i
mportant
limitations
of
op amps
.
Remove the 1
0
M
resistor, s
witch to the square wave on the function generator
,
an
d
verify that the output still looks pretty much the same as the input
.
Now take a closer look at one
of the “on” edges of the waveform
.
That is, expand the time scale to short times
.
Y
ou
should see
a little lag in the output
, relative to the input
.
If not
,
increase
the voltage
amplitude
on the input a
little (it should be a few volts
).
This effect
is
refer
red
to as the
slew rate
,
the speed at which
the
output voltage
changes
in response to
rapid changes
in the
input
.
There is a good reason to design
a less
than infinite slew rate into an op amp that we
will
talk about in lecture.
Measure the slope of the output’s
on
time
.
Do this near the center of the
voltage
range
.
Have a
look at the specs for the op amp and see if this
agrees
with the “typical” value fo
r the slew rate.
Measure the slope of the output’s
off
time
.
Is it symmetric?
They aren’t always
symmetric

the
re is part and model variation.
Circuit Exercise 2
–
Set up the inverting amplifier
with a controllable input as
show
n below
and measure t
he output (B) and input (A)
with the DMM
or the PMD (you can do both
simultaneously
with the PMD
).
This circuit illustrates
that
it
’s easier
to work with DC signals
in op amp circuits
than
with
transi
s
tor amplifiers,
but its
just as easy to work with most
AC signals
using op amps
.
With many
op amp circuits, it is
a good idea
to decouple the power supplies at the circuit board with 0.1
μ
F
ceramic disk capacitors

ask how this is done if you aren’t sure
.
It often is not needed, but it
never hurts to do it.
What value do you expect for the gain
of the amplifier
, including
the
sign?
What voltage range do you expect the
variable input (15 V power supply plus 15 KΩ resistor and
1 KΩ pot)
to give you?
S
et the 1
KΩ
pot to
at least
five values between 0.1 and 0
.9 V, measuring the voltages at points
A and B each time
.
Record the values below
.
Now change the 15
KΩ
resistor connection to
the
negative
1
5 V
power supply
and repeat the
set of
measurements.
Graph the results and paste the graph in below
.
Fit the data
using a linear regression
.
Is there a
non

zero intercept on either of these sets of data?
Is the slope equal to the gain that you predicted above?
The source of
a
non

zero intercept
(
if there is
one)
could be
an
import
ant failing of
op amp
golden rule #
1
.
The two inputs for the op amp are
sometimes
not at exactly the same voltage
a
nd
the op amp tends to magnify the offset
.
It is possible to trim the 741 op amps to remove this
effect
, as noted above
.
It’s kind of a pointless exercise though, since
the tri
m
tends to drift with
time (presumably due to small temperature changes in the trimming resistor) and will va
ry from
op amp to op amp
.
Fortunately
non

zero intercepts are easy to account
(calibrate)
for, as long as
the res
ponse is linear,
and
it
usually is
.
Next we’l
l see how the inverting amp does with an AC signal
.
Disconnect
the 15
KΩ
resistor
from the
15 V
power supply and connect it to the function generator, set for a sine wave output
.
Using a scope probe at
point A
,
adjust the function generator amplitude and the 1
KΩ
pot until
the signal at point A is about 0.5 V
pp
.
Connect the
second scope probe to point B and record the
peak to peak
voltage
and relative phase below.
A/volts
B/volts
Calculated B/volts
Error %
Try triangular and square waves and note qualitatively the relative amplitude and any distortion
of the waveforms (what shape are they
?
)
for 10 kHz and 100 kHz.
Math with
Signals

the Summing Amplifier
T
he output feedback loop cancel
s
whatever current is coming into the inverting input when the
non

inverting input is held at ground,
so
it is possible to sum currents at this point (
using
Kirchoff
’s current law
).
Thus the op amp can be used to do
analog
math
.
If
we just want
the
voltage inputs to be summed,
we
use the same value input resistor to connect to multiple sources
that all terminate at the virtual ground produced at the inverting input
as
for the feedbac
k resistor
.
The output i
s an inverted version of the sum
of the inputs
, but we can re

invert with another
inverting amplifier, if we wish.
If
we
want to multiply some inputs by a factor
and then add
them
,
we
use different
input
resistors
relative to the
on
e
feedback resistor
.
Changing the feedback
resistor can amplify or attenuate the final sum. There are many possible combinations.
Concept Question
2
–
If we
put two 5 volt DC signals through 10 KΩ resistors to the virtual
ground of an inverting amplifier
and use a 15 KΩ feedback resistor, what is V
out
?
(You might need to sketch this one.) If we put a 5 volt DC signal through 10 KΩ resistor and a
100 mV
pp
pure AC sine wave signal through a 1 KΩ resistor (both terminating at the summing
point) and use a 10
KΩ feedback resistor, what is the output waveform?
If we
want to add a 5 volt signal to half of a 10 volt signal and then end up with 1/3 of the total,
what three resistors (two R
in
and one R
feedback
) would work?
The summing amplifier is a
lso
handy way
to add a
controllable
DC offset
to
a signal, as we show
below.
Frequency
A/volts
B/volts
Phase of B relative to A
100 Hz
1 kHz
10 kHz
100 kHz
Circuit Exercise 3
–
Modify the inverting amplifier circuit as follows so that there are two
inputs
.
Set
the FG
for a 1 kHz sine wave
.
Observe the change in the output at C for a 0.5 Vpp
sin
e wave at B as the voltage at A is changed from about 0.5 to

0.5 V.
Describe the function that this circuit is providing (what knob on the trainer is it mimicking?)
How could the circuit be changed so that the sine wave is
attenuated
by
a factor of
tw
o, but the
range of the dc offset remains the same?
Try this and verify that it worked.
Non

inverting Amplifier
When high input impedance is required or amplification of the input signal without inversion is
desired, the positive or non

inverting input (
pin 3) of the op amp is used
.
The follower is one
example, and the non

inverting amplifier is another
.
A typical example is shown below
using
a
3140
(high input impedance)
op amp
.
Circuit Exercise 4
–
Set up the non

inverting amplifier as shown below
.
No
te: the feedback loop
is still connected to the inverting input
.
All pin assignments are the same as the 741;
the same
power supply and other connections
can be
used as above
.
You don’t need to write anything
down, but try to think your way through the ana
lysis of this circuit, and all of the other op amp
circuits we do in this lab
.
They are usually very simple to analyze using the golden rules
.
In those
instances where they are not, it will be pointed out.
R
ecord the output voltage at
the DMM
as shown
for
at least
two values of positive input voltages
at point A and
for
two negative values
.
You can use the PMD
instead
to measure both voltages
simultaneously, if you wish.
Calculate the expected
(Calc’d)
voltages at
the DMM location shown on
the diagram
from the
equation
V
out
=
V
in
(l + 100
KΩ
/10
KΩ
)
and
record
them
in the table
above
. Calculate and record
the percent error between the measured and expected output
,
and explain
the e
rrors
, if
they are
non

zero
.
What voltage would you get (theoretically) at point B if you put 1 V in at point
A
?
See if this is
what you get
.
Again, how is this circuit different from the inverting amp?
Differentiator
and Integrator
As promised back in the capacitors lab, we are now in a position to build some much better
calculus circuits with the op amps
.
Th
at is, we can now get a nice
integrator
and
an
“
ok
”
differentiator
.
A/volts
DMM/volts
Calc'd B/volts
Error %
Circuit Exercise 5
–
Breadboard
the following circuit, which provides an approximate time

differential of the input signal. Drive it with the function generator and watch the output on t
he
scope
.
Hint: you have to watch the input between the FG and the first cap
.
The capacitor in
parallel with the 100
KΩ
feedback resistor is necessary to avoid instability and excessive noise;
try values
in
the indicated range that give the cleanest signal
.
For the following input signals from the function generator, record the amplitude of the output
signal and describe its waveform
.
Comment on the output waveforms as time derivatives of the input signals.
As we saw with the pure RC circuits, this
differentiator is also used as a filter
.
Is it a
high
pass
or
a
low
pass
filter?
Was your answer based on your observations, or were you able to predict
a priori
which way it
was going to come out?
Interchanging the input capacitor and the feedback res
istor in the above circuit produces the
opposite effect, integration
.
Go ahead and do this
as shown below
.
It doesn’t take too much
imagination to
come up with
a use for integration
.
Whenever we do chromatography or
spectroscopy,
we end up with “peaks” an
d usu
ally it is the integral of the peaks (the area
underneath) which is related to concentration in some way
.
Remember the integral trace from
NMR spectrometer
s
?
In the circuit below, a 3140 op amp is used
to make the integrator
because
of its low input
current
.
This helps to circumvent another
limitation of op amps
–
golden r
ule 2
isn’t perfect either,
and
some current does flow into the inputs
.
S
ince the integrator integrates
Input
Output/Vpp
Waveform
1 Vpp triang. 100 Hz
1 Vpp triang. 1 kHz
1 Vpp square 100 Hz
1 vpp square 1 kHz
1 vpp sine 100 Hz
1 vpp sine 1 kHz
current
this would add to the desired signal
.
We can get around this to
some
e
xtent by using
MOSFET input transistors on the front end of the op amp
.
Even so, the output will gradually
limit as the op amp integrates its own error current and voltage
.
We’ll try a sneaky solution
s
uggested by Hayes and Horowitz:
a
big
resistor is inse
rted into the feedback loop
to
help keep
the capacitor from charging up and the integrator from running away with itself
.
You can
probably anticipate that this mixing of the “wrong” component types with the “right” ones leads
the circuit to switch roles at
some extreme and thus behave non

ideally
.
Comment on the output waveforms as time integrals
of the input waveforms
, and
how
their
amplitude changes with
frequency.
What type of filter is this one?
How well does it work?
(If you want to do a Bode p
lot to find out, that’s fine
.
Otherwise, you
can just check it out qualitatively.)
Real World Example
(Easy)
–
Pick one of the circuits you made today and say how it could be used in
one of the
instruments from
the
Instrumental A
nalysis lab
.
Ok, now build
that
instrument
.
(Just kidding

but something to keep in mind for the project at the end of the term.)
Input
Output/Vpp
Waveform
1 Vpp triang. 100 Hz
1 Vpp triang. 1 kHz
1 Vpp square 100 Hz
1 vpp square 1 kHz
1 vpp sine 100 Hz
1 vpp sine 1 kHz
Comments 0
Log in to post a comment