Development of digital compass based on AVR microcontroller and MEMS ACCELEROMETER-magnetometer module LSM303DLHC

Abstract

У роботі розроблено цифровий компас на МК AVR з використанням МЕМС – модуля акселерометра – магнітометра LSM303DLHC. Розроблено структуру та спроектовано апаратне забезпечення цифрового компасу. Описано алгоритми калібрування акселерометра та магнітометра LSM303DLHC. Описано алгоритм обчислення кутів нахилу (кутів тангажу і крену) цифрового компасу. Описано алгоритм визначення курсу (напрямку) компаса без компенсації і з компенсацією нахилу. Розроблено алгоритм роботи та програмне забезпечення цифрового компасу. Створено модель та макет цифрового компасу. Проведено моделювання і тестування розробленого цифрового компасу.
In the paper, the digital compass based on AVR microcontroller has been developed using MEMS accelerometer-magnetometer LSM303DLHC. The structure and hardware of the digital compass have been developed. The calibration algorithms of the accelerometer and magnetometer of the LSM303DLHC module have been described. The calculation algorithm of the pitch and roll angles has been described. The heading calculation algorithm of the digital compass without tilt compensation and with tilt compensation has been described. The operation algorithm and embedded software of the digital compass have been developed. The model and prototype of the digital compass have been created. The simulation and operation test of the developed digital compass have been performed.

Description

Keywords

цифровий компас, апаратно-програмна платформа Arduino Uno R3, МК ATmega328P-PU, акселерометр, магнітометр, МЕМС модуль LSM303DLHC, САПР Proteus Design Suite, мова програмування C, середовище програмування Arduino IDE для МК платформи Arduino, вбудоване програмне забезпечення, digital compass, Arduino Uno R3, AVR microcontroller ATmega328P-PU, accelerometer, magnetometer, MEMS module LSM303DLHC, Proteus Design Suite, C programming language, Arduino IDE, embedded software

Citation

Development of digital compass based on AVR microcontroller and MEMS ACCELEROMETER-magnetometer module LSM303DLHC / A. Holovatyy, V. Teslyuk, K. Kolesnyk, V. Tabala // Computer Design Systems. Theory and Practice. — Lviv : Lviv Politechnic Publishing House, 2019. — Vol 1. — No 1. — P. 12–26.