Motors Engaging at Slightly Different Times

I am having my students code and program their V5 robots to run without the remote. All they have to do is drive straight for 100" until they contact a volleyball. At that point they run into the ball and push it another 100" to knock over bowling pins. However, when they start their robot, they all jerk to one side before driving off. My students can’t even get the robot to go off in a straight direction. They started to code them to take off at a 10% velocity and gradually increase, but even as it increases, you can see the motor on side keep jerking the robot off its path. Its almost as if it’s getting the voltage first in a series vs. a parallel manor. The kits are new so I’m not sure if its a set up issue with the motors or what. We are also setting and programming the robot using the 2 motor-drive train system. I have read about weight distribution and all but I really don’t see that being the issue. Anyone have any ideas about why the one motor would be jumping before the other?

From what I understand it is most likely a friction issue between the two sides. one side has more friction and is causing one side to move slower. Try to make sure the wheels on both sides of the drive can freely spin when not connected to the motors. you can use the inertial sensors gyro to add auto correcting in the code, or just hard code the difference in. The problem of drifting is something that lots of teams, including myself, experience.

Hope this helps :smiley:

Can you provide a copy of the code for review?

The motors have a bit of travel before engaging. You can feel it when you turn the wheels, and how they snap back and forth.

This means that while the motors spin at the same time and speed,one will still engage before the other causing a sideways motion.

In order to fix this, you have to “prime” the motors before moving. The code looks something like this:

/start code

Set motor power to 1%

Spin motor for 0.25 revolutions

Set motor power 100%

/end code

This code will cause the drive motors to spin forward, but with so little torque that they stall out before they can actually move the robot. This ensures that both motors will engage at the same time and your robot will go straight. Then afterwards you set your torque back to 100% so that the robot can actually move.


@Railgunawesome offers an interesting solution.

This may also be an opportunity for your students to go thru the process of root cause analysis. Some ideas for them to try:

  • Become familiar with debugging, either by printing information to the screen or to the “terminal” (the terminal is better for later)
  • At a regular interval, print out the position (bonus points for adding velocity) each motor reports. If sent to the terminal, it should be possible to copy this data to Excel or some other program that would graph the data
  • Run the program both with the robot on the ground and with the robot suspended off the ground.

In addition to posting the code, a short video of the behavior would also be helpful


it’s most likely a friction issue.

if one side of the drive has more friction than the other, the wheels on that side will accelerate more slowly, resulting in that initial jerk to one side that you’re observing.

one easy way to test this is to prop up your drive so that none of the wheels are touching the ground, spin both sides up to full speed, and simultaneously stop all the motors. If one side stops spinning before the other, that side has more friction.


Does on side start moving before the other, or do they start moving at the same time?