Difference between revisions of "PWM Motor Controller Interface"

From Embedded Systems Learning Academy
Jump to: navigation, search
(Created page with "== What is PWM == PWM stands for '''P'''ulse '''W'''idth '''M'''odulation. A signal duty cycle is controlled to produce the pulse width. == Application == The application ...")
 
(Application)
Line 4: Line 4:
 
== Application ==
 
== Application ==
 
The application of a PWM is usually in motor controls.  If a motor is attached to your PWM signal, you could control the motor's speed using the PWM.  Imagine that the PWM you produce lasts for one second (1 Hz).  Now, imagine that the PWM is high 10% of the time and LOW 90% of the time.  What you will end up doing is turning on the motor only 1/10th of a second, hence controlling the motor speed.
 
The application of a PWM is usually in motor controls.  If a motor is attached to your PWM signal, you could control the motor's speed using the PWM.  Imagine that the PWM you produce lasts for one second (1 Hz).  Now, imagine that the PWM is high 10% of the time and LOW 90% of the time.  What you will end up doing is turning on the motor only 1/10th of a second, hence controlling the motor speed.
<syntaxhighlight>
+
   
/*  
+
    Example PWM that is ~ 25% HIGH, 75% LOW
Example PWM that is ~ 25% HIGH, 75% LOW
+
        __          __          __
    __          __          __
+
      |  |        |  |        |  |
  |  |        |  |        |  |
+
    ___|  |________|  |________|  |_________
___|  |________|  |________|  |_________
+
 
 +
    Example PWM that is ~ 90% HIGH, 10% LOW
 +
        _________  _________  _________
 +
      |        | |        | |
 +
    ___|        |_|        |_|
  
Example PWM that is ~ 90% HIGH, 10% LOW
 
    _________  _________  _________
 
  |        | |        | |
 
___|        |_|        |_|
 
*/
 
</syntaxhighlight>
 
  
 
<BR/>
 
<BR/>

Revision as of 19:57, 20 November 2012

What is PWM

PWM stands for Pulse Width Modulation. A signal duty cycle is controlled to produce the pulse width.

Application

The application of a PWM is usually in motor controls. If a motor is attached to your PWM signal, you could control the motor's speed using the PWM. Imagine that the PWM you produce lasts for one second (1 Hz). Now, imagine that the PWM is high 10% of the time and LOW 90% of the time. What you will end up doing is turning on the motor only 1/10th of a second, hence controlling the motor speed.

   Example PWM that is ~ 25% HIGH, 75% LOW
       __          __          __
      |  |        |  |        |  |
   ___|  |________|  |________|  |_________
   Example PWM that is ~ 90% HIGH, 10% LOW
       _________   _________   _________
      |         | |         | |
   ___|         |_|         |_|



Now imagine that this 1Hz signal is changed to 10KHz. Now, you will no longer hear the motor turn on just for 1/10th of a second. Now, the motor will produce a high frequency noise depending on the pulse frequency. The turning ON and OFF will happen at a very high rate producing a very smooth operation of the motor that you can control digitally.

PWM for LPC17xx

TO DO

Motor Wiring Example

TO DO