Triple Axis Magnetometer Breakout

From Geeetech Wiki
Revision as of 08:55, 8 March 2012 by Admin (talk | contribs) (How to buy)

Jump to: navigation, search

Product Overview

Hmc5883L.jpg

This is a breakout board for The Honeywell HMC5883L . The Honeywell HMC5883L is a multi-chip module designed for low-field magnetic sensing with a digital interface for applications such as low-cost compassing and magnetometry. The HMC5883L includes our state-of-the-art, high-resolution HMC118X series magneto-resistive sensors plus an ASIC containing amplification, automatic degaussing strap drivers, offset cancellation, and a 12-bit ADC that enables 1° to 2° compass heading accuracy. The I2C serial bus allows for easy interface. Applications for the HMC5883L include Mobile Phones, Netbooks, Consumer Electronics, Auto Navigation Systems, and Personal Navigation Devices.

The HMC5883L utilizes Honeywell’s Anisotropic Magnetoresistive (AMR) technology that provides advantages over other magnetic sensor technologies. These anisotropic, directional sensors feature precision in-axis sensitivity and linearity. These sensors’ solid-state construction with very low cross-axis sensitivity is designed to measure both the direction and the magnitude of Earth’s magnetic fields, from milli-gauss to 8 gauss. Honeywell’s Magnetic Sensors are among the most sensitive and reliable low-field sensors in the industry.

Applications

Mobile Phones, Netbooks
Consumer Electronics
Auto Navigation Systems
Personal Navigation Devices


Features

The Honeywell HMC5883L includes a wide range of features:
3-Axis Magnetoresistive Sensors and ASIC in a 3.0x3.0x0.9mm LCC Surface Mount Package
12-Bit ADC Coupled with Low Noise AMR Sensors Achieves 2 milli-gauss Field Resolution in ±8 Gauss Fields
Low Voltage Operations (2.16 to 3.6V) and Low Power Consumption (100 μ A)
I2C Digital Interface
Wide Magnetic Field Range (+/-8 Oe)

Pin Out and Signal Description

Hmc5883L1.jpg

Hmc5883L pin.jpg

Block Diagram

Hmc5883L schematic.jpg

demo code

Hm5883l连线图.png

#include <Wire.h> 
#include <HMC5883L.h> 
HMC5883L compass; 
void setup() 
{ 
 Serial.begin(9600); 
 Wire.begin(); 
 compass = HMC5883L(); 
 compass.SetScale(1.3); 
 compass.SetMeasurementMode(Measurement_Continuous); 
} 
void loop() 
{ 
 MagnetometerRaw raw = compass.ReadRawAxis(); 
 MagnetometerScaled scaled = compass.ReadScaledAxis(); 
 float xHeading = atan2(scaled.YAxis, scaled.XAxis); 
 float yHeading = atan2(scaled.ZAxis, scaled.XAxis); 
 float zHeading = atan2(scaled.ZAxis, scaled.YAxis); 
 if(xHeading < 0) xHeading += 2*PI; 
 if(xHeading > 2*PI) xHeading -= 2*PI; 
 if(yHeading < 0) yHeading += 2*PI; 
 if(yHeading > 2*PI) yHeading -= 2*PI; 
 if(zHeading < 0) zHeading += 2*PI; 
 if(zHeading > 2*PI) zHeading -= 2*PI; 
 float xDegrees = xHeading * 180/M_PI; 
 float yDegrees = yHeading * 180/M_PI; 
 float zDegrees = zHeading * 180/M_PI; 
 Serial.print(xDegrees); 
 Serial.print(","); 
 Serial.print(yDegrees); 
 Serial.print(","); 
 Serial.print(zDegrees); 
 Serial.println(";"); 
 delay(100); 
}

How to buy

Click here to buy HMC5883L Triple Axis Magnetometer Breakout