8-10 Degree angle

Hello guys.

I bought a robot platform like this one: http://www.robofun.ro/kit-roboti/magician_2 that has 2 wheels and 2 motors.

After running the code: go(255,255) = both motors forward with max speed, i saw that the robot tends to make right at a 8-10 degree angle... WHY? How can i make it to run straight? It`s very annoying.

I am using this motor shield: http://www.robofun.ro/shield-motoare-l298-v2

But just looking at your command go(255,255) i wonder what would happen if you reduced one of those numbers a little bit?

...R

You sir are a genius. By typing: go(0,150) i managed to see which motor is which. After that i lowered the left motor value with 5 points like so: go(155,150) and it runs STRAIGHT!

But will it work for bigger speeds? Like go(255,250)... Let`s try, brb with a response

IT WORKS! Even with bigger speeds, the difference between each motor`s speed must be 5.

But ain`t it weird? It should run straight at equal values... The fact that now it walks straight, using the 5 points difference, matters! TY!

It should run straight at equal values...

In theory yep. The difference is due to some mechanical tolerances I expect: perhaps the tyres do not have exactly the same circumference, or slight differences in motor speeds, or tiny difference in traction on one side so it slips a bit. Any or all of those kinds of things.

Xeyow: You sir are a genius. By typing: go(0,150) i managed to see which motor is which. After that i lowered the left motor value with 5 points like so: go(155,150) and it runs STRAIGHT!

But will it work for bigger speeds? Like go(255,250)... Let`s try, brb with a response

Full marks for intelligent diagnostics and for experimenting. The Arduino is a great system for learning by doing.

...R

Most DC motors are biased to run in one direction (the brush angle is advanced a few degrees to increase efficiency at high speeds in the forward direction). Typical robot motors have to run different directions for the left wheel from the right wheel so that asymmetry in motor response will be noticeable.

Also with small motors and mechanical systems variations in friction will be marked too, and small motors have poor speed regulation compared to large machines.