Skip to main content
PartAndStock
Blog

What Is the QMC5883L? 3-Axis Magnetometer (GY-271) and Uses

December 1, 2026 4 min read
Quick answer

The QMC5883L is a 3-axis magnetometer (digital compass) sensor over I²C. It is the chip most often on GY-271 modules, replacing the discontinued HMC5883L. It is functionally similar to the HMC5883L but has a different I²C address and register map (NOT software-compatible). Calibration and magnetic-declination correction are a must for the compass.

The QMC5883L is a 3-axis magnetometer (digital compass) sensor communicating over I²C. It is the chip most often found on GY-271 modules, replacing the discontinued HMC5883L. For the concept, see what is a sensor.

What is the QMC5883L used for?

A digital compass, heading finding, robot/drone navigation. It measures the magnetic field and gives X/Y/Z components; combined with an accelerometer/gyroscope it yields a tilt-compensated compass. It is functionally very similar to the HMC5883L but has a different I²C address and register map.

Specifications

ParameterValue
Type3-axis magnetometer (I²C)
MeasurementMagnetic field (X/Y/Z)
MakerQST
ModuleGY-271 (often sold as HMC5883L)

Watch out

The QMC5883L is not software-compatible with the HMC5883L (different address/register); if you don't pick the right library you get no readings. The magnetometer is sensitive to iron/magnets/motors; for the compass, calibration (hard/soft iron) is a must. For a correct heading, magnetic declination correction is needed.

Equivalents

  • HMC5883L: the older (discontinued) similar part.
  • LIS3MDL: a modern 3-axis magnetometer.
  • MMC5603: a high-accuracy magnetometer.

Find it in our catalog

Use the QMC5883L search.

Frequently Asked Questions

What is the QMC5883L?+
The QMC5883L is a 3-axis magnetometer (digital compass) sensor communicating over I²C. It is the chip most often found on GY-271 modules, replacing the discontinued HMC5883L.
Does the QMC5883L work with the HMC5883L library?+
No; it has a different I²C address and register map and is not software-compatible. You must pick the library that matches the actual chip on your module (QMC or HMC).
Is the QMC5883L compass accurate?+
For an accurate heading you need calibration (hard/soft iron) and magnetic-declination correction. Nearby iron/magnets/motors disturb the reading, and an accelerometer is used for tilt compensation.
What is an equivalent of the QMC5883L?+
The older, similar HMC5883L; the modern LIS3MDL; the high-accuracy MMC5603.