My favorite way as well. You can also just put a resistor across the motor leads. Its not as good and more power intensive but its simple to drive and sufficient in some cases. Pick a value that's a balance between power dissipation and deceleration.You can have every effective braking with just motor shorting. I easily got within a few QEI counts of the position set-point just using fast relays to drive or short the motor.
by Duane Benson
by Aaron Carman
by Jake Hertz
by Aaron Carman