Square Wave notes handout

advertisement
Pulse or Square Waveforms
A Pulse waveform is generally seen as a rectangular waveform that varies with time.
Parameters
There are a number of parameters that can be specified and measured.
Amplitude
The amplitude indicates the size of the waveform. In the diagram below it is 0 to +5 V.
Period - T
Period T is the time for 1 cycle of the waveform.
Frequency
Frequency f represents the number of cycles that occur
in time (usually 1 second). Frequency is related to
period f = 1/T.
Duty Cycle
Square or pulse waves can also vary with respect to how much time that are at the high level voltage
during a cycle.
1
Time High (THIGH) and Time Low (TLOW)
Describing Duty Cycle requires some new terminology for the waveform - Time High (THIGH) and Time
Low (TLOW).
The period of the waveform is now
T = THIGH + TLOW
The Duty Cycle is described as
D.C. = THIGH / (THIGH + TLOW) x 100%
Average Value
The average value of the waveform is controlled by the Duty Cycle.
The average value is
VAvg = Duty Cycle x High level voltage
Examples
Calculate the period, frequency, and duty cycle for the following 0 to +5 V square waves.
1. THIGH = 250 µsec TLOW = 250 µsec
Period T = THIGH + TLOW = 250 µsec + 250 µsec = 500 µsec
Frequency f = 1/T = 1/500 µsec = 2000 Hz
Duty Cycle = THIGH / (THIGH + TLOW) x 100% = 250 µsec/(250 µsec + 250 µsec) x 100 % = 50%
Average value VAVG = 0.50 x +5 V = 2.5 V
2. THIGH = 200 µsec TLOW = 50 µsec
Period T = THIGH + TLOW = 200 µsec + 50 µsec = 250 µsec
2
Frequency f = 1/T = 1/250 µsec = 4 kHz
Duty Cycle = THIGH / (THIGH + TLOW) x 100% = 200 µsec/(200 µsec + 50 µsec) x 100 % = 80%
Average value VAVG = 0.80 x +5 V = 4.0 V
3. THIGH = 2.5 msec TLOW = 7.5 msec
Period T = THIGH + TLOW = 2.5 msec + 7.5 msec = 10 msec
Frequency f = 1/T = 1/10 msec = 100 Hz
Duty Cycle = THIGH / (THIGH + TLOW) x 100% = 2.5 msec/(2.5 msec + 7.5 msec) x 100 % = 25%
Average value VAVG = 0.25 x +5 V = 1.25 V
The results are plotted
Average Voltage (V)
4
3
2
1
20
40
60
80
Duty Cycle (%)
DC Motor Speed Control
The speed of a DC motor can be controlled by the DC voltage connected to it. For example you could
connect a DC motor to a DC power supply and vary the speed by adjusting the voltage of the power
supply. It is not practical to use a variable DC power supply to vary the speed of a DC motor connected
to a computer port.
Pulse Width Modulation
In Pulse Width Modulation the speed of a DC motor for example is controlled by the average DC voltage
of a variable duty cycle square wave produced by a computer at an output port – the higher the duty
3
cycle => the higher the average DC voltage => the faster the motor turns. The relationship has a linear
shape but can become non-linear at higher speeds.
Motor Speed
25
50
75
Duty Cycle (%)
From the examples above, which case will cause the motor to run the fastest and the slowest?
Square Wave - Most General Case
The square wave looked at earlier is a specific case – the most general case is shown.
THIGH
TLOW
+ V2
-V1
Period
The period of the waveform T is still
T = THIGH + TLOW
Frequency
Frequency f represents the number of cycles that occur in time (usually 1 second). Frequency is related
to period f = 1/T.
Peak Value – VP
There are two peak values for this waveform – positive peak and a negative peak and in general they are
not the same value.
4
Peak-to-Peak Value – VP-P
The peak-to-peak value is the voltage from the positive to the negative maximum.
Duty Cycle
The Duty Cycle D.C. is still described as
D.C. = THIGH / (THIGH + TLOW) x 100%
Application Note
Written by David Lloyd
Computer Engineering Program
Humber College
5
Download