What is a DC motor brake test

Brake the DC motor (by short circuit)

Hello everybody,

I have recently owned an Arduino and my first project (automatic chest opener) is on its way. I have already found help here or elsewhere on the Internet for all kinds of problems that may arise, but when it comes to "braking the engine" I did not get satisfactory answers.

The 12V motor is controlled via an H bridge (L293d). I have read that if I put a HIGH on both "direction" pins and also energize the "Enable" pin, the motor is braked (because the pins are short-circuited ?!). With a small brake test sketch I tested all possibilities, the fastest the motor decelerates when the two "direction" pins are on the same value (HIGH or LOW does not matter) and the "Enable" pin is on HIGH.

However, the braking power achieved is not comparable to when I short-circuit the motor by hand! Is this because the resistance across the lines to the H bridge can be too great? (Cable length about 50cm, "normal" JumperWires).

The next attempt was to connect a MosFET directly to the motor terminals when reaching the end positions (top or bottom). Then I noticed, however, that transistors can usually only be switched in one direction (the test worked in one direction), so I would need two, but I think that should be better?

I only see the solution (there are a total of 4 magnetic switches distributed over the travel path (numbered from 1 to 4), which roughly determine the position of the motor) when you reach switch 2 or 3 (depending on the direction in which you are driving ) to give a short counter-current impulse and then to drive to the end position at a reduced speed. (When reaching switch 2 or 3, slowing the motor using PWM works, but is not "fast" enough to be able to stop at the limit switch in a defined manner)

Before I do that, however, here are the questions again: -I am doing something wrong, can I short-circuit the motor with the H bridge? -If not with the H bridge, what is the best way to short-circuit a motor to brake like that? -Are there any other easy ways I just couldn't find / overlooked to brake the engine?