HMC5883L — i2c address & wiring
3-axis digital compass / magnetometer for heading and tilt-compensated bearing.
Key facts
HMC5883L at a glance
| i2c address | 0x1E fixed address |
|---|---|
| Logic voltage | 3.3–5 V |
| Type | sensor |
| Part | Honeywell HMC5883L |
| Ships with | Grove |
The chip
What the Honeywell HMC5883L actually is
Three-axis anisotropic magnetoresistive (AMR) magnetometer measuring magnetic field strength for electronic compass, heading estimation and navigation applications. Commonly combined with accelerometers and gyroscopes in inertial measurement systems.
Watch out: Genuine HMC5883L silicon is long discontinued — most modern GY-271 modules actually carry the QMC5883L clone, which answers at address 0x0D (not 0x1E) with a completely different register map. Scan the bus before assuming which one arrived; libraries for one won't drive the other.
Wiring
How to connect the HMC5883L
The HMC5883L talks i2c at address 0x1E. It runs at 3.3–5 V, so match your host's logic level — if your host is 5 V and a board on the bus is 3.3 V-only, add a level shifter. Use the compatibility checker to confirm the exact cable for your setup.
The address is fixed, so two HMC5883Ls can't share a bus directly — the address-conflict guide covers the workarounds (multiplexer, second bus).
Wiring is the usual four: power, ground, SDA and SCL, plus pull-up resistors — almost always already fitted on the breakout. Nothing showing up? Run an i2c scan first; if the bus is silent, the 7-step checklist finds it faster than guessing.
Ecosystems
Plug-together options for the HMC5883L
HMC5883L breakouts ship with Grove — keyed 4-pin cables carrying power, ground, SDA and SCL, so there's nothing to solder and nothing to wire backwards. Chain it to the next board and keep going.
Running a mixed bench? Those ecosystems interoperate more than their marketing suggests — see every connector pairing for the cable or adapter you need, or the standards overview for how they compare.
Alternatives
Other motion boards
Watch the bus
Boards that clash with the HMC5883L
These want an address the HMC5883L also answers (0x1E), so they can't share a bus with it untouched. If one is address-selectable, strap it elsewhere; if not, the conflict guide covers the multiplexer and second-bus routes, and the collision roundup explains why a scan won't warn you.
Get one
Questions
HMC5883L i2c FAQ
What is the HMC5883L's i2c address?
The HMC5883L sits at a fixed address of 0x1E. It can't be changed, so two of them can't share one bus without a multiplexer or a second bus.
What voltage does the HMC5883L run at?
3.3–5 V logic. That range covers both 3.3 V and 5 V hosts, so it drops onto a Pi, ESP32 or Arduino without a level shifter.
Can I use two HMC5883Ls on one i2c bus?
Not directly — every HMC5883L answers to 0x1E, so two on one bus would collide. Use a TCA9548A multiplexer to give each its own channel, or put the second one on a separate bus.
Does the HMC5883L work with Grove?
Yes — HMC5883L breakouts ship with Grove, so it plugs straight in with no soldering. Mixing ecosystems? The compatibility checker gives you the exact cable or adapter.
What should I watch out for with the HMC5883L?
Genuine HMC5883L silicon is long discontinued — most modern GY-271 modules actually carry the QMC5883L clone, which answers at address 0x0D (not 0x1E) with a completely different register map. Scan the bus before assuming which one arrived; libraries for one won't drive the other.