Operational Amplifier - University of Saskatchewan

advertisement
EE221-2016
Laboratory #1
2016-08-09
Lab 1: Non-Ideal Operational Amplifier and Op-Amp Circuits
1. Learning Outcomes
In this lab, the students evaluate characteristics of the non-ideal operational amplifiers. Students use a
simulation tool (LTspice) to simulate the two most popular configurations op-amp circuits: inverting and
non-inverting amplifiers. Students also build, predict the results, and observe the gain and frequency
response of the amplifiers.
2. Health and Safety
Any laboratory environment may contain conditions that are potentially hazardous to a person’s health if
not handled appropriately. The Electrical Engineering laboratories obviously have electrical potentials
that may be lethal and must be treated with respect. In addition, there are also mechanical hazards,
particularly when dealing with rotating machines, and chemical hazards because of the materials used in
various components. Our LEARNING OUTCOME is to educate all laboratory users to be able to handle
laboratory materials and situations safely and thereby ensure a safe and healthy experience for all. Watch
for posted information in and around the laboratories, and on the class web site.
3. Lab Report
Students work in groups of 2 with laboratories being on alternative week (in 2C80/82). Each student must
have a lab book for the labs. The lab book is used for lab preparation, notes, record, and lab reports. The
lab books must be handed before 5:00 pm on the due date (same day of the following week) into the box
labeled for your section across from 2C94. The lab books are marked and returned before the next lab.
Marking Scheme
All labs must be performed and a lab write-up submitted in order to pass the class. If one or more labs
have not been performed, then a grade of “INC” (incomplete) will be submitted. You will be required to
demonstrate correct operation of various parts of the lab to a lab instructor during your scheduled lab
period (these parts are highlighted in the lab procedure section) to be considered as having "completed"
the lab.
A mark for each lab will be assigned based upon your submitted lab book. Lab books can be considered
to be fulfilling the same functions as logbooks in industry. Logbooks are used to record the results of all
tests performed on systems, subsystems and equipment during the various phases of a project including
R&D, design, systems integration, etc. Logbooks are official, permanent documents, and can be used in
court to prove ownership of a design!
The following points must be followed when writing up lab reports:
• The first page must contain a table of contents.
• All pages in the lab book must be numbered.
• Formal structure is not critical; logical order is important.
Rev A
Copyright 2016 © University of Saskatchewan
Page 1 of 18
EE221-2016
Laboratory #1
2016-08-09
• Try to use pen, avoid pencil.
• Legibility and neatness are important, as is orderly notes.
• The lab book is standalone. There should be no references to any outside documents. Remember
that you may be allowed to bring in your lab books for the final exam. They are your cheat
sheets—make sure they’re complete!
• Theory and background information must be completed prior to the lab.
• Cross out unwanted or erroneous material with a single large X. Do not remove any pages from
your lab book.
• The left-hand page can be used for rough calculations, notes, measurements, etc. This page is not
considered part of the “official” write-up, unless you ask that it be considered.
• Do not cut and paste any material from the lab manual into your lab book; only graphs, plots,
experimental waveforms, and schematics can. Use glue wherever possible; tape is acceptable,
but staples are not!
• One lab partner must have the original of any experimental waveform; his/her partner may have
a photocopy of that waveform.
• Label all diagrams and schematics; include an equipment list.
• Schematic diagrams and waveforms without explanation are not acceptable.
• Discussion of results and/or conclusions resulting from each portion of the lab should be found
with that portion. The end of the lab should have a short summary of all conclusions.
• The instructors may request you to hand-in your lab books at the end of the term for accreditation
purposes.
If in doubt about what to include (and how), remember that it should be clear, concise and complete.
4. Material and Equipment
Material
(supplied by department)
Rev A
Equipment
(supplied by student)
TL082 op-amp
Analog Discovery
Resistors: 2 x 1 kΩ, 1 x 10 kΩ
Waveforms 2015 software
Capacitors: 1 x 470 pF
Breadboard and wiring kit
Copyright 2016 © University of Saskatchewan
Page 2 of 18
EE221-2016
Laboratory #1
2016-08-09
5. Prelab
Op Amp Specifications
The TL082 Op-Amp is used for this lab. The pin-out diagram for the TL082 op-amp IC is shown in
Figure 5-1.
8
dot
4
1
Figure 5-1: TL082 Op-Amp
1. Go to www.digikey.ca and search for “TL082”. Select the “Linear – Amplifiers” category and apply the
“Mounting Type = Through Hole” filter. Select the “TL082IP”. Fill in the following table:
Price Break
Unit Price
1
10
100
1,000
10,000
2. Using the datasheet link in step #1, make note of the following ratings/characteristics:
Rating
Maximum Positive Supply Voltage
Maximum Negative Supply Voltage
Input Voltage Range
Typical Loop Signal Voltage Gain
Input Resistance
Slew Rate
Gain Bandwidth
Rev A
Copyright 2016 © University of Saskatchewan
Value
Page 3 of 18
EE221-2016
Rev A
Laboratory #1
2016-08-09
Copyright 2016 © University of Saskatchewan
Page 4 of 18
EE221-2016
Laboratory #1
2016-08-09
Inverting Amplifier
1. Analytically determine the gain of the inverting amplifier shown in Figure 6-1 (ignore the Capacitor
C1).
2. Simulate the inverting amplifier shown in Figure 6-1 using SPICE (see Appendix A on how to run
LTSpice) and include a screen shot of the output plot. A SPICE circuit file for the inverting amplifier is
shown in Figure 5-2. An on-line SPICE Reference Manual can be found at
http://www.eecg.toronto.edu/~kphang/teaching/spice/index.html
Inverting Amplifier
** Subcircuit: ideal_opamp
** Voltage controlled voltage source
.subckt ideal_opamp 1 2 3
Evcvs 1 0 2 3 1e6
; V_1_0 = V_2_3 * 1e6
.ends ideal_opamp
** Inverting Amplifier Circuit
Vin Vin 0 DC 0 AC 100mV
; Input voltage 100 mV AC signal
R1 Vin 2 1k
; 1 kOhm input resistor
R2 2 Vo 10k
; 10 kOhm feedback resistor
C1 2 Vo 470pF
; 470 pF feedback capacitor
R3 Vo 0 1k
; 1 kOhm load resistor on output
XA1 Vo 0 2 ideal_opamp
; Op Amp subcircuit set up with negative feedback
** Analysis
.AC LIN 100 1Hz 100kHz
; AC analysis from 1 Hz to 100 kHz
.end
Figure 5-2: Inverting Amplifier SPICE Circuit File
Non-Inverting Amplifier
1. Analytically determine the gain of the non-inverting amplifier shown in Figure 6-7 (ignore the
Capacitor C1).
2. Simulate the non-inverting amplifier shown in Figure 6-7 (include the Capacitor C1) using SPICE and
include a screen shot of the output plot. You will need to modify the SPICE circuit file from the
inverting amplifier.
Rev A
Copyright 2016 © University of Saskatchewan
Page 5 of 18
EE221-2016
Laboratory #1
2016-08-09
Breadboards
1. Watch the video at "https://www.youtube.com/watch?v=oiqNaSPTI7w".
2. Answer the following questions:
2.1. Why is it called a breadboard?
2.2. What feature makes it easy to connect to the power supply?
Resistors
1. Watch the video at "https://www.youtube.com/watch?v=SjlnW5g9np4".
2. Answer the following questions (a Resistor Colour Code Chart can be found in Appendix B):
2.1. What would be the colour code of a 2.2 kΩ resistor with 5% tolerance?
2.2. A resistor has colour code Brown-Black-Orange-Gold. What is its resistance value?
2.3. A resistor has colour code Brown-Black-Black-Brown-Brown. What is its resistance value?
3. You can also download one of a number of apps to your smartphone for identifying resistors (e.g.
Resistor Color Code for Android).
Rev A
Copyright 2016 © University of Saskatchewan
Page 6 of 18
EE221-2016
Laboratory #1
2016-08-09
6. Lab Procedures
Debugging (or What To Try When Things Aren't Working)
There are a number of things/procedures you should use to debugging circuits when things are not
working correctly. These include (but are not limited to):

Check that all component pins are correctly inserted in the breadboard (sometimes they get bent
underneath a component).

Make sure that components are not "misaligned" in the breadboard (e.g. off by one row).

Double check component values (you can measure resistors, capacitors, and inductors).

Try a different section in the breadboard (in case there is a bad internal connection).

Measure the source voltages to verify power input.

Measure key points in the circuit for proper voltage/waveform (i.e. divide-and-conquer).
Inverting Amplifier
One of the most common applications of the op-amp is the simple inverting amplifier. The output is
inverted relative to the input and the amplification gain is determined by the ratio of the feedback resistor
(R2) to the input resistor (R1).
1. Construct the circuit shown in Figure 6-1 on your breadboard. A Resistor Colour Chart can be found
in Appendix B and an Analog Discovery Pin Out in Appendix C:
1.1. The +5 V supply is provide by V+ of the Analog Discovery (red wire) and the -5 V supply is
provided by V- of the ADM (white wire).
1.2. Vin is supplied by the Arbitrary Waveform Generator W1 (yellow wire), make sure to include at
least one ground (black wire).
1.3. An example of a circuit layout with above connections is shown in Figure 6-2.
C1
470 pF
R2
10 kΩ
+5 V
R1
1 kΩ
Vin
Rev A
_
TL082
Vo
+
-5 V R3
1 kΩ
Copyright 2016 © University of Saskatchewan
Page 7 of 18
EE221-2016
Laboratory #1
2016-08-09
Figure 6-1: Inverting Amplifier Circuit Schematic
Figure 6-2: Inverting Amplifier Example Layout
2. Use "Supplies" on Waveforms 2015 to turn on the V+ and V- supplies.
3. Set "Vin" to be a 100 mV 1 kHz sine wave using the "WaveGen" tool as shown in Figure 6-3 and turn
on by pressing "Run".
Figure 6-3: Arbitrary Waveform Generator 1 Setting
4. Connect "Channel 1" to measure the input voltage "Vin" (relative to ground). Channel 1 is the voltage
difference between 1+ (orange wire, also called "Scope Channel 1 Positive") and 1- (orange/white
wire, also called "Scope Channel 1 Negative").
Rev A
Copyright 2016 © University of Saskatchewan
Page 8 of 18
EE221-2016
Laboratory #1
2016-08-09
5. Connect "Channel 2" to measure the output voltage "Vo" (relative to ground). Channel 2 is the voltage
difference between 2+ (blue wire, also called "Scope Channel 2 Positive") and 2- (blue/white wire,
also called "Scope Channel 2 Negative").
6. Bring up the Scope window by selecting "Scope" from the WaveForms main screen. Press "Run" and
the Scope window should look similar to Figure 6-4 if everything is working correctly.
Figure 6-4: Initial Scope Window
7. To be able to better see and measure the waveforms:
7.1. Set "Time Base" = 200 us/div, set "C1 Range" = 50 mV/div and set "C2 Range" = 500 mV/div.
Turn off “Noise” for both channels (refer to Lab 0 if you need instructions).
7.2. Click on the "View | Measure" option and "Add":
7.2.1. "Channel 1 | Horizontal | Frequency"
7.2.2. "Channel 1 | Vertical | Amplitude"
7.2.3. "Channel 2 | Vertical | Amplitude"
7.3. Click on "Single" to freeze the capture and read off the Measurements.
7.4. The Scope window should look similar to Figure 6-5:
7.4.1. Include a screen capture in your report.
7.4.2. Note that the output waveform should have an amplitude 10 times larger than the input
waveform and that they are 180o out of phase with each other (e.g. when the input
reaches a peak, the output reaches a valley). The Gain is -10.
7.5. REQUIRED: Demonstrate to a lab instructor and make sure your demonstration is recorded
by the lab instructor.
Rev A
Copyright 2016 © University of Saskatchewan
Page 9 of 18
EE221-2016
Laboratory #1
2016-08-09
Figure 6-5: Scope Window With Measurements
8. Measure and fill in the values for the table below (be sure to include units). You will need to adjust
"Time Base" so that the sine waves are discernable as you change frequency.
Frequency
Vin Amplitude
Vo Amplitude
Gain = |Vo/Vin|
Modeled Vo
from Prelab
1 kHz
5 kHz
10 kHz
Every 10 kHz
until 100 kHz
9. Comment on what happens to the relative "phase" (delay) between the input and output voltages
when the frequency is changed from 1 kHz to 100 kHz. Get a screen capture of the Scope at 100 kHz.
10. Determine the frequency at which the gain equals 0.707 of the maximum gain:
10.1. This is most easily accomplished by determining the target Vo, and using the slider on the
Frequency parameter in Wavegen (change “Simple” to “Basic”, see Figure 6-6). Move the slider
until the "C2 Amplitude" closely matches as possible to the target Vo. Note that setting
appropriate "Max" and "Min" value for the slider makes it easier. You may need to adjust "Time
Base" so that you only see a few cycles of the sine waves (to get reasonable measurements) as
you change frequency.
10.2. Include a screen capture of the Oscilloscope window showing the found 0.707 gain point.
10.3. Is there a specific name for this frequency?
Rev A
Copyright 2016 © University of Saskatchewan
Page 10 of 18
EE221-2016
Laboratory #1
2016-08-09
Figure 6-6: Basic Waveform Generator Mode
11. Remove Capacitor C1. Measure and fill in the values for the table below (be sure to include units):
Frequency
1 kHz
5 kHz
10 kHz
20 kHz
50 kHz
100 kHz
Vin Amplitude
Vo Amplitude
Gain = |Vo/Vin|
12. Plot the output voltage Vo versus Frequency for the measured Vo from step 6.2.8 and step 6.2.11 and
the simulated Vo from Prelab 5.2.
Rev A
Copyright 2016 © University of Saskatchewan
Page 11 of 18
EE221-2016
Laboratory #1
2016-08-09
Non-Inverting Amplifier
1. Construct the circuit shown in Figure 6-7 on your breadboard.
C1
470 pF
R2
10 kΩ
+5 V
R1
_
1 kΩ
TL082
Vo
+
Vin
-5 V R3
1 kΩ
Figure 6-7: Non-Inverting Amplifier Circuit Schematic
2. Set "Vin" to be a 100 mV 1 kHz sine wave.
3. Connect "Channel 1" to measure the input voltage "Vin" and connect "Channel 2" to measure the
output voltage "Vo".
4. Similar to section 6.2, bring up the Scope window and adjust its parameters (including the
Measurement functions) to provide a good picture of the input and output voltages. Include a screen
capture in your report.
4.1. REQUIRED: Demonstrate to a lab instructor and make sure your demonstration is recorded
by the lab instructor.
5. Measure and fill in the values for the table below (be sure to include units):
Frequency
Vin Amplitude
Vo Amplitude
Gain = |Vo/Vin|
Modeled Vo
from Prelab
1 kHz
5 kHz
10 kHz
Every 10 kHz
until 100 kHz
6. Comment on what happens to the relative "phase" (delay) between the input and output voltages
when the frequency is changed from 1 kHz to 100 kHz.
7. Determine the frequency at which the gain equals 0.707 of the maximum gain. Include a screen
capture of the Oscilloscope window showing the found 0.707 gain point.
Rev A
Copyright 2016 © University of Saskatchewan
Page 12 of 18
EE221-2016
Laboratory #1
2016-08-09
8. Remove Capacitor C1. Measure and fill in the values for the table below (be sure to include units):
Frequency
1 kHz
5 kHz
10 kHz
20 kHz
50 kHz
100 kHz
Vin Amplitude
Vo Amplitude
Gain = |Vo/Vin|
9. Plot the output voltage Vo versus Frequency for the measured Vo from step 6.3.5 and step 6.3.8 and
the simulated Vo from Prelab 5.3.
Rev A
Copyright 2016 © University of Saskatchewan
Page 13 of 18
EE221-2016
Laboratory #1
2016-08-09
Appendix A – SPICE
"SPICE (Simulation Program with Integrated Circuit Emphasis) is a general-purpose, open source analog
electronic circuit simulator. It is a powerful program that is used in integrated circuit and board-level
design to check the integrity of circuit designs and to predict circuit behavior" (from Wikipedia).
There are a number of freeware SPICE simulation programs available. "LTspice IV" is available on the
Engineering computers in the "Electrical Engineering" folder under the Start menu. It can also be
downloaded to your home computer from http://www.linear.com/designtools/software/#LTspice.
To run a simulation:
1. Create a text file with the SPICE circuit description with a ".cir" extension (a good Windows text editor
is Notepad++ can be found at https://notepad-plus-plus.org).
2. Run "LTspice IV" and "File | Open" the file from step 1 (make sure you select "Files of type: Netlists
(*.cir, *.net, *.sp)"). Your screen should look similar to Figure A-1.
Figure A-1: LTspice IV Circuit Description
3. Select the "Simulate | Run" menu item to run the simulation. A blank plot window should be opened
as shown in Figure A-2.
4. Select the "Plot Settings | Add trace" menu item. Select the "V(vin)" and "V(vo)" traces to plot as
shown in Figure A-3.
5. Maximize the plot window. The screen should look similar to Figure A-4. Note that the vertical scale
is in "dB". Change the range using the "Plot Settings | Manual Limits" menu item to match what is
shown in Figure A-5. Also “Plot Settings | Grid”. The final plot window should now look similar to
Figure A-6.
Rev A
Copyright 2016 © University of Saskatchewan
Page 14 of 18
EE221-2016
Laboratory #1
2016-08-09
Figure A-2: Initial Plot Window
Figure A-3: Add Traces Dialog
Figure A-4: Maximized Plot Window
Rev A
Copyright 2016 © University of Saskatchewan
Page 15 of 18
EE221-2016
Laboratory #1
2016-08-09
Figure A-5: Plot Limits Dialog
Figure A-6: Final Plot
Rev A
Copyright 2016 © University of Saskatchewan
Page 16 of 18
EE221-2016
Laboratory #1
2016-08-09
Appendix B - Resistor Colour Codes
http://itll.colorado.edu/electronics_center/resistor_chart/
Rev A
Copyright 2016 © University of Saskatchewan
Page 17 of 18
EE221-2016
Laboratory #1
2016-08-09
Appendix C - ADM Pin Out
Rev A
Copyright 2016 © University of Saskatchewan
Page 18 of 18
Download