Compass for navigation

I wanted to know if anyone has experience with a magnetometer or digital
compass. I assume they are the same sensor but with two names.
I am building a robot lawn mower and wanted to know if a compass would allow the robot to cross the lawn in a pattern using a north south or east west heading.

I have never used this sensor but I read they need to be calibrated and are sensitive to tilting.

I would like to hear your opinion on a part that doesn’t need calibration and is accurate enough for this purpose.

I must have missed seeing that compass. It is however not listed as .5 degree accuracy but .5% which is 1.8 degrees but yes this seems like a very good option.
Yes it needs to overlap rows so, assuming a 12" cut, my plan was to mow to the other side of the yard, turn 90 degrees, drive for say 10", turn 90 degrees, then drive to the other side of the yard. I know that is ideal but it is a start.
I have no experience with IR but a coded IR light at the end of the rows would allow it to check its position once it reached the end. I don’t think this will work outdoors though.
If you have more ideas please let me know.

I figured a GPS module would only be accurate enough to determine if it was still in the yard but not for positioning in rows.

The yard is maybe 70 ft X 30 ft so medium size I guess.
A spiral may make sense because you could possibly use odometry for that.
I use the banebot motors and gearboxes so I don’t see a good way to use the typical encoders. I am thinking about using a HAL effect sensor for that and place magnets on the wheel hub.

Yes, a tilt-compensated magnetic compass would allow your robotic lawn mower to travel in a specific direction. You can get away with using a non-compensated compass only if your lawn is relatively level. If you have a few slopes, tilt compensation is very beneficial. If the tilt compensation is accelerometer-based, no calibration is necessary, since it knows the angle. If it’s gyroscope-based, then you may need calibration.

Some of the units do offer 0.5 to 1 degree accuracy such as RB-Dev-45. There are a variety of additional sensors you might consider such as encoders and GPS, but shouldn’t there be some overlap in the mowing pattern?

A combination of compass, encoders and GPS should work relatively well, and be self-contained on the robot itself.

It depends on how large your terrain is - perhaps I was imagining something a bit too large :slight_smile:
The other way is to try a different pattern instead of rows - perhaps a spiral?
popularmechanics.com/home/improvement/lawn-garden/how-to-mow-a-lawn-patterns

You could even consider an approach similar to this, but use the sensors when the robot encounters an obstacle:
youtube.com/watch?v=dWW–UY2X20