DPRG
DPRG List  



DPRG: PWM schemes

Subject: DPRG: PWM schemes
From: Jim Brown jim_brown at adc.com
Date: Thu Sep 9 10:30:37 CDT 1999

"James, Bill" wrote:

> 1111111111111111   Full on
> 1111111111111110
> 1111111111111100
> 1111111111111000
> 1111111111110000
> 1111111111100000
> 1111111111000000
> 1111111110000000
> 1111111100000000
> 1111111000000000
> 1111110000000000
> 1111100000000000
> 1111000000000000
> 1110000000000000
> 1100000000000000
> 1000000000000000
> 0000000000000000 Full off

Here's just a suggestion, not that it really makes any difference:  try
equalizing it out:


1111111111111111   Full on
1111111111111110
1111111011111110
1111011111011110
1110111011101110
1011011011011101
1010110101011011
1010101101010101
1010101010101010
1001010100101010
1001010010100100
1001000100100100
1000100010001000
1000010000100000
1000000010000000
1000000000000000
0000000000000000 Full off

The higher the Hertz rate the better.  Less than 100hz may give you some

buzz.  You can play music through your motors if you make the notes
right!
The faster the better.  If you're going over 500hz for PWM, then your
levels
of slow and fast will be greater as well.  For most things, though, 5 or
less
speeds is probably enough.  More speeds will allow you to ramp up and
down
your speed, but probably more at more than 5 speeds it gets hard to
distinguish
the difference just by looking.  I was PWMing Baby Bot 2 at probably
less than
30hz and I was ok with that.  Hey, if it suits you, that's all that
matters, right?
I used timer interrupt to create the PWM (that's all a regular 8051 has
to work
with).  The HC11s have nice pwm facilites built in to just set it and
forget it.
If you're working with a PC, you might be able to use the timer int or
the timer
chip, but I don't think the resolution is what you want 18hz or so.  You
could
always create a serial motor controller with PWM circuit to get the PWM
levels you want.

- --
    ____             ___
    \/\_\@  ____    /  /\ __  ___          ___  jim_brown at adc.com
    / / /\ / / /\  /--/ //\_\/\_/\ /\/\/\ /\_/\ brownjim at airmail.net
/__/ / / // / / / /__/ // / /__/ //_/_/ // // / home: (972)495-3821
\__\/  \/ \/\/\/  \__\/ \/  \__\/ \_\_\/ \/ \/  work: (972)889-4228
http://www.cyberramp.net/~jbrown http://www.dprg.org
Cole's Law:  Thinly sliced cabbage.

------------------------------

More information about the DPRG mailing list