# Op-Amp Basics

Professor Barry Paton

Department of Physics and Atmospheric SciencesDalhousie University

## Instructor’s Portion

### Summary

In measuring the characteristic properties of a device, it is often necessary to measure the output signal over a range of input conditions. For example, the inverting amplifier has a unique transfer curve as long as the output stays within the rail voltage limits. This restriction puts a limit on the range of input signal levels where a device functions as a linear amplifier. Computer automation allows a range of test voltages to be output and the response measured, displayed and analyzed. In this lab, students will learn how to build an amplifier with a fixed gain on a breadboard. Using LabVIEW, they can investigate the transfer properties and observe some of the limitations of an Op-Amp.

### Uses

This experiment applies to all general instrumentation courses and any discipline that uses basic operational amplifiers. Specifically it applies to the areas of electrical/electronic engineering, computer engineering, mechanical engineering, biomedical engineering, and physics.

### Equipment List

· Computer running Windows, Macintosh, Linux, Sun, or HP-UX (visit http://www.ni.com/labview/lv_sysreq.htm for requirements specific to your operating system)

· Breadboard Connector Starter Kit from National Instruments (part number 777448-40)

· LabVIEW Full Development System

· PCI-6024E Data Acquisistion Board

· SC-2075 Breadboard Connector

· SH68-68-EP Shielded Cable

· General purpose Op-Amp (e.g. 741 op-amp)

· Digital Multimeter (DMM)

· Assortment of resistors

· Cables and wires for connecting the previous equipment together, such as:

· Two BNC-to-banana converters

· Two banana-to-alligator clips

· Connection wire

· Websites

· National Instruments — www.ni.com

### Setup

**Note**:  Most of the manuals that are referred to ship with National Instruments hardware and software. If you can’t find your hardcopy of the manuals, you can get them online at http://www.ni.com/manuals. If you encounter problems during setup, contact technical support at http://www.ni.com/support.

#### Before the Day of the Lab

1. Install LabVIEW (see the *LabVIEW Release Notes* for your version of LabVIEW).

2. Install your PCI-6024E board (see the *6023E/6024E/6025E User Manual*).

3. Configure the SC-2075 Breadboard Connector (see the *SC-2075 User Guide*).

4. Cable the PCI-6024E to the SC-2075 with the SH68-68-EP.

5. Configure the PCI-6024E board (See the *NI-DAQ Release Notes* for your version of NI-DAQ).

6. Connect the BNC-to-banana converters to Analog Output channel 1, CH1, and Analog Input channel 1, CH1 on the SC-2075 Breadboard Connector.

7. Connect the Banana-to-alligator clip wires to the BNC-to-banana converters you just connected.

8. Create the following directory in your LabVIEW folder: \\LabVIEW\Experiments\Opamp Basics.

9. Copy **Opamp Basics.llb** into the Opamp Basics folder you just created.

10. Conduct a run-through of the lab procedure the students will perform.

#### On the Day of the Lab

1. Power up the computers.

2. Check that all components are at each workstation.

### References

· Diefenderfer and Holton (1994), *Principles of Electronic Instrumentation*, Sanders College Publishing.

· Sedra and Smith (1998), *Microelectronic Circuits*, Oxford University Press.

## Student’s Portion

### Introduction

In this lab, you will learn how to build an amplifier with a fixed gain on a breadboard. Using the computer, you can investigate the transfer properties and observe some of the limitations of an Op-Amp.

### Objective

The objective of this lab is to demonstrate the ease of building an amplifier with a precise gain and determine the amplifier accuracy. 

### Theory

In this experiment, we will assume that the supply voltages for all op-amp circuits are +15 and –15 volts. 

Operational Amplifiers or op-amps are the heart and soul of all modern electronic instruments. Their flexibility, stability and ability to execute many functions make op-amps the ideal choice for analog circuits. Historically, op-amps evolved from the field of analog computation where circuits were designed to add, subtract, multiply, integrate, differentiate etc. in order to solve differential equations found in many engineering applications. Today analog computers have been mostly replaced by digital computers; however the high functionality of op-amp circuits remains its legacy and op-amps are found in countless electronic circuits and instruments.

The op-amp is basically a very high gain differential amplifier with bipolar output. The op-amp transfer curve states that the output voltage, Vout is given by

Vout = - A (V- - V+)  = -A (V)(1)

where A is the open loop gain, V– is the inverting input voltage and V+ is the non-inverting input voltage. The negative sign in front of the gain term (A) inverts the output. The gain (A) can be defined as the ratio of the magnitude of the output voltage (Vout) to the input difference voltage V. In practical op-amps, the gain can be from 10,000 to 20,000,000. Only a very small input signal is required to generate a large output. For example, if the op-amp gain is one million, a 5 microvolt input would drive the op‐amp output to 5 volts.

Most op-amps are bipolar. This means that the output can be a positive or negative signal. As a result, two power supply voltages are required to power the op-amp. 

The output voltage can never exceed the power supply voltage. In fact the rated op-amp output voltage (Vmax) is often a fraction of a volt smaller than the power supply voltage. This limit is often referred to as the + or – rail voltage.

#### Closed Loop Op Amp Circuits

High gain amplifiers are difficult to control and keep from saturation. With some external components part of the output can be fed back into the input. For negative feedback, that is the feedback signal is out of phase with the input signal, the amplifier becomes stable. This is called the closed loop configuration. In practice, feedback trades gain for stability, as much of the open loop gain (A) is used to stabilize the circuit. Typical op-amp circuits will have a closed loop gain from 10 to 1000 while the open loop gain ranges from 105 to 107. If the feedback is positive, the amplifier becomes an oscillator.

#### Inverting Amplifier

The circuit shown in Figure 1 is probably the most common op-amp circuit. It demonstrates how a reduction in gain produces a very stable linear amplifier. A single feedback resistor labeled Rf is used to feed part of the output signal back into the input. The fact that it is connected to the negative input indicates that the feedback is negative. The input voltage (V1) produces an input current (i1) through the input resistor (R1). Note the differential voltage (V) across the amplifier inputs (–) and (+). The plus amplifier input is tied to ground. 

Figure 1.  Schematic Diagram for an Inverting Op-Amp Circuit

Kirchoff’s laws and the loop equations are used to develop the transfer characteristic.

Input loopV1 = i1R1 + V(2)

Feedback LoopVout = - if Rf + V(3)

Summing Pointi1 = - if + iin(4)

Gain EquationVout = - A V(5)

Solving these four equations yields

Vout = iin/Z - (V1/ R1)/Z (6)

where the closed loop impedance Z = 1/Rf + 1/AR1 + 1/ARf.

The feedback and input resistor are usually large (k’s) and A is very large (>100,000), hence Z = 1/Rf. Furthermore V is always very small (a few microvolts) and if the input impedance, (Zin) of the amplifier is large (usually about 10 M) then the input current (iin = V/ Zin) is exceedingly small and can be assumed to be zero. The transfer curve (Equation 5)REF X89820 \n  then becomes

Vout = - (Rf / R1) V1 = - (G) V1(7)

The ratio (Rf / R1) is called the closed loop gain (G) and the minus sign tells us that the output is inverted. Note that the closed loop gain can be set by the selection of two resistors, R1 and Rf.

### Pre-Lab Preparation

· Read through the theory and lab procedure for this experiment. 

· Bring the following to lab with you:

· This experiment.

· Your lab notebook and pencil.

· A virus-free, formatted 3.5-inch floppy disk.

### Workstation Details

· A computer with National Instruments LabVIEW software.

· National Instruments DAQ board (inside computer).

· National Instruments SC-2075 Breadboard Connector (outside computer).

· Digital Multimeter (DMM).

· A 741 Op-Amp.

· An assortment of resistors.

· Cables and wires for connecting the previous equipment together, such as:

· Two BNC-to-banana converters

· Two banana-to-alligator clips

· Connection wire

### Lab Procedure

#### LabVIEW Demo 1: Op-Amp Gain

1. Launch LabVIEW.

2. Open **OpAmp1.vi** from the **Opamp Basics.llb** library located in \\LabVIEW\Experiments\Opamp Basics.

3. Click on the **Run** button to power up the VIs op-amp. 

Figure 2.  Open Loop Op-Amp Circuit

4. Investigate the sensitivity and sign of the output voltage as the input signal levels V– and V+ are varied. There are two choices for the op-amp gain. The **Lo Gain** position sets A = 10 and allows the viewer to see how the amplifier functions. The **Hi Gain** position sets A=100,000 and is more representative of a real op-amp. Note that the rail voltages are about 1 volt less than the power supply. When the output is at the rail voltage, the op‐amp is said to be saturated. For **Hi Gain**, it seems that the op-amp is almost always saturated in this open loop configuration. 

5. For a better view of the transfer curve, plot the output voltage as a function of the input differential voltageV).

