0% found this document useful (0 votes)
84 views18 pages

Sample Report

This document describes an experiment to generate triangle and square waves using op-amps. The objective is to build circuits using dual op-amps to generate the waves and measure their properties. The first part involves building the circuit in Figure 1 and measuring the triangle and square waves. The second part builds the circuit in Figure 2 to generate a sine wave. Results are presented for the measurements taken of the triangle and square waves generated in the first part of the experiment.

Uploaded by

Wilbur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views18 pages

Sample Report

This document describes an experiment to generate triangle and square waves using op-amps. The objective is to build circuits using dual op-amps to generate the waves and measure their properties. The first part involves building the circuit in Figure 1 and measuring the triangle and square waves. The second part builds the circuit in Figure 2 to generate a sine wave. Results are presented for the measurements taken of the triangle and square waves generated in the first part of the experiment.

Uploaded by

Wilbur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Name

Lab Partner
ENEE
3518
Lab #8 – Triangle and Square Wave Generators
March 30, 2020
I. Objective

The objective of the first part of this experiment is to build and use a dual op-amp to
generate a triangle wave and a square wave. The objective of the second part of this experiment
is to build and use an op-amp based phase shift oscillator that will generate a sinewave.

II. Equipment

Multisim was used to create the circuits for this lab, consisting of:

1. Oscilloscope
2. Resistors
3. Potentiometer
4. Capacitors
5. Op-amps

III. Theoretical Background

An operational amplifier, or op-amp, is an electronic unit that behaves like a voltage-


controlled voltage source. It can also be used in making a voltage- or current-controlled current
source. An op-amp can sum signals, amplify a signal, integrate it, or differentiate it. The ability
of the op-amp to perform these mathematical operations is the reason it is called an operational
amplifier. The op-amp consists of a complex arrangement of resistors, transistors, capacitors,
and diodes. An ideal op-amp is an amplifier with infinite open-loop gain, infinite input
resistance, and zero output resistance. We often assume ideal op-amps to facilitate the
understanding of op-amp circuits. Most modern amplifiers have such large gains and input
impedances that the approximate analysis using an ideal op amp is sufficient. An ideal op-amp
has zero current into its two input terminals, and the voltage between the two input terminals is
equal to zero.
Shown in Fig. 1 is a simple triangle wave and square wave generator using common 1458
dual op-amps that can be used from very low frequencies to about 10 KHz. The time interval for
one half cycle is about RC, and the outputs will supply about 10 milliamps of current. The
triangle’s amplitude can be altered by adjusting the 47K resistor, and waveform offset can be
removed by connecting a capacitor in series with the output.
The subsystem on the left in Fig. 1 is an integrator, and the subsystem on the right
is a comparator. The oscillation frequency, 𝑓𝑜𝑠𝑐 is given, approximately, by (1).

𝑓𝑜𝑠𝑐 1
= 2.2𝑅𝐶 (1)
Fig. 1. Triangle and Square Wave Oscillator Using Op-amps for Part 1

The op-amp based phase shift oscillator is much more stable than the single transistor version
because one may set the gain to be higher than needed in order to sustain oscillations; also, the
output is taken from the RC network which filters out most of the harmonic distortion. The
sinewave output from the RC network is buffered and the amplitude restored by the second
(top) op-amp, which has a gain of around 28 dB. For the values shown on Fig. 2, the frequency
is around 600 Hz and can be reduced by proportionally increasing the network resistors. The
7.5K value at pin 2 of the op-amp controls the oscillator circuit gain and is selected so that the
output at pin 1 is slightly clipped at the positive and negative peaks. The sinewave output at pin
7 is about 5 volts p-p. Using a 12 V supply for Vcc should appear very clean on a scope.

Fig. 2. Phase-shift Oscillator for Part II


The formula for frequency, f, is used in this lab, calculated from the period obtained from
the oscilloscope.
1
𝑓=
𝑝𝑒𝑟𝑖𝑜𝑑 (2)

The percent error will be calculated for certain data in this experiment. The formula is
below, in which m is the measured value and t is the theoretical value.
𝑚−𝑡
𝑒 = 100 | |% (3)
𝑡

