circuitcellar.com
Magazine Support   Digital Library   Products & Services   Suppliers Directory 
 
 





 

April 2004, Issue 165

Mini Rover 7
Electronic Compassing fo Mobile Robotics


by Joseph Miller

EFFECTS OF TILT

Tilting an electronic compass can create heading errors. When tilted, the sensors no longer receive the magnetic field in the proportions measured during calibration. Equations 1 and 2 characterize the sensor output value with respect to the magnetic field’s angle to the sensor’s orientation in the horizontal plane. Tilting the sensor would expose the sensor to portions of the Earth’s vertical field component and reduce its exposure to the horizontal field component, which could either be an increase or decrease in field density depending on local inclination angles and direction of tilt.

Equation 6 gives the relationship of heading error versus tilt angle when a compass is tilted in the north-south rotational axis (also known as pitch):

[6]

where qERR is the heading error caused by tilt, a is the pitch angle compass, and j is the inclination angle of the Earth’s magnetic field.

To use an example, if your compass were located in San Francisco, which has a magnetic field inclination angle of 61°, you could expect a heading error of up to 1.8° for every degree of pitch for the first 10° of tilt. Tilt in the east-west direction (roll) or any compound angle of the two tilt axes creates similar errors, although the worst-case errors could still be characterized by Equation 6 by simply substituting the pitch angle, a, with a tilt angle in any direction. Another accuracy-degrading factor would be the lack of hard iron and soft iron distortion correction in the pitch and roll axes. The two most common ways to make a compass insensitive to tilt is to mount a two-axis compass on a gimbal and to use a three-axis, tilt-compensated compass.

COMPASS FEATURES

A good compass should have high dynamic range sensors. The need to compensate large hard iron offsets is not uncommon, and can account for 75% to 90% of the sensor’s operating range. A good compass will have an operating range that is at least four times the Earth’s magnetic field density.

A compass also should be able to resolve the Earth’s horizontal magnetic field component to 1:115 for 1° resolution and 1:1146 for 0.1°. These numbers don’t account for soft iron distortions that effect sensor gains and hard iron offsets, which would increase these requirements.

A good compass should be temperature-compensated. Magnetic sensors have temperature dependencies like most sensors. Fortunately, the sensor’s common temperature effects drop out of the heading calculations because the arctangent function’s input value is a ratio of the sensor pair (y/x). Sensor nonlinear temperature effects, external hard iron offsets, and soft iron distortions do not share this temperature cancellation characteristic. Of course, a compass that has hard iron and soft iron compensation is essential. The necessity of tilt compensation depends on the robot’s requirements and your budget.

V2Xe COMPASS MODULE

I used the V2Xe compass in the Mini Rover 7 robot. This is a 1² square electronic compass module that uses an SPI interface as a means of communication. It consumes less than 3 mW of power, and has an output resolution of 0.01° with a heading accuracy of 2°. Its field measurement range is about 20 times that of the Earth’s field, which means that it can operate with extremely large hard iron offsets that are common in robotic applications.

The V2Xe compass can be calibrated using one of two methods. Distortion-compensation coefficients along with declination settings are stored in nonvolatile memory. The V2Xe can provide raw sensor data and compensated field magnitude. It has an adjustable digital low-pass filter for heading.

A continuous calibration is the simplest calibration method to perform on the V2Xe. Send the calibration start command to the V2Xe to begin the calibration process, rotate the robot in one or two complete circles, and then send a calibration stop command to end the calibration process. After completing the calibration, you can retrieve the heading data from the V2Xe as necessary.