Need to disable drivers in case of fault with DualG2 High Powe Motor Shield 24v18?

I’m using the DualG2HighPowerMotorShield24v18 to control two 12V electric motors in my kids’ ride on electric vehicle.

I’m new at electronics, so I apologize if this is a silly question. My arduino code uses the stopIfFault function in the demo sketch. I found that I get a fault if the vehicle tires roll at all without being driven by the motor controller. In which case the motor drivers are disabled and the vehicle won’t go until the arduino is reset.

What are the dangers of not disabling the motor drivers if a fault is detected? Thank you very much in advance!


The fault pins are good for indicating when something is going wrong, like your motor is stalling, your battery is low, or the output wires are shorted. You can find more information about the fault conditions in the “Control and feedback pins” section of the user’s guide (which is available on the product page under the “Resources” tab). The safest thing to do when a fault triggers will usually be to stop your system until you determine that everything is alright; not doing that increases the risk that your system will act unexpectedly or somehow damage itself.

I suspect the short circuit protection for the output pins is triggering when your vehicle tires roll on their own. In this case it might be okay to revise your code to just ignore the fault, such as by removing the while(1); lines from the stopIfFault() function. However, that will also prevent the driver from stopping for other types of faults, so a better compromise might be to change the stopIfFault() function so it does not latch, i.e. so operation resumes automatically when the fault condition has cleared. One way you could do that is by replacing the while(1); lines with while(md.getM1Fault()); and while(md.getM2Fault());. You could also just try setting up your program so that it only monitors the fault pins when you are actually driving the motors.

- Patrick