IV. Methodology

Pre-lab:

Before coming to the lab, design the circuit of Fig. 1 to achieve a frequency of 1
KHz; i.e., find convenient, available, R and C values to yield the desired frequency.

Procedure for Part I:

1. Connect the circuit shown in Fig. 1 with the R and C values you found in your
design (pre-lab).
2. Use the oscilloscope to see the waveforms and take measurements (period,
frequency, amplitude, offset).
3. Modify the circuit to decrease the amplitude of the triangular waveform by about 25%.
What R value yielded this decrease?
4. Now repeat to increase your original amplitude by 25%.

Procedure for Part II:

1. Connect the circuit in Fig. 2 as shown and take all appropriate measurements.
2. Replace the 7.5 KΩ resistors by 5KΩ, re-take your measurements and compare to those
of step 1.

V. Results

Below are my calculations for the pre-lab of this experiment. Using the desired 𝑓𝑜𝑠𝑐 of 1
kHz and a capacitance of 0.47 µF, I calculate the resistance to be 967 Ω using equation (1).
These values of R and C were used when I built my circuit.

𝑓𝑜𝑠𝑐 1
1 → 1 𝑘𝐻𝑧 = (4)
= 2.2𝑅𝐶 2.2𝑅(0.47 𝜇𝐹)

1
𝑅=
2.2(1 𝑘𝐻𝑧)(0.47 𝜇𝐹) (5)

𝑅 = 967 Ω (6)
Fig. 3 shows the circuit diagram created in Multisim. The values of R1 and C1 are
the same values calculated in the pre-lab.

Fig. 3. Circuit Diagram of Triangle and Square Wave Oscillator for Part I

For Part I of the lab, I first used the oscilloscope to measure the triangle wave at the
upper output terminal. Table 1 contains the measurements for the period, frequency, amplitude,
and offset. The period and amplitude were taken with the oscilloscope set to AC. The peak
voltage of the wave when set to DC was 3.692 V, which created an offset of 2.509 V. Figures 4
and 5 show the triangle wave both with and without DC offset as they appeared on the
oscilloscope. Figure 6 shows a plotted graph of the wave.

Triangle Wave Measurements


Period Frequency Amplitude (Peak Voltage) Offset
852.884 µs 1172.4924 Hz 1.183 V 2.509 V
Table. 1. Triangle Wave Measurements

The frequency of 1172.4924 Hz was calculated using the period obtained from the
oscilloscope and (2). It is interesting to note that the resistor and capacitor values determined in
the prelab, 967 Ω and 0.47 µF, were used because they would create a frequency of 1 kHz. This
is consistent with the calculated frequency, 1172.4924 Hz. This is a 17.2% error.
1
𝑓=
= 852.884 𝜇𝑠 = 1172.4924 𝐻𝑧 (7)
1
𝑝𝑒𝑟𝑖𝑜𝑑

𝑚−𝑡 1172.4924 𝐻𝑧−1000 𝐻𝑧


𝑒 = 100 | | % = 100 | | % = 17.2% (8)
𝑡 1000 𝐻𝑧
Fig. 4. Triangle Wave without DC Offset

Fig. 5. Triangle Wave with DC offset


Fig. 6. Voltage/Time Graph of Triangle Wave

Then, I used the oscilloscope to measure the square wave at the bottom output terminal.
Table 2 contains the measurements for the period, frequency, amplitude, and offset. The period,
frequency, and amplitude were taken with the oscilloscope set to AC. The peak voltage of the
wave when set to DC was 5.037 V, which created an offset of 2.237 V. Figures 7 and 8 show the
square wave both with and without DC offset as they appeared on the oscilloscope. Figure 9
shows a plotted graph of the wave.

Square Wave Measurements


Period Frequency Amplitude (Peak Voltage) Offset
866.873 µs 1153.6913 Hz 2.800 V 2.237 V
Table. 2. Square Wave Measurements

