Spark Logic

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 package

Honeywell·

Read a magnetic vector over I²C

Required

Tie 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
C1 4.7 µF ceramic between Reservoir node and GroundReservoir nodeC1 4.7 µF ceramicGround
C2 0.22 µF ceramic between Strap positive and Strap driverStrap positiveC2 0.22 µF ceramicStrap driver
C3 100 nF between +3.3 V and Ground+3.3 VC3 100 nFGround
R1 2.2 kΩ between +3.3 V and I²C data+3.3 VR1 2.2 kΩI²C data
R2 2.2 kΩ between +3.3 V and I²C clock+3.3 VR2 2.2 kΩI²C clock

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

External wiring example · Read a magnetic vector over I²C

Highlighted contacts are used in this circuit. Select a contact to highlight its wiring nets.

LPCC-16 · 3 × 3 mm

1 · SCL · Left side, contact 1 from the top

Viewed through the package from the marking side, with pin 1 at the upper left, as shown in the pin configuration.
Selected pin details

1 · SCL

Input · Clock inputs / oscillator

I²C clock. Connect to the host clock line with its bus pull-up.

Wiring requirements

Honeywell HMC5883L datasheet, pp. 2–3, 6–7 and 16–17. Manufacturer PDF archived from SparkFun.

Electrical limits · Pin in the reference

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.