Could use some help with PWM
Hi,
I'm looking to control a couple motors using H-bridges, and hopfully use the BS2 for on/off & speed control.· I can handle the on/off part, but PWM continually confuses me.· I understand the princepals of it and stuff like that; I just can't figure out how to generate it using the BS2.· So I looked into the PWMPAL;·since I've never used serial communacation before, that confused me more .· So finnally, I'm asking for help, will sombody please explane how to make PWM.
Thanks,
crgwbr
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
I'm looking to control a couple motors using H-bridges, and hopfully use the BS2 for on/off & speed control.· I can handle the on/off part, but PWM continually confuses me.· I understand the princepals of it and stuff like that; I just can't figure out how to generate it using the BS2.· So I looked into the PWMPAL;·since I've never used serial communacation before, that confused me more .· So finnally, I'm asking for help, will sombody please explane how to make PWM.
Thanks,
crgwbr
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Comments
I haven't tried it yet, but there is a discussion here:
http://forums.parallax.com/showthread.php?p=536244
HTH
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Greetings crgwbr,
Sorry that I didn't take more time to look at this carefully.
Now that I look at it again, I'm not so sure how it's done using the
Basic Stamp and an H-bridge alone (in other words, no additional
motor control accessories).
A Google search turned up this:
maelabs.ucsd.edu/mae_ds/stamp/how/hardware/motor_pwm_ours/motordriver.html
It looks promising, but I'll have to take another look at it when I get home.
Maybe someone at Parallax can show us how it's done...
Thanks
What do you plan to use as an input to the stamp to control the PWM (example...POT,debug terminal, RC controller)? Remember that when using PWM it ties up the micro and you can not output two PWM on different pins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Post Edited (bennettdan) : 6/22/2006 7:53:10 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
When you apply power to an inductive load such as a motor, you create a magnetic field around the coil.
When the power is removed, the magnetic field collapses causing current to flow in the reverse direction
through your circuit. MOSFET's and other electronics don't survive very long under these conditions and
will prematurely fail. A simple fix is to place a diode in the reverse direction across the MOSFET or BIPOLAR
transistor. Some, not all, MOSFETS have such a diode already built-in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life