Let's Make Robots!

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

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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" ;-)


Never mind my defenitions, you build and learn and have fun the way you find it fun!

(it is only my wife who doesn't quite get what a real robot is, ha)

I spend 1 week or more just turning on and off LED's etc when I first laid hands on a microcontroller. And it was BIG fun! Extremely fun, actually :D I am sorry if I am spoiling that time for you, not intended.

I should spend more time arguing with "jip", he is so clever because he unbderstands electronics and floating point!

/ Frits 

You have already argued enough with me you evil man! :-)

Personally I like to try and solve as many problems in mechanics before trying to compensate for them in software - but that's just my approach... oh and it's heaps of fun building the vehicles with LEGO :-).

- Jimmy

This may have your interest: 


/ Frits 

Nice gizmo. I have solved the problem mechanically by building the adder/subtracter; it's an ingenious device. It was a bit difficult, though, because the differentials I have is the "old" style, which is a bit larger and only have sprockets in one end. But I succeeded. Second problem is the voltage drop in the motor driver, but I have bought a 4-cell battery box. Now I just need some time... I'll take some pictures of my robot when it is done.

"Second problem is the voltage drop in the motor driver, "

Yeah, I am beginning to really hate that bitch!!! 

"but I have bought a 4-cell battery box. Now I just need some time... I'll take some pictures of my robot when it is done."

YEEHAAA! (also before it´s done, just don't mark "robot is finished" :)

/ Frits 

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

DiffRot_.jpgIt'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.

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.