6. Stop the VI by pressing the **Stop** button on the bottom of the screen.

7. Close the VI.

#### LabVIEW Demo 2: Op-Amp Transfer Curve

1. Open the LabVIEW program called **OpAmp2.vi** from the **Opamp Basics.llb** library. This program is similar to the previous program, except that the ground and power supply lines have been removed. These lines must always be connected in a real circuit but often are not shown in schematic diagrams. A X-Y graph has been added to dynamically display the transfer curve.

2. Click on the **Run** button to start the VI.

Figure 3.  Transfer Curve Display for Open Loop Op-Amp

3. Again the **Lo Gain** button is used to observe the amplifier operation. Use the **Hi Gain** setting to simulate a real Op-Amp. By selecting various input voltage levels, the complete transfer curve can be traced out. Two colored LED displays straddle the meter to indicate when the amplifier saturates either at the + or – rail.

4. Press the **Stop** button on the right to stop the VI.

5. Close the VI.

#### LabVIEW Demo 3: Inverting Op-Amp

1. Open the LabVIEW program called **OpAmp3.vi** from the **Opamp Basics.llb** program library. This program simulates the operation of a simple op-amp configured as an inverting amplifier.

2. Click on the **Run** button to observe the circuit operation.

3. One can change the resistance by clicking-and-dragging on the slide above each resistor or by entering a new value in the digital display below each resistor. The input voltage can be changed by clicking on the thumb-wheel arrows or entering a new value into the input digital display. Vary the feedback resistor, the input resistor and the input voltage to verify that the output follows the transfer equation (Equation 7)REF X98567 \n . 

