Magnetometer Digital Triple Axis - HMC5883L

This is Honeywell’s HMC5883L, a 3-axis digital magnetometer designed for low-field magnetic sensing. The sensor has a full-scale range of ±8 Guass and a resolution of up to 5 milli-Gauss.

Supplied voltage should be between 2.16 and 3.6VDC.

Communication with the HMC5883L is simple and all done through an I2C interface. All registers and operating modes are well described in the datasheet below.

Comes in a low-height, LCC surface mount package. For a breakout board, see below.

Replaces:COM-0944

  • Simple I2C interface
  • 2.16-3.6VDC supply range
  • Low current draw
  • 5 milli-gauss resolution
  • 3.0x3.0x0.9mm

Magnetometer Digital Triple Axis - HMC5883L Product Help and Resources

Core Skill: Soldering

This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.

3 Soldering

Skill Level: Competent - You will encounter surface mount components and basic SMD soldering techniques are required.
See all skill levels


Core Skill: Programming

If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.

3 Programming

Skill Level: Competent - The toolchain for programming is a bit more complex and will examples may not be explicitly provided for you. You will be required to have a fundamental knowledge of programming and be required to provide your own code. You may need to modify existing libraries or code to work with your specific hardware. Sensor and hardware interfaces will be SPI or I2C.
See all skill levels


Core Skill: Electrical Prototyping

If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.

3 Electrical Prototyping

Skill Level: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
See all skill levels


Customer Comments

  • I’m working with this sensor as part of the ArduIMUV3 board. When browsing through some of the code that others have written for this magnetometer to convert a magnetic reading to a heading angle, they just use atan2(-magy/magx) however I’ve gone and recorded what the magnetic readings are at various known heading angles, and by my initial look at it, I dont think using atan2 is going to cut it.

    Here’s my readings (the readings below are the LSB) Known Heading Angle, Mag X, Mag Y, Mag Z 0 301 -301 -411 45 234 0 -408 90 0 95 -408 135 -240 0 - 400 180 -318 -318 -390 225 -161 -518 -387 270 0 -559 -387 315 172 -386 -398

    If you just plot X versus Y as I’ve outlined above, you will see the weird shape I’m talking about. I guess I was initially expecting to see something like a unit circle if people were using atan2.

    • can you please send me the code for interfacing hmc5883l with atmeg16 for getting heading angle.. Email:medharoshan@gmail.com

  • I think this should also be listed in the Sensors/Magneto category.

  • Hello,
    When do you plan to add this part into the eagle library?

  • I have used the HMC5843 and it seems that the HMC5883L is very similar except for a few things. One of the new things that isn’t particularly well explained in the datasheet is the Measurement Averaging bits, MA1 and MA0, of configuration register A. By setting these bits, the measurement output can be averaged over 1, 2, 4, or 8 samples. To clarify, suppose I configure the sensor to run at 75Hz (DO2:DO0 = 110), and average 8 samples per measurement output (MA1:0=11). Does this mean:
    1) that the sensor is taking 8 samples every measurement period
    (1/75Hz = 13.3ms), averaging them, and putting the result in the data registers
    2) the sensor is taking only one measurement per sample period, and averaging that with the previous 7 measurements, so that the average would be effectively over 8*13.3ms = 106ms period?
    3) something else?
    I’ve tried to search online for this, but haven’t found anything to help clarify.

    • I suspect that it’s a simple “moving average” filter, where it samples at the given rate (75Hz), saves the last 8 samples, reports the average of those 8, then discards the oldest value when it takes a new sample. But as always, you should feel free to contact the chip manufacturer (Honeywell) for detailed information about the low-level functioning of their parts. Most companies have application engineers standing by to help you.

    • Hi, another thing that is different and care should be taken of is the internal data registers, Y and Z data registers are replaced!

  • “For a breakout board, see below."
    There are no products in the related products section.
    I believe you intended to link this board.

  • That’s not a datasheet in the description, this is it I think: http://www.insed.de/HMC5883L.pdf

Customer Reviews

No reviews yet.