Design and implementation of digital compass based on HMC5883L magnetoresistive sensor
指南针
磁电阻
计算机科学
物理
磁场
量子力学
作者
Li Liu,Fengxiu Li,Yuhong Du,Yao Zhang,Yuanyuan Li,Ying Liu
标识
DOI:10.1117/12.3059013
摘要
The compass is regarded as one of the four great inventions in ancient China. While the traditional combination of magnetic needle and compass can provide orientation indications, it is bulky, inconvenient to carry, and has limited accuracy. This paper presents a digital compass based on the HMC5883L magnetoresistive sensor, designed for the precise acquisition of geomagnetic data. The data collected by the sensor is transferred to the STC89C52 microcontroller via the I²C interface, whereupon the microcontroller performs the calculation of the azimuth angle and displays the result on the LCD1602 display. Moreover, the system is capable of communicating with a computer via a USB-to-TTL module, thus facilitating additional processing and data display. Practical tests have demonstrated that the system is able to provide accurate azimuth information in real time with high positioning accuracy and stability, thereby offering a new supporting technology for digital guides.