Signal Generator Project Statement
Signal Generator Project Statement
Objectives
The objective is to build a function generator capable of generating square, triangle, and
sine waves. The frequency and amplitude of these waves will be controlled through
potentiometers. There will be some frequency analysis to aid in the understanding of Laplace
transforms, Bode plots, and Fourier series.
Simulation Part
1
2. The period of the output square wave can be calculated as:
where
β= R1/(R1 + R2).
Examine the frequency of the output voltage for the following component values:
Frequency
R3 C1 Frequency (Calculated)
(Simulated)
10K 1µF
9K 1µF
7K 1µF
10K 2µF
10K 3µF
To measure the frequency of the output waveform, measure the time it takes for the square wave
to complete one full cycle, then take the reciprocal of this time.
Figure 2: Integrator
2. Find the transfer function by hand, i.e., Vout(s)/Vin(s). The input of the integrator is going to
be the output of the square-wave generator, either +15V or –15V, DC. For the sake of analysis,
2
we can say that vin(t) = –15u(t) or vin(t) = 15u(t), depending on if the square wave is at its
minimum or maximum value.
If we take the input as –15u(t), what will the output of the integrator be in both the frequency and
time domains (hint: the integral of a constant)? What will the output be in both the frequency
and time domains if the input is +15u(t)?
Vout(s)/Vin(s)
3. Sketch the asymptotic Bode plot of the transfer function of the integrator:
3. In the simulation, make a Bode plot of the transfer function by conducting an AC sweep on
the input voltage. In the simulation profile for AC Sweep, set the start frequency to 1Hz, the end
frequency to 100,000Hz, and the points per decade to 100.
3
How much does the gain (value plotted on the y-axis) change per decade (a factor of 10, e.g.,
between 100rad/s and 1000rad/s)?
dB/decade
Vout(s)/Vin(s)
3. Sketch the asymptotic Bode Plot of the transfer function of the low-pass filter:
4
4. The theory behind Fourier series is that any periodic function, f(t), with period T, can be
written as the sum of weighted sinusoids. The frequency of each sinusoid is a positive integer
multiple of ω0, the frequency in rad/s of f(t) (ω0=2π/T). Each sinusoid also has a coefficient
multiplying it, determining how strongly that sine (or cosine) wave contributes to the function
f(t). Derive the coefficients (a0, an, and bn) of the Fourier series representation of the following
signal:
5
Here is a hint to aid you in finding the coefficients: Is this function even or odd? For even
functions, the function is comprised entirely of cosine waves. For odd functions, the function is
comprised entirely of sine waves. Find ao, an and bn.
a0
an
bn
4. For M = 15V and T = 3ms, write down the first three terms in the Fourier series
expansion of the triangle wave shown in Figure 4.
5. Make a Bode plot of the transfer function by conducting an AC sweep on the input voltage. In
the simulation profile for AC Sweep, set the start frequency to 1Hz, the end frequency to
100,000Hz and the points per decade to 100.
At what frequency (rad/s) does the Bode plot drop by 3dB from its constant value? This
frequency is known as the “3dB point.” After the 3dB point, what is the rolloff (i.e., how much
does the gain decrease per decade, say from 10kHz to 100kHz)?
Rolloff (dB/decade)
2. Plot the output of each op-amp (on the same plot). Change R3 to 7K and print the three
waveforms again (on another plot).
6
2. Using the results from the previous sections, explain in a paragraph or two how this function
generator works. Discuss how the triangle and sine waves are generated (sketching graphs of the
outputs may be useful). Be sure to mention the role of the integrator, as well as the low-pass
filter in relation to the Fourier series representation of the triangle wave.
Also comment on the following: Bode plots are useful in showing how the gain of a transfer
function changes with the frequency of the input. Using this knowledge, respond to the question
of why the amplitude of the triangle wave and the sine wave decrease in amplitude as R3 is
decreased from 10K to 7K (hint: look at the equation on the top of page 2, and also the bode
plots of each op-amp stage).
7
Hardware Part
1. Connect an oscilloscope probe to the point labeled “Function Out” in Figure 8. Select the
output from the first op-amp (the square wave). You will now analyze the duty cycle of this
square wave. Make sure that R8, the amplitude knob, is adjusted such that there is no resistance
between the DIP-switch output and the oscilloscope probe (i.e. such that the amplitude of the
output is at a maximum). The potentiometer R7 does not need to be turned to a specific
resistance. The duty cycle of a square wave is defined as:
Duty Cycle = 100% × (amount of time waveform is positive during one period / duration of one period)
For example, if a square wave has a period of 200ms and is positive for 50ms during each period,
then the duty cycle is 25%. Record what happens to the duty cycle as you adjust VCC, the
positive voltage supply to the op-amp.
–15V 15V
–15V 10V
–15V 5V
Table 2: Effect of VCC on Duty Cycle
9
What happens to the positive voltage level of the square wave as VCC is decreased? What
happens to the negative voltage level?
What do you think would happen if VEE were changed from –15V to –10V? Record the duty
cycle and the negative voltage level of the square wave to see if you are correct.
–10V 15V
VEE
3. The potentiometer labeled R7 in Figure 8 controls the frequency of the square wave. Because
the triangle and sine waves will have the same frequency as the square wave, this potentiometer
is the frequency knob for the function generator. Fill in the following table for the maximum
and minimum values of the resistance of the potentiometer, R7, between pins 1 and 2.
R7 = 0K 2K 0K 2K 0K 2K
Voltage (p-p)
Voltage (RMS)
Frequency
Table 4: Effect of R7 on Frequency and Output Voltage
It is studied before that the frequency of the generated square wave is governed by the following
equation:
10
where
β= R1/(R1 + R2).
As R7 increases in the above equation, what should happen to the frequency? Do your results in
the table above support your claim? Explain.
2. Connect the point labeled “Vout” in Figure 9 to one of the inputs of the stereo amplifier.
Attach a speaker to the corresponding output channel, and play all three generated waveforms
through the amplifier, varying the frequency (R7) and amplitude (R8) knobs to see how they
affect the output signal you hear.
11
Take Home Task
Using TL494 for the Generation of Different Duty Cycles at Different Frequencies
Figure below shows the circuit diagram for TLP494 for generation of different duty cycles at
different frequencies. The circuit has been taken from its datasheet which should be read to
understand the operation of the IC.
Consult the data sheet of TLP494 and design the circuit to generate 1 kHz, 4 kHz, 10 kHz and 20
kHz frequencies with 50% duty cycle. There are two variable resistances used in the circuit
shown in the figure, one is to adjust the frequency and other one is to adjust the duty cycle. The
required variation of duty cycle is from 5% to 95% with all the selected frequencies.
Tasks
1. Observe the saw tooth waveform on the scope, measure feed-back voltage and verify the
generation of duty cycle.
2. Observe the variation of frequency by changing the resistance in your oscillator circuit.
4. Explain how to adjust the frequency? How to calculate R and C for required frequency? Show
the waveforms observed for selected frequencies with selected value of R and C.
12
5. Observe the voltage across the oscillator capacitor and include the snapshot of waveform in your
lab report.
6. Show waveforms for 20%, 40%, 60%, 80% and 90% duty cycles at all selected frequencies.
7. What is the function of dead time pin? How we can adjust the dead time? What is the dead time
if that pin is grounded? Observe the dead time on the scope and include the snapshot in the lab
report.
8. What is the function of output control pin? Configure it for push pull operation and observe the
output waveforms then configure it for single ended operation and observe the output waveforms.
Include the results in your lab report.
9. We have used variable voltage at the feedback pin using the potential divider. Configure error
amplifiers to vary the duty cycle at the output terminals. Discuss all of your design in your lab
report.
10. Use TL494 as a square wave generator in the above mentioned signal generator.
13
Appendix A Fourier Analysis
14
15
16