Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Sensors/MEMS

Guide to using tilt-compensated eCompass

Posted: 30 Aug 2011 ?? ?Print Version ?Bookmark and Share

Keywords:electronic compass? accelerometer? magnetometer?

The electronic compass (eCompass) uses a three axis accelerometer and three axis magnetometer. The accelerometer measures the components of the earth's gravity and the magnetometer measures the components of earth's magnetic field (the geomagnetic field). Since both the accelerometer and magnetometer are fixed on the printed circuit board (PCB), their readings change according to the orientation of the PCB.

If the PCB remains flat, then the compass heading could be computed from the arctangent of the ratio of the two horizontal magnetic field components. Since, in general, the PCB will have an arbitrary orientation, the compass heading is a function of all three accelerometer readings and all three magnetometer readings.

This technical note provides the mathematics, reference source code and guidance for engineers implementing a tilt-compensated eCompass.

View the PDF document for more information.

Originally published by Freescale Semiconductor Inc. at as "Implementing a Tilt-Compensated eCompass using Accelerometer and Magnetometer Sensors".

Article Comments - Guide to using tilt-compensated eCom...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top