Hi, is it possible to drive a motor in reverse using PWMPAL with my BS2e? I have the circuit wired as the sample that came with the PWMPAL documentation?
You can drive a motor in reverse just by connecting it "backwards". If you want to select the direction under control of the Stamp, you will need something called an "H-bridge" (because of the form of its schematic). The PWMPAL still is the device that controls the speed of the motor, but the H-Bridge controls the direction. Do a Google search for "wiki h-bridge" and you'll find some good explanations. Parallax sells several motor controllers that incorporate an H-bridge and I think some of their tutorials cover it. Search these forums for the term.
Thank you for the response. Yes i want to control the motor direction. I know about h-bridges. I was hoping for some magic like using 2 different outputs from the PWMPAL with a different wiring setup to run the motor in reverse.
The simple solution is a relay, you can trip the relay and reverse the polarity, still using the PWMPAL. An extra pin/transistor is required obviously for the relay.
Post Edited (originator) : 3/21/2007 4:00:39 AM GMT
Using a PWMPAL to drive an H-Bridge all you need to do to reverse the motor is switch which PWMPAL output is toggling and bring the other output LOW. For example, for one direction you will engage channel 1 of the PWMPAL while channel 2 output is just LOW. Then for reverse you bring channel 1 LOW and PWM channel 2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support
Comments
Post Edited (originator) : 3/21/2007 4:00:39 AM GMT
Thanks
Using a PWMPAL to drive an H-Bridge all you need to do to reverse the motor is switch which PWMPAL output is toggling and bring the other output LOW. For example, for one direction you will engage channel 1 of the PWMPAL while channel 2 output is just LOW. Then for reverse you bring channel 1 LOW and PWM channel 2.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support