VNH5019 : Stop sending current to the motors

Hello everyone,

I need your help to resolve a problem to stop 24V-DC motors using the VNH5019 with an Arduino Mega 2560.

First, I am a beginner in this kind of development and my final goal is to drive 4 or 6 24V-DC motors with VNH5019.

I would like to stop sending current to my motors when its current increases some value (value gave by the user).

E.g. : Something like

unsigned long current=4000; // 4Amps
if (md.getM1CurrentMilliamps() >current) // Or while()
{
 // stop sending current to my motor and stop the motor
}

The goal is to stop the motor slowly.
I know there are “brake” functions into the library but it seems really brutal to stop the motors using them and my motor
reacts so strangely (it sputters =bounces).

P.S : Sorry about my english…

Hello.

The setMxBrake() functions in the library allows the user to slow down the motor with coast or brake mode. What value did use when you were braking the motor? If it was braking too hard, you might reduce the value to make it coast more. Alternatively, you might try decelerating the motor by setting the speed lower gradually when the current exceeds the set value.

- Jeremy

Hello I finaly found my mistakes.
Many thanks