Shop OBEX P1 Docs P2 Docs Learn Events
Best Frequency for PWM - DC motors — Parallax Forums

Best Frequency for PWM - DC motors

Ron CzapalaRon Czapala Posts: 2,418
edited 2011-05-19 18:15 in Robotics
I have read various comments from various web sites on what frequency is best for PWM speed control of DC motors but no conclusive results...

One recommendation was in the 10 to 15 KHz range.

I have been experimenting with Beau Schwabe's PWM_32 Propeller object and using a PWM.Duty period value of 100 yields a 10 KHz frequency according to my Parallax oscilloscope.

Does anyone have any recommendations regarding the frequency and related issues like heat buildup, power consumption, torque loss, etc?

Thanks,
- Ron

Comments

  • kwinnkwinn Posts: 8,697
    edited 2011-05-16 11:39
    I have read various comments from various web sites on what frequency is best for PWM speed control of DC motors but no conclusive results...

    One recommendation was in the 10 to 15 KHz range.

    I have been experimenting with Beau Schwabe's PWM_32 Propeller object and using a PWM.Duty period value of 100 yields a 10 KHz frequency according to my Parallax oscilloscope.

    Does anyone have any recommendations regarding the frequency and related issues like heat buildup, power consumption, torque loss, etc?

    Thanks,
    - Ron

    AFAIK there is no one optimum frequency. It would depend on several factors including the inductance of the windings, armature material, motor type (permanent magnet, series wound, parallel wound) etc.

    Like most things in life it is a trade off.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2011-05-16 12:27
    Back when I was working on Battlebots one of the popular controllers (Vantec) had a default frequency of 338Hz. You can see their manuals here:

    http://www.vantec.com/manuals.htm

    Another place to check is with the OSMC group on Yahoo.

    http://groups.yahoo.com/group/osmc/
  • ercoerco Posts: 20,256
    edited 2011-05-16 12:42
    Yep, many ESCs make a high-pitched squealing sound in the 10-15K range.

    Of course, plain old servos and even my old Hero 2000 drive motors are pulsed in the 5-10 hz range and they work just fine. I have used LM556 ICs to scratch-build such low-frequency motor drivers for PM DC motors and IMHO they are infinitely superior in that they allow full motor torque at ultra low speeds.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-05-16 12:49
    Is there a simple and expensive to determine the torque? I guess a swapping a pulley for a wheel and using known weights would be the easiest - or maybe just climbing an incline at a fixed angle (of course that would involve the robots weight, friction, etc
  • ercoerco Posts: 20,256
    edited 2011-05-16 12:59
    DC motor stall torque is easy to measure, mount an arm and see how hard it pushes on a scale. Useful info at http://lancet.mit.edu/motors/motors3.html See the very last graph; typically, peak power is at half the no-load speed, where you get half of the stall torque.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-05-16 19:12
    erco wrote: »
    DC motor stall torque is easy to measure, mount an arm and see how hard it pushes on a scale.

    I wish I had a strain gauge to check it with. It seems i am re-living my college physics and geometry classes.

    I bought compasses, protractors, graph paper, etc to faciliate building this robot.

    Ah - the good ol' days... ;)
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2011-05-16 19:42
    When I was in robotic R&D for prosthetics, the widely accepted method was to have some sort of tach feedback from the motor itself, and mask the PWM base frequency to the speed of the motor or a multiple of the motor's armature coils. Even if the base frequency was within human hearing it was difficult to detect over the 'normal' noise of the motor.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-05-17 10:12
    Kwinn is right that there is no standard here. To determine optimum PWM you can always make your own dynamometer, like this one:

    http://www.sci-spot.com/Mechanical/dyno.htm

    (The page has additional interesting applications in it, including hacking a mouse scroll wheel for the tach.)

    Still, lots of work for what you could calculate empirically. You're basically after the highest torque at the lowest amps. Other worries such as motor heating will more or less follow. As your motors aren't the tear-off-your-arms type, you could probably test them with a lever and a fish scale (trout size for small motors, tuna size for bigger motors).

    If you have some heat-resistant cloth you could make a variable clamp for the motor. Mount a flywheel where the wheel would go, apply the clamp, tighten it to provide the load you'd like to test, and measure amps on your meter. Play with the PWM frequencies and plot the results.

    The story goes that Edison once determined just how strong the packing crates needed to be in order to ship his phonograph players and still withstand if they got dropped off the train station platform. He used no math to determine things like density of the wood, elongation at break, and all that other nonsense. He just chucked a bunch of filled crates off a three-foot riser until he found the crate design that worked.

    -- Gordon
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2011-05-18 07:34
    ...you could probably test them with a lever and a fish scale (trout size for small motors, tuna size for bigger motors...
    -- Gordon

    Great idea! I was wondering where I could get a gauge without spending alot. They probably don't qualify as scientific measurment devices but would certainly suffice for comparing different PWM frequencies.

    After I get my encoder/driver logic working I'll check out the sporting goods stores...

    Thanks,
    Ron
  • ercoerco Posts: 20,256
    edited 2011-05-19 09:54
    Here's a 1000-gram digital scale for $5.54 shipped. I have one, works great.

    http://cgi.ebay.com/VH612-Mini-1000-x-0-1-Gram-Digital-Pocket-Jewelry-Scale-/160522155673?pt=LH_DefaultDomain_0&hash=item255fddb699

    And does anyone know offhand if the motor PWM frequency of standard servos is standard? It's that ~10 hz frequency that servos buzz at when holding position.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-05-19 11:56
    Should be ~50 Hz pulse rate for an analog servo. At 10 Hz the servo would have very low holding power.

    While R/C servos are commonly said to use PWM, in actuality they don't. It's more a system of pulse duration. Whether the servo can handle a higher refresh rate depends on the servo. On many, going much above 70 or 80 Hz can cause it to lock up. You can get improved holding torque at the higher rates, as long as you're careful about not overheating the motor, and providing it adequate amps.

    This is fundamentally how digital servos work. They convert the standard 50 Hz pulses to 300-400 Hz. They're more power hungry because of it.

    -- Gordon
  • ercoerco Posts: 20,256
    edited 2011-05-19 14:15
    I agree the input signal is 50 hz, AKA our ubiquitous PAUSE 20 command. But I'm convinced the motor output frequency is more like 10 Hz. You can easily feel it on a servo that buzzes from the load. I'll have to scope it after this busy weekend and report back. If it's really 50 hz, I owe you an In & Out burger, Mr. McComb! I just pedaled my bike though Oceanside last Saturday with our club.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-05-19 18:15
    I see what you mean now. That may be the hysteresis of the motor control responding to the input and error signals. I've not measured it, but I can imagine it wouldn't be the full 50 Hz.

    I'd be interested in your tests -- maybe you could hook up a servo horn to make/break an opto switch, and then measure the number of pulses in a second. Just for your efforts, no matter what the result, I'd gladly treat you to a #1 at In-and-Out. Even upsize the drink! Science deserves its rewards, you know.

    -- Gordon
Sign In or Register to comment.