HMC5883L three-axis magnetometer
Read magnetic axes with a genuine HMC5883L, calibrate locally and distinguish it from incompatible look-alike compass modules.

Compass measurements
The chip measures magnetic field components. To estimate heading while the board is tilted, combine the magnetic data with an independent tilt measurement and use the correct axis convention.
Bus and register checks
Read the identification registers before assuming the HMC5883L register map applies. Use the published order of the output registers: X, Z and then Y.
Calibration and interference
Collect readings in several orientations to estimate offsets and distortion. Keep the sensor away from high-current wiring and magnetic hardware. A heading that follows motor operation is a sign to inspect placement and magnetic interference.
Specifications
| Parameter | Value or condition | Source |
|---|---|---|
| I²C addressing | 0x1E as a seven-bit address | Honeywell |
| Sensor output | Three magnetic axes with programmable gain | Honeywell |
Compatibility and practice
Confirm chip identity and address before choosing a library; board labels are sometimes misleading.
Related components
Sources and datasheets
- HMC5883L Data Sheet · Honeywell