QMC5883L Electronic Compass

From Epalsite Wiki
Jump to: navigation, search

Introduction

3-Axis Compass module, I2C based QMC5883 digital compass. This ASIC is equipped with high resolution magneto-resistive sensors and a 16-bit ADC. It provides compass heading accuracy up to 1° to 2°. Signal conditioning like amplification, automatic degaussing strap drivers and offset cancellation are inbuilt. This module also includes a MIC5205-2.5 voltage regulator for power supply requirement. Hence user can connect any 3.3V to 6V DC power supply.
QMC5883L.jpg

Features

  • I2C interface
  • Compatible with 3.3V-5.0V voltage level
  • Max 200Hz output rate
  • High heading accuracy

Usage

Below is a register map that might help you understand what you can get from this module. There are totally 14 registers provided by QMC5883L. Two Control Registers decide the working mode of the device, they come with address "09H" and "0AH". Most of the remaining registers are read only data output registers, status register and identification registers.
QMC5883L Register Map.PNG
In this example we will make the module output the heading angle between South and this module.

  1. Connect the QMC5883L Electronic Compass to Arduino via the I2C port. Make sure the QMC5883L module is horizontal。
  2. Download the library file: QMC5883L Compass library. Unzip it into the libraries file of Arduino IDE by the path: ..\arduino-1.0.1\libraries.
  3. Open the demo by the path:File -> Example ->Digital Compass ->QMC5883L_Example.
  4. Upload the Code.
  5. Check the output result by opening the serial monitor.

QMC5883L Test.PNG QMC5883L output.PNG

Resources