2

Author Topic: Help with a HMC6352 Compass Module  (Read 1091 times)

0 Members and 1 Guest are viewing this topic.

Offline AlexceptionalTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Help with a HMC6352 Compass Module
« on: March 22, 2012, 10:22:25 AM »
Hi!

I'm having a few issues with a Compass module I bought recently. It's a Honeywell HMC6352 2-axis compass which communicates with a microcontroller through I2C. I'm not sure if anyone here will be familiar with this module or similar modules but fingers crossed!

The compass has various 'modes' including a calibration mode. I'm using it in a standard 'on demand' mode where I send a request to get a heading then read two 8 bit values from two registers to give me a 16 bit heading in tenths of degrees (0 - 3599).

I can do this and the compass returns seemingly sensible values no problem; as I rotate it the reading goes from 0 to 3599 as expected. There are two problems however.

The first is that the readings seem to be non linear, i.e. when I turn the module 90 degrees the reading does not change by 90 degrees; either more or less depeinding on orientation and location. I've calibrated the module multiple times and in different locations to the same effect.

The second problem is that when I move the module around the room the value changes, generally by plus or minus 30-50 degrees, despite the fact I'm not changing the actual rotation of the module (so the heading shouldn't change).

I've also tried getting another module but have similar results.

Any help? Sorry for the huge lump of text but I've tried to explain the problem in as much detail as possible.

Cheers!

Alex

Offline chuckdaball

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: Help with a HMC6352 Compass Module
« Reply #1 on: March 22, 2012, 05:58:43 PM »
The problem could be that the magnetometer isn't level.  It has to be in order for it to work properly.  If you tilt the module more than a few degrees of it being level you will receive garbage data.  There are some magnetometers that have something called tilt compensation to help with this problem, but they are expensive.

Hope this info helps.

 


Get Your Ad Here