The Compass Module 3-Axis HMC5883L is designed for low-field magnetic sensing with a digital interface. This compact sensor fits into small projects such as UAVs and robot navigation systems.
The sensor converts any magnetic field to a differential voltage output on 3 axes. This voltage shift is the raw digital output value, which can then be used to calculate headings or sense magnetic fields coming from different directions. Example code in PBASIC, Spin, and C are provided below in the Downloads. Click over to the KickStart Guide to see how to use the compass module, complete with wiring diagrams and sample code for the BASIC Stamp, Propeller, and Arduino.
Measures Earth's magnetic fields
3-axis magnetoresistive sensor
Wide magnetic field range (+/-8 gauss)
1 to 2 degree compass heading accuracy
Precision in-axis sensitivity and linearity
I²C digital Interface
Fast 160 Hz maximum output rate
Designed for use with a large variety of microcontrollers with different voltage requirements
Auto and personal navigation
Location-based services (LBS)
Power Requirements: 2.7 to 6.5 VDC
Communication Interface: I²C (up to 400 kHz)
Operating temperature: -22 to +185 °F (-30 to +85 °C)
Dimensions: 0.725 x 0.650 in (1.8 x 1.7 cm)
Note: For tilt compensation, you will need to use an accelerometer along with this module. See the application notes for details on tilt compensation.