Design of analog electronic compass function based on integrated sensor

Publisher:delta14Latest update time:2011-10-19 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The electronic compass is an important navigation tool that can provide the heading and attitude of moving objects in real time. With the advancement of semiconductor technology and the development of mobile phone operating systems, smartphones that integrate more and more sensors have become more powerful, and many mobile phones have implemented the function of electronic compasses. Applications based on electronic compasses (such as Skymap for Android) have also become popular on various software platforms.

To realize the electronic compass function, a three-axis magnetic sensor for detecting magnetic fields and a three-axis acceleration sensor are required. With the maturity of micro-mechanical technology, STMicroelectronics has launched the LSM303DLH, a two-in-one sensor module that integrates a three-axis magnetometer and a three-axis accelerometer in one package, which allows users to design a low-cost, high-performance electronic compass in a short time. This article takes LSM303DLH as an example to discuss the working principle, technical parameters and implementation method of the electronic compass.

1. Background knowledge of geomagnetic field and heading angle

As shown in Figure 1, the Earth's magnetic field points from the magnetic south pole to the magnetic north pole like a bar magnet. At the magnetic pole, the magnetic field is perpendicular to the local horizontal plane, and at the equator, the magnetic field is parallel to the local horizontal plane, so the magnetic field in the northern hemisphere is tilted toward the ground. The unit used to measure the intensity of magnetic induction is Tesla or Gauss (1 Tesla = 10000 Gauss). Depending on the geographical location, the strength of the geomagnetic field is usually 0.4-0.6 Gauss. It should be noted that the magnetic north pole and the geographical north pole do not coincide, and there is usually an angle of about 11 degrees between them.

Figure 1. Distribution of the Earth's magnetic field

The geomagnetic field is a vector. For a fixed location, this vector can be decomposed into two components parallel to the local horizontal plane and one component perpendicular to the local horizontal plane. If the electronic compass is kept parallel to the local horizontal plane, the three axes of the magnetometer in the compass correspond to these three components, as shown in Figure 2.

Figure 2 Schematic diagram of geomagnetic field vector decomposition

In fact, for the two components in the horizontal direction, their vector sum always points to the magnetic north. The heading angle (Azimuth) in the compass is the angle between the current direction and the magnetic north. Since the compass remains horizontal, only the detection data of the two horizontal axes (usually the X-axis and the Y-axis) of the magnetometer can be used to calculate the heading angle using Formula 1. When the compass rotates horizontally, the heading angle changes between 0º-360º.

2. ST integrated magnetometer and accelerometer sensor module LSM303DLH

Reference address:Design of analog electronic compass function based on integrated sensor

Previous article:Sensor Noise and Its Suppression Methods
Next article:Homemade disconnection burglar alarm

Latest sensor Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号