Let's Make Robots!

How to determine how far has my bot turned?

Hi All

I wonder how you determine how far your robot has turned? I have a newly built catarpillar and find it turns a different amount depending on the surface (and of course obstacles).

How do you pro's determine how much your robot has turned?

I guess one could use some form of becons and triangulation or an onboard compass but are there any other methods you guys & gals use?


Comment viewing options

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

But encoders are the most logical way.

ignore mine... it is only good to use encoders on wheels....

accelerometers and/or gyros?

On my lego robots I use a Hitechnic Compass sensor and it works great.

Hey Screwdriver

How did you mount your compass? On a mast? If so, how high?


Hi People

I have found a cheap magnometer here http://www.technobotsonline.com/hmc5883-triple-axis-magnetometer.html

I wonder how this would be affected by the magnetic fields created by running motors/servos close by. Does anyone have any thoughts on that?


A magnometer or compass is probably the best way to manage turning if I know where the center of my gap is based on my servo and IR sensor readings...


You would want to keep the device as far from motors and power wires as possible. EMI falls off pretty quickly with distance. You could do some tests to see how much the deivice was effected while you ran the motors.

Some robots put a device like that on a mast to get it away from interference.

I made a compass bot which works great (as long as the cable doesnt wrap too many times around :) ).   it always points north.

the chip is accurate within 6 degrees.   most compass chips expect to flat and level, so on a rocking catepillar, you might have some challenges getting good readings.   my compass chip rotates within 3 - 4 inches of the main continuous rotation servo without intereference.   the only intereference suffered is from the greater outside world, or large metal objects like bridges or tunnels.

I used a weighted average to smooth out the noise in the signal.   give more weight to the previous reading and less weight to each new reading.

I mount my compass on a mast as high as possile.


I use them for robot soccer and the max height is 35 cm which is fine.