HMC5883L three-axis magnetometer connection guide
HMC5883L three-axis magnetometer (LPCC-16 · 3 × 3 mm) connection guide. Read a magnetic vector over I²C.
LPCC-16 · 3 × 3 mm
16 contacts Current packageRead a magnetic vector over I²C
RequiredTie VDD, VDDIO and S1 to the shared 3.3 V rail. Place C1 and C2 close to the sensor and size the set/reset current paths for about 1 A peak. Leave all NC pins open.
- +3.3 V
- R1.1
- R2.1
- C3.1
- Ground
- Host ground
- C1.2
- C3.2
- Reservoir node
- C1.1
- Strap positive
- C2.1
- Strap driver
- C2.2
- I²C data
- ↔
- Host SDA
- R1.2
- I²C clock
- →
- Host SCL
- R2.2
Bench checks
- Verify that both GND pins are connected and C1 and C2 are ceramic with ESR below 200 mΩ, as Honeywell recommends.
- Confirm address 0x1E and read ASCII H43 from registers 0x0A–0x0C.
- Select continuous measurement by writing 0x00 to the mode register at 0x02. Poll RDY or monitor the optional DRDY pin, then read all six result bytes starting at 0x03.
- Decode the signed X, Z and Y values in that order. Move the board away from ferromagnetic fixtures and confirm that the readings change as it rotates.
Honeywell HMC5883L datasheet, pp. 2–3, 6–7 and 16–17. Manufacturer PDF archived from SparkFun.
LPCC-16 · 3 × 3 mm wiring map
1 · SCL
I²C clock. Connect to the host clock line with its bus pull-up.
Wiring requirements
Single supply. Tie VDD, VDDIO and S1 together at 2.16–3.6 V. Fit one 100 nF bypass on the shared rail.
Dual supply. Use 2.16–3.6 V for VDD and 1.71 V to VDD for VDDIO. Tie S1 to VDDIO and bypass each supply with 100 nF.
With either supply arrangement. Join both GND pins to host ground. Use host-compatible I²C levels and pull SDA and SCL up to VDDIO (2.2 kΩ each in the reference design).
Models and documents
This map covers Honeywell’s bare HMC5883L in LPCC-16. Confirm the chip identity on boards sold with similar names.
- HMC5883L
- Honeywell 16-pin leadless chip carrier.
- HMC5883L manufacturer documentation· Honeywell HMC5883L datasheet, pp. 2–3, 6–7 and 16–17. Manufacturer PDF archived from SparkFun.
