DPRG
DPRG List  



[DPRG] PWM Frequency/Resolution Tradeoffs

Subject: [DPRG] PWM Frequency/Resolution Tradeoffs
From: Dan Creagan dcreagan at bellevue.edu
Date: Fri Aug 24 09:57:47 CDT 2001

12" floor tiles. While crazy things get in the way of a test run (in my
case, nosey Golden Retrievers and the grouted cracks between the tiles
occasionally bump it off course), it usually returns to the same tile
and usually within a 1/2" or so.  The real trick is to get it to turn
around and run the same course again. The aforementioned obstacles still
get in the way, but it can do it.  Fatter tires would help a little. I'm
running 5" (sometimes 4", depending on which bot I use) wheels with O
rings as tires.  The wheels fall in love with cracks of any kind.
That's why the robot is called Skinny. ;-}
 
Dan

-----Original Message-----
>From: dprglist-admin at dprg.org [mailto:dprglist-admin at dprg.org] On Behalf
Of Matt Minnis
Sent: Friday, August 24, 2001 9:23 AM
To: 'DPRG List'
Subject: RE: [DPRG] PWM Frequency/Resolution Tradeoffs


Dan,

What size floor tiles are you talking about?

Thanks,

Matt Minnis

At 09:02 AM 8/24/2001, Dan Creagan wrote:


The Duty Cycle response curve of the motor will be different at
different frequencies. Depending on the motor, higher might give you a
flatter and more usable response curve. Just have to experiment.
 
Your statement about having a 300 Hz growl does sound attractive until
you do it. It gets really annoying after about two runs.  However, you
can actually hear the speed build up when it goes from full stop to
running - which makes it pretty cool to do once. But I couldn't take it
after the first couple of runs. Had to bump it up.
 
8 bit resolution and locked anti-phase gives me plenty of resolution and
control for my purposes.  I have it going out on four and five turn, 20'
runs and returning to the same spot - The same spot in this case is
defined as the same floor tile it took off on.  
 
Dan
http://academic1.bellevue.edu/robots/Skinny.html
 
-----Original Message-----
>From: dprglist-admin at dprg.org [mailto:dprglist-admin at dprg.org] On Behalf
Of David Peterson
Sent: Friday, August 24, 2001 4:15 AM
To: Kipton Moravec; DPRG List
Subject: Re: [DPRG] PWM Frequency/Resolution Tradeoffs



I've been looking at a lot of different websites that discuss PWM
frequency and why they chose a given method for different motors. What I
offer is not science, but simple observation. It seems that high
frequency PWM is simply to avoid any possible audible "noise" that may
be generated with frequnecies below 20 kHz. Motors seem to operate
perfectly well with lower PWM frequencies as long as these are above
their mechanical and electrical time constants. There may also be a tie
in with what type of PWM you use, whether Sign Magnitude or Locked
Antiphase, though I'm unsure of what effects either of these have. It
boils down to : if you switch faster than the motor can react, the motor
doesn't react any differently than it would for simply a lower level
voltage. Besides it might be cool if your robot had a 300 Hz growl or
whine or what ever 300 Hz turns out to be. (Isn't A 440 Hz?) 

David P 

http://www.geocities.com/robodave2000/ 


----- Original Message ----- 

>From: Kipton Moravec <mailto:kip at kdream.com>  

To: DPRG List <mailto:dprglist at dprg.org>  

Sent: Thursday, August 23, 2001 9:49 PM 

Subject: [DPRG] PWM Frequency/Resolution Tradeoffs



I am looking at a PWM generator. 

  

As far as I see there is a slight problem here. 

I had been thinking of a 8 bits of PWM resolution.  

However there was an argument from David Anderson that 14-bits was more
appropriate, as that was what he used. 

  

There is another school of thought that says the PWM frequency should be
high so that there is no audible buzzing.  So it needs to be above
15kHz. 

  

So I did some calculating: (Hope this table looks O.K.) 

  

    Divisions|               Frequency             | 

Bits Per PWM  20000000   22118400 11059200 18432000 

  8    256     78125       86400    43200    72000 

  9    512     39062.5     43200    21600    36000 

 10   1024     19531.25    21600    10800    18000 

 11   2048      9765.625   10800     5400     9000 

 12   4096      4882.813    5400     2700     4500 

 13   8192      2441.406    2700     1350     2250 

 14  16384      1220.703    1350      675     1125 

 15  32768       610.352     675      338     562.5 

 16  65536       305.176     337.5    169     281.25 

So now what do I do???  If I decide to go to 10 bits and a processor
clock of 20 MHz that means my PWM frequency will be about 19.5 kHz. 

  

If I go to 14 bits like SRO4, then the PWM frequency will be around 1220
Hz.  It appears it will take about 1 microsecond to turn on or off the
MOSFET.  So I don't think any of these speeds will be a problem for the
MOSFET. I am looking for the maximum speed.  I can always offer a slower
PWM frequency by using a divisor.  

  

I think the compromise is at 10 or 11 bits.  If I go to 11 bits, and use
a 40 MHz crystal that gives more divisions, and I can divide the
frequency by 2 for the processor clock.  What do you guys think? 

  

20MHz is the fastest the 6 state 8051 will go.  This is the equivalent
to the traditional 8051 running at 40MHz.  The other clocks speeds make
the baud rate more precise.  Unfortunately the crystal TTL oscillator
for 2X 18.432 MHz is not easily available. 

  

I am looking for opinions and justifications.  I can always go slower, I
can easily cut the frequency by factors of 2 and probably by any other
integer factor if I think about it.  I think 300 Hz is too slow, but I
do not have data to support the theory. 

  

Kip 



  

Kipton Moravec  kip at kdream.com 

DREAM 

Custom Electronics Design and Manufacture 

http://www.kdream.com





The generation of random numbers is too important to be left to chance.
=========================================================
Preferred Resources          (314) 567-7600 phone
701 Emerson rd.              (314) 993-6699 fax
Suite 475                      mminnis at prefres.com
St. Louis, MO                 
63141
=========================================================
_______________________________________________ DPRGlist mailing list
DPRGlist at dprg.org http://nimon.ncc.com/mailman/listinfo/dprglist

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

More information about the DPRG mailing list