Table of Contents

Hayes and Horowitz: Pages 262 - 272

Lawless: Chapters 30 - 35

Pasquale: Pages 71 - 76

Operational amplifier circuits

As you may have noticed previously, working with transistors can be difficult: you have to consider the gain you want, set an appropriate bias point, and design your input stage such that it doesn't filter your signal.  Fortunately for us people have already packaged entire combinations of transistor circuits that will do most of the hard work for us in the form of operational amplifiers.

There are many, many different operational amplifiers, each tailored to slightly different situations.  To start with we'll use the LF411, which is a good all-purpose model.

There's some more text after the numbers

The text after the chip name is part of the device marking code. The suffix typically contains information about allowed temperature ranges, the “grade” of the chip, and the physical packaging. The codes are going to be idiosyncratic, varying from company to company. The most common special grades you might see are things rated for automotive or military use; reliability demands are a bit more stringent for a toaster versus your car's cruise control.

In this instance, CP is used to denote that the chip is rated for 0-70${}^\circ$C temperatures and that it is in a plastic, dual-inline package. TI also sells smaller variants, ones rated for -40-85${}^\circ$C, and parts shipped on a reel for large-scale manufacturing; each option with a different letter code.

lf411_chip.jpg
Pin connections for the LF411 op-amp chip.  Pins are typically numbered starting with 1 in the top-left of the diagram and continuing counter-clockwise around a chip. Note that pins 1, 5, and 8 aren't used for this part; this is to keep a common footprint and make mass production simpler. How to place an Integrated Circuit (IC) chip on a breadboard.  Note that the notch on the top of the diagram corresponds to a notch or circle on the physical chip, and that the chip should be placed across the channel in your breadboard.

While there are many, many subtleties to op-amp behavior, we'll focus on a model that will get us the furthest without getting bogged down in details.

Op-amp golden rules:

  • There is no current into either the inverting input ($V_-$) or the non-inverting input ($V_+$ )
    • There can (and typically is) current at the output and the power connections. Kirchhoff would be sad otherwise.

When there is negative feedback (i.e. there is a path for current from the output to the inverting input), then:

  • The output $V_{out}$ will do what is needed for there to be no potential difference between the inverting input $(V_-)$ and the non-inverting input $(V_+)$

You can get a long ways with these two rules of thumb, but there are some important common caveats:

There are many more limitations on the behavior of real op-amps, but this simple model is enough to understand and design a lot of useful circuits.

Setting up an Op-Amp

When working with transistors, we usually just used the power supply for providing a positive voltage and ground. The op-amp circuits you'll be using are designed to use a bi-polar supply, meaning both a positive and negative voltage, as power. This means setting the low side of one variable supply to ground and the high side of the other variable supply to ground. To set facilitate this, we can use a metal jumper to make the connections for us. The method is shown below.

step1.jpg step_2.jpg
Unscrew the ground terminal's cover Place the bar over the ground terminal, then loosen the adjacent + and - terminal covers
step_3.jpg end.jpg
Rotate the bar under the adjacent terminal covers and tighten them Replace the ground terminal cover

Now the leftmost red terminal will be positive with respect to ground and the right black terminal will be negative with respect to ground.

To make it easier to set symmetric limits, you can use the MODE button just above the ground terminal. When this is pushed in and the TRACK option is selected, the right-hand side of the supply will mirror the voltage of the left-hand side.

Non-Inverting Amplifiers


To start, consider the op-amp circuit shown below:

A diagram of an op-amp non-inverting amplifier circuit. The numbers next to the five different connections refer to the pin connection on the physical chip; this isn't standard but we've included it here to make the initial construction simpler.

You should use your power supply for the the $\pm 15 V$ rail connections here.  Refer to the previous labs for instructions on how to set up a negative voltage.

For the input, use a sine wave with the following parameters:

Build the circuit on your breadboard, and then observe both $V_{in}$ and $V_{out}$ on the scope.

Measure the amplitudes of both signals, and include a sketch or screenshot of the two signals.
Calculate the measured gain $g = \dfrac{V_{out}}{V_{in}}$ for this circuit.  Is it close to what you'd expect?
Why is this circuit called a non-inverting amplifier?

The circuit is called a 'non-inverting amplifier' because circuit's the output increases when the input does, meaning that the signal isn't inverted. Doesn't make a ton of sense without contrasting to inverting amplifiers, so you might encourage students to hold off on thinking about this until later, or compare it to the last lab's transistor amplifier.

