Sample Report
Sample Report
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
𝑓𝑜𝑠𝑐 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.
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.
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%.
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.
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
𝑝𝑒𝑟𝑖𝑜𝑑
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.
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
𝑝𝑒𝑟𝑖𝑜𝑑
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
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.
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
𝑝𝑒𝑟𝑖𝑜𝑑
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.
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
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
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 .
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