HMC5983 magnetometer

2,593 views
Skip to first unread message

Stefan Gofferje

unread,
Jul 29, 2013, 11:24:53 AM7/29/13
to drones-...@googlegroups.com
Hi,

during my researching external magetometers, I stumbled over the
HMC5983, which is available from eBay for about twice the price of an
HMC5883L. It is temperature-compensated, able of 220Hz output(5883L:
160Hz), more than double the resolution of the 5883L (2mGauss vs.
5mGauss), has an SPI interface in addition to I�C. I'm planning to do
some experiments with that one too. It should be a drop-in replacement,
using the same I�C addresses in 8 bit mode as the 5883L does.

Question:
Can we benefit from the higher datarate? Would it be necessary to make
changes in the code to benefit from it?

--Stefan

Robert Lefebvre

unread,
Jul 29, 2013, 11:30:22 AM7/29/13
to drones-discuss
Randy would probably be the authority on this, but he's probably sleeping now.  In the meantime:  I think that the higher data rate might not be helpful as we're only running the control loops at a maximum of 100Hz anyway, and in fact the navigation loop I think is only running at 10 or 20Hz, and that's the one that is really affected by the compass data.  I'm also not sure the increased resolution would help since the problem right now is of a gross alignment error, not on the order of milligauss.

Not to discourage your from experimenting.  But just trying to answer your questions.

Yes, you'd definitely have to make code changes to use the higher rate.  That's probably only realistic to do on the PX4.


On 29 July 2013 11:24, Stefan Gofferje <stefan....@gmail.com> wrote:
Hi,

during my researching external magetometers, I stumbled over the
HMC5983, which is available from eBay for about twice the price of an
HMC5883L. It is temperature-compensated, able of 220Hz output(5883L:
160Hz), more than double the resolution of the 5883L (2mGauss vs.
5mGauss), has an SPI interface in addition to I涎. I'm planning to do

some experiments with that one too. It should be a drop-in replacement,
using the same I涎 addresses in 8 bit mode as the 5883L does.


Question:
Can we benefit from the higher datarate? Would it be necessary to make
changes in the code to benefit from it?

--Stefan

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Stefan Gofferje

unread,
Jul 29, 2013, 11:40:08 AM7/29/13
to drones-...@googlegroups.com
The datasheet suggests, it also has some kind of interference
compensation... THAT would be cool if it work properly...

http://www51.honeywell.com/aero/common/documents/myaerospacecatalog-documents/Defense_Brochures-documents/HMC5983_3_Axis_Compass_IC.pdf

Stefan Gofferje

unread,
Jul 29, 2013, 11:44:31 AM7/29/13
to drones-...@googlegroups.com
"Set/reset and offset strap drivers for degaussing, self test, and
offset compensation. Eliminates sensor calibration necessary for other
magnetic sensor technologies."

If I understand that right, with this sensor (if supported in the code),
the APM's own calibration could become obsolete. Together with

"Sensors can be used in strong magnetic field environments with a 1°
to 2° degree compass heading accuracy"

and

"Compassing Heading, Hard Iron, Soft Iron, and Auto Calibration
libraries available"

That could solve a few issues, especially the toiletbowling...

I'll report back when I have my parts and some results.

--Stefan

Jonathan Challinger

unread,
Jul 29, 2013, 12:00:40 PM7/29/13
to drones-...@googlegroups.com

The only big difference would be the introduction of soft iron calibration and resolution.

The data rate won't help much (or even noticeably), as the compass is only being used as the source for a complementary filter. Our high bandwidth measurement comes from the gyros.

More resolution is always good.

Roberto Navoni

unread,
Jul 29, 2013, 3:56:45 PM7/29/13
to drones-discuss
wow with this pcs of hardware i solve my problem .... dismiss i2c bus
from my design .. a good upgrade for VRBrain :)
Thank you Stefan.
Best
Roberto

2013/7/29 Jonathan Challinger <mr.cha...@gmail.com>:

Randy Mackay

unread,
Jul 29, 2013, 11:03:21 PM7/29/13
to drones-...@googlegroups.com
Stefan,

     Thanks for looking into this.  The higher datarate and accuracy sounds good.  Hard to know if the interference compensation and auto calibration is valuable without knowing more details of how it works so looking forward to your feedback.  I have doubts that the compass alone has enough information to replace compassmot but perhaps the chip has enough intelligence to replace the "live calibration" that we currently do inside the mission planner although I still imagine it would need to be kicked off by the main cpu.

     A configurable i2c address would be another nice feature that I think the current 5883 compass doesn't have.

-Randy



From: Roberto Navoni <lase...@gmail.com>
To: drones-discuss <drones-...@googlegroups.com>
Sent: Tuesday, July 30, 2013 4:56 AM
Subject: Re: [drones-discuss] HMC5983 magnetometer
>> email to drones-discuss+unsub...@googlegroups.com.

>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discuss+unsub...@googlegroups.com.

> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsub...@googlegroups.com.

Roberto Navoni

unread,
Jul 30, 2013, 6:37:41 AM7/30/13
to drones-discuss
Hi Randy
I check the datasheet and i don't found where is possible to configure
i2c address of 5983 do you have found info about ?
best
Roberto

2013/7/30 Randy Mackay <rmac...@yahoo.com>:
>>> email to drones-discus...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "drones-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to drones-discus...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.

Randy Mackay

unread,
Jul 30, 2013, 7:28:46 AM7/30/13
to drones-...@googlegroups.com
Roberto,

     Ok, I'm not surprised.  The current and earlier versions don't allow it either.  I was just hoping because it makes the transition easier to have a different i2c address.  Anyway, not the end of the world.

-Randy



From: Roberto Navoni <lase...@gmail.com>
To: drones-discuss <drones-...@googlegroups.com>
Sent: Tuesday, July 30, 2013 7:37 PM
>>> email to drones-discuss+unsub...@googlegroups.com.

>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "drones-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to drones-discuss+unsub...@googlegroups.com.

>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discuss+unsub...@googlegroups.com.

> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discuss+unsub...@googlegroups.com.

> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discuss+unsub...@googlegroups.com.

Stefan Gofferje

unread,
Jul 30, 2013, 8:52:07 AM7/30/13
to drones-...@googlegroups.com
On 07/30/2013 02:28 PM, Randy Mackay wrote:
> Ok, I'm not surprised. The current and earlier versions don't
> allow it either. I was just hoping because it makes the transition
> easier to have a different i2c address. Anyway, not the end of the world.

As I understand it, it's supposed to be a backwards-compatible drop-in
replacement, so there could be a config param COMPASS_TYPE which could
enable advanced functionality.

--Stefan

Olivier ADLER

unread,
Jul 30, 2013, 9:12:54 AM7/30/13
to drones-...@googlegroups.com, Randy Mackay


Seems to be settable. Perhaps using identification registers A, B and C ? It's not clearly explained in the datasheet. But should be doable because the datasheet says :

"The default (factory)HMC5983 8 bit slave address is 0x3C for write operations, or 0x3D for read operations."


So if there is a default address, it is settable for sure.


Olivier.

Roberto Navoni

unread,
Jul 30, 2013, 9:20:51 AM7/30/13
to drones-discuss
Hi Oliver,
yes i saw that phrase ,but is not clear how you can change :) Normally
use hardware esternal pin for chose the id , so on VRBrain i ca use
external spi and choose by chipselect the magnetometer but could be
nice if that was possible also in i2c . They dicede to use same i2c id
of hmc5883 :( So cannot coexist on same i2c.
best
Roberto

2013/7/30 Olivier ADLER <cont...@nerim.net>:
> --
> You received this message because you are subscribed to the Google Groups
> "drones-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to drones-discus...@googlegroups.com.

Pablo Diaz

unread,
Aug 21, 2013, 4:33:04 PM8/21/13
to drones-...@googlegroups.com

Wich is the orientation that I have to put this compass? The arrow to the front, but it will be upside or downside? And in the mission planner ?

What are the colors of the wiring?


http://www.hobbyking.com/hobbyking/store/__25095__multiwii_compass_module_hmc5883l.html

Thanks.-


El lunes, 29 de julio de 2013 12:24:53 UTC-3, Stefan Gofferje escribió:
Hi,

during my researching external magetometers, I stumbled over the
HMC5983, which is available from eBay for about twice the price of an
HMC5883L. It is temperature-compensated, able of 220Hz output(5883L:
160Hz), more than double the resolution of the 5883L (2mGauss vs.
5mGauss), has an SPI interface in addition to I�C. I'm planning to do
some experiments with that one too. It should be a drop-in replacement,
using the same I�C addresses in 8 bit mode as the 5883L does.
Message has been deleted

neuro copter

unread,
Aug 22, 2013, 9:47:45 AM8/22/13
to drones-...@googlegroups.com
pablo, please check this topic concerning compass orientation.

 default orientation for external compass as assumed by ardupilot code (you can customize the orientation via mission player):
    X left
    Y back
    Z up

Pablo Diaz

unread,
Aug 23, 2013, 10:56:42 AM8/23/13
to drones-...@googlegroups.com
Solved; the arrow should point forward !

pop eye

unread,
Mar 7, 2016, 8:47:16 PM3/7/16
to drones-discuss, pablo...@gmail.com
As announced by Honeywell the HMC5983 is phased out this year 2016. Any replacement to suggest?
Rgds
F

Tom Pittenger

unread,
Mar 8, 2016, 1:33:47 PM3/8/16
to drones-discuss, pablo...@gmail.com

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jackyxu.s...@gmail.com

unread,
Jul 18, 2016, 12:12:38 PM7/18/16
to drones-discuss
It's now end of life and abandoned by Honeywell...

Check Isentek IST8310 chips, a Pin2Pin alternative to HMC5883L with a more powerful 14 bits ADC, a broader dynamic range (+/-1600uT) , a better linearity performance, and meanwhile a much lower hysteresis & noise level.

Z-axis techniques have also been well improved to get prepared for lower dehumidifying requirements & more adaptive resoldering manufacturing
​ process​
.

Isentek IST8310 Cloud Disk:http://pan.baidu.com/s/1jH7Vt6u
 
User Pin:6tv7

Jacky
Reply all
Reply to author
Forward
0 new messages