E11 Lab #2

Introduction to Op Amps

Pre-Lab Reading

This lab requires a formal lab report.

Before you start this lab, be sure to read the lab rules

The room where you will be doing this (and other) labs has computers equipped with web browsers, so you need not print this out (though you certainly may, if you would like to).  Since this document is fairly long, you should look through it at least once before coming to lab.

This document has material that you should read before you come into the lab.  You don't need to turn anything in before lab, but the more you have done beforehand, the more quickly you will complete the lab.

The document is in several parts.

  1. The Breadboard
  2. The op-amp
  3. The inverting configuration
  4. The non-inverting configuration
  5. Besting the professional engineers 2: The programmable gain amplifier

The Breadboard

Throughout the semester you will be building circuits on a prototyping board, or breadboard (in the early days of radio, crystal receivers were mounted on large wooden boards -- hence the name "breadboard"). A typical section of the breadboard is shown below


Connections are made on the breadboard by sticking wires in the holes. The holes in each column of five contiguous holes running vertically are all connected (as shown by the five holes highlighted in green); so any wires placed into the same column of holes will be electrically connected. However groups of five holes that are not contiguous are not connected. There are also connections running horizontally along the two rows of holes that lie on either side of each section of the breadboard. All of the holes in each column are connected to each other, with a single break half-way down the column where there is an extra space between the holes.  So all the holes that are highlighted with yellow are connected, as are those highlighted with orange -- but there is no connection between them.  Also, neighboring columns are not connected to each other.

Other features of the breadboard (not shown) include four lines for power (ground, -Vcc, +Vcc, and +5V) running along the top of the breadboard. The two lines labeled +Vcc and -Vcc are two DC voltages that are used to provide power to analog circuits. These voltages are usually connected to the columns of holes, these are then connected to the power connections on the circuit being developed. The breadboard also has, going clockwise from upper right: a bank of LED’s (light emitting diodes) for use with logic circuits, a speaker, a BNC connector for an oscilloscope or other device (with connections for the pin and the shell), switches, some potentiometers (or variable resistors), more switches, another BNC, more switches, a function generator, a power switch and two knobs for changing +Vcc and -Vcc.

The op-amp

In this lab, and throughout the semester, you will be using op amps, the basic building blocks of analog electronics. For our purposes we will be using an ideal model of the op amp. The circuit symbol for an op amp is shown.

The op amp obeys the input-output relationship:

vout=A(v+ - v-)

where vo is the output voltage, v+ and v- are, respectively, the voltages at the non-inverting and inverting inputs, and A is the amplifier gain. For an ideal op amp there are two important facts:

a) The gain of the amplifier is infinite.
b) The internal resistances between the inputs (v+ and v-) and ground are infinite.

As we will discuss in lab, these two facts lead to two important relationships used to analyze op amp circuits (provided they have negative feedback):

1) The voltages at the two inputs are the same.
) There is no current from the input of the op amp.

Relationship number 1 can be seen from fact a. In order for the output voltage, vo, to be finite (and we don’t want infinite voltages in the lab) with an infinite gain, then v+ must equal v-., i.e. (v+ - v-)=0. In practice the gain is typically about 106 and the magnitude of vo is less than 10 volts, so v+ and v- are within several microvolts of each other, (v+ - v-)≈0.

Number 2 can be seen from fact b. If there is a resistance to ground from v+, then the voltage at v+ must be equal to the current times the voltage. If v+ is to be finite, and the resistance is infinite, then the current must be zero. The same argument follows for v-. Typically the input resistance is at least several megaohms, so the input current is typically microamps or less (≈0).

These two relationships are very important. Become comfortable with them for they will make your life easier. Obedience is freedom.

One commonly used op amp is the 741 op amp, an eight pin integrated circuit (or chip, or IC) whose pin-out is shown below.

741 pinout

