# Motors backing off

We are using 393 motors and RobotC. Is there anyway for us to make our motors not backoff when no power is applied?

A lot depends on the particular configuration of your mechanism. In some cases, for example with a claw, you could have elastics keep the mechanism closed and use the motors only to open the claw. Or use elastics to keep the claw open and use the motor only to close it.

If you keep the motor at full power (127) for too long, you risk overheating the motor and tripping out its PTC, in which case it will shut down. Sometimes you can keep the motor at a lower power (say, 30 or 40) for extended periods of time without tripping the PTC.

If you can describe your mechanism or provide a photo, I’m sure peeps on the forum can provide better ideas.

You could do some fancy PID control, but the simplest way is to just apply a trim, or braking power. It should be as low as possible, and something as little as 10 or 15 is usually sufficient to lock the motor from moving backwards.

Thanks for the help. is this something that we can add into our program? I am not familiar with “PID control.”

You can, but it is usually difficult or advanced to program. Also, you need to have a potentiometer or encoder to have feedback on the motor position, it is not possible with just the motor. I personally think PID is overkill for what you are describing, but if you want to try it, why not. Search on the forums and there are lots of threads.

You could just change the code to hold the motors at 15 (or whatever you want) when the button is not pressed.

This is what my lift code is right now (quite simple, we had to scrap our elevator lift for the first competition)

``````//Lift Controls
if (vexRT[Btn6U]) { //Lift Up
motor[liftLeft] = 127;
motor[liftRight] = 127;
}
else if (vexRT[Btn6D]) { //Lift Down
motor[liftLeft] = -127;
motor[liftRight] = -127;
}
else {
motor[liftLeft] = 0; //No Movement
motor[liftRight] = 0;
}

//Intake Controls
if (vexRT[Btn5U]) motor[intake] = 127; //Open Claw
else if (vexRT[Btn5D]) motor[intake] = -127;	//Close
else motor[intake] = 15;	//No Movement
}``````