Figure 4.  LabVIEW Simulation for an Inverting Op-Amp Circuit

6. Press the **Stop** button on the right to stop the VI.

7. Close the VI.

#### Questions

Answer these questions on your data sheet before you continue.

1. What happens when the output voltage tries to exceed the power supply voltage of + or – 15 volts?

2. What happens when the input voltage reaches the power supply voltage?

3. What happens when the input voltage exceeds the power supply voltage by 1 or 2 volts?

#### LabVIEW Challenge: LabVIEW Inverting Op-Amp Simulation (Version 2)

1. In the program **OpAmp3.vi**, replace the simple transfer curve (Equation 7)REF X41409 \n  with the more correct expression (Equation 6)REF X98567 \n . You will need a new control on the front panel so the open loop gain (A) can be varied from 10,000 to 1,000,000.

2. Investigate for what values of R1 and Rf the simple transfer curve is not a good approximation.

3. Save your program as **OpAmp3_2.vi**

#### Test Circuit: Inverting Op-Amp Circuit

1. On your National Instruments SC-2075 Breadboard Connector build the inverting amplifier circuit shown in Figure 5 REF X37472 \n  (shown pictorially in Figure 6).

Figure 5.  Schematic Diagram for Inverting Amplifier with Gain of 10

Figure 6.  Component Layout for an Inverting Op-Amp Circuit

2. Open the LabVIEW program entitled **TestAmp1.vi** from the **Opamp Basics.llb**. This program uses the National Instruments DAQ board to generate a DC test signal on the National Instruments SC-2075 Breadboard Connector between –0.5 and +0.5 volts and present it as an output on one of the Analog Output lines. The program then measures the response on an Analog Input line of the SC-2075 and displays it on a front panel indicator.

3. Before powering up the circuit, measure the feedback resistor, and the input resistor with a DMM. Calculate the expected output from the transfer equation (Equation 7)REF X41409 \n . Estimate the error for each measurement and calculate the expected error.

4. Connect your circuit on the breadboard of the SC-2075 to the inputs/outputs of the SC-2075 as follows:

· Connect the +15V **DC Power Output** of the SC-2075 to the outer Rail closest to the Op-Amp’s**Pin****7**on the breadboard.

· Connect the -15V **DC Power Output** of the SC-2075 to the outer Rail closest to the Op-Amp’s **Pin 4**on the breadboard.

· Connect the **AIGND** of the SC-2075 to the inner Rail closest to the Op-Amp’s **Pin 3**on the breadboard.

· Connect the alligator clips connected to Analog Input channel 1, CH1, to the OUTPUT of the op-amp.

· Connect the alligator clips connected to Analog Output channel 1, CH1, to the INPUT of the op-amp circuit.

5. Switch the **Power Select**of the SC-2075 (upper left corner) to **Internal**.

6. Click on the **Run** button of the **TestAmp1.vi** to power up the test circuit.

7. Enter a variety of input signal levels and plot the transfer curve (Measured Signal versus Input Signal). The graph will be similar to that derived from the LabVIEW Simulation for an Inverting Op‐Amp Circuit (**OpAmp3.vi**) only now you are looking at a real device. Record all of the values attempted on the data sheet provided.

8. Press **Stop** on **TestAmp1.vi**.

9. Test the circuit again, but with different resistors. Test the circuit with three different sets of resistors.

10. When finished testing different input voltages, have your instructor check your data and initial the data sheet.

11. Exit LabVIEW.

### Lab Report

This lab report should be an informal report. The lab report will consist of the normal contents of an informal report: title, introduction, results, and discussion. The report must be typed. You should include the following in your lab report:

· Sketch of the inverter circuit.

· Answer these questions:

1. What is the measured value of the + rail voltage?

2. What is the measured value of the – rail voltage?

3. What is the output voltage when the input signal is zero? This is called the offset voltage.

4. Over what range of input signals is the amplifier linear?

5. What is the gain of the inverting amplifier circuit?

· Staple your data sheet to the back of your report.

Data Sheet

1. What happens when the output voltage tries to exceed the power supply voltage of + or – 15 volts?

2. What happens when the input voltage reaches the power supply voltage?

3. What happens when the input voltage exceeds the power supply voltage by 1 or 2 volts?

4. Fill in the chart:

5. ___________ Questions completed and circuit correctly set-up. (*instructor’s initials*)

� EMBED Equation.3  ���

*Op-Amp Basics*15

# _1058776443.unknown