pulse width modulation + FREQOUT
kingneb
Posts: 65
I am trying to control the speed of·two motors at once with one BS2 module.· Will·this work with the freqout command?· If not how do·I do it?
Thanks·
Thanks·
Comments
·· I've never heard of anyone trying to perform such a task.· Are you trying to control the motors directly off the I/O pins or are you using some sort of motor controller?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
The approach I've taken is to not use the "PWM" command.· Instead, you use the main loop of your program to update each pin.· You can change the duty cycle by making "Low1" and "High1" different values.
Now, the fastest speed of the pulses may be low -- 500 uSec high and low.· You can put in a 'PAUSE' command to change the pulses by 1 mSec.· But I think this is the best the BS2 can do, if you're trying to drive multiple pins.
Post Edited (allanlane5) : 9/13/2005 1:09:45 PM GMT
can somebody tell me how the translate this into a freq
for x = 1 to 300 'time, personal pref.
high fan
pause 5
low fan
pause 22
this will set a low volt fan at approx 25 %
for x = 1 to 200
high fan
pause 25
low fan
pause 4
this will run a low volt fan at approx. 75 %
japer
A period of 22 mSec is a frequency of 1/22 mSec == 45 Hz.
Now, I don't know what the duty cycle of 'FREQOUT' is.
And I hope you're driving that fan through a transistor or Darlington or some other 'high current' device. Driving it directly from a BS2 pin could damage the pin (if you're pulling more than 25 mA).
i used the transistor that came with what is a microcontroller
with a diode to prevent backfeeding problems
thanks for helping me with the math on this one
japer