Shop OBEX P1 Docs P2 Docs Learn Events
Trying my hand at a 3pin h-bridge driver, Motor Ramping? — Parallax Forums

Trying my hand at a 3pin h-bridge driver, Motor Ramping?

rwgast_logicdesignrwgast_logicdesign Posts: 1,464
edited 2013-02-24 18:26 in Robotics
Ok, so ive been through all the obex objects that are meant for motor control, and none of them are what Im looking for, they all have minor issues, and im not slick enough yet to edit the ones I actually like do to the amount of PASM and shorthand. Ive decided to skip around a bit in the SPIN/PASM curriculum I set up for myself, in order to write my own simple driver for a 3 pin style h-bridge. Using the appnote on counter along with this article http://propeller.wikispaces.com/PWM and the Arduino Light library on obex, I think I should be able to achieve what I want quickly.

Basically all im looking to do is generate PWM signals on 4 pins, along with the enable line control. It is only three lines of code to get a timer working so it really is not a huge deal, I just want to be able to control the h-bridges fast breaking along with being able to choose a carrier frequency up to 30khz.

Now Ive already written a driver like this on the Arduino, including ramping functions. The l298 driver on Obex appears to ramp every single maneuver sent to the motors. I read through the boeBot book a little bit about ramping along with some other documents. What Im wondering is do you guys always ramp every movement your bot makes? I know it helps with accuracy/slippage, and I know its also easier on the motors, but what im not sure of is how fast you can ramp the motor and it still accomplish these features? I perfer to ramp rather quickly, is the slower the ramp the better, should I ramp every movement?

Also kind of unrelated, but if you PWM your motor so slowly the wheels wont move is this bad, is this actually making the motor draw stall current. The reason im asking is ive noticed some of the motor drivers in obex just slow the wheels down so much they cant pull the bot, instead of shorting the motor leads.
Sign In or Register to comment.