Documente Academic
Documente Profesional
Documente Cultură
Mikolaj Pal
L03
Masoud Sarabi
10 December 2019
1
Introduction
The most important aspect of any electronic circuit is the main input, which can come in
many forms, including sinusoidal, triangle, and square waves. For the most part this input was a
given with the usage of the function generator in previous labs. However, the actual internal
workings of this generator in generating these waves was not thoroughly investigated, until this
lab, where an operating function generator with frequency and amplitude alteration available was
constructed. During the first week, a relaxation oscillator was constructed that output both a
square wave and triangle wave. This was later modified by adding a potentiometer that allowed
the variation of the output frequency. The second week added a waveshaper and amplifier that
created the additional sine wave output. In both weeks, the outputs were viewed and measured
using the oscilloscope.
2
Part 1
Part A: Relaxation Oscillator
3
Table 2: Part A measurement log.
To regulate the square wave voltage output from the first operational amplifier, the two
Zener diodes D1 and D2 are connected series-opposing to the ground. These two diodes are used
as a voltage clamp, which in this case symmetrically limits the amplitude on both positive and
negative ends. If diode D1 were the only diode used, there would be no negative voltage
amplitude and the opposite would be true for solely having D2. The purpose of resistor R3 is to
reduce the output current and possible further oscillations in the voltage and current.
The Schmitt trigger has the switching thresholds of ±5 volts, which were close to or
exactly at the voltage values recorded above in Table 2. The purpose of the trigger was to
eliminate noise and generate clear outputs. Once either the upper or lower thresholds are
achieved from the input, the output will be either switched high or low. This clear switching in
between high and low creates the square wave that is later used in the inverting integrator to
create a clear and crisp triangle wave, as shown in Figure 2.
4
Part B: Adding Frequency Control
Shown above in Table 3 are the real oscillation frequency limits as measured in the
experiment at their respective potentiometer extremes of 0 Ω and 10 kΩ. These were subject to
real-world limitations such as imperfect component values, component wear, or imperfect
tuning. Because the resistor and potentiometer are in series, they can be considered as a single
resistor in series with capacitor C1. To find the theoretical frequency limits, the low and high
total resistances were equated into the capacitor impedance equation and were solved for the
frequency, as shown in Listing 1. The theoretical oscillation limits are 1.446 kHz and 15.915
kHz, of which the higher frequency is more than double than the measured value.
5
1
|𝑍𝐶 | =
2𝜋𝑓𝐶
1
10,000 = ≫ 𝑓ℎ𝑖𝑔ℎ = 15.915 𝑘𝐻𝑧
2𝜋𝑓𝐶1
1
100,000 + 10,000 = ≫ 𝑓𝑙𝑜𝑤 = 1.446 𝑘𝐻𝑧
2𝜋𝑓𝐶1
Listing 1: Frequency Calculations.
6
Figure 5: Waveforms at high extreme.
7
Part 2
Part A: Double Check Your Relaxation Oscillator
8
Part B: Waveshaper and Amplifier
9
Table 4: Waveshaper and amplifier BOM.
10
Figure 10: Waveshaper transfer characteristic.
Shown above in Figure 10 is the transfer characteristic for the waveshaper circuit. Vtri is
the triangle wave input while Vop3 is the output for the operational amplifier input for gate 3.
The transfer characteristic shows how much clipping there is of the original triangle wave in
order to form the required sinusoidal waveform, which was further amplified with the
operational amplifier circuit to its required ±5-volt amplitude level.
11
Part C: Output State with Amplitude Control
12
Figure 12: Sinusoidal output and Triangular input waveforms.
Shown above is the sinusoidal output Vout, which differs from the same waveform
shown in Figure 9 in Part B. Both are similar in their form and their operation frequency.
However, they differ in both of their positive and negative magnitudes, due to the addition of
NPN transistor Q1 and PNP transistor Q2. This reduction has come from the base-emitter and
collector-emitter voltages that have reduced the amplitudes closer to their ideal values. Crossover
distortion is the distortion caused by the switching in between the two transistors, which are
configured to be a Class B emitter-follower. This is visible above in Figure 12, as the small
notches in the middle of the output waveform that are caused due to the transistors not
combining both output halves correctly, caused by their configuration. Implementing a small
forward-biased base current will reduce this or implementing a feedback loop that will correct on
itself. An additional option is to modify the configuration into a Class AB power amplifier, with
the addition of two biasing diodes in series and in the same direction as each other, as shown in
Figure 13.
13
Figure 13: Ideal Class AB amplifier. Source:
https://commons.wikimedia.org/wiki/File:Electronic_Amplifier_Class_AB_Bipolar.svg
The maximum voltage swing calculated in Q2 of the prelab was 29.3 volts, since the DC
input voltages used to power the circuit were ± 15 volts and the saturated voltage collector-
emitter voltages for Q1 and Q2 were 0.3 and 0.4 volts respectably. Additionally, the maximum
and minimum voltages of the output were found to be 14.7 and -14.6 volts respectably. The
overall amplification was calculated in Q4, being the formula shown in Listing 2 below,
modified to fit the resistances for the circuit built in this part, as shown in Figure 10. To
completely avoid clipping, the absolute value of the minimum output voltage needs to be taken
into consideration for the output. The positive and negative peak values of Vsin were
approximately ± 5 volts. Dividing the absolute value of the minimum voltage of the output by
this voltage gives the voltage amplification, which can be used to find the value of potentiometer
R10 that yields the desired output, which was found to be 1920 Ω.
𝑅9 5 𝑉
, 𝐴𝑣 =
𝑅9 + 𝑅10 14.6 𝑉
1000 5
=
1000 + 𝑅10 14.6
𝑅10 = 1920 Ω
Listing 2: Q4 amplification equation and clipping calculations.
14
Discussions and Conclusion
In the lab, a function generator was constructed using a relaxation oscillator connected to
a waveshaper to produce three output waveforms: square, triangle, and sinusoid. Both sub-
circuits were first constructed without a potentiometer, which was later added on in the second
part of each respective week segment. This allowed frequency and amplitude variation, which
are important in achieving the desired output. During the construction of both sub-circuits, the
voltage amplitude and frequency of the outputs were measured and found to be within
specifications. Once the potentiometer in the first sub-circuit was added, the upper and lower
frequency extremes were found by measurement and recorded. However, the upper extreme from
the frequency calculations was found to far exceed the recorded extreme. The second
potentiometer, the amplitude control, was adjusted to the required frequency output of 3 kHz and
output the required 5-volt amplitude. The calculations done in the prelab questions corresponded
correctly to the required circuit, with the only discrepancies occurring in a couple of the
resistance values, where the calculated resistances had to be replaced with slightly differentiating
resistors due to material availability in the lab.
The most important thing I’ve learned in this lab is the way to construct the function
generator and how to adjust it for the output I desire. In my future career, different electronics
may require different inputs in order to function properly and having a built-in function generator
will ensure that it is powered by the desired voltage and frequency. Waveshapers, like the one
built in the second week of this lab, are often used by musicians to modify their sound for an
abrasive or distorted sound in their music. The relaxation oscillator built in the first week of this
lab is used in the control of lighting arrays for proper blinking and electronic beeper for
generating noise at the proper frequency and sound level.
15
Appendix A
16
Figure 15: Current specifications for new transistor.
17
Appendix B: Prelab Questions and Verification
18
Figure 17: Part 1 Prelab question Q2.
19
Figure 18: Prelab Q3 waveform and TA Verification.
20
Figure 19: Part 2 Prelab questions Q1 and Q2.
21
Figure 20: Part 2 Prelab questions Q3 and Q4.
22
Figure 21: Part 2 Prelab TA Verification.
23
Appendix C: Postlab Signoffs
24