How to lock motors on a drive train

We are having a bit of trouble with robot drift. Basically we want our bot to stop immediately or soon after we stop pressing the sticks. Does anyone know how to do this?

Try setting your motors to “brake” mode. I don’t know which coding platform you are using, but in blocks, use this block:

2 Likes

Thank you but we’ve tried that. We now realize that it can’t be solved easily with code. Let me elaborate on the problem, we want our bot to immediately stop after we stop pressing the joystick. Our coach said that it’s a physics problem and the only way would be to put a counter spin in the code.

Yeah…Instantly stopping would require an infinite amount of force or a massless robot because of Newton’s Second Law. Even counterspinning your motors wouldn’t fix it, in fact, you would take longer to slow down than just brake mode. Unless you have really low traction though, you should stop fast enough, just not instantly.

1 Like