# Difference in motor speed

I have build a robot out of old LEGO bricks, since my gearbox and tank tracks haven't arrived yet. I have used the standard one-motor-per-wheel-in-the-front-and-one-small-wheel-in-the-back-design. My problem is, that the two motors aren't running with the same speed, so my 'bot is turning to the right all the time. I have considered putting a resistor on the fast motor to make it slower, but would like to ask, if any of you have any other solution to this problem? The best solution would be some sort of sensor on the motor to tell the speed and let the CPU adjust the speed.

## Comment viewing options

long time i dont use my lego bricks, and i wanted to ask you a question since i don't remember how the differential gear is like. does it have a star-like hole on one side? i guess it does...and i guess its on the right part of it (right part if you look at the one picted above) oh and by the way by star like i actually mean a cross like one and not just a round hole.
No. The point is that the axles rotate freely in the end holes.
then how can you turn the rotation sensor with the differential? i don't get how it can start turning if the axles are rotating freely

EXCATLY. The rotation sensor will not turn if the axles are going the same speed inthe same direction!

Differential gears are so called because the output of the main gear is the difference between the other two. Mechanically, they can, of course be configured as adders.

ah ok i got it now, thanks for the infos mate

It's hard to believe I'm only getting to this forum now.

The RCX is abit short of inputs, so my solution to going in a straight line (or knowing what angle you've turned through) is to use only one rotation sensor.

Drive the rotation sensor from a differential gear connected between the two drive wheels. Set it up so that the two "inputs" to the diff are driven in opposite directions by the drive wheels. (See in the photo  how there are 3 8T cogs on the right, but only 2 cogs on teh left?) That way, if the rotary sensor is not moving, you know you're going in a straight line. If it's motion is posisitve, you're tracking to one side. If it's negative, you're tracking to the other.

Heh! You didn't know I knew stuff about Lego, too, did you? I'm full of surprises, me.

Ahaaa.. This is fun!

But.. I must ask; Who the phuck wants to go in a straight line so desperatly? Why on earth? You should use other tools than robots to make straight lines!

The purpose is to go from A to B, right? Well go to B then. With that aproach you are Ok even if the road is bumby, B changes etc.

If the purpose REALLy is to go in a straight line, I would simply set up a laser and follow that :D

But this is funny, and as said, I respect your way of thinking, just dont see the drive in it.. Hurray, I have made a robot that drives in a straight line!! More fun for me is; Hurray, I have made a robot that tracks down my cat!

/ Frits

Hey! I'ts not just about straight lines, but about knowing what angle you've turned through.

Create a robot with a pen at the centre. Program it to draw a square, 30cm on each side. If your robot won't go in a straight line, you will have a problem.

But then again... It won't be autonomous, so according to your definition, it won't be a "real robot" ;-)

/Jesper