Break Types

I’m interested in knowing the difference between the 3 break types. The documentation is rather vague in that respect; it only says coast, break and hold. Hold, holds it in position rather well which is good for holding shooting mechanisms in place, but what is the difference been break and coast? Example of where you would use coast and when to use brake?

Found answer in RobotC documentation

setMotorBrakeMode(motor1, motorCoast);
setMotorSpeed(motor1, 0); //The motor will now Coast (does not resist movement)
sleep(1000);

setMotorBrakeMode(motor1, motorHold);
setMotorSpeed(motor1, 0); //The motor will now Hold (resist movement and stay at position)
sleep(1000);

setMotorBrakeMode(motor1, motorBrake);
setMotorSpeed(motor1, 0); //The motor will now Brake (resist movement only)
sleep(1000);

Coast does exactly what you think. It will just let the motors move without any power being applied.

The real difference is between brake and hold. Hold fights to get back to position, while brake just resists movement in general.

STORYTIME!!! When one of my kids was making their 6 bar…

First, they used Brake. When they lifted the 6 bar up and applied Brake, the 6 bar slowly lowered itself. The motors resisted the movement but did not bring it back to position.

Then they tried Hold. This did exactly what they wanted, keeping the lift at the same position once up. Awesome!

Finally, their build wasn’t that good… And the gear on the right side would slip sometimes. Unfortunately, this would make the lift lean to one side. To fix it, they made one of the buttons apply Coast to the motors. The lift would drop and hit the base, straightening the lift out. Then they would go back to driving the robot.

So, they managed to use all three modes, and two were in their code at the end of the day. Next time they should just build better botz.

1 Like

Yup all fine tales should with this

Glad they were able to take advantage of the different brake profiles to solve problems - make sure they document it in their engineering notebook!

Just a tip, make sure you watch your motor temperatures when using brake type hold because it tends to burn out the motor if used for too long or used to resist too much opposing force.

2 Likes

My IQ kids to this all the time. Leave the robot hanging for 10 minutes…