When shown in a schematic diagram the +Vcc and -Vcc connections are usually not shown, however they are very important as they supply power to the chip. You may ignore the two connections labeled "offset null", we will not be using them in this course. This chip can be treated as ideal for the circuits in this course -- the gain is about 106 and the input resistance is also about 106, both large enough to be considered infinite. There are some non-idealities you may notice, though we will usually ignore them when doing analysis of the circuit. The most obvious shortcoming of the circuit is that the output cannot go above +Vcc or below -Vcc (in fact it cannot only come within a few volts of those limits). Also the output of the op amp can only change at about 106 volts/second. While this seems fast you may see this effect at high frequencies in some of your circuits.

The inverting configuration

Consider the op-amp in the diagram below.

Using the two op-amp rules we know v-=v+=0, and the current into the op-amp is zero.  So the current through R1 and Rf must be equal.

This tells us that the "gain" of the circuit (the ratio of output voltage to input voltage) is determined by the ration of Rf to R1 (and is negative - so a positive input yields a negative output, and vice-versa).  This is called the inverting configuration of the op-amp, because the output looks inverted relative to the input.

The non-inverting configuration

Consider the op-amp in the diagram below.

Using the two op-amp rules we know v-=v+=vin, and the current into the op-amp is zero.  So the current through R1 and Rf must be equal.

This tells us that the "gain" of the circuit (the ratio of output voltage to input voltage) is determined by the ration of Rf to R1 (and is positive - so a positive input yields a positive output).  This is called the non-inverting configuration of the op-amp, because the output has the same polarity (i.e., it is not inverted) as the input.

Besting the professional engineers 2: The programmable gain amplifier

In its August 3, 2006 edition, the electronics trade journal EDN, had an article describing an amplifier whose gain could be controlled using some switches.  You can look at either the online article, or a pdf version (the pdf is easier to read).   You don't need to read the article before coming to lab.

The article presents two circuits, both are a variant of the non-inverting configuration.  In both cases, switches are used to change the gain of the circuit.  To make the circuits easier to compare, I have redrawn the first circuit from the article below to include "N" switches; this makes it more like the second circuit which also has "N" switches.

Circuit from article Equivalent circuit from article
(assuming only one switch
closed at a time)

In the article, a method is given for each circuit wherein the N+1 resistors are chosen to specify N different gains (note: this makes the problem underspecified, so an arbitrary value for R1 is chosen, and the other resistors are then calculated).

So, with N switches, the two circuits can be designed to produce N different gains.  However, with N switches, there are 2N possible combinations of the switches.  For example, for N=3, there are 8 possible settings for the switches.  (When a switch is open, no current can flow; it acts as an open circuit.  When a switch is closed, it acts as a short circuit.)

S3 S2 S1
open open open
open open closed
open closed open
open closed closed
closed open open
closed open closed
closed closed open
closed closed closed

It is often useful to be able to change the gain of an amplifier in equal increments.  You will show (in your report) that this is impossible with the circuits from the article

Let's find a better solution.

It is possible with the circuit shown below to generate 2N different gains (in this case, 4 different gains) with equal increments as the switches are opened and closed.

Calculate the gains of the circuit  in terms of Ra, Rb and RF for the four configurations of the switches (you don't need to do this before lab, but it might save some time):

Sb Sa Gain
open open  
open closed  
closed open  
closed closed  

If you do this carefully, the result can be very short.  Come see me if your answer becomes ugly.  Don't wait until the night before the lab report is due to try this derivation.

Now calculate the gains when Ra=20kΩ, and Rb=10kΩ and RF=20kΩ.

Sb Sa Gain
open open  
open closed  
closed open  
closed closed  

Hopefully, your gain increased in equal increments.

I put together a MultiSim simulation of this circuit.  If you want to run it, copy it to your computer and then open it from MultiSim.  From MultiSim, open up the oscilloscope, hit the on/off switch for the simulation (upper left corner of screen).  You can open and close the switches by typing the "a" key and the "b" key on your keyboard (click on the schematic diagram first, to make sure the focus of the program is there, and not on the oscilloscope).

On to the lab

Click here to go on to the in-lab procedures.

  email me with any comments on how to improve the information on this page (either presentation or content), or to let me know if you had any particular difficulties with this lab.