Академический Документы
Профессиональный Документы
Культура Документы
Experiment no .2
Pulse width modulation (PWM)
Student:
1-Kaso Baxtiar
2-zhiwar awat
3-shangeen baqi
4-rayan jamal
For a PWM signal we need to look at two important parameters associated with it one is the
PWM duty cycle and the other is PWM frequency.
Frequency of a PWM
The frequency of a PWM signal determines how fast a PWM completes one period. One Period
is the complete ON and OFF time of a PWM signal as shown in the above figure. The formulae
to calculate the Frequency is given below.
Normally the PWM signals generated by microcontroller will be around 500 Hz, such high
frequencies will be used in high speed switching devices like inverters or converters. But not all
applications require high frequency. For example to control a servo motor we need to produce
PWM signals with 50Hz frequency, so the frequency of a PWM signal is also controllable by
program for all microcontrollers.
Procedure
Result
The above graph show the two inputs of sine wave and saw tooth signals and as shown the
result is PWM signal
Discussion
In this experiment we learned about the mechanism of PWM and how its done which is as
shown in the cct above we created that signal by comparing tow inputs signals which they are
sine wave and saw tooth wave and the result of them will be either one or zero and the
condition will applied and the output will be 1 in places where the amplitude of the sine wave is
equal or greater than saw tooth’s amplitude and this comparing is done by the device called
relational operator and it has several other options of comparing and as the result we want to
have 5V amplitude so we take the output of comparing and connected to a regular Gain with 5
so we got 5V in result .
We also noticed that the pulse widths are different ,since when the input is positive the width of
the pulses is greater than the instance where the input is negative. This is due to the message
signal being less than the pulse signal