Troubleshooting VEX V5 Smart Motors

The following article will provide guidance on how to troubleshoot VEX V5 Smart Motors if you are experiencing one or more of the following issues:

  • Motor is not spinning to the intended position
  • The VEXcode V5 project is stopping unexpectedly in the middle of the project
  • Motors are moving unexpectedly

Problem: Motor Not Spinning to Intended Position

If your motor is not spinning to the intended position, try the following steps to troubleshoot.

VEXcode V5 Devices window with the Motor options shown. Below, the Gear Cartridge setting is highlighted. This setting has three different ratio options, they read 36 to 1 with 100 rpm, 18 to 1 with 200 rpm, or 6 to 1 with 600 rpm.

Before editing your VEXcode V5 project, check that you have the correct gear cartridge selected in the device configuration. The default choice is the green 18:1 gear cartridge.

For more information about configuring individual motors in VEXcode V5, view this article.

Two VEXcode V5 blocks are shown, with labels indicating that one is correct and one is incorrect. The correct block reads Spin ArmMotor to position 90 degrees. The incorrect block reads Set ArmMotor position to 0 degrees.

Check the commands used in your project. [Spin to position] is used to spin a motor to a specific position. In contrast, the [Set position to] block sets the motor encoder’s position to the given value and will not move the motor.

Ensure that you are using [Spin to position] rather than [Set position to] in your projects.

Diagram of two connected gears, one is small and is labeled Driving Gear and the other is large and is labeled Driven Gear. Two highlighted lines indicate the degree difference between them.

Make sure that you know the correct degree position that you want the motor to move to. Any gear trains could impact the number of degrees needed to fully raise an arm or open a claw.

See this article to learn more about gear ratios with VEX V5 Smart Motors.

Brain screen is shown in the Home menu with the Devices option highlighted.

If you are unsure of how far to move a motor, use the device information available on the V5 Brain screen. To open the device information for a motor, first select 'Devices' from the V5 Brain screen.

Brain screen is shown in the Device Info menu which has a list of all of the Brain's Smart Ports and connected devices. The icon for a connected motor in the Device Info menu is highlighted to indicate that items can be selected to open their information menus.

Then select the motor that you want to see more information for.

NOTE: The motor must be plugged into the V5 Brain in order to be seen on the devices screen.

Brain screen is shown in the dashboard for a motor, with the Revolutions and Degrees values highlighted.

Once opened, you will be able to see the degree and rotational position of the V5 Smart Motor selected. This will update in real time if you want to see how the values change as the motor spins.

The device information reports the position of the motor in degrees and revolutions, so as you move a motor (like opening and closing a claw) the numbers will change. Use this testing to determine how many degrees or rotations are needed to close a claw, raise an arm, spin an intake, etc.


Problem: VEXcode Project Getting Stuck

Your project may seem to get stuck because the motor cannot reach its intended target position. You can adjust the position the motor is moving towards or can set a “timeout” for the motor.

VEXcode V5 Set motor timeout block is shown with the Motor dropdown menu open. Two different motors are shown to indicate that each one can be selected individually.

Motor timeouts allow you to set a time limit for the motor to reach its target position. If it has not met that position when time expires, the motor will stop trying to spin and the project will move to the next command.

VEXcode V5 blocks project that reads When started, set ClawMotor timeout to 3 seconds. Next, spin ClawMotor close for 360 degrees and then drive forward for 200 mm.

In this example, the motor timeout is set to 3 seconds. If the claw does not close to 360 degrees within 3 seconds, the motor will stop spinning at the 3 second mark then move to the next command and drive forward.


Problem: Motors Not Holding a Position

You may have an arm motor that moved down unexpectedly because it is being pulled by gravity or other forces. Using [Set motor stopping] allows you to control that movement of the arm after another command is completed.

VEXcode V5 Set motor stopping block is shown with the stopping parameter dropdown menu open. The dropdown menu options read brake, coast, and hold, and the hold option is highlighted.

The [Set stopping to] command allows you to determine the behavior of the motor after it stops spinning.

Using the ‘hold’ parameter will instruct the motor to fight gravity. ‘Hold’ causes the motor to come to an immediate stop and will return it to the stopped position if moved.

VEXcode V5 blocks project that uses a forever loop to handle Controller inputs to control a robot arm with a claw. Most of the blocks are inside of the forever loop, but two blocks are outside of it at the beginning of the project. These two blocks are highlighted and they read set ArmMotor stopping to hold, and set ClawMotor stopping to hold.

Set the motors to ‘hold’ before other commands using the motors as shown in this custom Controller code example here.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: