EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Re: Parallax/Hitachi HM55B Compass Example

Started by toahatt March 7, 2007
--- In b..., "tombhandley" wrote:
>
> I've posted a Parallax/Hitachi HM55B Compass module with a test
> example, calibration routine, and instructions on my web site at
> [HM55B.zip]:
>
> http://home.comcast.net/~tomhandley/bx-24/bx-24.html
>
> - Tom
>

Anyone got this saved? We are working on trying to calibrate our compass
(HM55B), but no luck so far...
Google HM55B.zip

Is this it?

http://pruim037.proboards107.com/index.cgi?board=technicalmb&action=display&thread04250898&page
Tom
--- In b..., Tom Becker wrote:
>
> Google HM55B.zip
>
> Is this it?
>
> http://pruim037.proboards107.com/index.cgi?
board=technicalmb&action=display&thread04250898&page
> Tom
>

googled it, got 2 replys, one 404 and the other one you posted,
thatone referrs to http://home.comcast.net/~tomhandley/bx-24/bx-
24.html wich is down.

the code is posted on that page, but I want the calibtarion program
and maybe some guidelines howto calibrate it.
Anders
> ... I want the calibration program and maybe some guidelines how to
calibrate it.

Tom Handley vanished in late 2005 and his work seems to have vaporized, too.

The Hitachi HB55B is similar to other two-axis magnetometers applied to
compassing, so the calibration techniques of other sensors will guide
you well. I'm currently working with Honeywell parts and have found
their application notes very helpful. At http://www.magneticsensors.com
(a Honeywell site), find AN214, for example, which suggests the general
method of rotating the _level_ compass while sampling to find the
maximum and minimum of X and Y, which are then plugged into a simple
compassing algorithm. Other methods achieve similar results by
interpolating between X/Y magnitude pairs taken and stored in a table
while rotating at a constant rate.

These methods assume that the sensor is level. You will find that tilt
will introduce large errors so, if you are building a hill-climbing
robot, for example, you must also incorporate tilt sensors to correct
the compass outputs.
Tom
Is it possible to use a mechanical gimbal
to keep the compass level?

On 3/7/07, Tom Becker wrote:
>
> > ... I want the calibration program and maybe some guidelines how to
> calibrate it.
>
> Tom Handley vanished in late 2005 and his work seems to have vaporized,
> too.
>
> The Hitachi HB55B is similar to other two-axis magnetometers applied to
> compassing, so the calibration techniques of other sensors will guide
> you well. I'm currently working with Honeywell parts and have found
> their application notes very helpful. At http://www.magneticsensors.com
> (a Honeywell site), find AN214, for example, which suggests the general
> method of rotating the _level_ compass while sampling to find the
> maximum and minimum of X and Y, which are then plugged into a simple
> compassing algorithm. Other methods achieve similar results by
> interpolating between X/Y magnitude pairs taken and stored in a table
> while rotating at a constant rate.
>
> These methods assume that the sensor is level. You will find that tilt
> will introduce large errors so, if you are building a hill-climbing
> robot, for example, you must also incorporate tilt sensors to correct
> the compass outputs.
>
> Tom
>
>
>

--
Scott
http://robotbuilding.blogspot.com/

Minds are like parachutes, they only function when they are open.
I guess I answered my own question by reading the info on the honeywell
website. I had no idea there was so much stuff out there for compassing.

I am currently working on creating a GPS/compass navigating rover. Does
anyone have any good suggestions on how to get started? I am looking for
suggestions on chips and stuff. For example, I was just looking at the
hrm3200, which looks great.

I am planning on using a ZX-24a and the main microcontroller for navigation,
servos, etc.... I also have a BS2, which may be used for some sensors and
stuff.

If you have not already guessed, I am a newbie to this stuff.

On 3/7/07, Scott wrote:
>
> Is it possible to use a mechanical gimbal
> to keep the compass level?
> ... Is it possible to use a mechanical gimbal ...?

Yes, with difficulty, IMO. You can also steer a level compass module
with a servo, though, itself controlled by a tilt sensor. Here's an
approach I tried:
http://tech.ph.groups.yahoo.com/group/basicx/photos/browse/a646

This is a Honeywell HMC6352 on a Sparkfun breakout board, mounted to a
brass tube that is held in teflon-plumbing tape in nylon clamps, steered
by a hobby servo via a pair of identical cranks and a carbon-fiber
control rod. The servo is driven by a BX-24 that takes signals from an
ADXL203 accelerometer and an ADXRS401 rate gyro, combined in a
pseudo-Kalman filter, implemented in code. Compass data comes off the
breadboard via the Bluetooth radio near the batteries, whose steel
shells, along with the servo motor magnets, are as far from the compass
as possible, hence the control rod.

For single-axis levelling, this works very well. For two-axes, it
becomes more complicated.
Tom
--- In b..., Tom Becker wrote:
>
> > ... I want the calibration program and maybe some guidelines
how to
> calibrate it.
>
> Tom Handley vanished in late 2005 and his work seems to have
vaporized, too.
>
> The Hitachi HB55B is similar to other two-axis magnetometers
applied to
> compassing, so the calibration techniques of other sensors will
guide
> you well. I'm currently working with Honeywell parts and have
found
> their application notes very helpful. At
http://www.magneticsensors.com
> (a Honeywell site), find AN214, for example, which suggests the
general
> method of rotating the _level_ compass while sampling to find the
> maximum and minimum of X and Y, which are then plugged into a
simple
> compassing algorithm. Other methods achieve similar results by
> interpolating between X/Y magnitude pairs taken and stored in a
table
> while rotating at a constant rate.
>
> These methods assume that the sensor is level. You will find that
tilt
> will introduce large errors so, if you are building a hill-
climbing
> robot, for example, you must also incorporate tilt sensors to
correct
> the compass outputs.
> Tom
>
Okay, looked at that datasheet and tried that calibration
approach...but not very succesful...maybe the environment is just to
noisy...

when I turn 90 degrees i eithert get around 70 or 120 on the
compass...but always 360(+- a few) when turning a full circle...

sounded like calibration to be, but I dont know...

anyway, I'll try another module tomorrow...with greater accuracy

here are a few photos of the robot btw.
Autonomus, rescue inpired (send into (burning) building, locate
objects, return with map of building).

http://193.11.222.247:8080/skolarbeten/mekatronik/docu/RobotBygge0702
29%20007.JPG
http://193.11.222.247:8080/skolarbeten/mekatronik/docu/RobotBygge0702
29%20004.JPG

neither compass or, IR or ultrasound is mounted on those pics...
(compass placed ~20cm above chassis)

Anders
> ... neither compass or, IR or ultrasound is mounted on those pics...

The top photo looks like a Parallax HM55B is in the BOE breadboard.
With a drive motor or two only 10cm or 20cm from it, you will not see
good compass results.

It is not noise that is affecting your results, I suspect, just a heavy
local magnetic bias from the motor magnets, and, perhaps, a varying
magnetic field from the motor coils as they rotate in two directions,
driven by a varying current.

A more accurate compass will not improve that. M-metal shielding and
distance will; magnetic fields decrease according to the inverse of the
squared distance. If you look around online at other small compassed
robot vehicles, you'll often see the compass sitting atop a mast of some
considerable height to reduce the bias that the vehicle produces.

Welcome to compassing.
Tom
--- In b..., Tom Becker wrote:
>
> > ... neither compass or, IR or ultrasound is mounted on those
pics...
>
> The top photo looks like a Parallax HM55B is in the BOE
breadboard.
> With a drive motor or two only 10cm or 20cm from it, you will not
see
> good compass results.
>
> It is not noise that is affecting your results, I suspect, just a
heavy
> local magnetic bias from the motor magnets, and, perhaps, a
varying
> magnetic field from the motor coils as they rotate in two
directions,
> driven by a varying current.
>
> A more accurate compass will not improve that. M-metal shielding
and
> distance will; magnetic fields decrease according to the inverse
of the
> squared distance. If you look around online at other small
compassed
> robot vehicles, you'll often see the compass sitting atop a mast
of some
> considerable height to reduce the bias that the vehicle produces.
>
> Welcome to compassing.
> Tom
>

probably only there for testing at that moment, or I put it there so
I would not loose it...=)

It's located 20cm above the 3mm alu plate, on the opposite side of
the motors...

and I always have eveything turned off while measuring...

The 2024 Embedded Online Conference