The frequency of 1153.6913 Hz was calculated using the period obtained from the
oscilloscope and (2). Again, note that the resistor and capacitor values determined in the prelab,
967 Ω and 0.47 µF, were used because they would create a frequency of 1 kHz. This is
consistent with the calculated frequency, 1153.6913 Hz. This is a 15.4% error.
1
𝑓=
= 852.884 𝜇𝑠 = 1153.6913 𝐻𝑧 (9)
1
𝑝𝑒𝑟𝑖𝑜𝑑

𝑚−𝑡 1153.6913 𝐻𝑧−1000 𝐻𝑧


𝑒 = 100 | | % = 100 | | % = 15.4% (10)
𝑡 1000 𝐻𝑧
Fig. 7. Square Wave without DC Offset

Fig. 8. Square Wave with DC Offset


\
Fig. 9. Voltage/Time Graph of Square Wave

When I modified the circuit to decrease the amplitude of the triangular waveform by
about 25%, I found that an R value 35.25 kΩ yielded this decrease. With this resistor value, the
amplitude decreased to approximately .88901 V, which is approximately 25% less than the
original amplitude of 1.183 V. I chose this value to test because 35.25 kΩ is 25% less than the
original resistor value, 47 kΩ.
When I modified the circuit to increase the amplitude of the triangular waveform by
about 25%, I found that an R value 58.75 kΩ yielded this increase. With this resistor value, the
amplitude increased to approximately 1.4825 V, which is approximately 25% greater than the
original amplitude of 1.183 V. I chose this value to test because 58.75 kΩ is 25% greater than
the original resistor value, 47 kΩ.
Table 3 summarizes this data. Figures 10 shows the triangle wave with a 25% decrease
in amplitude, and Figure 11 shows the triangle wave with a 25% increase in amplitude. Below
are the calculations used to determine the new resistor values. Equations (11) and (12) show the
theoretical values of the voltage amplitudes at 25% less and 25% greater, respectively.
Equations (13) and (14) show the resistor values at 25% less and 25% greater. Equations (15)
and (16) show the percent errors for the calculated and measured voltage amplitudes. The
percent errors are very minimal, at 0.20% and 0.25%.

25% 25%
Original
Decrease Increase
Resistor Value 47 kΩ 35.25 kΩ 58.75 kΩ
Amplitude 1.183 V .88901 V 1.4825 V
Table. 3. Resistor and Amplitude Change

1.183 − (1.183 ∙ 0.25) = 0.88725 𝑉 (11)


1.183 + (1.183 ∙ 0.25) = 1.47875 𝑉 (12)

47 − (47 ∙ 0.25) = 35.25 Ω (13)

47 + (47 ∙ 0.25) = 58.75 Ω (14)


𝑚−𝑡 .88901 𝑉−.88725 𝑉
𝑒 = 100 | | % = 100 | | % = 0.20% (15)
𝑡 .88725 𝑉

𝑚−𝑡 1.4825 𝑉−1.47875 𝑉


𝑒 = 100 | | % = 100 | | % = 0.25% (16)
𝑡 1.47875 𝑉

Fig. 10. Triangle Wave with 25% Decrease in Amplitude


Fig. 11. Triangle Wave with 25% Increase in Amplitude

For Part II of the lab, I first used the oscilloscope to measure the sine wave at the output
terminal of the phase shift oscillator created in Multisim. Figure 12 shows the circuit diagram,
and Figure 13 shows the sine wave. Figure 14 shows the graph of the sine wave. The period,
frequency, amplitude, and offset measurements are shown in Table 4.

Sine Wave Measurements


Period Frequency Amplitude (Peak Voltage) Offset
1.440 ms 694.444 Hz 676.375 mV 0V
Table. 4. Sine Wave Measurements with 7.5 kΩ Resistors

The frequency of 694.444 Hz was calculated using the period obtained from the
oscilloscope and (2). As stated in the lab handout, for the values in this circuit, the frequency
should be around 600 Hz. When I compare the theoretical frequency to the measured one, the
percent error is 15.4%.
1
𝑓=
= 1.440 𝑚𝑠 = 694.444 𝐻𝑧 (17)
1
𝑝𝑒𝑟𝑖𝑜𝑑

