The compass drives two very costly design constraints into the robot lawn mower:
- The need to minimize the number and size of steel or ferrous parts in the design.
- The need to separate the compass from the motors to prevent electro-magnetic interference.
To address the first constraint, I selected a 5000 or 6000 series aluminum for the robot chassis and deck. That is quite costly both from a material standpoint and from a fabrication standpoint. And ultimately, you’re going to have some amount of steel in your robot. You can’t avoid it.
The second constraint requires the compass to be raised above the motors to a level high enough to get it out of the magnetic field created by the motors. Because I’ve placed the flight controller and other electronics in the same control box with the compass, several wires have to be run between this box and the power box. Shielding those wires is going to be tricky. Long story short, it creates lots of secondary design inefficiencies.
Reading through the forums and in my own research, I’ve come across a few interesting anecdotes:
- Kenny Trussell reports that when steel mower blades begin to spin at high RPMs, the compass heading begins to drift by some amount, about 20º.
- Christopher Milner had to place a 4ft tall mast on his vehicle to sufficiently separate his compass from the noise created by two drive motors and one brushless DC motor.
- Unplugging and disabling all compasses on my wheelchair robot doesn’t cause any EKF errors, and after traveling a few feet in the wrong direction, the robot corrects its heading somehow, without the compass. I suspect the wheel encoders aid this process.
In light of this information, I am beginning to question whether I even need a compass. It seems to be creating more problems that it solves. The bad compass health error messages in Mission Planner are starting to get very annoying, even though they don’t usually seem to impact the robot wheelchair’s ability to navigate properly.
According to U-Blox, you can use two ZED-F9P modules configured as a moving base-rover combination to calculate the vehicle’s heading. Even with a spread between the antennas of 10in, U-Blox says the heading accuracy is 0.8º. Some folks on the Ardupilot forum are starting to investigate using the modules in this way, and I suspect it will be a much more accurate way to obtain the vehicle’s heading.
I’ve had enough bad luck with compasses that I’m willing to get rid of them altogether and use the ZED-F9Ps for heading exclusively. This allows some significant improvements to the robot design. I guess I’ll head back to the drawing board for the time being…