mBot won't run in a straight line


#1

Is there a way to make the mbot run in a straight line. I have tried everything I can think of.


#2

Which kit, the mBot STEM, Starter Kit, or Ranger?
Also, could you post a screen shot of your code?

Ideas

Make sure that the wheels/axles are not binding against the frame. The usual cause of this behavior is that some sort of friction is being induced that causes one motor to turn more slowly than the other one. That being said, these are “toy” motors that are not encoded so variances in manufacturing can also cause this sort of behavior. If you have eliminated some sort of friction issue, then you may need to write a custom move block (not that difficult) to account for the differences.

I have yet to encounter any motors that don’t have encoders that guarantee a robot chassis moves consistently in a straight line over more than about 12 inches of distance. That is one of the reasons I used the line following module and black tape lines in the maze solver so that I could minimize the impact of that behavior.


#3

Hi Chuck,

Its a blue stem mbot I guess.
I think its unfixable, toy motors like you mentioned just aren’t up to it. I checked for any binding, I even loosened the screws holding the motors to the side of blue body, nothing is rubbing. At speed 255 it pulls left about a foot when traveling 5 feet forward. At speed 100 it pulls right 2 feet when traveling 5 feet forward. As I recall the amount of charge even has an effect.

49%20PMMy%20mBot%20SetUp%20Cropped


#4

Hmm, I’m wondering if the extended chassis length might also be contributing to the veer because a relatively small yaw movement at the back translates to a much larger movement on the front. You might want to write a custom block and specify the movement for each motor. Some experimentation is obviously in order to determine the correct proportion of speed for each motor, but other than replacing the motors that’s the only thing I can come up with off the top. mBlock has a motor block for that purpose, with the run forward block (and it’s other options for running backwards or turning left/right) are more of a convenience block that essentially makes the calculations under the covers.

The custom block would likely take a single argument for speed and then based on your observations the block would scale the requested speed appropriately to account for the yaw movement.


#5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.