Title: Apresenta
1HCM 5843 Magnetometer DIYdrones Board I2C
Interface Behavior of the Data Signal
2Im experiencing a strange behavior of the signal
of the HCM magnetometer. As youll see in the
next pages, as soon as the board is power-up, the
signal is very good and remains good for a period
of time. After 8 minutes approximately , the
signal begin to deteriorate and became useless ...
3The Hardware
Serial Comm with LabView
Arduino Duelmilanove
13.8V Batt to 7809 Regulator
To keep attached to a leveled surface, and static
9V from 7809
I2C Interface SDAA4 (Yellow) SCLA5 (Orange)
7809 Volt Regulator to Arduino Vin
4The Hardware
4k7 pull-up resistors for SDA and SCL
Yellow wire SDA Orange wire SCL
5V from Arduino
GND from Arduino (black wire)
5V from Arduino (red wire)
5Code for Arduino
I got measurements with two diferent codes for
Arduino with the same results - A code from
ArduIMU that uses the Wire library - A code that
uses the HMC library
6Results
- - The Arduino board sends, through serial port,
the data to the computer (approx. sampling rate
8.33Hz) - - On the computer there is a LabView program that
deal with data and show it in the way that youll
see in the next pages - The data that Arduino sends
- Mag X raw data from magnetometer
- Mag Y raw data from magnetometer
- Mag Z raw data from magnetometer
- Heading calculated from the data above
7After 2 minutes
Good data, no spread (see Histograms) and very
low standart deviations (click to see)
2 min
0 min
8After 5 minutes
Data remain good, no spread (see Histograms) and
very low standart deviations
5 min
3 min
9After 8 minutes
( ) start of the problem, increase in the
spread (see Histograms) and in the standart
deviations
8 20
6 20
( )
10After 10 minutes
High spread (see Histograms) and high standart
deviations, make the data useless
10 min
8 min
11After 14 minutes and 30 seconds
14.5 min
12.5 min
12After 25 minutes
25 min
23 min
13Questions
- What am I doing wrong?
- Why as soon as the board is powered-up the data
is good and reliable? - Arduino and the HCM5843 board are not
compatible? - Could my HCM5843 board be defective?