Académique Documents
Professionnel Documents
Culture Documents
(PWM)
FINAL REPORT
Class: ENEE 417
Professor: Dr. Yang
Copyright 2007
By: Long Pham
Khoa Nguyen
Travis Paul
All Rights Reserved
Table of Contents
OBJECTIVE..................................................................................................................................................................3
STAGES NEEDED.......................................................................................................................................................3
DIAGRAM OF THE ALL THE STAGES INCLUDING THE OPTICAL GROUP/LEDS ..........................................................3
BACKGROUND RESEARCH....................................................................................................................................4
WHAT IS PWM (PULSE WIDTH MODULATION METHOD)...........................................................................................4
HOW TO GENERATE A CARRIER SIGNAL (TRIANGLE WAVEFORM)...........................................................................4
HOW A COMPARATOR WORKS.....................................................................................................................................4
HOW TO DEMODULATE A PWM SIGNAL....................................................................................................................5
PARTS SPECIFICATION RESEARCH ...................................................................................................................5
PARTS NEEDED TO BUILD THE CIRCUIT..........................................................................................................7
QUICK ANALYSIS OF THE PROJECT AND HOURS SPEND...........................................................................7
PSPICE OF CIRCUIT AND SIMULATIONS..........................................................................................................8
CIRCUIT THAT REPRESENTS THE ACTUAL CIRCUIT....................................................................................................8
SIMULATE THE CIRCUIT WITH SINE AT 100HZ ........................................................................................................10
SIMULATE THE CIRCUIT WITH SINE AT 1KHZ..........................................................................................................11
SIMULATE THE CIRCUIT WITH SINE AT 10KHZ........................................................................................................12
SIMULATE THE CIRCUIT WITH SINE AT 20KHZ........................................................................................................13
SIMULATE THE CIRCUIT WITH SQUARE AT 20KHZ...................................................................................................14
CIRCUIT BUILD ON PC BOARD...........................................................................................................................15
TRANSMITTING SIDE.................................................................................................................................................15
RECEIVING SIDE........................................................................................................................................................17
TEST RESULTS.........................................................................................................................................................19
TEST THE CIRCUIT WITH SINE WAVE AT 100HZ......................................................................................................21
TEST THE CIRCUIT WITH SINE WAVE AT 1KHZ........................................................................................................24
TEST THE CIRCUIT WITH SINE WAVE AT 10KHZ......................................................................................................27
TEST THE CIRCUIT WITH SINE WAVE AT 20KHZ......................................................................................................30
FREQUENCY RESPONSE OF THE CIRCUIT BUILD.......................................................................................34
TRANSMITTING SIDE OF THE CIRCUIT......................................................................................................................34
RECEIVING SIDE OF THE CIRCUIT (2ND ORDER LPF)...............................................................................................35
CONCLUSION............................................................................................................................................................36
REFERENCES............................................................................................................................................................37
APPENDIX A CMX309...........................................................................................................................................38
APPENDIX B OP-AMP LM7171...........................................................................................................................39
APPENDIX C OP-AMP TLV2362.........................................................................................................................44
Objective
To modulate an audio signal by using the method of pulse width modulation, then
demodulate the signal to recover the audio signal. The final goal for the team is to transmit the
modulated signal optically, thus an optical group is in charge of transmitting the PWM signal by
an LED and use a photo-detector to receive the signal. Finally, there is a power amplifier to
amplify the received signal before inputting it to a speaker.
Stages Needed
1.
2.
3.
4.
To PhotoDetector
Figure 1a
Receiving Side:
Figure 1b
Background Research
What is PWM (Pulse Width Modulation method)
PWM of a signal or power source involves the modulation of its duty cycle, to either
convey information over a communications channel or control the amount of power sent
to the load.
PWM uses a square wave whose duty cycle is modulated resulting in the variation of the
average value of the waveform.
Figure 2
If we use a higher voltage to transmit, the that will increase the signal to
noise ratio
Its Gain Bandwidth Product is 170 MHz at operating voltage +/-9V at room
temperature
Low offset voltage typically 0.2mV
Price: $2.88/chip
Amount of chips recommended: 5 (units) to test with
o
o
o
o
Op-Amp (not used in final design) Texas Instrument TLV2362- see Appendix C for
specifications
Reasons for not using this part in final circuit design:
o Due to lacking of understanding about op-amp specification, many features from
this op-amp is not suitable in our design
o It has a much smaller Gain Bandwidth Product than the above op-amp (6MHz
compare to 170MHz)
o High input offset voltage 6mV
o Maximum supply-voltage limits at +/- 3.50V, which will give a small output
swing that are set by the rails in comparison to the LM7171
o Price: $.57/chip
o Amount of chips recommended: 5 (units) to test with
Price($)/Unit Quantity
2.63
1
2.88
1
.01
1
.01
1
.01
3
.20
1
.20
1
.20
1
.10
1
.10
1
.97
2
.524
1
Total Cost of Circuit
Total Cost
2.63
2.88
.01
.01
.03
.20
.20
.20
.10
.10
1.94
.52
8.83
0
V3
9 .4 V
R 2
1970
V-
L M 7 1 7 1 A IN
3
+
VO FF = 0
VAM PL = 100m V
F R EQ = 10000
V
Input
PWM Signal
R 6
1990
V+
U 1
R 3
C 4
2020
963p
O U T
C 3
4 .7 n
V2
9 .4 V
R 1
0
V 1 = .8 V
V 2 = -.8 V
T D = .1 f s
T R = .1 f s
T F = .1 f s
P W = .5 u s
PER = 1us
663
C 1
240p
Square
0
0
Figure 3a
1. 0V
0V
- 1. 0V
V( Squar e: +)
1. 0V
0V
SEL >>
- 1. 0V
10. 0us
V( R1: 2)
12. 5us
15. 0us
17. 5us
20. 0us
Ti me
0V
- 100mV
V( I NPUT: +)
1. 0V
0V
SEL>>
- 1. 5V
0s
V( R2: 2)
2ms
4ms
6ms
8ms
10ms
Ti me
Figure 4a (Green Input Sine to Comparator Red Output of 2nd Order LPF)
10V
0V
- 10V
100us
V( R6: 1)
110us
120us
130us
140us
150us
Ti me
10
0V
- 100mV
V( I nput : +)
1. 0V
0V
SEL >>
- 1. 5V
0s
0. 2ms
0. 4ms
0. 6ms
0. 8ms
1. 0ms
V( C4: 2)
Ti me
10V
0V
- 10V
100us
V( R6: 1)
110us
120us
130us
140us
150us
Ti me
11
0V
- 100mV
V( I nput : +)
1. 0V
0V
SEL>>
- 1. 0V
100us
V( C4: 2)
125us
150us
175us
200us
Ti me
10V
5V
0V
- 5V
- 10V
80us
100us
120us
V( R6: 1)
Ti me
12
0V
SEL>>
- 100mV
V( I nput : +)
1. 0V
0V
- 1. 0V
50us
75us
100us
125us
V( C4: 2)
Ti me
10V
5V
0V
- 5V
- 10V
40us
50us
60us
70us
80us
V( R6: 1)
Ti me
13
0V
SEL>>
- 120mV
V( U1: +)
1. 0V
0V
- 1. 0V
0s
100us
200us
300us
V( C4: 2)
Ti me
10V
0V
- 10V
50us
60us
70us
80us
90us
V( R6: 1)
Ti me
14
Figure 9a
Front View: Closer Look at the PC Board and Circuit
Coupling
Capacitor to
get rid of DC
voltage
Capacitor to
get rid of
ripple of
square wave
Integrator
Pin 4
Pin 3
Pin 5
Pin 2
Pin 6
Clock Oscillator
CMX309
Pin 1
LM7171
Comparator
Figure 9b
15
Back View:
+9 Volt Supply
into LM7171
AA Battery
Supply into
CMX309
-9 Volt
Supply into
LM7171
Output of Comparator
(PWM signal)
Figure 9c
16
Receiving Side
Front View:
Pin 1 - Input to
2nd order LPF
Pin 2 - Output of
2nd order LPF
Figure 10a
17
Back View:
Pin 2 - Output of
2nd order LPF
Pin 1 - Input to
2nd order LPF
Figure 10b
18
Test Results
Conditions:
One AA battery (1.63Vdc) supply to the clock oscillator
One +9Vdc battery supply to Pin 7 of the LM7171 chip (refer to appendix B)
One -9Vdc battery supply to Pin 4 of the LM7171 chip (refer to appendix B)
Used 1x probes to measure ac signal on the oscilloscope
Measured DC Voltages:
Output of clock oscillator dc voltage
(Refer to Figure 9b Pin 2)
Clock oscillator dc voltage after coupling capacitor
(Refer to Figure 9b Pin 4)
Triangle wave dc voltage after integrator
(Refer to Figure 9b Pin 5)
PWM output dc voltage of LM7171
(Refer to Figure 9b Pin 6)
0.750Vdc
0.004Vdc
0.004Vdc
0.005Vdc
Figure 11a
19
Figure 11b
20
Figure 12a
PWM Output Signal of the Comparator/Input Signal to the LED:
Refer to figure 9b Pin 6
- Input: Triangle Wave at 1MHz
+ Input: Sine Wave at 100Hz
Figure 12b
21
Figure 12c
Output Signal of the Photo-Detector/Input Signal to the 2nd Order LPF:
Refer to figure 10a Pin 1(use 10X probe to measure)-Note (1)
Figure 12d
22
Output Signal of the 2nd Order LPF/Input Signal to the Power Amp:
Refer to figure 10a Pin 2
Figure 12e
Output Signal of the Power Amp/Input Signal to the Speaker:
Figure 12f
23
Figure 13a
PWM Output Signal of the Comparator/Input Signal to the LED:
Refer to figure 9b Pin 6
- Input: Triangle Wave at 1MHz
+ Input: Sine Wave at 1kHz
Figure 13b
24
Figure 13c
Output Signal of the Photo-Detector/Input Signal to the 2nd Order LPF:
Refer to figure 10a Pin 1 (use 10X probe to measure)-Note (1)
Figure 13d
25
Output Signal of the 2nd Order LPF/Input Signal to the Power Amp:
Refer to figure 10a Pin 2
Figure 13e
Output Signal of the Power Amp/Input Signal to the Speaker:
Figure 13f
26
Figure 14a
PWM Output Signal of the Comparator/Input Signal to the LED:
Refer to figure 9b Pin 6
- Input: Triangle Wave at 1MHz
+ Input: Sine Wave at 10kHz
Figure 14b
27
Figure 14c
Output Signal of the Photo-Detector/Input Signal to the 2nd Order LPF:
Refer to figure 10a Pin 1 (use 10X probe to measure)-Note (1)
Figure 14d
28
Output Signal of the 2nd Order LPF/Input Signal to the Power Amp:
Refer to figure 10a Pin 2
Figure 14e
Output Signal of the Power Amp/Input Signal to the Speaker:
Figure 14f
29
Figure 15a
PWM Output Signal of the Comparator/Input Signal to the LED:
Refer to figure 9b Pin 6
- Input: Triangle Wave at 1MHz
+ Input: Sine Wave at 20kHz
Figure 15b
30
Figure 15c
Output Signal of the Photo-Detector/Input Signal to the 2nd Order LPF:
Refer to figure 10a Pin 1 (use 10X probe to measure)-Note (1)
Figure 15d
31
Output Signal of the 2nd Order LPF/Input Signal to the Power Amp:
Refer to figure 10a Pin 2
Figure 15e
Output Signal of the Power Amp/Input Signal to the Speaker:
Figure 15f
32
Data Table 2:
Input
Input Sin
Frequency Vp-p
100Hz
233mV
1KHz
221mV
10KHz
230mV
20KHz
232mV
PWM
output Vp-p
16.8 V
15.8 V
16 V
15.8 V
LED
7.52 V
7.36 V
7.4 V
7.4 V
Output
Photodiode
799mV
764mV
793mV
746mV
Note(1): All the measurement of Photodiode was taken under dark room condition.
Measurements for output of Photodiode were captured using 10X probe.
33
Phase
Log (Gain) and
Log (Phase)
Gain
Log (Hz)
Figure 16a
34
Gain
Phase
Log (Hz)
Figure 16b
35
Conclusion
The final goal of this project is to transmit a modulated audio signal optically, receive the
signal and demodulate the audio signal within several feet away is successful. The circuit build
is placed into a box which holds everything in place. According to the test result waveforms, it
corresponds with the PSPICE simulations waveforms and is as expected in terms of how the
signal behaves and its amplitude. The waveforms for the PWM and how to demodulate the
PWM signal into a sine wave are consistent with the background research.
The key point into making this project successful is to do a thorough research on the parts
such as fast comparator/op-amp, clock oscillator and troubleshooting the circuit. Also, one thing
to keep in mind is that there should not be any DC voltage being input into the comparator thus
that is the reason why there is a coupling capacitor to bias out DC components. Basically, only
AC signal can be input into the comparator. Also, in order to produce a clean PWM signal is to
first produce a stable carrier signal as a reference signal at desired frequency. This carrier signal
has to be greater in AC voltage than the audio signal at all times or else it will be cut off.
If we were to redo this project, we would research for a fast comparator that can compare
frequencies of over 1MHz, build an active LPF for integration as well as demodulation and
search for parts which uses higher power to give a high voltage swing of the AC signal. This
will be sufficient for transmitting the signal optically.
From this course, weve learn important issues such as how a background research can
save time from trouble shooting the circuit. If a thorough research is done and the circuit is well
understood, then there should not be much to troubleshoot besides wiring errors. Another
important issue is to have a good PSPICE simulation of what the ideal circuit may be to have an
understanding of how the waveforms may change under different constraint. Lastly, teamwork
is rather important in order to get the task complete in the end because if one group delays, then
the other group has to wait in order to proceed. For example, if the optical group was finished
early, but the PWM or FM was not ready to transmit the signal, then the task will be delay.
36
References
Sedra and Smith. Microelectronic Circuit. 5th Edition. Oxford University Press, 2003.
Wikipedia, The Free Encyclopedia. 18 Dec. 2007.
<http://en.wikipedia.org/wiki/Lowpass_filter>
37
Appendix A CMX309
38
39
40
41
42
43
44
45
46