Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

DC Motor Braking for speed control (Pololu 12V gear motor 4755 and VNH5019 Dual driver 2507)

Hello Internet!

I’ve got a bit of a problem I can’t seem to wrap my head around. I’d like to use a DC motor to precisely control the speed of a vehicle going down a hill. When on flat or up ground, obviously one uses the motor speed control. Going downhill is where I’m confused about the brake function. Id like to have a “heavy” cart roll down a flat surface at a precise speed using these motors. if I let it coast, it’s too fast so I need to slow it down. There are 400 increments that can be used for brake, does each of those correspond to a precise speed? I.e. if I set the brake will it slow it down without bringing it to a stop?


Pololu 100:1 12V gear motor w/ encoder (product code 4755)
Pololu Vnh5019 dual product code 2701
A Star Prime.


Product number 2701 corresponds to a pack of screws, not our dual VNH5019 motor driver, which is product 2507. Is that the product you are talking about? Are you using the Arduino library we made for that product?

If you are using our dual driver and our library, then that number just corresponds to the portion of the time it is braking vs coasting. 0 is full coast, 400 is full brake. The actual speed of your robot will depend on that plus external factors like its weight, the slope it’s on, etc.

By the way, if you wants to do precise speed control, you should probably be using motors with encoders or tachometers for feedback to implement a closed-loop control scheme. Then, if the robot is going too fast, the control algorithm could start applying a little power in the opposite direction to slow it down.

- Patrick