Motor driver fault when quickly changing speed


Im currently working on a project that uses a BOSCH PSR 14,4-2 cordless drill. The motor terminals are connected to an MC33926 shield on top of my arduino uno. The power for the motor comes from its battery, connected to the MC33926's VIN and GND terminals, right beside the M1A and M1B connections. Everything runs fine. But when I quickly change the speed of the motor, like from 300 to 0 or 400 to 0, the driver tells me that there is a fault. When I slowly reduce the speed however, the motor does not get any faults.

Code to detect fault (taken from pololus user guide)

void stopIfFault()
if (md.getFault())

The current readings are still okay with around 2.4 amps at a speed of 280, 4.5 amps on max speed. The error only occurs on speeds > 250.

Rapid change in speed will momentarily draw much higher currents, especially with a drill motor with is high current. Ramp the speed.

For large industrial motors you have to ramp the speed to limit current or else risk destroying the motor completely. A typical large motor has a stall current 20 to 50 times its operating current, smaller motors more like 10 times. Remember power dumped as heat in the windings goes up as current squared too.

For a DC motor the current = (Vin - Vback) / Rwindings, and Vback, the back-EMF due to motion is proportional to rotation speed. Vin is the effective input voltage if using PWM drive, and so ramping this allows the rotation speed to track the drive and keep the current reasonable.