Search
Product Info
Triple Axis Magnetometer Breakout - HMC5843
sku: SEN-09371
Description: This is a breakout board for Honeywell's HMC5843, a 3-axis digital compass. Communication with the HMC5843 is simple and all done through an I2C interface. There is no on-board regulator, so a regulated voltage of 2.5-3.3VDC should be supplied.
The breakout board includes the HMC5843 sensor and all filtering capacitors as shown. The power and 2-wire interface pins are all broken out to a 0.1" pitch header.
Features:
- Simple I2C interface
- 2.5 to 3.3VDC supply range
- Low current draw
- 7 milli-gauss resolution
Dimensions: 0.5x0.5" (12.7x12.7mm)
Documents:
Pricing
Comments
45 comments
Feeds
Currency
Display prices in
Feedback
If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.



























I have read the 2bytes storage part, but I missed the ADC.
These BOBs are meant for people like me that can't/won't smd solder or don't have access to reflow ovens etc.
Here is a forum post by me (Faraday's Cage == taktoa@gmail.com == taktoa), but I also sent in a request via the "feedback" form.
BTW, in the HMC5843 datasheet, it says the C1 and C2 should have low ESR. It seems C2 is 0402 which may not have a low ESR.
Sorry to hear you're having trouble with this little guy. If you could send us an email, with as much information as possible about your setup, we'd be happy to help you get this figured out.
-techsupport at sparkfun dot com
From the datasheet:
The two external capacitors should be ceramic type construction with low ESR characteristics. Reservoir capacitor C1 is
nominally 4.7 micro-farads in capacitance,
...
Low ESR characteristics may not be in many smallest size SMT ceramic capacitors (0402), so be prepared to up-size the capacitors to gain Low ESR characteristics.
I have a custom 4-layer board that uses this chip that I should get in the mail today. Assuming I can solder it without ruining it, I provide more feedback on the cap size I used and it's ESR.
Are you holding the board flat? That can affect the reading.
I init the chip by reading the id registers for H43 and then setting reg 2 to 0
To read I read 1 byte from reg 9 and send a i2c stop.
If the value back has bits 0 and 2 set, I then do a read of 6 bytes (without sending a reg), i.e. i2c start, write 3D followed by 6 reads. Make sure the reg 9 read and the last read of the 6 reads are naked rather than acked.
from page 18:
To change the measurement mode to continuous measurement mode, after the 5 milli-second power-up time send the
three bytes:
0x3C 0x02 0x00
This writes the 00 into the second register or mode register to switch from single to continuous measurement mode
setting. With the data rate at the factory default of 10Hz updates (100 milli-seconds interval), a 100 milli-second delay
should be made by the I2C master before querying the HMC5843 data registers for new measurements. To clock out the
new data, send:
0x3D, and clock out DXRA, DXRB, DYRA, DYRB, DZRA, DZRB located in registers 3 through 8. The HMC5843 will
automatically re-point back to register 3 for the next 0x3D query, expected 100 milli-seconds or later.
I was unable to get it to work with either of my Arduinos and there are a few forum posts detailing the problem.
http://forum.sparkfun.com/viewtopic.php?t=17475&start=18
A newer revision is in the works but there isn't an ETA on it (as per a support email I received from SparkFun on 2009-11-11). The workaround is to replace the capacitor with one like this:
http://www.sparkfun.com/commerce/product_info.php?products_id=96
chris.
I wrote an Arduino library to interface it: http://eclecti.cc/hardware/hmc5843-magnetometer-library-for-arduino
The datasheet says that the I2C lines of this device are nominal 3.3V... I would appreciate an advise or share comments regarding interfacing this magnetometer with 5V dsPIC MCU.
Thank you!
I saw the test code can just read sequential bytes.
I don't know about the commands - I might need to send them sequentially too.
Is anyone else seeing this?
I'm using a 3.3v arduino pro and changed the program to 8Mhz (that was the only change).
There are two caps stacked, so I assume that has been fixed, but I'm not getting any magnetic readings though it is communicating.
Adding in something, the ID bytes work. The status register is always 4 (regulator enabled, zero conversions ready). The command registers (even after being written to) read the defaults of 0x10, 0x20, but the mode register reads 0 or 1 depending on how quickly I read.them.
My recommendation to anyone getting this board is to have a cap ready to solder on and if it acts at all strange, add the cap.
(Come on SparkFun - don't you test these things?)
Panasonic ECG Ceramic 10uF 6.3V X5R 0603.
Small, lowESR, and makes the thing actually work well.
Somebody has attempt to use it at low temperature? (~0ºC).
I have to solder the extra capacitor, but at low temperature, I tried several capacitors and the magneto doesn't work properly, it has the same behavior without the extra cap.
I guess that new cap works fine.
You would make a much, much better board if you bring our the DRDY pin to the header - there is a good reason that Honeywell decided to bring out the RDY bit (SR0 of the Status register) to a separate pin and it is pity that you did not do the same!
Having the DRDY pin available would make asynchronous (interrupt-driven) reading data from this magnetometer much, much easier; for now it is quite cumbersome...
thanks
Joe
http://www.sparkfun.com/datasheets/Sensors/Magneto/HMC5843-v11-schematic.pdf
This problem has been fixed in v12 by replacing the 10uF tantalum cap with a 4.7uF ceramic cap.