ElectronicComponent

HMC5883L Magnetometer

HMC5883L Magnetometer

Tags

Description

The HMC5883L Magnetometer measures magnetic field strength in 3 axis and is most commonly used as an electric compass, with a sensing range of +/-8 Gauss. Earth's magnetic field is measured in units of tesla or gauss and ranges from 0.25 to 0.65 gauss on the surface (where 1 Tesla = 10,000 gauss). The chip itself is manufactured by Honeywell Microelectronics & Precision Sensors and is a surface mount component that measures 3.0x3.0x0.9mm. Adafruit and Sparkfun distribute a breakout board kit, which will ease the trouble of interfacing with this chip.

Pinout

Adafruit sells a breakout board kit, which comes with a onboard power regulator. The Adafruit breakout board comes with 6 pins:

  • Vin Powers the board, accepts 3-5 Volt DC.
  • GND Ground connection pin.
  • 3vo The Adafruit board comes with an onboard voltage regulator. This pin outputs 3.3V at maximum 100mA so you can power something else, within those limits.
  • SDA I2C data pin, which has a 10kΩ to the Vin line, can safely be used with 3V and 5V logic.
  • SCL I2C clock pin, which has a 10kΩ to the Vin line, can safely be used with 3V and 5V logic.
  • RDY this pin is used for high frequency data reading (greater than 100 times per second (100Hz)). This pin will tell you when data is ready.

Wiring Notes

  1. Arduino Power the board from the 5V pin. Connect the SDA and the SCL pin to the Analog A4 and A5 pins, respectively.
  2. Raspberry Pi Power the board from the 3V pin. Connect the SDA and SCL pins on the RTC to the SDA0 (P1-03) and SCL0 (P1-05) pins on the Raspberry Pi, respectively (see R-Pi pinout here). These pins have internal 1.8kΩ pull-up resistors, so they can be directly connected.
  3. MSP430 Launchpad Power the board from the 3.3 Volt pin. Connect the SDA and SCL pins on the RTC to the SDA and SCL pins on the Launchpad board, respectively. You will need to add 1.8kΩ pull-up resistors to the SDA and SCL pins. See tutorial here.
    • MSP430F5529 Connect SDA -> P3.0 and SCL -> P3.1

Quick Overview

 HMC5883L Magnetometer
Input Voltage3-5V
Current Supply100µA
Sensing Range+/- 8 Gauss
Operating Temperature-30 C to +85 C
I2C Address0x1E
Price surface-mount IC$4.21 here
Price Breakout Board$9.95 here

Related Tutorials

MSP430LaunchPad.HMC5883Energia

HMC5883L Magnetometer on the Launchpad with Energia
Setup the HMC5883 Magnetometer with the MSP430 Launchpad and Energia.

External Links

  1. Adafruit Breakout Board Info