摘 要: 針對指南針精度與顯示界面的問題,在ARM9的開發平臺上,設計了一款界面美觀且能夠實時顯示方位、溫度和時間的電子指南針。該系統采用了靈敏度和精度高的磁力傳感器MAG3110檢測方位,采用了智能型溫度傳感器DS18B20檢測溫度,并選擇了Linux Qt作為電子指南針圖形界面的開發平臺。實驗結果表明,指南針方位精度達±2°,溫度精度達±0.5 ℃,能夠使用在普通導航領域上。
關鍵詞: 方位精度; 顯示界面; 電子指南針; ARM9; 磁傳感器; 溫度傳感器
中圖分類號: TN919?34; TP212.9 文獻標識碼: A 文章編號: 1004?373X(2013)24?0114?04
Design of electronic compass based on ARM9 platform
ZHANG Xian?hai, QIAN Zhenghong, BAI Ru, ZHU Li?yao, LI Dong?liang
(Center for Integrated Spintronic Devices, Hangzhou Dianzi University, Hangzhou 310018, China)
Abstract: Aiming at the accuracy and display interface of compass, an electronic compass with beautiful appearance, and functions of orientation, temperature and time real?time display was designed at the ARM9 development platform. In the system, the high?sensitivity and high?accuracy magnetic sensor MAG3110 is adopted to detect orientation, and intelligent sensor DS18B20 to measure temperature. Linux Qt is taken as the development platform of electronic compass graphical interface. The experimental results show that the azimuth accuracy of the compass can reach to [±]2°, the temperature accuracy is up to [±]0.5 ℃, and the compass can be used in common navigation field.
Keywords: bearing accuracy; display interface; electronic compass; ARM9; magnetic sensor; temperature sensor
0 引 言
指南針在我國已有悠久的歷史,作為一個重要的導航工具,廣泛的運用在生活各領域。隨著半導體技術的飛速發展,如今的指南針不僅體積小,靈敏度和精確度都已得到很大的提高,而舒適清晰,簡單快捷的人機交互界面更是日益追求的目標。本文采用一款小體積、低功耗的數字磁力計MAG3110采集地磁場,它采用標準IIC串行接口,輸出數據速率達80 Hz,并且可自我消除誤差,并使用數字溫度傳感器DS18B20,它具有線路簡單,體積小,測溫范圍為-55~+125 ℃,精度為±0.5 ℃。選擇這兩款數字芯片,可滿足靈敏度和精度的要求,選擇Linux Qt作為電子指南針GUI界面的設計可達到舒適清晰,美觀精巧的界面效果。
1 指南針圖形界面的選擇
現行比較流行的GUI有MiniGui,MicroWindows,OpenGUI,Qt/Embedded。MiniGuI是國內開發的圖形界面系統,圖形設備層次過于抽象,圖形功能不夠完善。MicroWindows源碼開放,但其許多圖形引擎算法低下,控件或構件的實現還不是很完備,系統整體不夠完善。OpenGUI比較適合X86平臺,內核采用匯編實現,移植性不好,不支持多進程,目前發展較緩慢。……