How to brake using DC motors
Kris Cardoen
Posts: 46
Hi,
I'm building my robot with the parallax stingray kit, using the propeller board.
It is my first robot with DC motors and it seems to be more difficult then I suspected.
The biggest problem for me is how to stop the robot, without driving some extra distance. If one of my senors detects an object it needs to have a full stop.(the wheels always spin some more after the halt command)
In the past I have used smaller servo motors who do not have this issue. Is there a way to solve this?
Maybe instead of setting my pulse 1500, I could send a reverse pulse for a very short period? But this might be a bad idea for the motors
Any suggestions, or info would be much appreciated
Regards,
Kris
I'm building my robot with the parallax stingray kit, using the propeller board.
It is my first robot with DC motors and it seems to be more difficult then I suspected.
The biggest problem for me is how to stop the robot, without driving some extra distance. If one of my senors detects an object it needs to have a full stop.(the wheels always spin some more after the halt command)
In the past I have used smaller servo motors who do not have this issue. Is there a way to solve this?
Maybe instead of setting my pulse 1500, I could send a reverse pulse for a very short period? But this might be a bad idea for the motors
Any suggestions, or info would be much appreciated
Regards,
Kris
Comments
I think sending a reverse pulse is a bad idea because it will use more power and be hard on the motors. You mention sending a 1500 pulse, are you using the HB-25?
A modification to a stock Scribbler for better odometry. It's pretty easy to see the difference when the robot stops with dynamic braking (green LED on) versus coasting to a stop with no braking (green LED off).
This depends entirely on the design of the h-bridge, and would have little to do with your code. Using the term loosely, dynamic braking (actually regenerative braking) uses the un-powered motor as a generator, feeding the current produced by the spinning motor back into the battery supply. If you short the motor leads all the current is dissipated as heat in the motor. This is dynamic braking, but not regenerative.