I have an L298P shield on my Arduino Uno which I've been using to control a DC motor w/ an encoder.
I'm able to control the DC Motor by writing to the PWM and DIR pins provided on the shield. However, I'd like to be able to fast brake by shorting the MTRA + and - pins. Is there a way to do this on the L298P?
I think applying "HIGH HIGH" to one set of motor pins on the L298N is a "brake" function, but I have seen warnings (can not find it now) about its use, and possibly harming the motor.
I was wondering if there was a simple way to apply opposing torque on a motor to make it stop and found that on an L298N, you could apply HIGH and HIGH to both IN1 and IN2 to do so.
On my L298P, I tested this by applying my 12V line to both of the MTRA pins and it worked. I just wanted a simpler way to do that through the shield.
I didn't see anything about this harming the motor, though.
Most, if not all motor drivers have such a brake function. Check the data sheets for the details. The L298 is ancient and extremely inefficient, so consider using a modern MOSFET motor driver.