𝑚−𝑡 694.444 𝐻𝑧−600 𝐻𝑧


𝑒 = 100 | | % = 100 | | % = 15.7% (18)
𝑡 600 𝐻𝑧
Fig. 12. Circuit Diagram of Phase Shift Oscillator with 7.5 kΩ Resistors

Fig. 13. Oscilloscope View of Sine Wave with 7.5 kΩ Resistors


Fig. 14. Voltage/Time Graph of Sine Wave

For part B, I replaced the 7.5 kΩ resistors in the circuit with 5 kΩ resistors. The circuit
diagram is shown in Figure 15, and the wave as seen on the oscilloscope and graph are shown in
Figures 16 and 17.

Fig. 15. Circuit Diagram of Phase Shift Oscillator with 5 kΩ Resistors


Fig. 16. Oscilloscope View of Wave with 5kΩ Resistors

Fig. 17. Voltage/Time Graph of Wave with 5kΩ Resistors


When I switched the 7.5 kΩ resistors to 5 kΩ resistors, the wave oscillates for about
8.018 ms, gaining a max amplitude of 727.829 mV before spiking to 6.359 V and staying at that
constant output. The period while oscillating was about 880.00 µs, so the frequency was
approximately 1136.3636 Hz. The frequency was calculated using the period obtained from the
oscilloscope and (2).

Sine Wave Measurements


Period Frequency Max Amplitude Max Offset Offset
(Peak Voltage Amplitude (During (After
During (Overall Oscillation) Oscillation)
Oscillation) Peak Voltage)
880.000 µs 1136.3636 Hz 727.829 mV 6.359 V 0V 6.359 V
Table. 5. Sine Wave Measurements with 5 kΩ Resistors
1
𝑓=
𝑝𝑒𝑟𝑖𝑜𝑑
1
= 880.000 = 1136.3636 𝐻𝑧 (19)
µ𝑠

𝑚−𝑡 694.444 𝐻𝑧−600 𝐻𝑧


𝑒 = 100 | | % = 100 | | % = 15.7% (20)
𝑡 600 𝐻𝑧

As stated in the lab handout, the frequency can be reduced by proportionally increasing
the network resistors. As the resistor values decrease, the frequency should increase
proportionally, which means they are inversely proportional. The new resistor value of 5 kΩ is
66.66% of 7.5 kΩ, and 694.444 Hz is 61.11% of 1136.3636 Hz. There is a minimal 8% error
between these calculations, which shows that the resistor values and frequency are inversely
proportional.
𝑚−𝑡 61.11%−66.66%
𝑒 = 100 | | % = 100 | | % = 8.33% (21)
𝑡 66.66%

VI. Conclusions

The first part of this lab showed demonstrated how to use a dual op-amp to generate a
triangle wave and a square wave. The sine wave generated had a period of 852.884 µs, an
amplitude of 1.183 V, and a DC offset of 2.509 V. The frequency was 1172.4924 Hz, which was
17.2% error from the theoretical 1 kΩ. The square wave generated had a period of 866.873 µs,
an amplitude of 2.800 V, and a DC offset of 2.237 V. The frequency was 1153.6913 Hz, which
was 15.4% error from the theoretical 1 kΩ. When the 47 kΩ was decreased by 25% to 35.25
kΩ, the amplitude also decreased by 25% to .88901 V with .20% error. When the 47 kΩ was
increased by 25% to 58.75 kΩ, the amplitude also increased by 25% to 1.4825 V with .25%
error. These results show that op-amp wave generator functioned as expected and confirm how
changing the 47 kΩ resistor alters the amplitude of the wave.
The second part of this lab also demonstrated how to build and use an op-amp based
phase shift oscillator to generate a sinewave. The sine wave generated had a period of 1.440 ms,
an amplitude of 676.375 mV, and no DC offset. The frequency was 694.444 Hz, which was
15.7% error from the theoretical 600 Hz. When I replaced the 7.5 kΩ resistors with 5 kΩ
resistors, the frequency changed to 1136.3636 Hz. These measurements confirmed an inverse
relation between the resistor values and frequency. However, with the 7.5 kΩ resistors, a
consistent sine wave was produced. When I switched the resistors to 5 kΩ, the wave oscillated
for about 8.018 ms before spiking to 6.359 V and staying at that constant output. The sine wave
produced was not consistent like the first. This could be due to the decrease in the resistors or
due to human error, such as the circuit design. Overall, the experiments in this lab show how op-
amps can be used to generate and control various waveforms.

