Table of Contents

Sensor fusion

Overview

The aim of this project is to learn sensor fusion algorithms and implement them on ARM microcontroller.

GY-80

GY-80 is a cheap sensor board. Available on Ebay and DealExtreme.

http://dx.com/p/gy-80-bmp085-9-axis-magnetic-acceleration-gyroscope-module-for-arduino-145912

Board feature 4 sensors providing in total 10-dimensional information.

Sensor Description I2C Address (8bit)
L3G4200D ST three-axis digital output gyroscope 0x69
ADXL345 Analog.com 3axis Digital Accelerometer 0x53
HMC5883L Honeywell Three-Axis Digital Compass 0x1E
BMP085 Bosh Digital Pressure Sensor 0x77

Project assumptions

The purpose of this project is to provide sensor fusion solution using low-cost sensor board.

Phase I

<html> <?xml version=“1.0” encoding=“UTF-8” standalone=“no”?> <!– Created with Inkscape (http://www.inkscape.org/) –>

inline-svg@projects:gy-80

</html>

Launchpad connections

1.1 GY-80 VCC_3.3V
1.10 GY-80 SDA
1.9 GY-80 SCL
GND GY-80 GND

Source code

Screenshots

Notes:

Phase II

Screenshots

Notes:

Source code

Phase III

Following graph show angle measurement using accelerometer (red) and gyroscope (blue). Gyro clearly shows error-induced drift.

Complementary filter

<html> <?xml version=“1.0” encoding=“UTF-8” standalone=“no”?>

inline-svg@projects:gy-80

</html>

Complementary filter is a good alternative for small systems. http://web.mit.edu/scolton/www/filter.pdf

Comparison

Filters:

While both methods provided unbiased value, the Kalman filter provided more stable readout. Present-day MCUs provide sufficient power to use Kalman filter in real-time.

Phase IV

CwFBXYt4UKg?.swf

The robot consists of 5 parts: Tamiya gearbox, double H-bridge driver, Bluetooth wireless module, Stellaris launchpad board and GY-80 sensor board. The power is provided externally.

GY-80 board provides accelerometer and gyro sensor measurement at 100 [Hz] (UPS variable). Sensor data is then processed by kalman filter and feed into PI controller. Control signal is driving PWM output driving motors H bridges.

Notes:

Source code

Robot operation. Red - accelerometer angle. Green - Gyro angular acceleration. Blue - estimated angle. Yellow - PI control signal.

References