The gain for this circuit should be $1+\frac{22}{10}=3.2$

From the second golden rule, the voltage at the inverting and non-inverting inputs will be the same, so $V_- = V_{in}$.

From the first golden rule, there won't be any current at the input pins, so any current through the 10k resistor must pass through the 22k resistor.

If the voltage increases from 0V to $V_{in}$ over the 10k resistor, it must increase by another 2.2$V_{in}$ over the 22k resistor.

As a quick sanity check, we see that this gain will result in a 3.3V pk-pk output, which is well within the rail voltages.

The biggest issues that can cause deviation are the resistor tolerances, which are 5%. For instance, if the 10k were 5% low and the 22k were 5% high, we'd expect the gain to be 3.43

Suppose that you swapped the position of the 22k and 10k resistors. 

Predict what the gain would be for this instance, and briefly explain

Test your prediction, briefly describe what you observe, and account for any discrepancies.

In this case, the gain should instead be $1+\frac{10}{22}=1.45$

Keep the op-amp on your board, you'll be using it for upcoming circuits.

Detour: Potentiometers


Before building the next circuit, we're going to introduce a new element: the potentiometer.  Potentiometers are made of some resistive material that has fixed connections at either end and a movable contact point.  This is shown in the schematic diagram as a resistor with an arrow pointed partway along its length:

A photograph of your potentiometer, with connections annotated. The 1, 2, and 3 refer to the three pin connections. This one has been soldered to a tiny bit of PCB to make it easier to use. The schematic symbol for a potentiometer

Find a 1k potentiometer (or 10k or 100k, the specifics aren't critical) and place it in your breadboard.  Connect three wires to the three terminals, and then use your multimeter to test its behavior.

Does the resistance between terminal 1 and 2 increase, decrease, or stay the same when the screw is turned?

The resistance between 1 and 2 should decrease when the screw is turned clockwise, and increase when turned counter-clockwise.

Does the resistance between terminal 1 and 3 increase, decrease, or stay the same when the screw is turned?

Here the resistance shouldn't substantially change; it should be measured across the entirety of the resistive material in the potentiometer.

There may be small fluctuations while turning due to poor contact, but after everything settles it should be the same.

Okay, we can adjust a resistor.  Let's use it in our amplifier and see what happens!

Consider the circuit shown below:

An adjustable amplifier circuit.  Note the blue numbers indicate the potentiometer pins
Predict what gains you can achieve with this circuit, and briefly explain

Build the circuit and test the limits of its gain using the potentiometer.  Resolve any discrepancies with your predictions.

When the knob is turned fully clockwise, there would be 1k resistance between points 2 and 3, and no resistance between points 1 and 2.

The resulting gain would then just be 1x

On the other hand, with the screw turned fully counterclockwise, the resistances would be switched, which would predict infinite gain(!)

Realistically, what we'll see is even tiny input voltages driving the outputs near the rail voltages.

We've forsaken one of our conditions for the golden rules to apply here (the output can't change the input at $V_-$) so other factors take over to limit the op-amp's behavior.

Followers

As you observed with the potentiometer circuit, we can make a non-inverting amplifier such that it has a gain of 1.  Like its transistor counterpart, this is called a follower circuit.  Let's make one intentionally by connecting our op-amp as follows:

After building this, test the follower with various inputs. You may also (carefully) test reducing the $\pm$15 V power rails.

Under what conditions does the op-amp circuit follow?

How are the requirements different from transistor followers?

We sort of built this before, except with a superfluous resistor going to ground.

This is really a 1x amplifier, but in this instance the output will follow the input as long as it stays within the $\pm 15V$ power rails.

In practice, there are some overhead requirements, so we actually expect this model to be guaranteed to follow from around $\pm 12V$

Where did those magical numbers come from? I googled “LF411 datasheet,” and looked for limits on the output voltage.

On page 2 of the TI datasheet there's a note on “Maximum peak output-voltage swing” that has the minimum/maximum voltages you'd expect to get with a $\pm 15V$. supply.

Op-amps have many design tradeoffs, so if you really want one that's a good follower you'd look for one described as a “rail-to-rail” op-amp, like a LMV981

If we go beyond the negative rail, we may encounter what is called a phase reversal due to our abuse of the internal transistors. This results in the output going to the maximum the positive rail can supply instead of the maximal negative voltage. It's a know phenomena, but a very, very bad one for some feedback circuits.

Inverting Amplifiers

Next, let's construct an inverting amplifier circuit, shown below:

