Shop OBEX P1 Docs P2 Docs Learn Events
HMC6352 compass — Parallax Forums

HMC6352 compass

DamoDamo Posts: 16
edited 2010-10-20 12:43 in Accessories
I'm using the honywell HMC6352 compass for direction oo my robot which navigates my living room. It seems that the compass is very much affected by any metal objects withing a few meters, giving readings up to 45 deg in difference from one end of the room to the other.

Would anyone have ideas on how to "shield" my compass for more consistant readings ? Or had similar problems that they have overcome ?

Comments

  • dandreaedandreae Posts: 1,375
    edited 2010-10-19 07:54
    Make sure your compass sensor isn't close to your motors. Any type of magnetic field will alter the compass sensor. Here is a link with information that explains how the compass sensors operate:

    http://www.ocean-server.com/download/OS5000_FAQs.pdf

    Dave
  • davx2120davx2120 Posts: 5
    edited 2010-10-20 09:38
    Damo,

    The level of sensitivity to metal objects that you are describing is not typical of the HMC6352 when it is properly calibrated. I have two HMC6352 devices on two different boards and using a steel object weighing ~2 Lbs, I had to get within 8 - 10 inches of the sensor to even make a change of 2 degrees in the heading. If I alter the X and Y Offset values in EEPROM (calibration), I can make it very sensitive to small changes in the magnetic field in certain directions.

    I would suggest that you try and re-calibrate your sensor bsing careful to keep it level during the calibration and see if this helps. It is hard to imagine how the walls of your home could effect the magnetic field significantly at a few meters distance. Is your sensor being driven by a Boe-Bot or a Propeller application? If you are performing the calibration with an external power source and a USB cable attached, moving these cables over the sensor while you are rotating it can also induce errors in the calibration.

    Hope this helps.

    DAVX2120
  • DamoDamo Posts: 16
    edited 2010-10-20 12:43
    Thanks Davx. I am using the propeller, and running the compass program constantly in a separate cog. I've calibrated it countless times, I also have a spare compass which gives the same results. Everything is mounted ona boe-bot chassis, and the compass is mounted on a wooden stick about 6 inches above everything else.

    I don't have the usb cable, or any other cables attached when calibrating.
    The motors on the boe bot are only small, and should be far enough away not to affect the compass.

    I migh try mounting it on my BS2 education board and see what the results are.

    Thanks for the advice.
Sign In or Register to comment.