VII. References

Alexander, C. K., & Sadiku, M. N. O. (2013). Fundamentals of Electric Circuits (6th ed.). New
York, NY: McGraw-Hill Education.

VIII. Appendix

The appendix of this report includes the lab handout with the description of the
experiment, which is attached to the end of this report.
E EE 2511- EledricaJ Circ u.it Laboratory
Spring 2020 - Lab 8 (last lab before. final project) WITH
PRE-.LAB

Tria ngle- and Square-Wave Generators (Oscillators

Pr e-I, b
Before coming to the lab, de ign the circuit o Fig. I to achieve n frequency of I
KHz; i.e., find convenient, avai la ble , R and C values to yield the de ired
frnquenc ·. Tum in your work by 09:00 011 Wednesday and keepi a co py for
yourself to use while runnin th.e J ab . Se Hint under Part L

Part I :
hown in Fig. I is a simple triangle- and square wa e generator us ing comm.on I 58. duai op-
am.ps that can be llsed from ry Im freqllencies lo about IO K H.'.l. The tim in ter val
ror one half cycle is about RC Wl.d the o utputs will suppiy about 10 milliamp of cun:re nl.
The triat1gle s am plilllde can b alt r•e d by adju tin.g the 47K resistor, and
waveform oil's I can be removed b, y con n cling a capacitor in series\ ith !he
omput.

Rini : The subsystem on the left in ig.. I is an i nte grator and the subsy lemon the right
is a comparator. Tbe oscillation frequ n y, .., is giv,en, approximately, by I)

l
lase = 2.2RC

Vc:c

1 I!
S1,1m11 _».- Tr! n,;i • <wl
r'!dJ
- ,----,-- -- --, -
0
-
i
- - - -

Sciu ar e ou1

ig. I; Tri ngl and · sciHat r u ·in p- mp for rt I.

I) nn t th in:uil h wn • n i . E y/lJi the R and va u y u fi und in yo rd ·1 1 n


, pre-la ),

elb wav f rm nndtak ma urcm nt· { p ri , f: qu n y,

3) Mod if the circui t to dec11ea e the ampli tude of the triangu lar wave mm b about 25
%; wha t R a lue yielded trus de,cr e ase .

4) ow r peat to incn:ase you r original am.plitud by 5 % .


Part II

The op-amp based phase shi f\ oscillator is much more stable than the single transistor
version that yo u will likely study in ENEE 3540 and ENEE 3517 because one may set the
gain to be higher than needed in order to sustain oscillatio ns; also, the output is taken
from
the RC network which filters out most of the harmonic distortion. The sinewave output
from the RC network is buffered and the amplitude restored by the second (top) op-amp,
which has a gain of around 28 dB. For the values shown on Fig. 2, the frequency is around
600 Hz and can be reduced by proportionally increasing the network resistors). The 7.5K
value at pin 2 of the op-amp controls the oscillator circuit gain and is selected so that the
output at pin I is slig htly cl ipped at the positive and negative peaks. The sinewave output
al pin 7 is about 5 vo lts p-p using a 12 V supply for Vee should appear very clean on a
scope.

I) Connect the circuit of Fig. 2 as shown and take all appropriate measurements.

2) Replace the 7.5 Kfl resistors by 5Kn , re-take your measurements and compare to those
of I).

+6 - 15 Volts

'17K

_;;--.--+-I t /'.v
56K 10uF
510K
20K

7.!5K

I I
+
10uF , l uF ,luFI
T LMl'\ 58 T T

Fi.g2:Phase-shift osc illator for Part II.

You might also like