PWM, or Pulse Width Modulation is a powerful way of
controlling analog circuits and systems, using the digital outputs of
microprocessors. Defining the term, we can say that PWM is the way we control a
digital signal simulating an analog one, by means of altering it's state and
frequency of this.
This is how a PWM signal would look like:
The PWM is actually a
square wave modulated. This modulation infects on the frequency (clock cycle)
and the duty cycle of the signal. Both of those parameters will be explained in
details later but by keeping in mind that a PWM signal is characterized from the duty
clock and the duty cycle. The amplitude of the signal remains stable during
time (except of course from the rising and falling ramps). The clock cycle is
measured in Hz and the duty cycle is measured in hundred percent (%).
Clock cycle and Duty
cycle parameters
These are the basic parameters
that characterizes a PWM signal. The first parameter is the clock cycle. It is the frequency of the signal measured in Hz.
The other parameter has to do
with the switching time of the signal.
All three signals shown above are square wave
oscillations modulated as per their oscillation width, so called "duty
cycle". They have the same frequency (t1), but they differ on the width of
the positive state (t2). The duty cycle is the percentage of the positive state
compared to the period of the signal. So:
Period (T)
=
|
1
|
Frequency
(F)
|
A 10% dudy cycle means that the positive stated
remains positive for 10% of the period of the signal.
Example:
Suppose that the above signals have a frequency of
1000Hz. This means that their period is 1/1000 =>
T = 0.001 Sec => T = 1mSec
The first signal has 10% duty cycle. This means
that during one full period, it remains positive for 10% of the total period:
t2 =
|
10 x T
|
100
|
And this comes to t2 = 0.1mSec. In the
first example, the positive state will remain for 0.1 mSec.
With the same way we can calculate the t2 (positive
state) of the other two signals:
Signal 2, 40%:
t2 = 40 x 1mSec / 100 = 0.4 mSec
Signal 3, 90%:
t2 = 90 x 1mSec / 100 = 0.9 mSec
Pulse-Width-Modulation
(PWM) in Microcontroller
The
Pulse-Width-Modulation (PWM) in microcontroller is used to control duty cycle
of DC motor drive. PWM is an
entirely different approach to controlling the speed of a DC motor. Power is
supplied to the motor in square wave of constant voltage but varying
pulse-width or duty cycle. Duty cycle refers to the percentage of one cycle
during which duty cycle of a continuous train of pulses. Since the frequency is
held constant while the on-off time is varied, the duty cycle of PWM is
determined by the pulse width. Thus the power increases duty cycle in PWM.
The
expression of duty cycle is determined by,
%Dutycylcle=ton/T
x 100%
Basically,
the speed of a DC motor is a function of the input power and drive
characteristics. While the area under an input pulse width train is measure of
the average power available from such an input.
0 comments:
Post a Comment