13
Prepared by Luís Mauro on Jan 6th , 2010 – São Paulo - Brasil HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

  • Upload
    lucita

  • View
    59

  • Download
    1

Embed Size (px)

DESCRIPTION

HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal. I´m experiencing a strange behavior of the signal of the HCM magnetometer. As you´ll 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. - PowerPoint PPT Presentation

Citation preview

Page 1: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

HCM 5843 Magnetometer DIYdrones Board

I2C Interface

Behavior of the Data Signal

Page 2: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

I´m experiencing a strange behavior of the signal of the HCM magnetometer.

As you´ll 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 ...

Page 3: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

The Hardware

Arduino Duelmilanove

I2C InterfaceSDA=A4 (Yellow) SCL=A5 (Orange)

7809 Volt Regulator to Arduino Vin

Serial Comm with LabView

13.8V Batt to 7809 Regulator To keep

attached to a leveled surface,

and static

9V from 7809

Page 4: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

The Hardware

5V from Arduino

Yellow wire = SDAOrange wire = SCL

4k7 pull-up resistors for

SDA and SCL

GND from Arduino (black

wire)

5V from Arduino (red wire)

Page 5: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

Code 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

Page 6: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

Results

- 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 you´ll 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

Page 7: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 2 minutes:2 min0 min

Good data, no spread (see Histograms) and very low standart deviations (click to see)

Page 8: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 5 minutes:5 min3 min

Data remain good, no spread (see Histograms) and very low standart deviations

Page 9: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 8 minutes:8’ 20”6’ 20”

( * ) start of the problem, increase in the spread (see Histograms) and in the standart deviations

( * )

Page 10: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 10 minutes:10 min8 min

High spread (see Histograms) and high standart deviations, make the data useless

Page 11: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 14 minutes and 30 seconds14.5 min12.5 min

Page 12: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

After 25 minutes25 min23 min

Page 13: HCM 5843 Magnetometer DIYdrones Board I2C Interface Behavior of the Data Signal

Pre

pare

d by

Luí

s M

auro

on

Jan6t

h, 2

010

– S

ão P

aulo

- B

rasi

l

Questions

- 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?