PWM freq optimization

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
User avatar
sofaspud
Posts: 531
Joined: Wed Feb 13, 2002 1:01 am
Location: San Antonio, TX
Contact:

PWM freq optimization

Post by sofaspud »

I'd like to request any info on determining the optimum frequency of a PWM circuit. Of the type used to control common loads such as LEDs, incandescent bulbs, and DC motors. Many sources describe how to set the frequency, but not necessarily the whys and gotchas for various frequencies - flicker, efficiency, EMI, RFI, etc., etc. Thanks for your input.
Robert Reed
Posts: 2277
Joined: Wed Nov 24, 2004 1:01 am
Location: ASHTABULA,OHIO
Contact:

Re: PWM freq optimization

Post by Robert Reed »

With my limited experience in these devices it seems the higher the frequency, the smaller the components - Good. The lower the frequency, the larger the components - Bad. The steeper the rise time (Tr), the more efficient the semiconductor's switching will be - Both Good and Bad as the EMI will be more broad band with faster Tr . Probably not a lot of help to you, but something to gnaw on while you're researching. :grin:
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: PWM freq optimization

Post by MrAl »

Hi,

I have to agree with Robert in that usually the higher the frequency the better.
When i was working in the field way back when we were limited quite a bit in frequency
for what we could use for dc to dc conversion. Today however, the trend is to use
as high a frequency as possible in order to keep size as small as possible.

There are some exceptions to this rule however, and i cant hope to post them all
here much less know them all to begin with, but one that strikes me right off is the
PWM for driving stepper motors.
Stepper motors are best driven with drivers that can PWM the current to the windings,
and the unfortunate side effect of the PWM is that the motor heats up more than with
a constant current due to several AC effects. Thus, there is a limit to the high end
that makes the stepper motor work well yet doesnt heat it up too much.

For other unfamiliar applications i would say study out the type of load as well as you
possibly can in order to ascertain the effects of frequency on that load. This will
give you a better understanding of what you can and can not do.

As a last note, some PWM is kept high just to reduce audio output (from say a motor).
LEDs vs Bulbs, LEDs are winning.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: PWM freq optimization

Post by philba »

The correct PWM frequency is really dependent on the application. There are too many factors to give a rule of thumb.

Not wanting to quibble but most stepper drivers don't really use PWM. It looks a lot like PWM but frequency and duty cycle are not determined in advance. It's determined by the current. When the current rises above a pre-set level, a comparator cuts the current. Typically there is a fixed off period set via an RC network. So the frequency will be different for a different motors. You never control the frequency directly, unlike DC motor control.
User avatar
haklesup
Posts: 3141
Joined: Thu Aug 01, 2002 1:01 am
Location: San Jose CA
Contact:

Re: PWM freq optimization

Post by haklesup »

For lighting, be it LED or incandescant, the min frequency is one that does not cause flicker. While that rule of thumb is probably around 24Hz, some people are very sensitive so I would peg that at min 100Hz (~4x faster). The maximum depends on the response time of the lamp. An LED can turn off quickly but not instantly. Junction capacitance, parasitic capacitance of the wiring etc conspire to keep it turned on for a moment after the switch opens. For incandescant lamps this is even longer since a filiment has to cool off (or not cool off all the way if that's the goal). You would need to look in a datasheet and run some characterizations to see what's the absoulte max frequency.

In the middle you have to worry about duty cycle, is the frequency low enough so you can vary the duty and still have a preceptable effect (since in PWM, usually Freq is fixed and duty cycle is variabe).

So for choosing a frequency, start with the duty cycle, determine the max on/min off or max off/min on time you need and the frequency will be the inverse of the sum of those times.

Rule of thumb is that there is no rule of thumb. Each application sets the limits then you can choose from that ballpark a set of parameters that minimizes construction costs and size
User avatar
sofaspud
Posts: 531
Joined: Wed Feb 13, 2002 1:01 am
Location: San Antonio, TX
Contact:

Re: PWM freq optimization

Post by sofaspud »

Well, thanks all. This is useful stuff. And explains why I keep finding load-specific and IC-specific docs on the web.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: PWM freq optimization

Post by MrAl »

philba wrote:The correct PWM frequency is really dependent on the application. There are too many factors to give a rule of thumb.

Not wanting to quibble but most stepper drivers don't really use PWM. It looks a lot like PWM but frequency and duty cycle are not determined in advance. It's determined by the current. When the current rises above a pre-set level, a comparator cuts the current. Typically there is a fixed off period set via an RC network. So the frequency will be different for a different motors. You never control the frequency directly, unlike DC motor control.
Hello philba,


Well, i dont know about you, but i dont let my motors control me, i rather like to control them.
I like to have control over the frequency so i can have some control over the heating of the
motor while it is operating.

What i mean is that it sounds like you have been working with some microcontroller apps for
use with steppers, which typically use a timed 'off' period for various regulation techniques,
but that is not the only way to run stepper motors and i dont believe it is the best by any
measure. And i wont argue that PWM is sometimes said when really the frequency varies,
but it sounds to me like you have never read an L297 data sheet.

An L297 is an ic chip that is made specifically to drive stepper motors, and the RC network is
used to place the frequency of operation at the desired set point. This allows you to choose
the frequency and thus partly control the heating of the stepper motor.

Also, the stepper motor heating with frequency is not something i made up just for my previous
post...it has been a known issue with stepper motors for quite a long time now.
LEDs vs Bulbs, LEDs are winning.
User avatar
philba
Posts: 2050
Joined: Tue Nov 30, 2004 1:01 am
Location: Seattle
Contact:

Re: PWM freq optimization

Post by philba »

Actually, more modern stepper controllers use a fixed off time. Allegro has a number that do this. You still have control of the approximate frequency but it requires selecting the off time with respect to the likely on-time. On-time is based on how long it takes the motor coil current to reach the cut-off level.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: PWM freq optimization

Post by MrAl »

Hi again philba,

Oh ok, so you have been using Allegra products...secrets out now! :smile:
That's cool too, and i think i like some of their products too.

Please note however that the main point i was trying to make earlier was
about the frequency vs heating of the motor, that's all. Whatever you
decide to use im sure will work pretty well, be it PWM or other forms
of regulation. I just wanted to make the note that it's a good idea
sometimes to look at the frequency and that it doesnt go too high
because it may cause the motor to heat up too much.

Im sure there must be more about this on the web somewhere.
LEDs vs Bulbs, LEDs are winning.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests