Skip to main content
PartAndStock
Blog

What Is the HMC5883L? 3-Axis Magnetometer (Compass) and Uses

November 30, 2026 4 min read
Quick answer

The HMC5883L is a 3-axis magnetometer (digital compass) sensor over I²C. By measuring the Earth's magnetic field it allows heading calculation; used in robot/drone navigation. IMPORTANT: it is largely discontinued; most 'HMC5883L' modules are actually the QMC5883L, which has a different address/register layout. Calibration is a must for the compass.

The HMC5883L is a 3-axis magnetometer (digital compass) sensor communicating over I²C. By measuring the Earth's magnetic field it allows heading calculation. For the concept, see what is a sensor.

What is the HMC5883L used for?

A digital compass, robot/drone heading and navigation. It is usually combined with an accelerometer/gyroscope (MPU6050) to get a tilt-compensated compass and orientation (AHRS). It is common on the GY-271 module.

Specifications

ParameterValue
Type3-axis magnetometer (I²C)
MeasurementMagnetic field (X/Y/Z)
MakerHoneywell
Supply3.3 V (module may have a regulator)

Watch out

IMPORTANT: the HMC5883L is largely discontinued; most "HMC5883L" modules on the market are actually the QMC5883L chip, which has a different address/register layout. Choose the library by the actual chip. The magnetometer is disturbed near iron/magnets and motors; for the compass, calibration (hard/soft iron) is a must.

Equivalents

  • QMC5883L: the common replacement chip (different register/address).
  • QMC5883L / GY-271: often confused as a module.
  • LIS3MDL: a modern 3-axis magnetometer.

Find it in our catalog

Use the HMC5883L search.

Frequently Asked Questions

What is the HMC5883L?+
The HMC5883L is a 3-axis magnetometer (digital compass) sensor communicating over I²C. By measuring the Earth's magnetic field it allows heading calculation; it is used in robot/drone navigation.
Are the HMC5883L and QMC5883L the same?+
No. The HMC5883L (Honeywell) is largely discontinued; most modules on the market are actually the QMC5883L, which has a different address/register layout. You must choose the library by the actual chip.
Does the HMC5883L need calibration for the compass?+
Yes; the magnetometer is disturbed near iron/magnets and motors. Hard-iron/soft-iron calibration is a must for an accurate compass, and it is combined with an accelerometer for tilt compensation.
What is an equivalent of the HMC5883L?+
The QMC5883L as the common replacement; the modern LIS3MDL.