Robot tends to tip after stops

Hi–

My team is building a VEX Spin-Up Robot, with a four-wheel drive train (green motors). When they run the robot straight and release the run button, the robot tends to push forward and tends to tip over a little before completely stops.

Did you know how to code the robot so it has a smooth stop after a movement?

Thanks
CJ

If the robot tips upon stopping then your drive motors are most likely set to hold or brake, alternatively you could have stick drift to where its always reversing just enough to make it full on stop
But if its during an auton then you need PID which you can just copy paste from someone else

The simplest solution would be to check if all your controller axis are zero and if so set your motors to coast. It will look something like this

while (1){ // Drive control loop

  if (controller1.axis1.position() == 0 && controller.axis2.position() == 0){
    motor.stop(coast);
  }
}

This isn’t the best solution because your robot will drift far after the joystick values stop. The best solution would be to lower your center of mass so that your robot doesn’t want to tip over. You should try various methods and record them in your engineering notebook :wink:

@Glucose_Gaurdian is right about the brake type of the motor. VEX motors have three types of brake modes in software. These are what the motor will do when you as the programmer are no longer supplying power.

  1. BRAKE - This applies internal mechanical resistance to hold the motor’s position
  2. HOLD - This tells the motor to use power to prevent the robot from moving. This is stronger than BRAKE
  3. COAST - This allows the motor to continue turning until friction naturally stops it. This is what you want to solve your problem
5 Likes

Also, if it tips when it stops, then the center of gravity could be off center of the robot. Is there one side of your bot that is heavier than the other?

2 Likes

One way you could also fix this besides all of the previous ways mentioned would be to redesign the drive base to be longer or use smaller wheels (lowers center of mass + can move further out)
Good luck solving your problem!

1 Like

To my understanding, Brake mode tells the motor to try not to turn, Hold tells the motor to return to the position it stopped at if it is moved, and Coast tells the motor to not interfere. Hold is not, to my understanding, much stronger than brake. I may be wrong, though

Using the information feature, vexcode says this about brake types:

  • Brake will cause the Motor or Motor Group to come to an immediate stop.
  • Coast lets the Motor or Motor Group spin gradually to a stop.
  • Hold will cause the Motor or Motor Group to come to an immediate stop, and returns it to its stopped position if moved.
1 Like

Exactly this. Hold is stronger than Brake simply because it will return to the original position if something does manage to move it. This would imply that rather than being a mechanical stop, it actively uses power to hold its position, which I would argue is stronger.

We could do some experimentation on this to definitively determine which is able to resist higher magnitudes of force, but I’m strongly inclined to think it would be Hold.

3 Likes