DPRG List  

[DPRG] What PWM Frequnecy

Subject: [DPRG] What PWM Frequnecy
From: Rick Bickle rbickle at intconsys.com
Date: Mon Jul 19 12:34:13 CDT 2010



I've always been of the opinion that the lowest PWM frequency is best.
The lowest frequency being a little higher than what the system (car)
will respond to. In other words, not so low that the car or robot will
pulse or vibrate. The higher the frequency, the more capacitive losses
you will realize in the MOSFETs of the H-bridges and other circuitry.
Also, lower frequencies are easier to manage in firmware of small
microcontrollers that don't have PWM specific hardware. Higher
frequencies, also tend to induce noise on other circuits. Most of my
motor control systems operated more in the 1khz range.


Just my 2 cents.





From: dprglist-bounces at dprg.org [mailto:dprglist-bounces at dprg.org] On
Behalf Of Dick Swan
Sent: Monday, July 19, 2010 11:46 AM
To: DPRG List
Subject: [DPRG] What PWM Frequnecy



Thanks for quick reply to my question regarding current sensing. I was
intrigued with one of your comments - "You will want a PWM frequency
larger than 20 KHz. 30 KHz is pretty much standard." - because this is
not my experience with the small robots used in hobby and educational
motors.  From personal experience, I've seen the following:


*         The LEGO RCX used bit-banged firmware to generate motor PWM.
It had eight power levels and the motor control was adjusted every
millisecond. So the PWM period is 8 milliseconds or 125 Hz.

*         Some of the other hobby/educational robots that I work with
use 2K Hz and 10K Hz PWM signals.

*         I've heard hobby servos typically use a PWM frequency of 2K
Hz. See for example
http://www.mcmanis.com/chuck/robotics/projects/servo.html, look about
2/3 of the way down the page.

*         The second post at
http://www.edaboard.com/ftopic388563.htmlsuggests recommends using a 1K
Hz PWM frequency. 


Picking a PWM frequency for motor control seems like a black art to me
(i.e. hardware challenged and not a EE).


This is a relevant topic for me right now as I'm in the process of
writing firmware bit-banged PWM for an Arduino. I'm using bit-banged
approach because Arduino (Duemilanove) doesn't have enough spare timers
for PWM control. And even if it did, I want full flexibility rather than
only being able to control three motors (each requiring two output pins
with PWM) on a few fixed assignment PWM pins. I was planning on using
the same approach as the LEGO RCX with updates (motor either on or off)
on either a 1.0 or 0.5 millisecond basis. With eight power levels, it
would take 4 milliseconds for one PWM "cycle" if bit-banged ran every
0.5 milliseconds. This is about 100 times less than a 30K Hz rate.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.dprg.org/pipermail/dprglist/attachments/20100719/ea3c854f/attachment.html

More information about the DPRG mailing list