Eel 4309
Eel 4309
Eel 4309
DEPARTMENT OF
ELECTRICAL & COMPUTER ENGINEERING
EEL 4309
Electronics II
Revised
May 2018
Table of Contents
Appendices
ToC- 1
Safety Rules and Operating Procedures
1. Note the location of the Emergency Disconnect (red button near the door) to shut off power
in an emergency. Note the location of the nearest telephone (map on bulletin board).
2. Students are allowed in the laboratory only when the instructor is present.
3. Open drinks and food are not allowed near the lab benches.
4. Report any broken equipment or defective parts to the lab instructor. Do not open, remove
the cover, or attempt to repair any equipment.
5. When the lab exercise is over, all instruments, except computers, must be turned off.
Return substitution boxes to the designated location. Your lab grade will be affected if your
laboratory station is not tidy when you leave.
7. Do not move instruments from one lab station to another lab station.
8. Do not tamper with or remove security straps, locks, or other security devices. Do not disable
or attempt to defeat the security camera.
9. When touching the FPGA development boards please do not touch the solid-state parts on the
board but handle the board from its edge.
I have read and understand these rules and procedures. I agree to abide by these rules and
procedures at all times while using these facilities. I understand that failure to follow these rules
and procedures will result in my immediate dismissal from the laboratory and additional
disciplinary action may be taken.
________________________________________ ________________
Signature Date Lab #
i
Laboratory Safety Information
Introduction
The danger of injury or death from electrical shock, fire, or explosion is present while
conducting experiments in this laboratory. To work safely, it is important that you understand the
prudent practices necessary to minimize the risks and what to do if there is an accident.
Electrical Shock
Avoid contact with conductors in energized electrical circuits. The typical cannot let-go (the
current in which a person cannot let go) current is about 6-30 ma (OSHA). Muscle contractions
can prevent the person from moving away the energized circuit. Possible death can occur as low
50 ma. For a person that is wet the body resistance can be as low as 1000 ohms. A voltage of 50
volts can result in death.
Do not touch someone who is being shocked while still in contact with the electrical conductor
or you may also be electrocuted. Instead, press the Emergency Disconnect (red button located
near the door to the laboratory). This shuts off all power, except the lights.
Make sure your hands are dry. The resistance of dry, unbroken skin is relatively high and thus
reduces the risk of shock. Skin that is broken, wet, or damp with sweat has a low resistance.
When working with an energized circuit, work with only your right hand, keeping your left hand
away from all conductive material. This reduces the likelihood of an accident that results in
current passing through your heart.
Be cautious of rings, watches, and necklaces (which increase the conductivity and contact area).
Skin beneath a ring or watch is damp, lowering the skin resistance. Shoes covering the feet are
much safer than sandals.
If the victim isn’t breathing, find someone certified in CPR. Be quick! Some of the staff in the
Department Office are certified in CPR. If the victim is unconscious or needs an ambulance, call
911. If able, the victim should go to the Student Health Services for examination and treatment.
Fire
Transistors and other components can become extremely hot and cause severe burns if touched.
If resistors or other components on your proto-board catch fire, turn off the power supply and
notify the instructor. If electronic instruments catch fire, press the Emergency Disconnect (red
button). These small electrical fires extinguish quickly after the power is shut off. Avoid using
fire extinguishers on electronic instruments.
Explosions
When using electrolytic / tantalum capacitors, be careful to observe proper polarity and do not
exceed the voltage rating. Electrolytic and tantalum capacitors can explode and cause injury. A
first aid kit is located on the wall near the door. Proceed to Student Health Services, if needed.
ii
Introduction
When in Doubt, Read This
Laboratory Requirements:
This laboratory requires that each student obtain a copy of this manual, a bound quad-
ruled engineering notebook and have access to a Spice simulation program such as
Multisim, Workbench or LTSpice.
The student is to prepare for each laboratory by reading the assigned topics. The
laboratory notebook should contain the necessary tables, graphs, logic and pin
assignment diagrams and identify the expected results from the laboratory exercise as
directed by the pre-laboratory preparation assignments or by the laboratory instructor.
Depending on the laboratory assignment, the pre-laboratory preparation may be due at
the beginning of the laboratory period or may be completed during the assigned
laboratory period. Be advised that during each laboratory period the instructor will grade
your laboratory notebook preparation.
During the laboratory period you are expected to construct and complete each laboratory
assignment, record data, and deviations from your expected results, equipment used,
laboratory partners, and design changes in your laboratory notebook. A laboratory
performance grade will be assigned by the laboratory instructor upon successful
completion of the above-described tasks for each experiment.
Laboratory reports will be due before the start of the following laboratory period. A
penalty of ten points will be charged for those late by up to one week (0-7 days). No
credit will be given for laboratory reports over-due by more than one week. However, a
student must complete each assigned experiment in order to complete the laboratory. By
not turning in a laboratory report, a student will receive a zero for that report, which
results in a zero for the laboratory grade.
For university approved activities, students who miss the laboratory lecture should make
arrangements to make up the laboratory at a later time. Otherwise there is no makeup
laboratory allowed. Students who are late to their laboratory section may not receive the
pre-laboratory points.
Intro- 1
Laboratory Points Breakdown
TOTAL.........................................................................................……….....…100 points
The final laboratory grade can be a percentage, or a failing grade. If the student receives a
failing grade for the laboratory, a failing grade may be assigned for the whole course.
Intro- 2
The following are general guidelines for your use. Use the standard paper prescribed by
your instructor. A cover page is required for each laboratory including your name, PID,
name and number of the experiment, date of the experiment and the date the report is
submitted. Complete the required information and attach to the front of each report. If a
cover page is not included with a report, then points may be taken off.
The report should contain the following (not segmented or necessarily in this order):
• Heading: The experiment number, your name, and date should be at the top right
hand side of each page.
• Objective: A brief but complete statement of what you intend to design or verify
in the experiment should be at the beginning of each experiment.
• Schematic: A schematic of the circuit under test and the test equipment should be
drawn and labeled so that the actual experiment circuitry could be easily
duplicated at any time in the future.
• Apparatus List: List the items of equipment, including IC devices, with
identification numbers using the UCF label tag, make, and model of the
equipment. It may be necessary later to locate specific items of equipment for
rechecks if discrepancies develop in the results. Also include the computer used
and the version number of any software used.
• Procedures and/or Design Methodology: In general, lengthy explanations are
unnecessary. Be brief. Keep in mind the fact that the experiment must be
reproducible from the information given in your report. Include the steps taken in
the design of the circuit: any equations used and any assumptions made.
• Data Collected: A detailed discussion of the data collected, how it was collected,
any issues with the data being collected and what equipment was used to collect
this data. Which data is to be collected will be given in the procedural steps of the
laboratory experiment. All oscilloscope patterns along with any values measured
with a multimeter should be included in the report. All oscilloscope images
should be limited in size to no wider than two inches, each. Only essential images
should be included, that mark the essence and success (or failure) of the
experiment. (Note that much of what comes in oscilloscope images can be
collected as data and put in graphs as required by many of the procedural steps in
the various laboratory experiments.)
• Plots Generated: All plots that are required for the experiment should be
included with the laboratory report. These plots should be computer generated
using a computer program that plots raw X, Y data. When comparing different
sets of data using graphical methods this should be done using the same plot not
several plots.
• Comparisons: Comparison means to compare two sets of data. For engineers
this means a quantitative value not a qualitative discussion. A simple percentage
Intro- 3
difference between two values is all that is needed. All comparisons should be
included in the report, both the equations used and the values calculated. The
results should be presented in a form that makes the interpretation easy. Large
amounts of numerical data are generally presented in a graphical form. Tables are
generally used for a small amount of data. Theoretical and experimental data
should be on the same graph or arranged in the same table for easy correlation.
• Conclusion: This is your interpretation of the objectives, procedures and results
of the experiment, which will be used as a statement of what you learned by
performing the experiment. This is not a summary. Be brief and specific, but
complete. Identify the advantages and/or disadvantages of your solution in
design-oriented experiments. The conclusion also includes the answers to the
questions presented in each experiment.
Intro- 4
EXPERIMENT #1
Linear Operational Amplifier Applications
Goals:
To introduce the concepts of an operational amplifier (op-amp) used as a non-inverting
amplifier, inverting amplifier, unity gain buffer and a summing amplifier. Data collected
during this laboratory experiment will be compared to the datasheet of the operational
amplifier used.
References:
The following two links are to the Tektronix website for the user manuals for the
DPO 4034B Mixed Signal oscilloscope and for the AFG3022B Arbitrary Function
generator:
Oscilloscope:
http://www.tek.com/search/apachesolr_search/DPO%204034B%20user%20manu
al
Please note, to download the user manual, Tektronix requires that you fill out the
user information form before downloading can begin.
Equipment:
Oscilloscope: DPO 4034B Mixed Signal
Function Generator: AFG3022B
Triple Power supply
Breadboard
TL081-TL084 family of operational amplifiers
Capacitors available in the laboratory
Resistors available in the laboratory
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
procedural steps in this experiment. Download the two user manuals for the
Tektronix function generator and oscilloscope and become familiar with their use.
Using the simulation package of your choice in which you are the most familiar
with: Multisim, Workbench or LTSpice IV simulate the following circuits. If you
do not have access to Multisim or Workbench, LTSpice IV is a free to use spice
1- 1
program available from Linear Technology Inc. and can be downloaded from the
following site: http://www.linear.com/designtools/software/#LTspice
The only disadvantage is the part library is for only Linear Technology parts. They
do offer a universal operational amplifier (UniversalOpamp2) that can be used for
many of the simulations required for EEL4309 laboratory experiments.
The equations required for gain Av are given in the appropriate sections for the
non-inverting amplifier, inverting amplifier, unity gain buffer and the summing
amplifier.
where V1 and V2 are input sources and Vout is the output from the summing
amplifier.
j. Simulate this summing amplifier generating the time transient response for a
1.0 volt, 200 Hz sine wave input for V1 and a 2 volt DC input for V2 (V2 = a
constant value of 2 volts). Plot the input as well as the output voltages as a
function of time.
Discussion:
An operational amplifier (op-amp) is a multistage amplifier, where its output is
proportional to the difference between the two inputs:
The schematic symbol for an op-amp is a triangle with the two inputs V+ and V-
and the one output Vout as shown in Figure 1. Most op-amps need two power
supplies; one with a positive voltage +Vcc and one with a negative voltage -Vcc.
1- 2
I - +Vcc
V+ Vout
V-
I+ -Vcc
There are several important facts about op-amps. First the output Vout is bounded
between the two powers supply voltages:
If the output voltage is allowed to go to exactly -Vcc to +Vcc this op-amp is referred
to as an op-amp with a rail-to-rail output. Rewriting Equation (1) gives the
following:
Vout
(V+ - V-) = Aod (3)
For most common op-amps, the gain of the op-amp Aod is about 106. Since Vout
is bound by Equation (2) to be within the power supply values which is typically
less than +/- 15 volts, by Equation (3), (V+ - V-) is limited to about +/- 15
microvolts. Essentially, V+ = V-. Finally, the last import fact is the current flowing
into the positive V+ input and the negative V- input is very small and for most
applications can be considered zero (I+ = I- = 0). Since V+ = V- and I+ = I- = 0,
this condition is called a virtual short.
Inverting Amplifier:
Figure 2 gives the schematic diagram for an inverting amplifier. A close look at
Figure 2 shows that the op-amp power supply contains both +Vcc and -Vcc, which
have been set to +15 and -15 volts, respectively. Also each of the power supply
inputs has a capacitor. This capacitor can range in size from about 0.01 microfarad
to about 10 microfarad. For this lab and the other labs for this course, these two
capacitors should be 10 microfarad, 35 volts, available in the lab parts cabinet. In
addition, both of these capacitors should be placed as close as possible to the + and
- power supply pins of the op-amp (see data sheet for actual pin numbers). These
capacitors are used to prevent any noise from being coupled into the op-amp power
supply pins and to prevent any positive feedback that may make the op-amp
oscillate.
1- 3
IR2 IR1
𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉 𝑅𝑅2
𝐴𝐴𝐴𝐴 = =− (4)
𝑉𝑉𝑉𝑉𝑉𝑉 𝑅𝑅1
Equation 4 includes a negative sign. This negative sign introduces a 180° phase
shift in the output voltage relative to the input voltage. Assuming R1 is a 5k ohm
resistor and R2 is a 1k ohm resistor, and Vin is +/- 1 volt triangle input, then Av
would be -5 and Vout would be +/- 5volts triangle wave that is 180° out of phase
compared to the input as shown in Figure 3. Note how the output signal is 5 times
larger than the input signal. For the special case, when R2 = R1 Vout =-Vin a 180°
phase shifted version of the input.
Vin
+1v
-1v time
+5v
Vout
time
-5v
Figure 3: The output for a -5 gain, inverting amplifier with a +/- 1 volt triangle
wave input.
1- 4
The interesting item about the inverting amplifier is that the gain is only a function
of the ratio of the two resistors of R1 and R2. Typical values of resistors used in
op-amp circuits usually are in the range of 1k ohms to 10 mega ohms.
Given that there is a virtual short between the two inputs of the op-amp V- = V+ =
0 volts and the current into both input terminals is zero, the current flowing in R1
is the same as the current flowing in R2:
The bandwidth of an inverting amplifier depends on the size of the signal on Vout
and broken into two categories of small signal and large signal. The two equations
that give the -3dB frequency (the frequency in which the magnitude of the voltage
gain is reduced by 0.707 from its value given in Equation (4)) are
Gain-Bandwidth-Product
(small signal) f-3dB = R1 (6)
R2 + 1
Slew-Rate
(large signal) f-3dB = (7)
R1
2πR2 + 1Vin(peak)
Vin
+1v
time
-1v
+5v
Vout
time
Slew-Rate
-5v Limit
Figure 4: Vout for a square wave input showing the affect of slew-rate limit.
Actual bandwidth of the inverting amplifier is then the smaller of Equations (6) and
(7). The Gain-Bandwidth-Product of an op-amp can be found in its datasheet and
it’s the frequency when Aod of the op-amp is equal to one. The slew-rate is the
maximum rate of change of the output Vout given in volts per second and is also
given in the op-amp data sheet. Figure 4 illustrates the effect of a finite slew- rate
1- 5
on a square wave input for an inverting amplifier with a gain of -5. Also in Equation
(7), Vin (peak) is the maximum peak input voltage.Equation (6) best describes the
bandwidth of the inverting amplifier when the output voltage swing is small and
Equation (7) best describes the bandwidth when the output voltage swing is large.
It should be noted that in the denominator of Equation (7) that
R1
R2 + 1Vin(peak) (8)
The last item of interest for the inverting amplifier is the maximum voltage swing
that can be achieved by the op-amp. For no load on the op-amp, the op-amp
maximum and minimum voltage swing is given by its datasheet. As mentioned
before, if the op-amp's maximum and minimum voltage swing are equal to +Vcc to
-Vcc then this op-amp is referred to as a rail-to-rail output op-amp. Another factor
that limits the maximum output voltage swing is the amount of current that the op-
amp output can deliver. Usually, as the load current increases, the maximum output
voltage swing decreases. This again is usually given in the op-amp's datasheet. In
fact, most op-amps have a maximum output current limit that is set so as to protect
the op-amp should its output be accidentally shorted to ground. Most op-amps have
internal projection. But what will destroy an op-amp is the accidentally applying
the wrong polarity power on +Vcc and -Vcc. Care must be taken to prevent
accidentally reversing the op-amp's power supply.
IR2 IR1
Non-inverting Amplifier:
Figure 5 gives the schematic diagram for a non-inverting amplifier. Note how the
input is now on the V+ terminal of the op-amp where for the inverting amplifier the
1- 6
V+ was grounded. For the non-inverting amplifier is should be noted that ground
does not get directly tied to the op-amp but is tied to one side of R2.
Vout R1
Av = Vin = R2 + 1 (9)
In comparing Equation (9) to Equation (4), there is no minus sign indicating that
the phase shift for a non-inverting amplifier is 0°. Setting R1 = 4 .R2, gives a gain
Av of 5 and is shown in Figure 6 for a triangle wave input.
Vin
+1v
-1v time
+5v
Vout
time
-5v
Figure 6: The output for a +5 gain non-inverting amplifier with a +/- 1 volt
triangle wave input.
Given that there is a virtual short between the two inputs of the op-amp V- = V+ =
Vin and the current into both input terminals is zero, the current flowing in R1 is
the same as the current flowing in R2:
1- 7
Figure 7 illustrates the effect of a finite slew-rate on a square wave input for a non-
inverting amplifier with a gain of +5. Like the inverting amplifier, the maximum
voltage swing that can be achieved at the output depends on the maximum output
current that can be delivered by the op amp.
Vin
+1v
time
-1v
+5v
Vout
Slew-Rate time
Limit
-5v
Figure 7: Vout for a square wave input showing the affect of slew-rate limit for a
non-inverting amplifier with a gain of +5.
Figure 8: shows VOS place in series with the input signal Vin.
1- 8
Vx
VOS = R1 (11)
R2 +1
Figure 8 shows this voltage source VOS place in series with the input signal Vin.
Equation (9) gives the voltage gain Av for the non-inverting amplifier. If R1 is set
to 0 and R2 is set to infinity then Av reduces to 1. But R1 = 0 is the same as a wire
and R2 equal to infinity is nothing more than an open. Figure 9 gives the schematic
for a unity gain buffer. For this circuit Vout = Vin. Care must be taken when
picking an op-amp for a unity gain buffer. Many op-amps are not stable for non-
inverting gains less than 3-5. These op-amps tend to oscillate. The datasheet for a
particular op-amp usually states if it's not unity gain stable.
Voltage Source
Figure 10: A 12 volt light bulb connected to a 1000 ohm 12 voltage source.
One of the interesting facts about a unit gain buffer is that its input current Iin is
zero. Since the input impedance is defined as Zin = Vin / Iin and since Iin is zero
then Zin is equal to infinity or is very large. An example of where a unity gain
buffer is used is when a source has a high impedance value and it needs to drive a
1- 9
low impedance load. Consider the following circuit of Figure 10. The voltage
source has an internal resistance of 1000 ohms and is rated at 12 volts. It is desired
to use this voltage source to turn on a 12-volt light bulb with an internal resistance
of 1000 ohms. Using Ohm’s Law the current through the light bulb is 12 volts /
2000 ohms and the voltage across the light bulb is 6 volts not 12 volts as required
to light the light bulb (it’s a 12 volt light bulb).
Voltage Source
Figure 11: A 12 volt light bulb connected to a 1000 ohm 12 voltage source via a
unity gain buffer.
Figure 11 shows using a unity gain buffer to light the light bulb. With this circuit,
since the current into the op-amp is zero the voltage drop across the internal voltage
source resistor is 0 and 12 volts appears at the input of the V+ terminal of the op-
amp. Since this amplifier is a unity gain buffer Vout = Vin = 12 volts. The full 12
volts now appears across the 12 volt light bulb. As long as the maximum output
current of the op-amp is not exceeded the voltage across the light bulb will remain
at 12 volts. Unlike the circuit of Figure 10 where the voltage across light bulb
dropped to 6 volts, the unity gain buffer circuit was able to maintain 12 volts across
the light bulb.
Summing Amplifier
1- 10
V1
V2
V3
V4
Equation (12) gives that the current through RF is equal to the sum of all of the
current through R1, R2, R3, and R4.
Solving for each of the currents in terms of the voltage across each Resistor and
substituting this into (12) gives:
Equation (13) gives the output at op-amp as the weighted sum of the inputs V1, V2,
V3 and V4. The summing amplifier of Figure 12 can be easily expanded to
additional inputs by simply adding addition voltage source inputs and the
appropriate resistors. For example for a two input summing amplifier with RF =3k
ohms and R1 = 1K ohms and R2 = 3k ohms the following equation is implemented
Vout = -3 V1 - V2 (15)
Some comments about the schematic in Figure 12: This schematic skipped drawing
the op-amp power supply that was drawn in the previous schematics of this lab.
This does not mean for this circuit that the op-amp power supply is not needed. It
is common to not to draw the op-amp power supply in a schematic so as to make
the schematic simpler to read, but the power supply still needs to be implemented
1- 11
as shown in the previous schematics including the 2 bypass capacitors. Also, the
use of input voltage sources as shown in the previous schematics are drawn using
a simple reference as V1, V2 etc., instead of the total symbol for a voltage source.
Again this is done to make reading the schematic easier.
Op-amps do not like large capacitance load at the output Vout. This tends to make
them unstable and having the possibility of the amplifier circuit oscillating. This
typically occurs when an op-amp amplifier circuit tries to drive long cables (such
as shielded cables). These cables tend to have a large capacitance per foot, which
essentially connects a large capacitance directly to the output of the op-amp
amplifier circuit. Figure 13 shows a slight modification of the unity gain amplifier
circuit that allows this amplifier to drive a large capacitance load. The resistor R
place in series with the op-amp output Vout isolates the capacitance load of the
capacitor. This resistor does not affect the voltage gain of this circuit. Since V+ =
V-, the amplifier circuit will adjust its output so that the virtual short is maintained.
Typical values for this resistor is in the range of 50 to 1k ohms.
Figure 13: A schematic for a unity gain amplifier adding a series resistor at the
output of the op-amp to drive a capacitive load.
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter and
function generator used in laboratory experiment.
2. Download the datasheet for the op-amp used. This will be needed to obtain its
pin-out. When comparing datasheet data values to experimental data, use the
typical values in the datasheet if given.
3. Make sure that the power supply to the op-amp is correctly wired as not to apply
the incorrect polarity to the op-amp.
4. Initially set +Vcc = 15 volts and -Vcc to -15 volts
1- 12
5. When measuring any values make sure to measure all inputs as well as the output
of the circuit. Do not rely on the values indicated on the instruments. Always
measure all signal values.
6. The output impedance of the signal generator should be set to high-z. If the
generator is not set to high-z impedance, the displayed Amplitude, Offset, and
High/Low values will be different than what is selected on the generator.
Usually a factor of 2 larger.
7. Before turning any power on, double check the wiring to make sure that it is
correct.
8. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values
9. Use all measured values to determine experimental results, such as gain and
current.
10. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
11. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
Inverting Amplifier:
1. Using the parts kit in the lab, build an inverting amplifier with a gain Av of -3.
Use resistor values as small as possible but greater than 1k ohms.
2. Set +Vcc =15 volts and -Vcc = -15 volts
3. Measure all resistor values
4. Apply a 1-volt DC input to this circuit and measure both the input and output
using the multimeter.
5. Compute the experimental gain Vout / Vin and compare it with the expected
theoretical Gain for Av = -R1 / R2 using the measured values for R1 and R2.
6. Compute the current through R1 and R2 from the measured resistances and the
measure voltages Vin, V-, V+ and Vout.
7. Compare the currents in R1 and R2 from step 5.
8. Repeat steps 4 and 5 for Vin = 0, 1, 2, 3, 4, and 5 volts and Vin = -1, -2, -3, -4
and -5 volts.
9. Generate a plot of Vout versus Vin from steps 4 and 8.
10. From the plot given in step 9 determine the maximum and minimum Vout
obtainable.
11. Compare these two values of Step 10 to the values given in the datasheet from
the Maximum Peak Output Voltage versus Supply Voltage.
12. Apply a 2-volt peak-to-peak, 200 hertz sine wave to the input and record from
the oscilloscope the input and output waveforms.
13. Compare the phase between the input and output waveforms.
14. Repeat steps 12-13 for a gain Av = -10 for the inverting amplifier. Use resistor
values as small as possible but greater than 1k ohms.
15. Using the same Av -10 inverting amplifier, apply a 0.05 volt peak sine wave.
For various frequencies between 1000 Hz and 1 MHz obtain Vout and Vin and
compute Av = Vout / Vin. Select frequencies with the value of 1X, 2X, and 5X
factors for each decade of frequency.
1- 13
16. Plot in dB Av (20 log(| Av | ) ) versus frequency.
17. Determine the frequency where the gain is down by -3dB.
18. Repeat steps 15 – 17 for a 2 volt peak-to-peak input.
19. Apply a 2-volt peak-to-peak square wave and measure the rise time of the output
to determine the slew-rate of the op-amp (∆Voltage / ∆ Time = slope of the
edge). Use the linear rising section to determine the slew rate. Zoom in on an
edge with the oscilloscope to accurately measure the rise time.
20. Compare the measured slew-rate from step 19 to the value given in the data
sheet.
21. Compare the measured value with Equations (6) and (7) for both 0.05 volt peak
sine wave input and the 1 volt peak sine wave input.
Non-Inverting Amplifier:
1. Repeat steps 12 - 21 for the inverting amplifier section for the non-inverting
amplifier except Av = +3 and Av = +10 instead of Av = -10.
2. Apply a 2 volt peak-to-peak, 200 Hz sine wave to the input of the, gain of 10,
non-inverting amplifier with +Vcc =15 v and -Vcc = -15
3. Add a load resistor from the op-amp output Vout to ground.
4. Measure the peak output voltage from the op-amp for load resistors in the range
of 100 ohms to 10k ohms. Use at least 5 different resistor values
5. Plot Vout peak-to-peak versus load resistance.
6. Compare this plot with the plot given in the data sheet (Maximum Peak Output
Voltage versus Load Resistance).
7. Design and build a non-inverting amplifier with a gain of 1000. Set +Vcc = 15
volts and -Vcc = -15 volts. Use resistor values as small as possible but greater
than 1k ohms.
8. Set Vin to 0 volts. The best way to do this is to disconnect Vin from the V+
terminal of the op-amp and tie the V+ terminal to ground.
9. Measure Vout. This value is the output due to VOS. Use Equation (11) to
calculate VOS.
10. Compare the VOS measured in Step 9 to the value given in the datasheet.
Summing Amplifier:
1. Design and build a summing amplifier to implement Vout = -5 V1 - 2 V2. Use
resistor values as small as possible but greater than 1k ohms.
2. Apply a 0.2-volt peak-to-peak, 200 Hz sine wave to V1 and a 1 volt DC input to
V2.
3. Using an oscilloscope measure and record the output at Vout.
4. Repeat steps 1-3 for a DC inputs of -1 and 2 volts.
1- 14
2. Measure the voltage across each resistor and calculate the current in each
resistor.
3. What is the voltage across the 1k ohm resistor that represents the light bulb?
4. Build a unity gain buffer as given in Figure 11.
5. Measure the voltage across each resistor and calculate the current in each
resistor.
6. What is the voltage across the 1k ohm resistor that represents the light bulb?
7. Build the unity gain buffer circuit given in Figure 13 with R at the output initially
set to zero (a wire).
8. Connect a 0.001 microfarad capacitor to the output of the op-amp to ground.
9. Set Vin to 2.0-volt peak-to-peak, 1 KHz square wave. Using an oscilloscope
measure and record the output at Vout.
10. Add a 1k ohm resistor as shown in Figure 13 for the resistor labeled R. Using an
oscilloscope, measure and record the output at Vout. Record and note the change
in Vout from step 12.
11. Disconnect the load 0.001 microfarad capacitor and set R back to zero ohms.
Set +Vcc = +5 volts and -Vcc to -5 volts. Apply a DC input and measure the
output Vout as Vin is varied from -5 Volts to + 5volts. Make sure to obtain at
least 1 point at each integer voltage value. Use the signal generator as the input
for this step. Set the voltage peak-to-peak to its minimum value of 20 millivolts
and to change the DC value use different offset values on the generator.
12. Plot Vout versus Vin and discuss what is observed in the laboratory report.
13. Lookup the Common-Mode input Voltage range. If the inputs are allowed over
the range of -Vcc to +Vcc then this operational amplifier is also referred to as a
rail-to-rail input op-amp.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
Note: All schematics / Circuit diagrams for this laboratory experiment were generated using
LTSpice IV.
1- 15
EXPERIMENT #2
More Linear Operational Amplifier Applications
Goals:
To introduce the concepts of an operational amplifier (op-amp) used as a difference
amplifier, an instrumentation amplifier, and a voltage-to-current converter. Data collected
during this laboratory experiment will be compared to the theoretical equations for the
appropriate circuits. Additionally an application for the difference amplifier will be
presented.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
Equipment:
Oscilloscope: Tektronix DPO 4034B Mixed Signal
Function Generator: AFG3022B
Triple Power supply
TL081-TL084 family of operational amplifiers
2N2222A NPN transistor
Capacitors available in the laboratory
Resistors available in the laboratory
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and become
familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Multisim, Workbench or LTSpice IV simulate the following circuits:
The equations required for gain Av are given in the appropriate sections for the
difference amplifier, instrumentation amplifier, and the voltage-to-current
converter.
2- 1
c. Plot the input voltages as well as the output voltage as a function of time.
d. Repeat steps b and c but this time set the phase difference between V1 and V2
to 0 degrees.
e. Repeat steps a, b, c, and d for a gain Ad = 4 difference amplifier.
f. Design a gain Ad = 2 instrumentation amplifier using a minimum of 1k-ohm
resistors and the circuit diagram in Figure 5.
g. The instrumentation amplifier needs two inputs V1 and V2. Simulate this
instrumentation amplifier time transient response for an input for V1 equal to a
1.0 volt 200 Hz sine wave and for V2 equal to a 1.0 volt 200 Hz sine wave but
180 degrees out of phase with the V1.
h. Plot the input voltages as well as the output voltage as a function of time.
i. Repeat steps g and h but this time set the phase difference between V1 and V2
to 0 degrees.
j. Repeat steps f, g, h, and i for a gain Ad = 4 instrumentation amplifier.
k. Design a voltage-to-current converter that produces an output of 1mA for every
volt of input using a minimum of 1k-ohm resistors and the circuit diagram in
Figure 6.
l. Simulate the voltage to converter designed in step k for V2 = 3 volts and Vin =
2 volts.
m. Vary V2 between 1 volt and 7 volts and plot IL versus V2.
Discussion:
Consider the following design problem as shown in Figure 1. A voltage source is
connected to a single ended amplifier in which a noise source is introduced onto
the wire between the voltage source and the amplifier.
Amplifier Vout
Voltage
Source V Av = A
Noise (N)
Figure 1: An example of a single ended amplifier with input noise and a gain of A.
Vout = (V + N) . A = V . A + N . A (1)
The design issue is that the noise is introduced only onto the signal wire. If the
layout of Figure 1 is modified, so that a second signal -V on a second wire is
transmitted along with the original V in which both wires are collocated. Then any
noise introduced on the wires is the same on both wires and the difference between
the two signal lines produces a noise free output. Figure 2 shows the block diagram
of this configuration. Since the noise is common to both wires, taking the
2- 2
difference results in cancellation of the noise. This common noise of both wires is
referred to as common mode noise.
V V1 Vout
Voltage Amplifier
Source Noise (N) Av = A
-V V2
V1 = (V + N) (3)
And
V2 = (-V + N) . (4)
Which reduces to
Vout = Ad . [ 2 . V + N - N ] = Ad . 2 . V (6)
Vout contains twice the signal and no common mode noise. An example, where a
difference amplifier is used is to remove 60 Hz noise for an audio system
transmitted over a long cable. It is not uncommon to transmit an audio signal
differentially and then use a difference amplifier at the receiving end to remove any
common mode 60 Hz noise that might be injected in the cable.
R4 R1 + R2 R2
Vout = V1 R3 + R4 R1 - V2 R1 . (7)
2- 3
R4 R2
Vout = V1 R1 - V2 R1 . (8)
R2
Vout = R1 [V1 - V2] . (9)
R2
Ad = R1 (10)
R4 R1 + R2 R2
Vout = Vcm R3 + R4 R1 - R1 . (11)
Dividing both sides of Equation (11) by Vcc gives the common mode gain Acm as
2- 4
Vout R4 R1 + R2 R2
Acm = Vcm = R3 + R4 R1 - R1 . (12)
Ideally, Acm should be zero. To find the output when V1 is not equal to V2 then
V1 is set to Vd/2 and V2 is set to an equal and opposite value of -Vd/2. Substituting
these values into Equation (7) gives
Vd R4 R1 + R2 R2
Vout = 2 R3 + R4 + R1 . (13)
R1
Dividing both sides by Vd, the difference mode gain Ad can be found
|Ad|
CMRR = 20 log10 |Acm| . (15)
The CMRR is commonly given in Decibels and higher the value the better the
performance of the difference amplifier. Since operational amplifiers are
essentially difference amplifiers, the datasheet associated with the op-amp usually
specifies the op-amps CMRR. One important fact of the op-amps is that the CMRR
is a function of the frequency of operations and the CMRR tends to decrease in
value as the frequency of operation increases as shown in Figure 4.
The main limitations of the difference amplifier given in Figure 2 is that the input
impedance is not very high and the input impedance of the two inputs is not the
same. The input impedance for the V1 input is
Z(V1) = R3 + R4 (16)
Z(V2) = R1 . (17)
2- 5
CMRR
100 dB
60 dB
20 dB
Another version of a difference amplifier where both inputs have high impedance
is given in Figure (5). This amplifier is commonly referred to as an instrumentation
amplifier. This amplifier contains the difference amplifier of Figure 3 and two
additional op-amp stages. A closer look at the circuits shows that both V1 and V2
are tied directly to the non-inverting input of these two op-amps. Since the input
impedance is very high, the current into an op-amp is approximately zero.
Va
Vb
R5 R5
Va = V2 R7 + 1 - V1 R7 . (18)
and for Vb as
2- 6
R6 R6
Vb = V1 R7 + 1 - V2 R7 . (19)
Since the right most stage of Figure 5 is a difference amplifier, Vout is found by
substituting Va for V2 and Vb for V1 into Equation (7)
R5 R5 R2
V2 R7 +1 - V1 R7 R1 . (20)
R6 R4 R1 + R2 R5 R2
Vout = V1 R7 + 1 . R3 + R4 R1 + R7 R1 -
R6 R4 R1 + R2 R2 R5
V2 R7 R3 + R4 + R1 R7 + 1 . (21)
R1
Using a similar approach to find Equation (11), the common mode gain is given by
R6 R4 R1 + R2 R2 R5
R3 + R4 + R1 R7 + 1 . (22)
R7 R1
Ideally, Acm should be zero. To find the output when V1 is not equal to V2 then
V1 is set to Vd/2 and V2 is set to and equal and opposite value of -Vd/2.
Substituting these values into Equation (21) gives
1 R6 R4 R1 + R2 R2 R5
2 R7 R3 + R4 R1 + R1 R7 + 1 . (23)
Once the common mode gain Acm and the difference mode gain are known, the
common mode rejection ratio becomes Common Mode Rejection Ratio is found
using the same equation that was used for the difference amplifier
2- 7
|Ad|
CMRR = 20 log10 |Acm| . (24)
For the special case when R6 = R5 and R1 = R3 and R2 = R4, Vout can then be
written from Equation (21) as
R6 R2 R6 R2
Vout = V1 R7 + 1 . R1 + R7 R1 -
R6 R2 R2 R6
V2 R7 R1 + R1 R7 + 1 . (25)
2 . R6 R2 2 . R6 R2
Vout = V1 R7 + 1 . R1 - V2 R7 + 1 . R1 (26)
or
R2 2 . R6
Vout = R1 R7 + 1 . [V1 - V2] (27)
Equation (27) illustrates that Vout is simply the difference between V1 -V2 with a
difference gain of
R2 2 . R6
Ad = R1 R7 + 1 (28)
The last linear op-amp circuit that will be discussed in this laboratory experiment
is that of the voltage- to-current converter. The input to this circuit is voltage and
the output is current. Figure 6 gives the schematic diagram for this circuit. Given
the fact that there is a virtual short between the plus and minus inputs of the op-
amp and with V+ = Vin, the voltage on across R2 is simply Vin (V+ = V- = Vin).
The current through R2 is then Vin / R2. The current, I2, through R2 is also the
emitter current flowing in the transistor. The relationship of the current flowing in
a transistor between the base, emitter, and collector are
Ic = β Ib (29)
Ie = Ic + Ib = (β + 1) Ib (30)
and
β
Ic = Ie , (31)
β+1
2- 8
where β is the current gain of the transistor.
IL
I2
β
Ic = I2 , (32)
β+1
but I2 = Vin / R2
β Vin
Ic = , (33)
β+1 R2
The collector current is equal to the input voltage Vin divided by R2. If β is large,
on the order of 100, then
β
≈1 (34)
β+1
Vin
Ic = R2 = IL . (35)
The output IL is simply Ic the collector current. The output current depends only
on the input voltage and R2 provided that the voltage across the resistor is less V2
- VCE(SAT)) (the saturation voltage VCE(SAT) is the minimum voltage that exist
2- 9
across the collector to the emitter). The second criteria is that voltage across R2
must be less than the maximum output voltage of the op-amp Vout(MAX) - Vbe -
Ib *100. Typically Ib (typically about 100x smaller than Ic) is very small and the
maximum voltage across R2 must be less than Vout(MAX)- Vbe. The 100 ohm
resistor R1 between the base and the output of the op-amp is used to isolate the base
to emitter capacitance from appear right at the output of the op-amp (See
Laboratory experiment #1).
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter and
function generator used in laboratory experiment.
2. Download the datasheet for the op-amp used. This will be needed to obtain the
pin-out of the op-amp used. When comparing datasheet data values to
experimental data use the typical values in the datasheet if given.
3. Make sure that the power supply to the op-amp is correctly wired as not to apply
the incorrect polarity to the op-amp.
4. Initially set +Vcc = 15 volts and -Vcc to -15 volts
5. When measuring any values make sure to measure all inputs as well as the output
of the circuit. Do not rely on the values indicated on the instruments. Always
measure all signal values.
6. The output impedance of the signal generator should be set to high-z. If the
generator is not set to high-z impedance, the displayed Amplitude, Offset, and
High/Low values will be different than what is selected on the generator.
Usually a factor of 2 larger.
7. Before turning any power on double check the wiring to make sure that it is
correct.
8. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
9. Use all measured values to determine experimental results such as gain and
current.
10. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
11. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
12. Obtain the pin out for the 2N2222 transistor
Difference Amplifier:
1. Using the parts kit in the lab, design the difference amplifier of Figure 3 with a
gain of Ad = 2 using 1k ohm resistors for R1 and R3.
2. Measure with the multimeter the actual resistance values.
3. Compute Acm and Ad using Equations (12) and (14).
4. Also calculate the CMRR using Equation (15).
5. Build the gain of Ad = 2 difference amplifier.
6. Setting V1 = V2 = 20 volt peak-to-peak 200 Hz sine wave measure Vout.
7. Calculate from step 6 Acm = Vout / V1.
2- 10
8. Varying the frequency of the function generator from 100 Hz to 100 kHz repeat
steps 6, and 7. Use measured values at frequencies of 1X, 2X and 5X for each
decade.
9. Setting V1 = 1 volt peak-to-peak 200 Hz sine wave and V2 = -V1. To generate
V2 = -V1, build an inverting amplifier 1 with a gain equal to –1. Apply the
function generator to V1 input to the difference amplifier and to the inverting
amplifier. The output of the inverter is now equal to -V1 and can be applied to
V2 input to the difference amplifier.
10. Measure Vout from step 9.
11. Calculate Ad from step 9 (Ad = Vout / (2 . V1).
12. Using Equation (15) calculate the CMRR from Acm from Step 7 and Ad from
Step 10.
13. Compare step 12 to step 4.
14. Discuss in the laboratory report the result of step 13.
15. Varying the frequency of the function generator from 100 Hz to 100 kHz repeat
steps 9, 10, and 11. Use measured values at frequencies of 1X, 2X and 5X for
each decade.
16. From steps 14, 15 calculate CMRR as a function of frequency.
17. From steps 14, 15 and 16 plot Acm, Ad, CMRR as a function of Frequency.
18. Decrease the value of R4 by 15 % to 20 %. Add a 10K ohm variable resistor in
series with this new value of R4. One side of the variable resistor to R4 and the
middle connection to ground. See Figure 7.
19. Setting V1 = V2 = 20 volt peak-to-peak 200 Hz sine wave measure Vout. Adjust
this variable resistor (potentiometer) to yield the smallest value for Vout. Adjust
R4 to best match R2 (This is the optimum setting).
20. Repeat steps 6,7, 9, 10, and 11 with this optimum setting for the potentiometer.
21. Build a gain of Ad = 4 difference amplifier.
22. Repeat steps 6, 7, 9, 10, and 11 for the difference amplifier of step 21.
23. Build the test circuit shown in Figure 8 with a gain of Ad = 4 for the difference
amplifier. This allows for two voltage sources to be applied to V1 and V2 of the
difference amplifier. The op-amp circuit of U2 inverts V1 adding 180 degree
phase shift. U1 and U3 are unity gain summers, summing V2 and V1 to produce
two signals into the difference amplifier:
Vout(U1) = - V1 - V2 (36)
24. Set V1 to a 0.5 volt peak-to-peak 200 Hz sine wave. Also set V2 to a 0.5 volt
peak-to-peak 20 Hz sine wave.
25. Measure and record with oscilloscope the outputs U1 and U2 op-amp stages.
26. Measure and record Vout with the Oscilloscope.
27. Discuss in the laboratory report the results of steps 25 and 26.
1
You can also use Channel B of the function generator and change the phase to 180°. Remember to phase-
lock (”track phase”) the two channels prior to setting the phase angle, otherwise, the two channels’ phases
won’t be aligned. Check with the o-scope.
2- 11
Figure 7. A difference amplifier with a variable resistor to optimize the resistors used.
Test Setup
Difference
Amplifier
Instrumentation Amplifier:
1. Using the parts kit in the lab, build the instrumentation amplifier of Figure 5 with
a gain of Ad = 2 using 2k ohm resistors for R2, R3, and R7.
2. Measure with the multimeter the actual resistance values.
3. Compute Acm and Ad using Equations (22) and (23).
4. Also calculate the CMRR using Equation (15).
2- 12
5. Setting V1 = V2 = 20 volt peak-to-peak 200 Hz sine wave measure Vout.
6. Calculate from step 5 Acm = Vout / V1.
7. Setting V1 = 1 volt peak-to-peak 200 Hz sine wave and V2 = -V1. To generate
V2 = -V1, build an inverting amplifier 2 with a gain equal to -1. Apply the
function generator to V1 input to the difference amplifier and to the inverting
amplifier. The output of the inverter is now equal to -V1 and can be applied to
V2 input to the difference amplifier.
8. Measure Vout from step 7.
9. Calculate Ad from step 8 (Ad = Vout / (2 . V1).
10. Using Equation (24) calculate the CMRR from Acm from Step 6 and Ad from
Step 9.
11. Compare step 10 to step 4.
12. Discuss in the laboratory report the result of step 11.
13. Varying the frequency of the function generator from 100 Hz to 100 kHz repeat
steps 5, and 6. Use measured values at frequencies of 1X, 2X and 5X for each
decade.
14. Varying the frequency of the function generator from 100 Hz to 100 kHz repeat
steps 7, 8, and 9. Use measured values at frequencies of 1X, 2X and 5X for each
decade.
15. From steps 13 and 14 calculate CMRR as a function of frequency.
16. From steps 13, 14, and 15 plot Acm, Ad, CMRR as a function of Frequency.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment.
2
You can also use Channel B of the function generator to generate V2 – see Footnote 1.
2- 13
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. All calculations for each step.
7. All plots generated for each step.
8. All comparisons calculations.
9. All waveforms obtained in each step
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the laboratory
experiment.
12. Also include what you learned.
13. For the difference amplifier compare the theoretical CMRR versus the measured
CMRR.
14. Discuss the frequency plots of CMRR versus frequency for the difference amplifier.
15. Look up for the op-amp used in this laboratory experiment the CMRR.
16. Discuss in this laboratory report the results of steps 25 and 26 for the difference
amplifier.
17. For the instrumentation amplifier compare the theoretical CMRR versus the measured
CMRR
18. Discuss the frequency plots of CMRR versus frequency for the instrumentation
amplifier
19. Is the curve linear for IL versus Vin?
Note: All schematics / Circuit diagrams for this laboratory experiment was generated using
LTSpice IV.
2- 14
EXPERIMENT #3
Linear Voltage Regulators
Goals:
To introduce the concepts of a linear voltage regulator and their use to maintain a
regulated voltage output. Data collected during this laboratory experiment will be
compared to the datasheet for the parts used.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
Equipment:
Triple Power supply
TL081-TL084 family of operational amplifiers
2N2222A NPN transistor
Capacitors available in the laboratory
Resistors available in the laboratory
Multimeter
7805 and 7812 linear three terminal regulators
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and
become familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Mulitsim, Workbench or LTSpice IV simulate the linear regulator of Figure
2.
a. Pick R1 and R2 such that Vout is 3 volts. The minimum values for R1 and R2
should be 1000 ohms.
b. Set RL = 100 ohms and Vin = 6 volts. Measure with the simulator Vout.
c. Measure IL and Iin. Calculate Pin, Pout and Preg.
d. Calculate the Efficiency = Pout / Pin . 100%.
e. Vary RL from 50 to 10k ohms and measure Vout and IL.
f. Plot Vout versus IL
g. Setting RL to 1k ohms vary Vin from 0 to 6 volts.
h. Plot Vout versus Vin
i. What is the dropout voltage for this regulator.
j. Lookup the data sheet for the 7805 and 7812 (LM340) voltage regulators
3- 1
k. Find the typical output voltages.
l. Find the dropout voltage and calculate the minimum allowed input voltage
Vin for the 7805 and 7812 voltage regulators.
m. Find the peak output current.
n. Find the maximum allowed power dissipation of the regulator at room
temperature and with no heatsink (assume a TO220 case).
o. Find the load regulation.
p. Find the thermal resistance of the voltage regulator.
Discussion:
Consider the following circuit given in Figure 1. With R1 equal to 100 ohms
Vout is equal to 10.9 volts. If R1 is changed to 10 ohms, then Vout is equal to 6
volts. Vout depends on the load resistor R1. In other words, the output voltage
decreases as the load current (the current through R1) increases. In many
applications it is desirable to have a constant voltage source that is independent of
load current. For example, the +Vcc and -Vcc input to a typical op-amp circuit
should remain constant independent of the op-amp current.
Voltage Source
A circuit that maintains a constant output voltage is called a regulator. There are
two types of voltage regulators that are available: those that work at a DC or
constant operation point (known as linear regulators) and those that are based
upon varying a duty cycle of a pulse (known as a switching regulator). This
laboratory experiment will focus on linear regulators. Switching regulators will
be discussed in a later laboratory experiment.
Figure 2 gives the circuit diagram for a linear regulator. This regulator uses a
2N2222 transistor and an op-amp to perform the output regulation. It is based
upon the requirement that the op-amp will try to adjust its output so as to keep its
inputs, V+ and V-, equal. The voltage at the V+ terminal is
R4
V+ = Vcc R3 + R4 (1)
3- 2
Assuming +Vcc =15v and -Vcc = -15v, then V+ = 1.485 volts. The op-amp will
adjusts its output voltage so that V- terminal is the same as V+. Since the output
from the regulator Vout is equal to voltage output of the opamp -Vbe, the output
of the regulator also changes. Given that the V- terminal is related to Vout as
R2
V- = Vout R1 + R2 (2)
R2 R4
V- = Vout R1 + R2 = Vcc R3 + R4 (3)
R1 +R2 R4
Vout = Vcc R2 R3 + R4 (4)
Iin
Iout
R1 + R2
Vout = 1.485v R2 (5)
From Equation (5) Vout does not depend on the load current, as was the case for
the circuit given in Figure 1.
3- 3
the positive direction (V+ > V-). This increasing voltage will raise the voltage on
the base of the transistor. Since Vbe is a constant (about .7 volts), Vout will
increase. Vout increases until V+ = V-. Now consider that Vout increases in
voltage beyond regulated voltage given in Equation (4). For this case V+ will be
less than V-. Since the voltage output of the op-amp is Aod (V+ - V-), the voltage
output from the op-amp will tend to decrease in value. This lowers the voltage on
the base of the transistor, which lowers the transistor's emitter voltage and lowers
Vout.
As a final note, R5 is used to limit the current out of the op-amp and capacitors
C1 and C2 are bypass capacitors used to maintain low AC impedance path to
ground from Vin and Vout. These capacitors are used to eliminate any AC
signals from appearing on Vin and Vout so the output of the regulator is a
constant DC value.
Iin IL
IL
IQ
There are several parameters that are important when dealing with a linear
regulator:
Iin = IL + IQ (6)
3- 4
IQ is the regulator quiescent current and typically is milliamps. If the load current
is much larger than IQ then Iin ≈ IL and IQ can be ignored in the following
equations.
Where Pin is the input power, Pout is the output power, and Preg is the power
dissipated in the regulator. The efficiency of a voltage regulator defines the
percentage of power that is delivered to the load and is given by
Pout
Efficiency = Pin 100% . (10)
As with any electronic parts, there are maximum ratings that must be adhered to,
such as the maximum input voltage, the maximum allowable load current, the
maximum power dissipation allowed and the maximum operating temperature.
Finally, since these parts are short circuit protected, the maximum short circuit
current is also given. As long as the maximum power dissipation and maximum
operating temperature are not exceeded the part will operate indefinitely with its
output shorted to ground.
There are several items that will destroy one of these three-terminal regulators
even if these parts are correctly installed in the circuit diagram of Figure 3 and the
maximum rating are adhere to. The first is applying the wrong polarity voltage at
the input. The second is having Vout be greater than Vin. This can occur if C1 >
C2 and the energy storage in the output is greater than the energy storage in the
input. This commonly occurs during power off if C1 > C2. The input to regulator
will discharge toward zero volts faster than the output. Figure 4 shows a solution
to protecting the regulator should Vout become greater than Vin. Under normal
use, Vin > Vout, and the diode is reversed biased. Should Vout become greater
than Vin, the diode is forward biased preventing any current flowing into the
regulators from its output.
3- 5
D1
Iin IL
IL
IQ
The three terminal regulators can also be made to be adjustable so any desired
regulated output voltage can be obtained. The only requirement is that the
minimum voltage is that of the part itself. For example, a 7805 regulator can be
made adjustable, but its minimum output voltage is 5 volts. Figure 5 gives the
circuit required to make a three-terminal linear regulator adjustable. For this
discussion, assume the regulator output voltage is Vreg (the voltage between the
output and the ground pins of the regulator). Then IR1 is then given by
Vreg
IR1 = R1 . (11)
The output voltage from the regulator Vout is the sum of VR1 + VR2. But VR1
is equal to Vreg
Vreg
Vout = R2 IQ + R1 + Vreg . (13)
or
R2
Vout = R2 . IQ + Vreg R1 + 1 . (14)
If the current IR1 >> IQ then the quiescent current IQ can be ignored in Equation
(14) and Vout is given by
3- 6
R2
Vout = Vreg R1 + 1 . (15)
Since for the 78XX regulators, IQ is about 6 milliamps. IR1 should be about at
least 30 milliamps. The goal is not to make IR1 too large, as this will reduce the
efficiency of the regulator circuit.
Iin Iout
IL
IR1
IQ
IR2
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter
and function generator used in laboratory experiment.
2. Download the datasheet for the 78XX regulators. This will be needed to obtain
the pin-out of the regulator. When comparing datasheet data values to
experimental data use the typical values in the datasheet if given.
3. Obtain the pin-out for the 2N2222 transistor
4. Make sure that the power supply to the op-amp is correctly wired so as not to
apply the incorrect polarity to the op-amp.
5. When measuring any values, make sure to measure all inputs as well as the
output of the circuit. Do not rely on the values indicated on the instruments.
Always measure all signal values.
6. Before turning any power on, double check the wiring to make sure that it is
correct.
7. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
8. Use all measured values to determine experimental results such as gain and
current.
9. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
10. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
3- 7
Discrete linear regulator:
1. Build the linear regulator of Figure 2.
2. Calculate the resistors R1 and R2 required to produce an output voltage of 3
volts for the circuit of Part 1. The minimum values for R1 and R2 should be
1000 ohms.
3. Set +Vcc = 15 volts and -Vcc to -15 volts.
4. Build this linear circuit (Part 1) using a 1000 ohm resistor for RL. Take note of
the polarity of the two electrolytic capacitors. Double check your wiring.
5. Vary the input voltage Vin, between 0 and 6 volts and measure Vout, Iout and
Iin.
6. Plot the output voltage Vout as a function of Vin.
7. What is the dropout voltage for this regulator?
8. Plot the output current Iout as a function of Vin.
9. Plot the input current Iin as a function of Vin.
10. Calculate Pin and Pout from steps 6, 7, 8 and 9.
11. For step 5, plot the output efficiency Pout / Pin as a function of Vin once the
output voltage becomes constant.
12. Keeping Vin at 6 volts and varying the RL between 100 and 10000 ohms and
measure Vout, Iout, and Iin as a function of RL. Use 5 different load resistor
values.
13. Calculate the load regulation.
14. For step 12, plot the output efficiency Pout / Pin as a function of RL.
3- 8
a. *Note: the resistors supplied in the lab are only quarter watt resistors. Do
not exceed this rated power level! Be sure to calculate the power through
both R1 and R2 and ensure it is not exceeding 0.25 W (P = I2R). Hint, if
R1 = 150 Ω then the power for both R1 and R2 will not exceed the limit.
Include these power calculations in your report.
2. Build the linear regulator circuit of Figure 5 using a 7805 regulator and a 1000
ohm resistor for RL. Take note of the polarity of the two electrolytic
capacitors. Double check your wiring.
3. Vary the input voltage between 0 volts and 15 volts and measure Vout, Iout
and Iin.
4. Plot Vout as a function of Vin.
5. Determine the dropout voltage for this regulator and compare this measured
value to the value given in the datasheet.
6. Plot Iout and Iin as a function of Vin in Step 3.
7. Compute Pin and Pout as a function Vin.
8. From step 7, plot the output efficiency Pout / Pin as a function of Vin once the
output voltage becomes constant.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
3- 9
EXPERIMENT #4
Goals:
To introduce the concepts of using a switching regulator as a voltage regulator. The
theory of a switching regulator will be presented along with its design. Data collected
during this laboratory experiment will be compared to the datasheet for the switching
regulator used.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following two links are to the Tektronix website for the user manual for the
TDS2014B oscilloscope and for the AFG3022B Function generator:
Oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO 4034B
Triple Power supply
Capacitors available in the laboratory
Resistors available in the laboratory
Multimeter
Inductor (100 µH)
Electrolytic Capacitors (470 µF at 15 volts)
LM 2576-ADJ switching regulator
Fast recovery diode MBR 1060
50 Ω, 50 W Power Resistor
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and
become familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Multisim, Workbench or LTSpice IV simulate the linear regulator of Figure
2.
4- 1
c. Pick the ratio for R1 and R2 that sets the output to 5 volts DC (Figure 2 of datasheet).
The minimum values for R1 and R2 should be 1000 ohms.
d. Compute E*T given on page 14 of datasheet.
e. Assuming a maximum current of 1 to 1.5 amps find the optimum inductance L given
in Figure 7 of datasheet.
f. Compute the minimum output capacitance (page 14 of datasheet).
g. Assuming a 3 amp maximum load, calculate the efficiency of the switching regulator
(Performance Figures).
h. Assuming a maximum load current of 3 amps, find the power dissipation of the
output and the regulator.
i. What is the expected dropout voltage at 3 amps (Vin - Vout)?
j. What is the expected current limit for the LM2576 regulator?
k. Approximately how much does the output voltage change if the input voltage goes
from 10 volts to 15 volts (assume a junction temperature of 25 degrees C)?
Discussion:
Switching regulators are based upon using a pulse where its duty cycle is varied to
maintain a constant voltage at its output. Consider the periodic pulse waveform
given in Figure 1. The average or DC for time varying signal is by
T
1
Vavg = T ⌠
⌡ v(t) dt . (1)
0
But for the periodic pulse signal v(t) is equal to zero for the time period of T - T1
and takes on a value of A from 0 to T. Substituting these values is Equation (1)
gives
T1
1
Vavg = T ⌠
⌡ A dt . (2)
0
T1
Vavg = A T (3)
Volts
T
1
A
0
T Time
4- 2
The average voltage Vavg depends on the ratio of T1 to T. As T1 decreases,
Vavg decreases, and as T1 increases, Vavg increases. The ratio of T1 to T is
nothing more than the duty-cycle, D, of the periodic waveform
Vavg = A . D . (4)
A circuit that produces a varying duty cycle periodic waveform is called a pulse
width modulator. Consider the block diagram shown in Figure 2. This circuit
uses a comparator and a sawtooth waveform to generate a varying duty cycle
periodic waveform. The output of the comparator is A volts if V1 > V2 otherwise
the output of the comparator is 0 volts. For a fixed input Vin, if Vin > V2, then
the output of the comparator is A volts. As the input V2 increases in value due to
the sawtooth waveform increasing in value, there is a point in time when V2
becomes greater than Vin and the output of the comparator goes to zero. Figure 1
gives the output of the pulse width modulator with T1 equal to Vin and T equal to
K.
V1
Vin Comparator
Vout
V1 > V2
V2 Vout = A
Sawtooth
Waveform
T
K
0 Time
The average voltage output from Figure 2 is then given by Equation (3) as
Vin
Vavg = A K , (5)
where T = K (the amplitude of the sawtooth wave at time T) and T1 = Vin (the
time when the sawtooth amplitude is equal to Vin). The pulse width modulator
4- 3
provides a means of varying the pulse width of a periodic pulse waveform, which
allows the average voltage to be varied.
The output waveform is the periodic pulse given in Figure 1 with A equal to Vin.
Typical switching regulators use periodic frequencies in the range of a few
kilohertz to a few megahertz (1 / T).
Gate
Pulse Width
Modulator
The main limitation of the simple regulator given in Figure 1 is that Vout is a
periodic pulse, not a constant DC voltage. The problem is that, when the
MOSFET turns off, Vout goes to zero and the current to the load, RL, goes to
zero. What needs to be added to this simple switching regulator is a means of
storing energy when the MOSFET is on and delivering this energy to the load,
RL, when the MOSFET is off. One device that stores energy in a magnetic field
is an inductor.
Figure 4 shows the modification of the simple switching regulator with the
addition of an inductor and a diode. This allows current to continue to follow in
RL when the MOSFET is OFF. When the MOSFET is on, Vin appears at the
source pin, the diode is reversed biased and off, and VL appears on the left side of
the inductor L1. Ignoring the current flowing in R1 and R2 since this current is
usually much smaller than current flowing in RL, the effective circuit, when the
MOSFET is on, is an RL circuit as shown in Figure 5. Since the current in an
4- 4
inductor cannot change instantaneously, the current through the inductor starts to
increase at rate of
Vin t L
IL = RL 1 - e- R (6)
and reaching a final value IL = Vin / RL. At the point that MOSFET turns off,
the diode becomes forward biased allowing current to continue to flow in the
inductor in the same direction as when the MOSFET was on. The model of the
switching regulator when the MOSFET is off is shown in Figure 6. The diode
turns on allowing current to flow through the inductor L1 and through the load
RL.
Vin Source Vout
IL
Gate
Pulse Width
Modulator
IL
Figure 5: The model of the switching regulator when the MOSFET is on.
Vout
IL
Figure 6: The model of the switching regulator when the MOSFET is off.
4- 5
Since there is no longer an applied source the current through the inductor L and
the load RL decreases at the rate of
tL
IL = K . e- R (7)
where K is the current flowing in the inductor and the load RL when the
MOSFET turns off. Figure 7 shows the current flowing in the load RL and the
inductor L1 as a function of time.
IL
Time
Since the voltage across a resistor is equal to its current times its resistance, Vout
= IL . RL. Vout is simply the same waveform that is given in Figure 7, but scaled
by RL. The magnetic energy stored in the inductor when the MOSFET is on is
delivered to the load when the MOSFET is off essentially providing for
continuous current flow when the MOSFET is on and off. To maintain a constant
Vout, an additional energy storage element, a capacitor, is placed across the load
RL. The final switching regulator is given in Figure 8.
. IL
Gate CL
Pulse Width
Modulator
When designing this regulator, several parameters must be adhered to. First, the
maximum currents for the MOSFET, the inductor and the diode must be
observed. The polarity and maximum voltage of the capacitors that are used must
4- 6
be followed. And finally the maximum power dissipation allowed for the
MOSFET and its maximum temperature rating must be included in the design.
The main advantage that a switching regulator has over a linear regulator is power
efficiency. From the linear regulator laboratory experiment, the power dissipation
across a linear regulator is
But
Iin = IL + IQ , (9)
where IQ is the quiescent current of the regulator. This is the current needed by
the regulator to power its internal electronics. Under most conditions, IQ << IL
and
Iin ≈ IL (10)
Pout is simply
4- 7
Efficiency = Pout / Pin . 100% (14)
Just having Vin > Vout, The efficiency of the linear regulator circuit is less than
100%. Typical efficiencies for linear regulator are bellow 50%. For switching
regulators, the main loss of power is the power dissipated in the MOSFET. But
the MOSFET is either full on or full off. When the MOSFET is off there is no
power dissipated in the MOSFET, but when the MOSFET is on the power
dissipated in the MOSFET is
where Rds is the drain to source on resistance of the MOSFET. For a power
MOSFET Rds on is on the order of a few milliohms. Such a small value produces
very small power dissipation in the MOSFET allowing for very high efficiencies
for the switching regulator. Efficiencies of 80% to 90% are very common in
switching regulators. To reiterate, the frequency of switching regulators runs
anywhere from a few kilohertz to a few megahertz. This allows for reasonably-
sized inductors and capacitors to be used.
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter
and function generator used in laboratory experiment.
2. Download the datasheet LM 2576-ADJ switching regulator. This will be
needed to obtain the pin-out of the regulator. When comparing datasheet data
values to experimental data use the typical values in the datasheet if given.
3. When measuring any values make sure to measure all inputs as well as the
output of the circuit. Do not rely on the values indicated on the instruments.
Always measure all signal values.
4. Before turning any power on double check the wiring to make sure that it is
correct.
5. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
6. Use all measured values to determine experimental results such as gain and
current.
7. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
8. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
Switching Regulator:
1. Have the lab assistant approve your design using a 100 µH inductor and two
4- 8
470µF, 15 volts capacitors.
2. Build your design making sure to correctly wire the LM2576, the polarity of
the diode, and the electrolytic capacitors.
3. Triple check your wiring before applying any power.
4. Use the 50 Ω, 50W power resistor provided in the lab for RL.
5. Vary the input voltage Vin between 0 and 15 volts and measure Vout, Iout and
Iin.
6. Plot the output voltage Vout as a function of Vin.
7. What is the dropout voltage for this regulator?
8. Compare the dropout value in step 7 to the expected value from the datasheet.
9. Plot the output current Iout as a function of Vin.
10. Plot the input current Iin as a function of Vin.
11. Calculate Pin and Pout from steps 6, 9, and 10.
12. For step 11, plot the output efficiency Pout / Pin as a function of Vin once the
output voltage becomes constant. How does this value compare to the
expected value.
13. Setting Vin to 10 volts and varying the RL between 100 and 10000 ohms
measure Vout, Iout, and Iin as a function of RL. Use at least 5 different
resistor values. Do not forget to measure the actual resistance of these
resistors.
14. Plot Vout as a function of RL.
15. Plot the output current Iout as a function of RL.
16. Plot the input current Iin as a function of RL.
17. Calculate Pin and Pout from steps 14, 15, and 16.
18. For step 17, plot the output efficiency Pout / Pin as a function of RL.
19. For step 14 calculate the load regulation.
20. Measure with a scope the voltage on both sides of the inductor for Vin = 10v
and RL = 50 Ω, 50 W. Discuss your findings in the lab report.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
1. The equipment used model and serial number.
2. Laboratory partners
3. Date and time data were taken.
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
8. All plots generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the
laboratory experiment.
12. Also include what you learned.
4- 9
13. Make sure to include the measured dropout voltage as well as the dropout voltage
from the datasheet.
14. Discuss the efficiency of this switching regulator and why is efficiency an important
parameter.
15. Is the curve linear for IL versus Vin?
16. Where does the power dissipated in the regulator go?
4-10
EXPERIMENT #5
Goals:
To introduce the concepts of using diodes as rectifiers and limiters. The concepts of the
ideal diode designed from diodes and op-amps circuits will also be discussed. Finally,
diode limiter circuits will be presented. Data collected during this laboratory experiment
will be compared to the theoretical equations presented in this laboratory experiment.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following link is to the Tektronix website for the user manual for the DPO
4034B oscilloscope and for the AFG3022B Function generator:
Oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO 4034B
Triple Power supply
Capacitors available in the laboratory
Resistors available in the laboratory
Multimeter
1N4148 diodes
Electrolytic Capacitors (10 µF at 15 volts)
LM 285 precision voltage reference.
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and
become familiar with the equations for each circuit.
Use the simulation package of your choice in which you are the most familiar
with: Mulitsim, Workbench or LTSpice IV.
a. Download the National Semiconductor LM285 Datasheet and become familiar with
this part.
b. Simulate the half wave rectifier circuit given in Figure 3 with R = 10K and the diodes
equal to 1N4148s. Set Vin equal to a 200 Hz +5 volt peak sine wave with no DC
offset. Obtain a plot of Vin and Vout versus time.
c. Repeat Step b for Vin equal to a 200 Hz +10 volt peak sine wave with no DC offset.
5- 1
d. Simulate the full wave rectifier circuit given in Figure 5 with R = 1K and the diodes
equal to 1N4148s. Set Vin to a 200 Hz +5 volt peak sine wave with no DC offset.
Obtain a plot of Vin and Vout versus time.
e. Repeat Step d for Vin equal to a 200 Hz +10 volt peak sine wave with no DC offset.
f. Repeat Step b for Figure 7a for R =10K and C = 10 µf. Obtain the peak-to-peak
ripple voltage. How does this value compare to Equation (11)? What is the DC
voltage at the output Vout? How does this value compare to Equation (13).
g. Repeat Step d for Figure 7b for R =10K and C = 10 µf. Obtain the peak-to-peak
ripple voltage. How does this value compare to Equation (12)? What is the DC
voltage at the output Vout? How does this value compare to Equation (14).
h. Simulate the ideal half wave rectifier given in Figure 9 for R = 10k. Set Vin to a 200
Hz +5 volt peak sine wave with no DC offset. Also set +Vcc = 15 volts and -Vcc = -
15 volts. Use this same value for all steps unless otherwise directed. Obtain a plot of
Vin and Vout versus time.
i. Change the diode orientation in Figure 9 and repeat Step h.
j. Change the diode orientation back and change the input frequency of the sine wave to
2000 Hz, 20kHz and 200 kHz and repeat Step h.
k. Simulate the ideal half wave rectifier given in Figure 11 for R = 10k. Set Vin to a 200
Hz +5 volt peak sine wave with no DC offset. Obtain a plot of Vin and Vout versus
time.
l. Change the diode orientations in Figure 11 and repeat Step k.
m. Simulate the ideal full wave rectifier given in Figure 13 for R1 and R2 = 1k. Set Vin
to a 200 Hz +5 volt peak sine wave with no DC offset. Obtain a plot of Vin, V2 and
Vout versus time.
n. Change the diode orientations in Figure 13 and repeat Step m.
o. Simulate the limiter circuit given in Figure 18a for RF = RA = 100k, R1 = 20k, R2 =
15k, R3 = 10K, and R4 = 20K. Set VR1 = +Vcc and VR2= -Vcc . Vary Vin from -
Vcc to +Vcc and obtain Vout. Compare this result to the plot given in Figure 17.
Use at least 10 points to perform the comparison.
p. Repeat Step o but remove RF.
Discussion:
Diode Model
The diode model used in the laboratory experiment is shown in Figures 1 and 2.
When the diode is forward biased so that Vd > Vx, (the forward turn on voltage)
the diode is on and the current Id flowing in the diode is non-zero (Figure 2b).
When Vd < Vx, the diode current Id is zero and the diode is reversed biased
(Figure 2c). Under this condition no current is flowing in the diode and the diode
can be considered an open circuit. Figure 1 gives a plot of the diode current as a
function of the diode voltage showing the forward biased and reverse biased
region. Typical values of the forward biased voltage Vx depends on the
semiconductor material used for the diode but typically is in the range of 0.2 volts
to 0.7 volts.
5- 2
Half Wave Rectifier
Id
Reverse Forward
Bias Bias
0 Vx Vd
Id
+ -
Vd
(a)
Id ≠ 0
Vx Id = 0
- +
+ - + -
Vd Vd
Vd > Vx Vd < Vx
(b) (c)
Figure 2: The simplified model for the diode. (a) Its symbol, (b) the
forward biased model, and (c) the reversed biased model.
where ω is the frequency in rad/sec and ω = 2πf (f is the frequency in hertz). This
circuit is commonly called a half wave rectifier.
When Vin < Vx the diode is off (reversed bias) and the diode model of Figure
2(c) applies, the diode current Id = 0 and Vout = 0 (Vout = R . Id). Under the
condition Vin > Vx, the diode is on (forward bias) and the model of Figure 2(b)
applies and current Id flows through the diode and the resistor R. Vout is then
given by
5- 3
Vout = Vin - Vx . (2)
Vin
A 1
(a) (b)
+
0
Id
- -A 1
0 time
Figure 3: (a) Half wave rectifier circuit diagram and (b) Vin as a function
of time.
The output is the same as the input Vin but smaller in voltage by Vx (Assuming
Vin peak >> Vx). Figure 4 gives Vout as a function time.
Vout
A - Vx 1
1
0 time
Figure 4: Vout as a function of time for the half wave rectifier circuit.
As shown in Figure 4, half of the sine wave waveform has been set to zero. The
average or DC value for Vout is now non-zero. The average is defined
T
1
⌠ v(t) dt .
Vavg = T ⌡ (3)
0
T
1
Vavg = T ⌠
⌡ A . sin(ωt ) dt . (4)
0
5- 4
and integrating over its period T = 1 / f produces a zero average value. Repeating
the process for Vout gives
T
2
1
Vavg = T ⌠
⌡ (A - Vx) . sin(ωt ) dt . (5)
0
The integration is now over half the period since Vout is zero for half the period.
Performing the integration in given in Equation (5) yields
A- Vx
Vavg = . (6)
π
The main limitation of the half wave rectifier is that its output is zero for half of
the period. Figures 5(a) and (b) give circuit diagram of a full wave rectifier using
a bridge configuration. A full wave rectifier allows current to flow during both
parts of the input sine wave input.
A
+ D1 D2
Vin
I
- D4 D3
B
(a)
A
- D1 D2
Vin
I
+ D4 D3
B
(b)
Figure 5: A full wave rectifier circuit diagram (a) For Vin > 2 . Vx and
(b) Vin < - 2 . Vx..
5- 5
Assuming Vx is the same for all of the diodes, when Vin > 2 . Vx, D2 and D4 are
forward biased and D1 and D3 are reverse biased. Current then flows from Vin
(A) through D2 through R and then through D4 and back to Vin (B) (Figure 5(a)).
Again, when Vin < -2 . Vx, but in the opposite polarity, D1 and D3 are forward
biased and D2 and D4 are reverse biased. Under this condition, current flows
from Vin (B) through D3 and then through R and D1 and back to Vin (A) (Figure
5(b)).
Under both conditions for Vin > 2 . Vx and Vin < - 2 . Vx, the current flowing
through the resistor R is in the same direction. Even though Vin changes polarity,
the voltage across R (Vout = I . R) remained the same. Figure 6 gives Vin and
Vout as a function of time. Vout is the same as Vin when Vin > 2 . Vx except it
has been reduced in amplitude by 2 two diode drops of Vx (Vout = Vin - 2 . Vx
and assuming Vin peak >> 2 .Vx). When Vin < -2 . Vx, then Vout is the inverted
version of Vin Vx except it also has been reduced in amplitude by two diode
drops of Vx (Vout = 2 . Vx - Vin). In other words
Vin Vout
A 1 A-2Vx
0 0
1
0 time 0 time
Figure 6: Vin and Vout as a function of time for a full wave rectifier.
The average or DC value for Vout is also non-zero. For the full wave rectifier,
the average is given by
T
1
Vavg = T ⌠
⌡ | (A - 2 . Vx) . sin(ωt ) | dt . (8)
0
5- 6
Since Vout is the same for 0 ≤ t < T/2 and T/2 ≤ t < T, the integral is twice the
integral over 0 ≤ t < T/2
T/2
2
Vavg = T ⌠⌡ | (A - 2 . Vx) . sin(ωt ) | dt (9)
0
2 . (A - 2 . Vx)
Vavg = (10)
π
The average or DC value is twice the average value of the half wave rectifier
given in Equation (6).
Rectifier Filtering
Figure 8 shows the output of the filtered half wave rectifier circuit. The curve
highlighted in X is when the diode is delivering power to the load R and charging
the capacitor C. Once the peak is reached, the capacitor is charged to its
maximum value of A - Vx. As Vin decreases below its peak value of A the diode
turns off. At this point the energy stored in the capacitor C is delivered to the
resistor R and the capacitor starts to discharge as highlighted in the curve Y. The
voltage difference between the peak value of A - Vx and the minimum voltage is
known as the ripple voltage, Vr, and is given by
A - Vx
Vr = f R C , (11)
where f is the frequency in Hertz of Vin as defined in Equation (1). For a full
wave rectifier, the period is half that of a half wave rectifier or the frequency is
twice that of a half wave rectifier
A - Vx
Vr = 2 f R C , (12)
The average output voltage Vout for the half wave rectifier is the given as
1 2 Vr
Vout(average) = (A - Vx) . 1 + (13)
π A - Vx
5- 7
+
C
-
A (a)
+ D1 D2
Vin
I
- D4 D3 C
B
(b)
Figure 7: Filtering the output of a (a) half-wave and (b) full-wave rectifier circuit.
Vout
2
A-Vx Y Y
Vr
X X
0
2
0 time
1 2 Vr
Vout(average) = (A - 2 .Vx) . 1 + (14)
π A - 2 .Vx
5- 8
with Vr defined by Equations (11) and (12), respectively. For Vr << A - Vx or Vr
<< A - 2 . Vx, the average voltage output reduces to Vout(average) = A - Vx for
the half wave rectifier and Vout(average) = A - 2 . Vx for the full wave rectifier.
The major limitation with the full wave and half wave rectifiers presented above
is the forward biased voltage drop of the diodes that must be achieved before the
diodes conduct. For the half wave rectifier Vin must exceed Vx and for the full
wave rectifier must exceed 2 . Vx before the diodes start conducting. The ideal
rectifier circuits use the open loop gain of the op-amp to remove the effects of the
forward biased voltage diode Vx. Consider the ideal half wave rectifier shown in
Figure 9. Assuming initially Vin = 0, and op-amp output is zero. Then since
(where Ad is the open loop gain of the op-amp) V- must also be initially zero.
Since V- and op-amp's output are both zero, the voltage across the diode Vd = op-
amp output - V- is zero and the diode is off. If Vin is now allowed to go negative
(Vin < 0) then by Equation (15), the op-amp's output goes negative and the diode
voltage Vd becomes negative and remains off. Since the diode is off and no
current flows through the diode, the current flowing in the resistor I = 0. This
results in zero voltage across the resistor and Vout = 0. Under this condition the
feedback loop is open and the output of the op-amp is at maximum allowed
negative voltage (negative rail). Next, consider Vin positive (Vin > 0). Under
this condition, from Equation (15) the op-amp's output heads toward a positive
voltage turning on the diode. The current flowing through the diode also flows
through the resistor producing a non zero voltage at Vout. The op-amp will try to
make V+ = V- (virtual short) maintaining a closed loop configuration. Since V+
= Vin and V+ = V-, V- = Vout = Vin. The output Vout is nothing more than the
input for Vin > 0. Equation 16 give the output Vout
If Vin is a sine wave as given by Equation (1), then Vout is the same as Figure 6
except the peak output voltage is equal to A not A - Vx. The forward bias diode
voltage has been eliminated. To maintain a closed loop condition and to maintain
that the diode is on, the op-amp's output = V- + Vx or the op-amp's output = Vin
+ Vx.
Changing the diode direction changes the polarity of the output producing an
output when Vin is negative
5- 9
Vout = 0 for Vin > 0 (17)
Vout = Vin for Vin < 0
- R2
Vout = R1 Vin for Vin < 0 . (18)
Equation (18) is nothing more than the output equation for an inverting amplifier
given an input Vin. For Vin > 0, the op-amp's output is negative (at its most
negative value) and the diode is reversed biased and off. Since the diode is off (I2
= 0) and since no current flows into the V- terminal of the op-amp, then the
current I1 flowing in the resistor R1 is zero. Since I2 = 0 then
Equations (18) and (19) describe an inverting half wave rectifier output as
described by Figure 6 without the effects of Vx. Changing the direction changes
the polarity of Equation (18) and (19) and inverts the output polarity of the half
wave rectifier of Figure 10.
5-10
Figure 10: Inverting configuration ideal half wave rectifier.
.
The main limitation of the half wave rectifier circuits presented in Figures 9 and
10 is that for half the time period the output of the op-amp is in saturation either
near the positive or negative rails. Care must be taken when an op-amp's output is
at its rails and if the input common mode voltage is exceeded. When the op-amp
is running open loop with no feedback (V+ ≠ V-), Vout will not be zero when the
diode D1 is off. In addition, for an op-amp to come out of saturation, it takes time
and slows the response of the half wave rectifier circuits given in Figures 9 and
10. Adding a diode D2 as shown in Figure 11 prevents the op-amp from going
into saturation and increases the overall response time of the half wave rectifier.
For Vin <0, the op-amp output is positive and D1 is forward biased on and D2 is
reversed biased off. Under this condition the output Vout is the same as described
by Equation (18). But when Vin > 0 the op-amp's output is negative, D1 is off
and D2 is forward biased on. D2 forward biased on keeps the feedback loop
closed so that V- = V+ = 0. The current flowing in diode D2 is equal to the
current flowing in R1 (Vin/R1). With diode D2 forward biased on and V- equal
to zero, the op-amp's output is equal to -Vx and the op-amp output is kept from
going to its most negative value (negative saturation). What makes the circuit of
Figure 11 faster than the circuit of Figure 10 is that turning off the diodes is
usually faster than an op-amp coming out of saturation.
Consider a sine wave input Vin as described in Equation (1) as input to the half
wave rectifier given in Figure 11 with diodes the direction of diodes D1 and D2
swapped. This produces a negative going half wave rectifier output V2 as shown
in Figures 12(a) and (b). Next, consider
V3 = Vin + 2 . V2 (20)
5-11
Figure 11: Half wave rectifier without op-amp saturation.
The best way to analyze Equation (20) is to determine V3 when Vin > 0 and when
Vin is < 0. When Vin < 0, the output V2 of the inverted have wave rectifier
output (Figure 12(b) is zero and Equation (20) reduces to
For Vin > 0, V2 is simply equal to the inverted version of Vin (V2 = -Vin) and
Equation (20) reduces to
V3 = -| Vin | (23)
Equation (23) is nothing more the inverted version of the full wave rectifier
equation in Equation (7) for the ideal rectifier case of Vx = 0 (Figure 12(c)).
Inverting Equation (23) gives
and is shown in Figure 12(d). Inverting Equation (20) gives Vout directly as
V3 = -Vin - 2 . V2 (25)
A closer look at Equation (25) shows that this equation is nothing more than a
summing amplifier with gains of -1 and -2, respectively. Figure 13 shows the
circuit diagram for a full wave rectifier using the ideal half wave rectifier and a
two-input summing amplifier with gains of -1 and 2, respectively.
5-12
n
yn n
A1 1
y v
n Vin0 n V20
-A1 -A1
00 500
Time1000 00 500
Time1000
n n
(a) (b)
0.5 A1
V3
00 Vout0.5
x x .( 1 )
n n
0.5 00
-A1 0.5
00 500
Time1000 00 500
Time1000
n n
(c) (d)
Figure 12: (a) The input signal, (b) the inverted half wave rectified signal,
(c) the signal due to Equation (20), and the final output Vout.
5-13
The Precision Voltage Reference
Many applications require a precision constant DC voltage that does not vary with
temperature and is very accurate. Figure 14 shows a schematic diagram for a
LM285 a precision voltage reference. The schematic diagram is the same as that
used for a zener diode. In addition, using and biasing a precision diode is the
same as a zener diode. The only difference between a precision voltage reference
and a zener diode is the voltage across the diode remains fairly constant over a
large range of bias current, where for a zener diode there is a significant change in
voltage across the part as the bias current changes. For the LM285 precision
voltage reference, the voltage across the device has a constant voltage of 1.235
volts and has a typical change of voltage of only 7 millivolts over the current
range of 10 microamps to 20 milliamps. It has a temperature stability of a typical
value of less than 6 millivolt change in voltage over the temperature range of -40
°C to 85 °C.
Cathode
Anode
Figure 15 shows how to bias a precision voltage reference. Assuming the current
I1 flowing out of the output Vo is zero then I is gvien as
where Vo = 1.235 volts. To bias the LM285 a bias current in the range of 0.5
milliamps to 20 milliamps is chosen.
I
I1 = 0
LM285
Figure 15: A schematic diagram shown how to bias a precision voltage reference.
Since it was assumed that the current I = 0, typically Vout is connected to an op-
amp buffer to produce a gain so the desired voltage reference can be obtained.
5-14
Figure 16 gives the circuit diagram for a precision voltage reference using the
LM285. The final output is then
R2
Vout = Vo R1 + 1 . (27)
I =1.235
I1 = 0
R2
Vout = 1.235 R1 + 1 . (28)
To design a precision voltage reference, for a desired output Vout, Equation (28)
is used and the ratio of R2 / R1 is found
R2 Vout
R1 = 1.235 -1 . (29)
Either R1 or R2 is chosen and the other resistor is calculated from Equation (29).
The final step is to solve Equation (26) for R and to calculate R based on the
value for Vcc and the desired current I between 10 microamps and 20 milliamps.
There are many types of limiter circuits that limit the output to a fixed value.
Many of these circuits are based upon using ether standard or zener diodes to
perform the limiting function. Figure 18a gives the two diode limiter where the
voltage limit can be set using resistors. For this derivation and discussion it is
assumed that V1 and V2 are much greater than the forward biased voltage Vx of
the diodes used so that Vx can be ignored in the derivation. Under this
assumption, ideal diodes will be assumed where Vx is assumed to be zero.
5-15
Analyzing Figure 18(a) further shows that if V1 > 0 and V2 < 0, both diodes will
be off and the output is the simply the circuit shown in Figure 18(b). To satisfy
the V1 > 0 and V2 <0, Vout can be found by relating Vout to VR1 and VR2.
The current through R1 and R2 is given as the voltage across R1 and R2 divided
by the total resistance R1 and R2
VR1 - Vout
I= R1 + R2 (30)
VR1 - Vout
V(R2) = I . R2 = R1 + R2 (31)
VR1 - Vout
V1 = Vout + R2 R1 + R2 (32)
R2 . VR1 - R1 . Vout
V1 = R1 + R2 (33)
For the diode D1 to be off, V1 > 0 as stated earlier. Substituting this fact into
Equation (33)
R2 . VR1 - R1 . Vout
0> R1 + R2 (34)
VR1 . R2
Vout > − R1 (35)
Using a similar approach in solving for V2 and with the requirement that V2 < 0
for D2 to be off, gives
VR2 . R3
Vout < − R4 (36)
As long as
5-16
VR1 . R1 VR2 . R3
− R2 < Vout < − R4 , (37)
both diodes will be off and the circuit of Figure 18(b) applies. Figure 18(b) is a
circuit for an inverting amplifier with
RF
Vout = − RA Vin (38)
Figure 17 shows the transfer function of Vout versus Vin. The center curve is
represented by Equation (38).
Figure 17: Vout versus Vin for the limiter circuit given in Figure 18.
VR2 . R3
Vout > − R4 (39)
and the diode D2 is on and diode D1 is off. With Diode D2 on, the resistor R3 is
placed parallel with RF. Vout for this case is then given by
R3 || RF
Vout = − RA Vin (40)
This is the top left curve in Figure 17. Similarly for the case when V1 < 0, then
VR1 . R2
Vout < − R1 , (41)
5-17
VR1
V1
V2
VR2
(a)
VR1
V1
V2
VR2
(b)
5-18
VR1
V1
V2
VR2
(c)
VR1
V1
V2
(d) VR2
Figure 18: A two diode limiter circuit diagram (a) the actual circuit, (b) the
model for when D1 and D2 are both off, (c) the model for when D1
is off and D2 is on, (d) the model for when for D1 is on and D2 is
off.
5-19
When V1 < 0, diode D1 is on and diode D2 is off as shown in Figure 18(d). Diode
D1 on places R2 is parallel with RF and Vout becomes
R2 || RF
Vout = − RA Vin (42)
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter
and function generator used in laboratory experiment.
2. Download the datasheet LM 285 precision voltage reference.
3. When comparing datasheet data values to experimental data use the typical
values in the datasheet if given.
4. When measuring any values make sure to measure all inputs as well as the
output of the circuit. Do not rely on the values indicated on the instruments.
Always measure all signal values.
5. Before turning any power on, double check the wiring to make sure that it is
correct.
6. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
7. Use all measured values to determine experimental results such as gain and
current.
8. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
9. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
Experimental Data
1. Build and design the half wave rectifier circuit given in Figure 3 with R = 10K
and the diodes equal to 1N4148s. Set Vin equal to a 200 Hz +10 volt peak-to-
peak sine wave with no DC offset. Obtain a plot of Vin and Vout versus time
using the oscilloscope.
2. Measure the DC voltage with a multimeter and compare this result to Equation
(3).
3. Repeat Step 1 for Figure 7a for R =10K and C = 10 µF. Obtain the peak-to-
peak ripple voltage. How does this value compare to Equation (11)? What is
the DC voltage at the output Vout? How does this value compare to Equation
(13).
4. Build and design the full wave rectifier circuit given in Figure 5 with R = 10K
and the diodes equal to 1N4148s. Set Vin to a 200 Hz +10 volt peak-to-peak
sine wave with no DC offset. Obtain a plot of Vin and Vout versus time the
oscilloscope. Since the output of the full-wave rectifier is not isolated from the
input, special care must be taken. Both the ground of the signal generator and
the oscilloscope are tied together through electrical ground. So attaching the
5-20
signal generator at the input and attaching the oscilloscope at the output shorts
the input and output together. To measure the output using the oscilloscope,
one of the output leads is tied to one channel of the oscilloscope and the other
is tied to an additional channel. Then the math function of the oscilloscope is
used to take the difference between the two leads. The ground of the scope is
tied to the ground lead of the signal generator
5. Measure the DC voltage with the multimeter and compare the results to
Equation (6).
6. Repeat Step 4 for Figure 7b for R =10K and C = 10 µF. Obtain the peak-to-
peak ripple voltage. How does this value compare to Equation (12)? What is
the DC voltage at the output Vout? How does this value compare to Equation
(14).
7. Build and design the ideal half wave rectifier given in Figure 9 for R = 1k. Set
Vin to a 200 Hz +10 volt peak-to-peak sine wave with no DC offset. Also set
+Vcc = 15 volts and -Vcc = -15 volts. Use this same value for all steps unless
otherwise directed. Obtain a plot of Vin and Vout versus time using the
oscilloscope.
8. Change the diode orientation in Figure 9 and repeat Step 7.
9. Change the diode orientation back and change the input frequency of the sine
wave to 2000 Hz, 20kHz, and 200 kHz and repeat Step 7.
10. Build and design the ideal half wave rectifier given in Figure 11 for R1 = R2 =
1k. Set Vin to a 200 Hz +10 volt peak-to-peak sine wave with no DC offset.
Obtain a plot of Vin and Vout versus time using the oscilloscope.
11. Change the diode orientations in Figure 11 and repeat Step 10.
12. Build and design the ideal full wave rectifier given in Figure 13 for R1 = R3 =
2k and R2 = R4 = R5 = 1k. Set Vin to a 200 Hz +10 volt peak-to-peak sine
wave with no DC offset. Obtain a plot of Vin and Vout versus time using the
oscilloscope.
13. Change the diode orientations in Figure 13 and repeat Step 12.
14. Build and design the precision voltage reference given in Figure 16 for Vout =
5 volts. Set R1 equal to 1K and set the current to the precision voltage
reference diode to 1 mA. Measure Vout and V+ and compare this result to the
datasheet for the LM285 and the expected Vout.
15. Build and design the limiter circuit given in Figure 18a for RF = RA = 100k,
R1 = 20k, R2 = 15k, R3 = 10K, and R4 = 20K. Set Vcc = 10V. Set VR1 =
+Vcc and VR2= -Vcc . Using the signal generator, input a sawtooth or triangle
wave on Vin that varies from -Vcc to +Vcc and obtain Vout. Compare this
result to the plot given in Figure 17.
16. Repeat Step 15 with but remove RF.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
5-21
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
8. All plots generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the
laboratory experiment.
12. Also include what you learned.
13. Make sure to include a discussion on how the frequency of the input affects the
output of the ideal half wave rectifiers.
14. Discuss the difference between the ideal half wave and full wave rectifiers and the
non-ideal half wave and full wave rectifiers.
15. Discuss the effect of filtering the output of a half and full wave rectifier.
5-22
EXPERIMENT #6
Active Filters
Goals:
To introduce the concepts of using an operational amplifier to perform filtering of electrical
signals. Both the lowpass and highpass filters will be investigated. The equations for first
order and second order filters will also be given. The frequency response of the various
filters will be measured and compared with expected results.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following link is to the Tektronix website for the user manual for the DPO
4034B oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO4034B
Triple Power supply
Signal generator
Capacitors available in the laboratory
Resistors available in the laboratory (minimum filter resistor should be 10kΩ)
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and become
familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Mulitsim, Workbench or LTSpice IV simulate the following filters.
Simulate using a pulse input of 0 to 1 volt to the filter and compare one cycle to the
equations below.
6- 1
the pulse generator.
e. Simulate a first order highpass filter using the circuit given in Figure 7 with ωo
= 10,000 rad / sec.
f. Using the AC simulation mode of the simulator obtain the highpass filter
magnitude spectrum from 10 Hz to 10,000 Hz.
g. Determine the attenuation factor in dB / Decade from Step f.
h. Apply a 1-volt peak square input with a frequency of 200 Hz. Simulate and
plot the time response of this filter. Use 1 µsec rise and fall times, or less, for
the pulse generator.
Second order Filters
i. Simulate a second order lowpass filter using the circuit given in Figure 10 with
ωo = 10,000 rad / sec with Q = 2.
j. Using the AC simulation mode of the simulator, obtain the lowpass filter
magnitude spectrum from 10 Hz to 10,000 Hz.
k. From Step j, measure Vout at ω = ωo and compare this result to K . Q.
l. Apply a 1 volt peak square input with a frequency of 200 Hz. Simulate and
plot the time response of this filter. Use 1 µsec rise and fall times, or less, for
the pulse generator.
m. Measure the peak overshoot and compute the percent overshoot using Equation
(31)
n. Repeat Steps l and m for Q = 0.5, 1, and 5. How do these simulations compare
to Figure 12?
o. Compare the measured % overshoot to the calculated value from Equation
(31).
p. Simulate a second order highpass filter using the circuit given in Figure 13
with ωo = 10,000 rad / sec with Q = 2.
q. Using the AC simulation mode of the simulator, obtain the highpass filter
magnitude spectrum from 10 Hz to 10,000 Hz.
r. From Step q, measure Vout at ω = ωo and compare this result to K . Q.
s. Apply a 1 volt peak square input with a frequency of 200 Hz. Simulate and
plot the time response of this filter. Use 1 µsec rise and fall times, or less, for
the pulse generator.
t. Repeat Step s for Q = 0.5, 1, and 5. How does these simulations compare to
Figure 15?
Butterworth Filter
u. Simulate a fifth order lowpass Butterworth filter using the steps described in
the laboratory experiment with ωo = 10,000 rad / sec and Kd = 5. The
attenuation factor should be -100 dB / Decade.
v. Using the AC simulation mode of the simulator obtain the lowpass filter
magnitude spectrum from 10 Hz to 10,000 Hz.
w. From Step v, measure Vout at ω = ωo.
x. Apply a 1 volt peak square input with a frequency of 200 Hz. Simulate and
plot the time response of this filter. Use 1 µsec rise and fall times, or less, for
the pulse generator.
6- 2
Discussion:
Filtering of a signal is an important aspect of electronic signal processing. It
provides a means of reducing the noise present in a signal and means of removing
unwanted interference. Filtering of a signal is easily implemented using resistor,
inductor and capacitor circuits or resistor, capacitor and op-amp circuits. The
classification of a filter is based upon which frequency components have been
attenuated.
There are four major types of filters. An ideal lowpass filter is defined as one that
contains no transition set of frequencies in which the filter goes from passing
frequency components to the attenuation of frequency components:
1 𝑓𝑓𝑓𝑓𝑓𝑓 𝜔𝜔 ≤ 𝜔𝜔𝐶𝐶
𝐻𝐻(𝜔𝜔) = � . (1)
0 𝑓𝑓𝑓𝑓𝑓𝑓 𝜔𝜔 > 𝜔𝜔𝐶𝐶
Figure 1(a) shows a plot of its magnitude spectrum. This filter has a finite
discontinuity at the cutoff frequency ωc.
H(f) H(f)
1 1
0 ωc f 0 ωc f
(a) (b)
Figure 1: The magnitude spectrums for (a) the ideal lowpass filter
and (b) the ideal highpass filter.
1 𝑓𝑓𝑓𝑓𝑓𝑓 𝜔𝜔 ≥ 𝜔𝜔𝐶𝐶
𝐻𝐻(𝜔𝜔) = � . (2)
0 𝑓𝑓𝑓𝑓𝑓𝑓 𝜔𝜔 < 𝜔𝜔𝐶𝐶
This ideal filter also has a finite discontinuity. Figure 1(b) gives the highpass filter
magnitude spectrum. The ideal lowpass and highpass filters presented above
cannot be built using electronic components as these filters would need an infinite
number of storage elements such as capacitors and inductors.
Realistic filters do not have a sharp or zero transition band of passing frequency
components to attenuate frequency components. Figure 2 shows the three bands
associated with a typical filter. The pass band is the band where frequency
components of the input to the filter essentially remain unchanged. The attenuation
band is where the frequency components of the input are attenuated and the
6- 3
transition band is the band where the filter transitions from passing frequency
components to attenuating frequency components.
Frequency
Figure 3(a) gives the magnitude spectrum for a typical lowpass filter. This filter
passes the frequencies below the cutoff frequency ωc and attenuates the frequency
components above the cutoff frequency. As shown in Figure 3(a), there is a gradual
transition from passing frequency components to attenuating frequency
components. Figure 3(b) gives a typical highpass filter. This filter passes the high
frequency components above the cutoff frequency ωc and attenuates the low
frequency components.
Figure 3(c) gives the magnitude spectrum for a bandpass filter. This filter passes
frequency components in the range of frequencies ω1 to ω2, with the center
frequency of the pass band given by ω0. The final filter is the band-reject filter,
given in Figure 3(d). This filter attenuates the frequency components in the range
of ω1 to ω2.
There are many types of electronic filters that are available. Many of these filters
come directly from electronic circuit designs that have existed for many decades.
Some of the most common ones are the Butterworth, elliptical, Chebyshev, and
Bessel filters as well as the simple first order resistor and capacitor network and the
second order resistor, capacitor, and inductor network. In this laboratory
experiment, the buffered version of the lowpass and highpass resistor-capacitor
filter circuits will be investigated along with the lowpass and highpass second order
resistor, capacitor, and op-amp filter circuits known as active filters.
Vout(s) 1
H(s) = Vin(s) = s , (3)
+ 1
ωo
6- 4
where ωo = ( RC)-1 and is known as the cutoff frequency of the filter.
Lowpass Highpass
HL(f) HH (f)
1 1
0 ωc f 0 ωc f
(a) (b)
Bandpass Band-reject
1 HB (f) 1 HR (f)
0 ω ωo ω f 0 ω ωo ω f
1 2 1 2
(c) (d)
Vout(ω) 1
Vin(ω) jω
H(jω) = = (4)
+ 1
ωo
6- 5
Vout(ω) 1
| H(jω) | = | |= (5)
Vin(ω) ω2
+ 1
ωo
and
Vout(ω) jω
arg( H(jω) ) = arg( ) = −arctan . (6)
Vin(ω) ωo
At the frequency ωo, the magnitude is equal to 1 / 2 and the phase is equal to -
45°. The magnitude in decibels (dB) is found by
dB
0 Degree
0 0
-3 dB
| H(ω) | in dB Arg H(ω)
-45°
50 50
0
1 .10 1 .10
3 4
1 .10 1 .10
3 4
1 10 100
ωo 1 10 100
ωo
Rad/Sec Rad / Sec
Figure 5: The magnitude and phase spectrums for a first order lowpass R-C filter.
The response to a step input can be found by taking the inverse Laplace transform
of
1 1
Vout(s) = s . s , (8)
+ 1
ωo
with the Laplace transform of a unit step u(t) equal to 1 / s and is given as
6- 6
1.5
Vout(t)
0.5
0
0 Time
Figure 6: The step response to a first order lowpass R-C filter
The same procedures are used to find the frequency and time response for a first
order highpass filter. Swapping the capacitor and resistor in Figure 4 changes the
first order lowpass filter to a first order highpass filter, shown in Figure 7(a).
s
H(s) = Vin(s) = s
Vout(s) ωo
, (10)
+ 1
ωo
where ωo = ( RC)-1 and is known as the cutoff frequency of the filter. Letting s =
jω and substituting it into Equation (10) gives
6- 7
jω
Vout(ω) ωo
H(jω) = = . (11)
Vin(ω) jω
ωo + 1
The magnitude and phase are then given by
ω
|=
Vout(ω) ωo
| H(jω) | = | (12)
Vin(ω) ω2
+ 1
ωo
and
Vout(ω) jω
arg( H(jω) ) = arg( ) = 90° −arctan . (13)
Vin(ω) ωo
At the frequency ωo, the magnitude is equal to 1 / 2 and the phase is equal to
+45°. The magnitude in decibels (dB) is found by Equation (7). At the cutoff
frequency ωo, the magnitude in dB is equal to -3dB.
100
dB
0
Degree
0 | H(ω) | in dB
-3 dB
Arg H(ω)
20
50 -45°
40
2 60 0
1 10 100
ωo 1 .10
3
1 .10
4 1 10 100 ωo 1 .10
3
1 .10
4
1 4
Rad/Sec Rad / Sec
Figure 7(b): The magnitude and phase spectrums for a first order highpass R-C filter.
Below the cutoff frequency, the frequency components are attenuated at a rate of
20dB per decade (Figure 7(b)). Above the cutoff frequency ωo, the response of the
filter is one and these frequency components remain unchanged.
The response to a step input can be found by taking the inverse Laplace transform
of
s
1 ωo ωo
1
Vout(s) = s . s = , (14)
+ 1 s + 1
ωo ωo
6- 8
with the Laplace transform of a unit step u(t) equal to 1 / s and is given as
Vout(t)
0.5
0
0 Time
Figure 8: The step response to a first order highpass R-C filter
Vout(s) K . ωo2
H(s) = Vin(s) = (16)
ωo
s2 + Q s + ωo2
1
ωo2 = C1 C2 R1 R2 , (17)
the gain K by
Rb
K = Ra + 1 , (18)
6- 9
1 R2 C21/2 R1 C21/2 R1 C11/2
=
Q R1 C1 + + (1-K) R2 C2 (19)
R2 C1
If both R1 and R2 are is set equal to R and C1 and C2 are set equal to C then the
cutoff frequency ωo reduces to
1
ωo = R C , (20)
1
Q=3−K , (21)
or
1
K=3-Q , (22)
Rb
K = Ra + 1 , (23)
6- 10
the desired Q must first be met. If the gain K, does not meet the desired gain as set
forth by the design requirement, it is much easier to add an additional amplifier
stage to increase the overall gain or to add a voltage divider to reduce the overall
gain to the desired level. Figure 10 shows the circuit diagram for the second order
lowpass filter with R1 =R2 =R and C1 = C2 = C.
Vout(ω) K . ωo2
H(ω) = = (24)
Vin(ω) ωo 2
Q j ω + (ωo - ω )
2
K . ωο2
| H(ω) | = f(Vout(ω),Vin(ω)) =
ωo2 2
ω + (ωo2 − ω2)2
Q2
(25)
At ω = ωo, Equation (25) reduces to
6- 11
Vout(ωο)
H(ωο) = = -j . K . Q (26)
Vin(ωο)
20 20
dB dB
0 0
Q = 0.5 Q=1
20 20
40 40
1 10 100 1 .10
3
1 .10
4 1 10 100 1 .103 1 .104
Rad / Sec Rad / Sec
(a) (b)
20 20
dB dB
0 0
Q=2 Q=5
20 20
40 40
3 4 3 4
1 10 100 1 .10 1 .10 1 10 100 1 .10 1 .10
Rad / Sec Rad / Sec
(c) (d)
Figure 11: The magnitude spectrum for the second order lowpass filter
given in Equation (16) for various quality factor values.
The attenuation factor for a second order filter is -40 dB / decade as compared for
a first order system of -20 dB / decade. The rate of attenuation is twice as fast as a
first order lowpass filter. As the Q increases, the increase in the gain of the filter
response at ω = ωo can be easily seen in Figure 11 (comparing Figure 11a to Figure
11b).
Applying a step input of u(t) with a corresponding Laplace transform for u(t) of 1
/ s yields
6- 12
1 K . ωo2
Vout(s) = s (27)
ωo
s2 + Q s + ωo2
Using partial fraction expansion, the standard Laplace tables, and some algebra
gives the step response for a second order lowpass filter as described by Equation
(16) as
e-ωo . t / (2Q) 1
Vout(t) = K1- sin 1 - 4Q2 ωo t + , (28)
1
1 - 4Q2
where
1- 2
1
θ =
4Q
( 2 )
atan
1 = atan 4Q - 1 (29)
2Q
Figure 12 shows the step response for a fixed cutoff frequency ωo and for various
quality factors, Q. These factors correspond to the same quality factors used to
generate the magnitude spectrums given in Figure 11, except that for these plots, K
is not set to one, but set using Equation (22). For Q > 0.5 there is ringing present.
The frequency of this ringing ωr is given by
1
ωr = 1- 2 ωo (30)
4Q
which is different from the resonance frequency ωo. Note, that the increase in
ringing and the amount of overshoot in the waveform are due to an increase value
of Q. For Q = 0.5 there is no ringing and no overshoot. Actually, for Q <0.5 the
second order transfer function of Equation(16) can be factored into two real poles
and can be implemented using the two first order lowpass filters shown in Figure
4. The percent overshoot given in the step responses is defined as
Vpeak - Vfinal
% overshoot = Vfinal 100% , (31)
where Vpeak is the peak voltage in the step response and Vfinal is final value of
the step response after the ringing has decayed to zero as shown in Figure 12. In
summary, the higher value of Q the higher the overshoot. J. C. Daly from the
Electrical and Computer Engineering at the University of Rhode Island gives the
percent overshoot as a function of Q as
6- 13
π
% overshoot = e - 100% (32)
4Q2 - 1
1.5 3
Vpeak
1 2
Vfinal
0.5 1
0 0
0 0.00 2 0.00 4 0 0 .0 0 2 0 .0 0 4
(a) (b)
4 6
0 0
0 0 .0 0 2 0 .0 0 4 0 0 .0 02 0 .0 04
(c) (d)
Figure 12: The step response for the second order lowpass filter
given in Equation (16) for various quality factor values. For
(a) Q = 0.5, (b) Q = 1, (c) Q = 2, and (d) Q = 5.
Figure 13 gives the circuit used to implement a buffered version of a second order
highpass filter for R1 = R2 = R and C1 = C2 = C. The only difference between this
filter and the lowpass version of this filter is that the R's and the C's are swapped.
The transfer function of this filter is given as
K . s2
Vout(s) = , (33)
ωo
s2 + Q s + ωo2
where
1
ωo = R C , (34)
6- 14
1
Q=3−K , (35)
or
1
K=3-Q , (36)
and
Rb
K = Ra + 1 . (37)
which are the same equations as Equations (20) - (23), repeated here for clarity.
-K . ω2
H(ω) = f(Vout(ω),Vin(ω)) = (38)
ωo
Q jω + (ωo − ω )
2 2
6- 15
K . ω2
| H(ω) | = f(Vout(ω),Vin(ω)) =
ωo2 2
ω + (ωo2 − ω2)2
Q2
(39)
At ω = ωo, Equation (25) reduces to
Vout(ωο)
H(ωο) = =j.K.Q (40)
Vin(ωο)
1 K . s2 K.s
Vout(s) = s = (41)
ωo ωo
s2 + Q s + ωo2 s2 + Q s + ωo2
Using standard Laplace tables and some algebra gives the step response for a
second order highpass filter as described by Equation (33) as
1 1 1
cos 1- 2 wo t − sin 1- 2 wo t (42)
4Q 4Q2 - 1 4Q
1
H(ω) = , (43)
ω 2N
1+
ωο
6- 16
where N is the order of the filter and ωo is the cutoff frequency or -3 dB attenuation
point. As N increases, the transition band at which the filter’s frequency response
changes from the pass band to the attenuation band decreases. For N = ∞, the
lowpass Butterworth filter becomes the ideal lowpass filter with zero transition
band. The rate of attenuation is -N . 20 dB / decade. For ω = 0, the response of
this filter is unity and at ω = → ∞, the response is zero. Similar to the Butterworth
lowpass filter, the Butterworth highpass filter is defined as
1
H(ω) = , (44)
ωο 2N
1+
ω
For ω = 0, the response of this filter is zero and for ω → ∞ , the response is one.
20
dB
dB Q = 0.5 0 Q=2
0
20
20
40 40
1 .1 0 1 .1 0 1 .10 1 .10
101 0 3 4 10 3 4
1 100 1 10 100
Rad / Sec Rad / Sec
(a) (b)
20
0
dB dB
0
Q=1 Q=5
0
20
20
40 40
0
1 .1 0 1 .1 0
3 4
1 .1 0 1 .1 0
10 3 4 10
1 10 1 00 1 10 100
Rad / Sec Rad / Sec
(c) (d)
Figure 14: The magnitude spectrum for the second order highpass filter
given in Equation (16) for various quality factor values.
6- 17
3 3
2 2
1 1
0 0
1 1
0 0.001 0.002 0.003 0.004 0 0.001 0.002 0.003 0.004
(a) (b)
2
2
2 4
0 0.001 0.002 0.003 0.004 0 0.001 0.002 0.003 0.004
(c) (d)
Figure 15: The step response for the second order highpass filter,
given in Equation (33) for various quality factor values. For
(a) Q = .5, (b) Q = 1, (c) Q = 2, and (d) Q = 5.
To design a Butterworth filter, the locations of the poles are required. Most tables
that give the Butterworth poles are computed with a normalized cutoff frequency
of ωo = 1. Table 1 gives the poles for up to a 7th order filter factored into first and
second order terms for a normalized frequency ωo = 1. The advantage of this table
is that a high order filter can be implemented by cascading several second order
filters with a first order filter. For example, if N = 6, there will three second order
filter stages and no first order stage.
6- 18
3. For N odd, there will be an (s + 1) pole. This can be easily implemented
with the first order lowpass filter given in Figure 4. Pick C and find R
from
1
R= (45)
C ωo
4. For each second order section (Figure 10) and Equation (16), the K and
Q must be found. This is done by using the corresponding constant in
front of the s term in the second order pole equation. This term is equal
to ωo / Q. But ωo is equal to 1 so this term is simply equal to 1 / Q.
5. Using
1
K=3-Q , (46)
Rb
K = Ra + 1 . (47)
Pick Ra or Rb and then solve Equation (47) for the other resistor (Ra or
Rb).
6. Pick C and solve for R using
1
R= (48)
C ωo
Ka = K1 . K2 . K3 . K4 …. , (49)
6- 19
where K1, K2, K3 etc. are the actual gains used in each of the first and
second order stages as given by Equation (37).
8. If the actual implemented gain Ka < Kd (the original desired gain) then
an additional gain stage as shown in Figure 16 is required with a gain of
Kd Ry
Kg = Ka = Rx + 1 . (50)
9. If the original desired gain Kd is less than the actual implemented gain
Ka, then a buffered voltage divider network as shown in Figure 17 will
be needed to reduce the total gain
Kd Rx
Kg = Ka = Rx + Ry . (51)
6- 20
Figure 17: A buffered voltage divider.
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter and
function generator used in laboratory experiment.
2. When measuring any values make sure to measure all inputs as well as the output
of the circuit. Do not rely on the values indicated on the instruments. Always
measure all signal values.
3. Before turning any power on, double check the wiring to make sure that it is
correct.
4. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
5. Use all measured values to determine experimental results such as gain and
cutoff frequency, or quality factor.
6. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
7. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
8. The square wave used with laboratory experiment is assumed to have a 50% duty
cycle.
6- 21
7. Applying a 1 volt peak sine wave input with frequencies varying from 100 Hz
to 100 kHz, plot its magnitude spectrum. Measure at least 3 points per decade
1X, 2X, and 5X.
8. Determine the attenuation factor in dB / Decade.
9. Apply a 1-volt peak-to-peak square wave input with a frequency of 200 Hz.
Measure and plot, using an oscilloscope, the step response of this filter.
10. Repeat Step 9 for square wave frequencies of 1000, 2000, and 5000 Hz.
Butterworth Filter
13. Build a fifth order Butterworth filter using the steps described in the laboratory
experiment with ωo = 10,000 rad / sec and Kd = 5. The attenuation factor
should be -100 dB / Decade. Make sure that the R’s and C’s are easily
swappable (minimum filter resistor should be 10kΩ).
14. Applying a 2 volt peak-to-peak sine wave input with frequencies varying from
100 Hz to 10 kHz, plot its magnitude spectrum. Measure at least 3 points per
decade 1X, 2X, and 5X.
15. Measure Vout at ω = ωo.
16. Apply a 2-volt peak-to-peak square input with a frequency of 200 Hz.
Measure and plot, using an oscilloscope, the step response of this filter.
17. Compare the measure low frequency gain to the desired gain of 5.
6- 22
18. Swapping the R's and the C's in the lowpass Butterworth filter design, build a
5th order highpass Butterworth filter with a desired gain Kd of 5.
19. Applying a 2-volt peak-to-peak sine wave input with frequencies varying from
10 Hz to 10 kHz, plot its magnitude spectrum. Measure at least 3 points per
decade 1X, 2X, and 5X.
20. Measure Vout at ω = ωo.
21. Apply a 2-volt peak-to-peak square wave input with a frequency of 10 kHz.
Measure and plot, using an oscilloscope, the step response of this filter.
22. Compare the measured high frequency gain to the desired gain of 5.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report;
1. The equipment used model and serial number.
2. Laboratory partners
3. Date and time data was taken.
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
8. All plots generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the laboratory
experiment.
12. Also include what you learned.
13. Make sure to include comparisons with simulated results and actual results.
14. Include the comparison of the measure percent overshoot with Equation (31).
15. Include all time plots.
16. Include all frequency plots.
17. Include the designs steps used to design the 5th order Butterworth filter. List all resistor
and capacitor values used in a table.
18. How are the time and frequency domain signals related?
6- 23
EXPERIMENT #7
Goals:
To introduce the concepts of using an operational amplifier as a voltage comparator. The
theory of voltage comparator will be presented along with the design of several comparator
circuits. The Schmitt trigger comparator will be presented.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following link is to the Tektronix website for the user manual for the DPO
4034B oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO 4034B
Function Generator: AFG3022B
Triple Power supply
Capacitors available in the laboratory
Resistors available in the laboratory
Multimeter
TL084 Operational Amplifier
LM393 Comparator
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and become
familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Mulitsim, Workbench or LTSpice IV simulate the various comparator
circuits.
7- 1
f. Repeat Steps b - e for Vref = 2 volts, 5 volts and 8 volts.
g. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, simulate the
comparator circuit of Figure 5.
h. Use a 10 volts peak 500 Hz triangle waveform for the input Vin (DC offset =0 volts).
i. Plot Vout as a function of time for Vref = 1 volt.
j. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
k. Repeat Steps g - j for Vref = 2 volts, 5 volts and 8 volts.
l. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, simulate the
comparator circuit of Figure 10.
m. Let R2 =10k and R1 =1k.
n. Use a 5 volts peak 500 Hz triangle waveform for the input Vin (DC offset =0 volts).
o. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
p. Plot Vout as a function of time.
q. Determine Vout max and Vout min. Replace +Vcc with Vout max and -Vcc with
Vout min in Equations (22) - (25).
r. Compare the Equations (22) - (25) with Step o.
s. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, simulate the
comparator circuit of Figure 12.
t. Let R2 =10k and R1 =1k.
u. Use a 5 volts peak 500 Hz triangle waveform for the input Vin (DC offset =0 volts).
v. Determine the voltage, Vin, where Vout switches from +Vcc to -Vcc.
w. Plot Vout as a function of time.
x. Determine Vout max and Vout min. Replace +Vcc with Vout max and -Vcc with
Vout min in Equations (30) - (33).
y. Compare the Equations (30) - (33) with Step v.
z. Simulate the pulse width modulator circuit of Figure 14.
aa. Use a 0 to 10 volt 1000 Hz sawtooth waveform. Vary Vin from 0 to 10 volts (0, 1, 2,
5, 8, and 10 volts) and measure T1 the time Vout = +Vcc.
bb. Plot T1 versus Vin.
cc. Compare Step bb to Equation (36) with T=0.001 sec and K 10 volts.
Discussion:
Voltage comparison is commonly required in electronic circuit design when there
is a need to compare two input voltages. Figure 1 shows the circuit diagram for a
voltage comparator. It is the same diagram as an operational amplifier and in many
cases an operational amplifier can be used as a voltage comparator. When an
operation amplifier is used as a comparator, care must be taken so that the input
does not exceed its common mode input range.
I- +Vcc
+
V Vout
-
V
I+ -Vcc
7- 2
Voltage comparators require either a dual power supply like an op-amp or a single
supply. The type of power supply that is required depends on the voltage range of
the voltage comparator's output. The output voltage Vout for a comparator is
Figure 2 gives a diagram of Vout versus Vin. The output has two possible states.
State 1: for V+ > V- and the second state for V+ < V-. As with an op-amp the
current flowing in the two inputs I+ and I- can be assumed to be zero.
When an op-amp is used as a voltage comparator, the open loop equation of the op-
amp (from laboratory Experiment #1) is
where Aod is the open loop gain of the op-amp. Since Aod is very large, with
Vout
(V+ - V-) = Aod (3)
and with Vout bounded between the two powers supply voltages:
if V+ > V- then Vout must be equal +Vcc, the positive output rail of the op-amp.
But, if V+ < V-, then Vout = -Vcc, the negative rail of the op-amp. As mentioned
earlier V+ and V- must be maintained within the allowed common mode input of
the op-amp.
Vout = Va
V+< V- V+ > V-
Vout = Vb
7- 3
R1
V- = +Vcc R1 + R2 (5)
and
+Vcc R1
for Vin > +Vcc R1 + R2
Vout = R1 (6)
-Vcc for Vin < +Vcc R1 + R2
Figure 4 is a graph of Vout versus Vin, showing the transition of Vout from +Vcc
to - Vcc when
R1
Vin = +Vcc R1 + R2 . (7)
Since the voltage divider circuit of Figure 3 does nothing more than produce a
reference voltage that sets the value of Vin that will result in Vout changing states,
this voltage divider circuit can be replaced by the label Vref, which can be called
the reference voltage.
Vref
Vout = +Vcc
Vin
+Vcc R1
Vout = -Vcc R1 + R2
7- 4
Changing the inputs to the voltage comparator circuit given in Figure 3 as shown
in Figure 5 produces the output of
Vref
Figure 6 gives its corresponding plot of Vout versus Vin. The difference in the two
comparator circuits of Figures 3 and 5 is the polarity of the output with respect to
the input Vin. For figure 3, Vout = + Vcc for
R1
Vin > +Vcc R1 + R2 , (9)
while for the comparator circuit for Figure 5, Vout = + Vcc for
R1
Vin < +Vcc R1 + R2 . (10)
Vin
Vout = -Vcc
Figure 7 gives Vout as a function of time for the comparator circuit of Figure 3.
During the time Vin > Vref, Vout = +Vcc else Vout = -Vcc.
7- 5
Vin
Vref
0
0
Time
Vout
+Vcc
0
Time
-Vcc
where the output voltage Vout is defined as Va = +Vcc and Vb = 0. The output of
the LM393 comparator is an open collector transistor and it needs a pull-up resistor
(typically 2k to 4k). The only requirement in picking the value of the pull-up
resistor is the maximum current for the output transistor cannot exceed 10
milliamps. Figure 9 gives the output as a function time for the comparator circuit
for Figure 3 using the LM393 comparator.
7- 6
Vin
Vref
0
0
Time
Vout
+Vcc
0
0 Time
VREF
But V- = Vref,
7- 7
Solving for V+ gives
Substituting Equation (14) into Equation (13) for the case when Vout = +Vcc yields
R1 . Vout + R2 .Vin
Vout = +Vcc when R1 + R2 > Vref . (15)
R1 R1
Vout = +Vcc when Vin > Vref R2 +1 - Vout R2 . (16)
R1 R1
Vout = +Vcc when Vin > Vref R2 + 1 - Vcc R2 . (17)
R1 . Vout + R2 .Vin
Vout = -Vcc when R1 + R2 < Vref . (18)
R1 R1
Vout = -Vcc when Vin < Vref R2 +1 + Vcc R2 . (19)
R1 R1
Vout (+Vcc→ -Vcc) when Vin < Vref R2 +1 - Vcc R2 . (20)
and if Vout = -Vcc then by Equation (19) Vout switches to +Vcc when
R1 R1
Vout (-Vcc→ +Vcc) when Vin > Vref R2 +1 + Vcc R2 . (21)
For the special case when Vref = 0 Equations (17) and (19) reduce to
𝑅𝑅1
𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉 = +𝑉𝑉𝑉𝑉𝑉𝑉 when 𝑉𝑉𝑉𝑉𝑉𝑉 > +𝑉𝑉𝑉𝑉𝑉𝑉 . (22)
𝑅𝑅2
and
7- 8
𝑅𝑅1
𝑉𝑉𝑉𝑉𝑉𝑉𝑉𝑉 = +𝑉𝑉𝑉𝑉𝑉𝑉 when 𝑉𝑉𝑉𝑉𝑉𝑉 > −𝑉𝑉𝑉𝑉𝑐𝑐 . (23)
𝑅𝑅2
R1
Vout (+Vcc→ -Vcc) when Vin < -Vcc R2 . (24)
and if Vout = -Vcc then by Equation (23) Vout switches to +Vcc when
R1
Vout (-Vcc→ +Vcc) when Vin > +Vcc R2 . (25)
Figure 11 gives a plot of Vout versus Vin for the case when Vref = 0 volts. Note
the hysteresis that exist between transitioning Vout from -Vcc to +Vcc and from
+Vcc to -Vcc of
2. R1
Hysteresis value = Vcc R2 . (26)
Vout = +Vcc
+Vcc R1
R2
Vin
-Vcc R1
R2
Vout = -Vcc
Figure 11: Vout versus Vin for the comparator circuit of Figure 8.
Figure12 gives another commonly used Schmitt trigger circuit. Using the same
approach in solving the Schmitt trigger circuit given in Figure 8
7- 9
Figure 12: A comparator circuit with hysteresis (Schmitt Trigger).
But V- = Vin,
Substituting Equation (29) into Equation (28) for the case where Vout = +Vcc
R1
Vout = +Vcc when Vin < +Vcc R1 + R2 . (30)
R1
Vout = -Vcc when Vin > -Vcc R1 + R2 . (31)
R1
Vout (+Vcc→ -Vcc) when Vin > +Vcc R1 + R2 . (32)
and if Vout = -Vcc then by Equation (31) Vout switches to +Vcc when
R1
Vout (-Vcc→ +Vcc) when Vin < -Vcc R1 + R2 . (33)
Figure 13 gives Vout versus Vin for the Schmitt trigger circuit given in Figure 12.
7- 10
R1
-Vcc Vout = +Vcc
R1 +R2
Vin
R1
+Vcc
R1 +R2
Vout = -Vcc
Figure 13: Vout versus Vin for the Schmitt Trigger circuit of Figure 12.
Vin V+
Vout
V-
Vx
0 Sawtooth
T Waveform
K
Vin
T1
Figure 14. A block diagram of a pulse width modulator.
t
Vx = K T for 0 ≤ t < T (35)
As long as Vx < Vin Vout will be equal to +Vcc. The point in time (T1) when Vx
> Vin, Vout goes to zero as shown in Figure 15. Solving Equation (35) for t and
setting Vx = Vin give the time T1 as
Vin
T1 = T K for 0 ≤ Vin < K . (36)
7- 11
Volts
T
1
Va
Vb
T Time
Figure 15: An example Vout from the pulse width modulator given in Figure 12.
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter and
function generator used in laboratory experiment.
2. Download the datasheet for the LM393 comparator. This will be needed to
obtain the pin-out of the comparator. When comparing datasheet data values to
experimental data use the typical values in the datasheet if given.
3. When measuring any values make sure to measure all inputs as well as the output
of the circuit. Do not rely on the values indicated on the instruments. Always
measure all signal values.
4. Before turning any power on double check the wiring to make sure that it is
correct.
5. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
6. Use all measured values to determine experimental results such as gain and
current.
7. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
8. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
Comparator Circuits
1. Download the National Semiconductor LM393 voltage comparator datasheet
and become familiar with this part.
2. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, build
the comparator circuit of Figure 3.
3. Use a 20 volt peak-to-peak 500 Hz triangle waveform for the input Vin (DC
offset =0 volts).
4. Plot Vout as a function of time for Vref = 1volt using an oscilloscope.
5. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
6. Repeat Steps 3 - 5 for Vref = 2 volts and 8 volts.
7. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, build
the comparator circuit of Figure 5.
8. Use a 20 volt peak-to-peak 500 Hz triangle waveform for the input Vin (DC
7- 12
offset =0 volts).
9. Plot Vout as a function of time for Vref = 1volt using an oscilloscope.
10. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
11. Repeat Steps 8 - 10 for Vref = 2 volts and 8 volts.
12. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, build
the comparator circuit of Figure 10 with Vref = 0 volts.
13. Let R2 =10k and R1 =1k.
14. Use a 10 volt peak-to-peak 500 Hz triangle waveform for the input Vin (DC
offset =0 volts).
15. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
16. Plot Vout as a function of time using an oscilloscope.
17. Determine Vout max and Vout min from the oscilloscope traces. Replace
+Vcc with Vout max and -Vcc with Vout min in Equations (22) - (25).
18. Compare the Equations (22) - (25) with Step 15.
19. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, build
the comparator circuit of Figure 12.
20. Let R2 =10k and R1 =1k.
21. Use a 10 volt peak-to-peak 500 Hz triangle waveform for the input Vin (DC
offset =0 volts).
22. Determine the voltage Vin where Vout switches from +Vcc to -Vcc.
23. Plot Vout as a function of time using an oscilloscope.
24. Determine Vout max and Vout min from the oscilloscope traces. Replace
+Vcc with Vout max and -Vcc with Vout min in Equations (30) - (33).
25. Compare the Equations (30) - (33) with Step 22.
26. Repeat steps 2-5 and steps 7-10 using the LM393 comparator with around a
2k pull-up resistor.
For the comparator it is necessary to use a 10 volt peak-to-peak 500 Hz
triangle waveform for the input Vin with a DC offset = 5 volts (i.e. the
triangle wave is from 0 to 10 V, rather than from -10 to 10 V). Use this in
place of the triangle wave described in steps 3 and 8.
27. Build the pulse width modulator circuit of Figure 14 (using the LM393). Do
not forget the pull-up resistor.
28. Use a 0 to 10 volt 1000 Hz sawtooth waveform. Vary Vin from 0 to 10 volts
(0, 2, 4, 8, and 10 volts) and measure T1 the time Vout = +Vcc.
29. Plot T1 versus Vin.
30. Compare Step 29 to Equation (36) with T=0.001 sec and K = 10 volts.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
1. The equipment used model and serial number.
2. Laboratory partners
3. Date and time data was taken.
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
7- 13
8. All plots generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the laboratory
experiment.
12. Also include what you learned.
7- 14
EXPERIMENT #8
Goals:
To introduce the concepts of using an operational amplifier as an oscillator to produce an
output waveform. The Schmitt trigger comparator will be used to produce a square wave
and a triangle waveform.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following link is to the Tektronix website for the user manual for the DPO
4034B oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO 4034B
Function Generator: AFG3022B
Triple Power supply
Capacitors available in the laboratory
Resistors available in the laboratory (use a minimum of 1k resistors)
Multimeter
TL084 Operational Amplifier
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and
become familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Mulitsim, Workbench or LTSpice IV simulate the various oscillator and
waveform generator circuits.
a. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, design and
simulate the phase shift oscillator circuit of Figure 1 (use a minimum of 10 kΩ for
resistors). Set ωo = 5,773 rad / sec. Adjust R2 until oscillation occurs (somewhere
above 8 . R). Make sure to run the simulation for a long enough time.
b. From the output waveform determine the frequency of oscillation and the peak-to-
peak value.
c. Increase R2 to 15 . R and repeat step b. Discuss the difference observed in-between
steps b and c.
8- 1
d. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, design and
simulate the Wien-bridge oscillator circuit of Figure 3. Set ωo = 10,000 rad / sec.
Adjust R2 until oscillation occurs (somewhere above 2 . R1). Make sure to run the
simulation for a long enough time.
e. From the output waveform determine the frequency of oscillation and the peak-to-
peak value.
f. Increase R2 to 8 . R1 and repeat step e. Discus the difference observed in between
steps e and f.
g. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, design and
simulate the Schmitt trigger oscillator circuit of Figure 5. Set fo = 1000 Hz. Make
sure to run the simulation for a long enough time.
h. Obtain waveforms for Vout, V-, and V+. Determine the frequency of oscillation and
the peak-to-peak value of Vout.
i. Using an op-amp with +Vcc set to +15 volts and -Vcc set to -15 volts, design and
simulate the triangle-square wave waveform generator circuit of Figure 7. Set fo =
1000 Hz. Make sure to run the simulation for a long enough time.
j. Obtain waveforms for Vout and Vx. Determine the frequency of oscillation and the
peak-to-peak value of Vout.
Discussion:
Oscillators and waveform generators are commonly used to generate sine wave,
triangle wave and square wave signals used as input sources to various types of
electronic circuits. Figure 1 shows the circuit diagram for a Phase Shift Oscillator
Depending on R2 this oscillator can produce either a sine wave or square wave
output. To analyze this circuit the feedback loop is opened and its transfer
function is found from its input, all the way back, to its output.
Figure 2 shows the feedback loop open at point A. The goal is to find the output
Y as a function of the input X. Starting at X, the transfer function from X to X1 is
X1(s) RCs
=
X(s) RCs + 1 . (1)
8- 2
Since the next stage (U2) is identically the same as the fist stage (U3), the transfer
function from X2 to X1 is
X2(s) RCs
X1(s) = RCs + 1 . (2)
A Y
X
X1 X2
Figure 2: The phase shift oscillator with its loop feedback open at point A.
Combine Equations (1), (2) and (3) together in Equation (4) gives the total loop
feedback transfer function of
or
8- 3
For this circuit to oscillate, the feedback must be positive feedback with a
magnitude of 1 and a feedback phase of zero degrees:
Y(jω)
=1 (8)
X1(jω)
and
Y(jω)
Arg = 0° . (9)
X1(jω)
The criteria given in Equations (8) and (9) are known as the Barkhausen criteria.
Expanding Equation (6) gives
Since Equation (8) is real and contains no imaginary terms, to satisfy this criteria
Equation (10) must also be real. This occurs when
[1 - 3(ωRC)2] = 0 . (11)
1
ω= = ωo . (12)
3RC
Before Equation (14) can be solved, another look at the Barkhausen criteria is
needed. The Barkhausen criteria state that a magnitude of 1 and 0° of phase are
required for oscillation. This is another way of stating that
8- 4
Y(jωo) Y(jωo) Y(jωo)
=1→ = 1 and arg = 0° . (15)
X(jωo) X(jωo) X(jωo)
Substituting Equation (15) into Equation (14) and solving for R2 gives
R2 = 8 . R . (16)
Equation (16) defines the minimum value that R2 can be to obtain oscillation
based on ideal conditions. Equation (16) is for the ideal case assuming an ideal
op-amp. Typically, R2 is selected such that R2 set to be slightly greater than 8 ·
R to guarantee oscillation. R2 is usually implemented using a variable resistor
and is increased in value to the point where oscillation begins. Equations (12) and
(16) are the two design equations that are needed to design and build a phase shift
oscillator. Usually C is chosen and Equation (12) is used to find R. Then
Equation (16) is used to find the minimum value for R2.
Y(s) R2
X1(s) = R1 + 1 (17)
and X1 in terms of X as
8- 5
R
X1(s) RCs + 1 RCs
X(s) = R 1 + RCs = (RCs)2 + 3RCs +1 . (18)
RCs + 1 + Cs
X1 Y
A
Combining Equations (17) and (18) gives the transfer function of the loop
feedback as
Since Equation (20) must be real with no imaginary terms to satisfy Equations (8)
and (9), the Barkhausen criteria:
1 - (RCω)2 = 0 (21)
or
1
ω = RC = ωo , (22)
8- 6
where, ωo is the frequency of oscillation. Substituting ω =ωo into Equation (20)
gives
Y(ωo) 1 R2
= + 1 . (24)
X1(ωo) 3 R1
Since to satisfy the Barkhausen criteria, the phase of Equation must be 0° and the
magnitude is 1 or
1 R2
3 R1 + 1 = 1 . (23)
R2 = 2 . R1 . (25)
Equation (25) defines the minimum value that R2 can be to obtain oscillation
based on ideal conditions. Equation (22) is for the ideal case assuming an ideal
op-amp. Typically, R2 is selected such that R2 set to be slightly greater than 2 ·
R1 to guarantee oscillation. R2 is usually implemented using a variable resistor
and is increased in value to the point where oscillation begins. Equations (22) and
(25) are the two design equations that are needed to design and build a phase shift
oscillator. Usually C is chosen and Equation (22) is used to find R. R1 is chosen
and then Equation (25) is used to find the minimum value of R2.
R1
V+ = R1 + R2 Vout (26)
and
1
V- = RCs +1 Vout (27)
Resistors R1 and R2 form the positive feedback that is needed for a Schmitt
trigger. From laboratory experiment #7, for
R1
Vout = +Vcc when V- < +Vcc R1 + R2 . (28)
8- 7
R1
Vout = -Vcc when V- > -Vcc R1 + R2 . (29)
R1
Vout (+Vcc→ -Vcc) when V- > +Vcc R1 + R2 . (30)
and if Vout = -Vcc then by Equation (29) Vout switches to +Vcc when
R1
Vout (-Vcc→ +Vcc) when V- < -Vcc R1 + R2 . (31)
Equations (28) - (31) assume that Vout is a rail to rail op-amp with Vout(max) =
+Vcc and Vout(min) = -Vcc. If the maximum and minimum Vout is any other
values than +Vcc is replaced with Vout(max) and -Vcc is replaced with
Vout(min). If R1 = R2, then Equation (28) - (31) reduce to reduces to V+(s) = 1/2
Vout or +Vcc / 2 or -Vcc / 2.
Since the output of this circuit is a square wave, this looks like a step input to the
RC network that is connected from Vout to V- terminal of the op-amp and is
given by
where Vf is the final voltage the capacitor charges to and Vi is the initial voltage
on the capacitor at the time the step input occurred.
Assume R1 = R2 and the Vout = -Vcc and Vout just changes states to +Vcc, and
since Vout has been at -Vcc, the initial voltage on the capacitor will be -Vcc / 2
8- 8
(V+ = Vout / 2). At this point the capacitor starts charging to +Vcc and Equation
(32) becomes
The capacitor continues to charge to +Vcc until V- > V+ = +Vcc / 2. At this point
Vout switches states, going to -Vcc. Setting V-(t) = Vcc / 2 and solving for t
gives the total time T1 it takes the capacitor to charge to +Vcc / 2
At this point Vout switches back from +Vcc to - Vcc, the capacitor starts to
charge to -Vcc with an initial voltage on the capacitor of +Vcc / 2. Substituting
these values into Equation (32) gives
The capacitor continues to charge to -Vcc until V- < V+ = -Vcc / 2. At this point
Vout switches states, going to +Vcc again. Setting V-(t) = Vcc / 2 and solving for
t gives the total time T2 it takes the capacitor to charge to -Vcc / 2
Tp = T1 + T2 = RC . 2 . ln(3) . (35)
1 1 0.455
f = Tp = = . (36)
RC . 2 . ln(3) RC
R1
Vout = +Vcc when Vx > -Vcc R2 . (37)
and
8- 9
R1
Vout = -Vcc when Vx < +Vcc R2 . (38)
R1
Vout (+Vcc→ -Vcc) when Vx < -Vcc R2 . (39)
and if Vout = -Vcc then by Equation (38) Vout switches to +Vcc when
R1
Vout (-Vcc→ +Vcc) when Vx > +Vcc R2 . (40)
V+
Vout
+Vcc
V-
V+
+Vcc / 2
V-
V+
V-
-Vcc / 2
T1 T2
-Vcc
0 Time
t t
-1 -1
Vx(t) = RC ⌠
⌡ V1(τ) d τ + Vx(0 - )= ⌠
RC ⌡Vout(τ) d τ + Vx(0 )
- , (41)
0 0
where Vx(0-) is the initial voltage across the capacitor. Vout simply switches
between +Vcc and -Vcc. When Vout is switching from -Vcc to +Vcc this can be
modeled as a unit step with an amplitude of v1(t) = +Vcc. Substituting this value
into Equation (41) gives
8-10
t
-1 -1
Vx(t) = RC ⌠
⌡ +Vcc d τ = RC (+Vcc) . t + Vx(0-) . (42)
0
If R2 = 2 . R1, then Vout switches from -Vcc to +Vcc when Vx = +Vcc / 2 and
Vout switches from +Vcc to -Vcc when Vx = -Vcc / 2. For the case when Vout
switches from -Vcc to +Vcc, the initial voltage across the capacitor Vx(0-) =
+Vcc / 2. Substituting this value into Equation (42) gives
-1 +Vcc
Vx(t) = RC (+Vcc) . t + 2 . (43)
The Vx(t) now decreases until it reaches a value of -Vcc / 2 at which point Vout
switches to +Vcc. Setting Vout(t) = -Vcc / 2 in Equation (43) and solving for t
gives the total time, T2, for Vout = -Vcc
T2 = RC . (44)
V1
Vx
Using Equation (41) and substituting V1(t) = -Vcc and with the initial voltage
across the capacitor Vx(0-) = -Vcc / 2 gives
-1 -Vcc
Vx(t) = RC (-Vcc) . t + 2 (45)
Equation (45) describes the case when Vout = +Vcc. At the point Vout switches
from +Vcc back to -Vcc, Vx = +Vcc / 2. Substituting this value into Equation
(45) and solving for T gives the total time T1 with Vout = +Vcc:
T1 = RC . (46)
8-11
The total period of oscillation is then defined as
Tp = RC + RC = 2 . RC . (47)
1 1
f = Tp = . (44)
2 . RC
Figure 7 gives the signal waveforms for Vout and Vx. Also shown in Figure 6 are
T1 and T2.
+Vcc
Vout
+Vcc / 2
Vx
Vx
Vout
-Vcc / 2
T1 T2
-Vcc
Time
Figure 8: The Triangle-Square wave waveforms.
Procedure:
General Setup:
1. Record the model and serial number of the oscilloscope, power supply,
multimeter and function generator used in laboratory experiment.
2. When measuring any values make sure to measure all inputs as well as the
output of the circuit. Do not rely on the values indicated on the instruments.
Always measure all signal values.
3. Before turning any power on double check the wiring to make sure that it is
correct.
4. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
5. Use all measured values to determine experimental results such as gain and
current.
6. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
8-12
7. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
8-13
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
1. The equipment used model and serial number.
2. Laboratory partners
3. Date and time data was taken.
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
8. All plots (oscilloscope waveforms) generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the
laboratory experiment.
12. Also include what you learned.
8-14
EXPERIMENT #9
Goals:
To introduce the concepts of using the versatile LM555 timer as a monostable pulse
generator, an astable oscillator and as a pulse width modulator. The internal block
diagram of the LM555 will also be presented.
References:
Microelectronics-Circuit Analysis and Design, D. A. Neamen, McGraw-Hill, 4th
Edition, 2007, ISBN: 978-0-07-252362-1.
The following link is to the Tektronix website for the user manual for the DPO
4034B oscilloscope:
http://www2.tek.com/cmswpt/madetails.lotr?ct=MA&cs=mur&ci=16272&lc=EN
Equipment:
Oscilloscope: DPO 4034B
Function Generator: AFG3022B
Triple Power supply
Capacitors available in the laboratory
Resistors available in the laboratory (use a minimum of 1k resistors)
Multimeter
LM555 (NE555) Universal Timer
Pre-laboratory:
Read this laboratory experiment carefully to become familiar with the background
and the procedural steps in this experiment. Carefully read each section and
become familiar with the equations for each circuit.
Using the simulation package of your choice in which you are the most familiar
with: Multisim, Workbench or LTSpice IV simulate the various oscillator and
waveform generator circuits.
a. Using LM555 with +Vcc set to +10 volts, design and simulate the astable
oscillator of Figure 3(a) with fo = 1000 Hz and with a duty cycle of 33%.
b. Record Vout, and the Threshold Pin 6 simulated waveforms. Compare these two
waveforms to the waveforms given in Figure 4. How are they the same and how
are they different?
c. What is the frequency and duty cycle for this circuit.
d. Add a 1N5818 diode across Rb as shown in Figure 5.
e. Record Vout and the Threshold Pin 6 simulated waveforms.
9- 1
f. What is the measured frequency and duty cycle for this circuit?
g. Using LM555 with +Vcc set to +10 volts design and simulate the monostable
oscillator of Figure 6 with a pulse width of 0.5 millisecond. For V3, use a square
wave with a 50% duty cycle that goes from 0 to +Vcc / 2 with a frequency of 200
Hz.
h. Record Vout, V3, and the Trigger Pin 2 simulated waveforms. How does Vout
and Trigger Pin 2 of Step g compare to the plot given in Figure 8?
i. Using LM555 with +Vcc set to +10 volts and -Vcc set to -10 volts design and
simulate the pulse width modulator of Figure 9 with a pulse width of 0.2
milliseconds. This is the same circuit as the monostable circuit but with the
addition of a unity gain buffer and an additional signal source Vg.
j. Set V3 to a 0 to +Vcc / 2 square wave with a 50% duty cycle and a frequency of
2000 Hz.
k. Set Vg = 6.67 volts DC and measure Tp from the simulated waveform for Vout
and compare this result to what is expected from Equation (16).
l. Set Vg to a sine wave with a peak value of 3 volts and an offset of 4 volts so that
Vg varies in a sinusoidal manner from 1 volt to 7 volts.
m. Measure Vout and Vg simulated waveforms. Compare these results to that given
in Figure 10.
Discussion:
The LM555 / NE555 timer is a versatile integrated circuit that can be configured
as an oscillator, a pulse width modulator and a single, variable width, pulse
generator known as an astable oscillator or one shot. Most datasheets give many
other application of this device. Figure 1 is the pin-out for the LM555 timer and
Figure 2 gives the internal block diagram. The LM555 contains two voltage
comparators, one set-reset (RS, also SR) flip-flop (also latch or register), one
inverter and one open collector NPN transistor. The voltage divider composed of
R1, R2 and R3 set the voltage at the V- input of comparator C2 (Pin 5) to 2/3
+Vcc and the V+ input of comparator C1 to 1/3 +Vcc. The transistor Q1 (Pin 7)
is typically used as a method of discharging any timing capacitors used in any
timing circuit configurations.
9- 2
The set-reset flip-flop (RS-FF) is placed in a set or reset condition depending on
the R and S inputs. Table 1 gives the output Q of the RS-FF as a function of R
and S. When R = 0, S = 0, the RS-FF is in a hold state and Q does not change.
When R = 1 and S = 0, the RS-FF is in a reset state and Q goes to 0 and when R =
0, S = 1, the RS-FF is in a set state and Q = 1. The condition for R = 1, S = 1, is
not allowed. There is also the ability to externally reset the RS-FF using the
RESET NOT pin (Pin 4).
Figure 3(a) shows the LM555 timer configured as an astable oscillator (the output
indefinitely changes states between Vcc and 0). Resistors Ra, Rb, and capacitor C
form the timing network that determines the frequency of oscillation and the duty
cycle of the square wave output. Figure 3(b) gives the same astable oscillator
circuit showing also the internal functional block diagram for the LM555 timer.
Capacitor CX in Figure 3(a) is used as a bypass filter for the reference voltages
going to the two comparators C1 and C2. The capacitor is used to filter any noise
that may be present on +Vcc to maintain a constant reference voltage on V+ of C1
and V- on C2.
9- 3
(a)
CX
(b)
Figure 3: (a) The external circuit diagram of the LM555 timer configured
as an astable oscillator and (b) the same circuit showing the
internal functional block diagram of the LM555 timer.
9- 4
Assuming initially Q = 1, the transistor Q1 is off, and the initial voltage across the
capacitor is just slightly greater than 1/3 +Vcc. Since the Trigger input (pin 2)
and Threshold (pin 6) are tied together, V+ < V- of C2 and V+ < V- of C1, the
output of both C1 and C2 are 0. The RS-FF is in a hold condition maintaining Q
= 1. The capacitor C starts to charge toward +Vcc through Ra and Rb. Equation
(32) from laboratory experiment 8 gives the voltage across the capacitor as
where Vf is the final voltage and Vi is the initial voltage across the capacitor.
Substituting Ra + Rb for R, Vi = 1/3 +Vcc, and Vf = +Vcc gives
Figure 4 shows the voltage across the capacitor C and Vout as a function on time.
The capacitor initially has a voltage 1/3 +Vcc and starts charging toward +Vcc.
The capacitor continues to charge to +Vcc until the voltage across the capacitor
reaches 2/3 +Vcc. At this point, V+ > V- of C2 and V+ < V- of C1 yielding the
output of C2 = 1 and the output of C1 = 0. This sets the RS-FF to a reset
condition changing Q = 0. The output Vout = 0, and Qnot of U1 is now 1, turning
on the transistor Q1. This starts discharging the capacitor C toward 0. When the
voltage across the capacitor goes below 2/3 +Vcc, V < V- of C2 and V+ > V- of
C1, yielding the output C2 = 0 and the output of C1 = +0. The RS-FF is now in
hold condition leaving Q = 0 of the RS-FF and the transistor Q1 on continuing to
discharge the capacitor.
+Vcc
2/3 +Vcc
1/3 +Vcc
0 T1 T2 time
Figure 4: Vout and the voltage across the capacitor C as a function of time.
9- 5
The time T1 it takes to charge to 2/3 +Vcc is found by substituting +2/3 +Vcc for
Vpin_2(t) into Equation (2) and solving for t
During the charge cycle the capacitor C discharges through Rb and the transistor
Q1. The voltage across the capacitor is then defined as
The total time period of oscillation T2 is found by adding Equations (3) and (5)
together
1 1.44
f= = . (7)
ln(2) (Ra + 2 Rb) C (Ra + 2 . Rb) . C
. . .
The duty cycle which is defined as the time the output is low to the total time
period is
T2 - T1 Rb .100%
D% = T2 = . (8)
Ra + 2 . Rb
A closer investigation of Equation (8) yields that for a 50% duty cycle, Ra would
have to be zero which is not possible for the astable oscillator circuit
configuration of Figures 3(a) and (b). To build an astable oscillator with a 50%
duty cycle requires the addition of a diode, as shown in Figure 5. During charging
of capacitor C, the diode is on. Essentially Rb is in parallel with the on-state
(forward-biased) resistance of the diode, which is typically much smaller than the
resistance Rb. For the most part, this parallel combination can be considered as
zero ohms. The best diode to use in this configuration is a Schottky diode, as this
9- 6
diode has a much smaller turn-on voltage than a regular diode. Since the parallel
combination of Rb and the forward-biased diode (on) resistance is approximately
zero ohms, the capacitor only charges through resistor Ra yielding a charge time
for T1 of
T1 = ln(2) . Ra . C . (9)
When the capacitor is discharging, the diode is on and the capacitor discharges
through Rb as described by equation (4) yielding a discharge time of
T2 - T1 = ln(2) . Rb . C . (10)
The total period of oscillation is then given by adding Equations (9) and (10)
together
1 1.44
f= = . (12)
ln(2) . (Ra + Rb) . C (Ra + Rb) . C
T2 - T1 Rb .
D% = T2 = Ra + Rb 100% (13)
Figure 5: An astable oscillator using the LM555 timer with a 50% duty cycle.
9- 7
The LM555 timer can also be configured as a monostable oscillator generating a
single pulse of a given pulse width when triggered. Figure 6 shows the LM555
timer in a monostable configuration. Ra and C determine the pulse width. R1,
R2, C1, D1, and D2 form an input network to trigger the LM555 timer. V3 is
assumed to be a pulse input in the range of 0 to +Vcc / 2. Diodes D1 and D2 are
used to protect pin 2 of the LM555 timer. D1 turns on when the trigger input
exceeds +Vcc + Vd (the forward diode voltage) and D2 turns on when the trigger
input goes below -Vd. These two diodes guarantee that the trigger input is
bounded between -Vd to +Vcc + Vd protecting this input pin. Resistors R1, R2
and the capacitor C2 form a highpass filter used to take the derivative of the input
V3. The trigger input which has the steady input of +Vcc / 2 uses the edges of V3
to trigger a single pulse output from the LM555 timer. Figure 7 shows the trigger
input and the V3 supply. Note how the input network has taken the derivative of
V3. The trigger input (Pin 2) is nothing more the derivative of V3 superimposed
on a +Vcc /2 offset due to the steady value of the trigger input of +Vcc / 2.
+Vcc
Pin 2 Trig
+Vcc / 2
V3
0 Time
Figure 7: The trigger input to the monostable oscillator circuit given in Figure 6.
9- 8
A negative going edge on the trigger input starts a trigger event that generates a
single pulse. At this point in time, the voltage on the capacitor C is 0 volts. The
trigger event on the trigger input sets the RS-FF to a set condition (C2 = 0 , and
C1 = 1 from Figure 2) and starts capacitor C charging through Ra. As the trigger
input returns to its steady state value of +Vcc / 2, V+ < V- of C1 and V+ < V- of
C2 (see Figure 2) yielding the output C1 = 0 and the output of C2 = 0. This sets
the RS-FF to a hold condition leaving RS-FF output Q = 1 (see Figure 2). With Q
= 1, Qnot = 0 and the transistor Q1 is still off and the capacitor continues to
charge through Ra toward +Vcc. This capacitor continues to charge until it
reaches a voltage of 2/3 +Vcc. At this point, V+ > V- of C1 and V+ < V- of C2
yielding the output C1 = 1 and the output of C2 = 0, setting the RS-FF to a reset
condition. This turns on Q1 discharging the capacitor C to 0. Starting with
Equation (1) with Vf = +Vcc and the initial voltage across the capacitor C, Vi = 0
gives
The capacitor C charges towards +Vcc until it reaches the value 2/3 +Vcc. At this
point, V+ < V- of C1 and V+ > V- of C2 yielding the output C1 = 0 and the
output of C2 = 1. This sets the RS-FF to a reset condition leaving Q = 0. With Q
= 0, Qnot = 1, transistor Q1 turns on and the capacitor discharges to zero where
the capacitor voltage stays at this value until another negative-going trigger pulse
occurs on the trigger input.
The total time Tp it takes the capacitor to reach 2/3 +Vcc is found by substituting
this value into Equation (14) and solving for t
Tp = ln(3) . Ra . C (15)
Figure 8 shows Vout, the voltage across the capacitor C, Vcapacitor, and the
trigger input as a function of time.
Since the pulse width of the monostable oscillator circuit depends on the charging
to the voltage of 2/3 +Vcc, changing this voltage value changes the time it takes
for condition of V+ > V- of C2 and V+ < V- of C1. At this point, the outputs C1
= 0 and C2 = 1 setting the RS-FF to reset state on the transistor Q1 and
discharging the capacitor C to zero. Removing the 0.01 µf capacitor applied to
the CV input and applying a varying voltage as shown in Figure 9 will vary the
pulse width of the pulse output. The op-amp circuit is nothing more than a unity
gain buffer isolating the voltage source Vg from reference voltage CV input of the
LM555 timer. Letting Vg be the voltage on the CV input, the total time Tp to
reach this voltage on the capacitor is
Vg
Tp = - Ra . C . ln1 - +Vcc (16)
9- 9
Figure 9 is nothing more than a pulse width modulator (PWM) with the pulse
width proportional to the input voltage Vg. Figure 10 gives an example of Vout
as a function Vg. For this example, +Vcc = 10 volts and Vg is a sine wave with a
peak value of 3 volts and an offset of 4 volts so that Vg varies in a sinusoidal
manner from 1 volt to 7 volts. Figure 10 shows how the pulse width increases as
the value of Vg increases.
+Vcc
Vout
Trigger - Pin 2
1/2 +Vcc
Vcapacitor
Vout
Tp
0
0 Time
9-10
Vout
+Vcc
Vg
0 Time
Figure 10: An example of using the LM555 timer as a pulse width modulator.
Procedure:
General Setup:
1. Record the model and serial number of the scope, power supply, multimeter
and function generator used in laboratory experiment.
2. When measuring any values make sure to measure all inputs as well as the
output of the circuit. Do not rely on the values indicated on the instruments.
Always measure all signal values.
3. Before turning any power on double check the wiring to make sure that it is
correct.
4. Measure all resistors that are used in the amplifier circuits using the multimeter
and record these values.
5. Use all measured values to determine experimental results such as gain and
current.
6. Comparing data means to calculate the percent difference between two values.
For example, theoretical values versus measured values.
7. Comparing data graphically means to plot the data on the same plot to see how
the data overlaps.
9-11
requirements for the frequency and the duty cycle. Discuss the differences in
the laboratory report.
5. What is the value on the threshold input (pin 6) when Vout changes states?
6. Setting the oscilloscope to AC coupling, and increasing the vertical sensitivity
of the oscilloscope measure and record the voltage at +Vcc Pin 8. Discuss
what you observe in the laboratory report.
7. Now connect at least a 10µf capacitor between +Vcc Pin 8 and ground and
repeat Step 6. Discuss what you observe in the laboratory report. Leave this
capacitor connected between +Vcc and ground for the rest of the laboratory
experiment.
8. Add a 1N4148 diode across Rb as shown in Figure 5.
9. Measure and record with an oscilloscope Vout, and the threshold input (pin 6).
10. What is the measured frequency and duty cycle for this circuit.
11. How did adding the diode change the frequency and duty cycle? How does the
measured frequency compare to the values calculated from Equations (12) and
(13)?
12. Using an LM555 timer with +Vcc set to +10 volts design and build the
monostable oscillator of Figure 6 with fo = 1000 Hz and with a pulse width of
0.5 millisecond. For V3, use a square wave with a 50% duty cycle that goes
from 0 to +Vcc / 2 with a frequency of 200 Hz.
13. Measure and record with an oscilloscope Vout, V3 and the trigger input (pin
2).
14. How does Vout and the trigger input of Step 14 compare to the plot given in
Figure 8?
15. Measure the actual pulse width of Vout and compare this result to Equation
(15).
16. Using an LM555 timer with +Vcc set to +10 volts and -Vcc set to -10 volts
design and build the pulse width modulator of Figure 9 with a pulse width of
0.2 milliseconds. This is the same circuit as the monostable circuit but with the
addition of a 2X non-inverting amplifier and an additional signal source Vg.
17. Set V3 to 0 to +Vcc / 2, square wave with a 50% duty cycle and a frequency of
2000 Hz.
18. Set Vg = 6.67 volts DC and measure Tp. Compare this result to what is
expected from Equation (16).
19. Varying Vg from 0.5 to 4 volts (0.5, 1.5, 3.5 and 4), measure Tp and compare
these values to the results expected from Equation (16).
20. Set Vg to a sine wave with a peak value of 1.5 volts and an offset of 2 volts so
that Vg varies in a sinusoidal manner from 0.5 volt to 3.5 volts (Note: On the
AFG3022 Function Generator, make sure that the Frequency CH1= CH2 is
“Off”).
21. Measure and record with an oscilloscope Vout and Vg. Compare these results
to that given in Figure 9.
Report: Please follow the procedures in this laboratory manual for writing the report for this
experiment. Include in your report:
1. The equipment used model and serial number.
9-12
2. Laboratory partners
3. Date and time data was taken.
4. Your laboratory report should include the goal of the laboratory experiment.
5. The procedures.
6. The pre-laboratory results.
7. All calculations for each step.
8. All plots (oscilloscope waveforms) generated for each step.
9. All comparisons calculations.
10. For each data collection step in the procedure, there should be either data collected, a
calculation performed, a waveform recorded. Please include these in the report.
11. Short summary discussing what is observed for each of the steps given in the
laboratory experiment.
12. Also include what you learned.
9-13
APPENDICES
A-1
Appendix A
A-2
Appendix A
A-3
Appendix A
A-4