An Inverting Amplifier circuit.

NOTICE: The depiction of the non-inverting and inverting inputs has been flipped; this is not uncommon in op-amp circuits so always check the symbol.

For the input, use a sine wave with the following parameters:

Construct the circuit and observe both $V_{in}$ and $V_{out}$ on the scope, measuring the amplitudes of both signals. 

Don't forget to include a sketch or screenshot of the two signals in your report
Find the gain $g = \dfrac{V_{out}}{V_{in}}$ for this circuit.  Is it close to what you'd expect?

In this case, the expected gain is $−\frac{22}{10}=−2.2$

From the second golden rule, the op-amp will function to set the voltages at points 2 and 3 to be the same (i.e. ground)

From the first golden rule, there will be no current into the inverting input.

Thus, there will be a voltage change of 𝑉𝑖𝑛 over the 10k resistor.

Then, since there will be no current to the op-amp, the same current going through the 10k resistor will go through the 22k resistor.

This will be associated with a proportional drop in voltage (i.e., the ratio we had earlier), so $V_{out}$ will be 2.2 times larger than $V_{in}$, but with a sign flip.

Why the sign flip?

Kirchhoff's laws! There's pretty much only one path for current to follow in this circuit, so the op-amp output $V_{out}$ has to be more negative than the point 𝑉−.

Where does the current go?

Into the op-amp's “snout” ($V_{out}$) and then to the negative rail of the power supply.

If you measure the currents through $V_{out}$ and both rails, you'll find they sum up just as you'd expect. We can't do that here though, since students don't have 3 multimeters.

Why is this circuit called an inverting amplifier?

As discussed before, the output is inverted (i.e. the opposite sign) compared to the input.

Suppose that you swapped the position of the 22k and 10k resistors. 

Predict what the gain would be for this instance, and briefly explain

Test your prediction, briefly describe what you observe, and account for any discrepancies.

In this instance, the gain will be instead $−\frac{10}{22}=−0.45$.

You'll notice that we're not bound to have a magnitude greater than 1; we can make a circuit that scales voltage down instead of up.

“Who would want something like that?” you might ask.

Sometimes, you want to reduce the amplitude of a signal to allow particular devices to use it.

For example, most integrated circuits (ICs) and microprocessors have a top input range of a few volts.

But if you're trying to analyze the signal from a power outlet in your house, you'd fry things outright if you hooked it straight in.

This being said, you'd often just go for the full passive solution of using a voltage divider. But in this case, this circuit is being used as a stepping stone to a transimpedance amplifier: something that converts a current to a measurable voltage.

Current to Voltage Conversion

By replacing one of our resistors with a circuit whose current depends on physical parameters, we can use the op-amp to convert this current to a voltage.  Since measuring voltages is typically easier than measuring current (you don't have to break a circuit and put a meter in), this sort of circuit can be useful to us when we want to do something like measure light levels with a phototransistor.

Phototransistors

As you might guess from the name, phototransistors act like bjt transistors that react to light.  Specifically, photons are able to pass through the clear packaging and strike the base layer of the transistor, knocking electrons free via the photoelectric effect.  These electrons create a small base current, which is then amplified to a much larger current through the collector and emitter.  More photons yield more current so this is a proportional measurement, unlike the photoresistor.

Our phototransistor and its schematic symbol.  Note the flattened edge belongs to the emitter side.

With this in mind, let's see what happens when we replace the 10k resistor in our last circuit with a phototransistor, as shown below:

A light to current converter, constructed with an op-amp.  Note that the phototransistor's base isn't connected to anything.

Construct and test the circuit

In what way does $V_{out}$ vary as the light level increases? (You may want to use your phone's flashlight here).  Is it what you'd expect?

As the light level decreases, the current due to light at the phototransistor's base will decrease. This in turn means that the collector / emitter currents (which should be $\beta \approx 100\times$ as large) will correspondingly decrease.

Predict how this circuit's sensitivity to light would change if the resistance was increased.

If we increase the resistance here, then for a given current we'd see a larger voltage change. Hence, the circuit would become more sensitive.

Note that at some point we'll saturate the output due to the op-amp's limitations, so just throwing in the biggest resistor we can isn't a good solution here.

Large resistors are also prone to be significant sources of Shot noise, which will eventually overshadow the signal that's being amplified.

Test your prediction, and resolve any discrepancies.

Portions of this page are adapted from “Flexible Resources for Analog Electronics” by Stetzer and Van De Bogart.