Keszoox
GY-271 QMC5883L 3-Axis Digital Compass Module I2C Arduino STM32
GY-271 QMC5883L 3-Axis Digital Compass Module I2C Arduino STM32
Couldn't load pickup availability
GY-271 QMC5883L 3-Axis Digital Magnetic Compass Module - I2C, Arduino / STM32
The GY-271 module features the QMC5883L 3-axis magnetometer from QST Corporation, providing digital compass heading via I2C interface. With a 2mG resolution, 200Hz output data rate, and 3.3V-5V supply compatibility, it is the standard compass module for drone flight controllers, robot navigation, and orientation sensing projects.
Key Specifications
| Parameter | Value |
|---|---|
| Sensor IC | QMC5883L (QST Corporation) |
| Interface | I2C (address 0x0D) |
| Supply Voltage | 3.3V - 5V DC |
| Measurement Range | +/-8 Gauss (full scale) |
| Resolution | 2mG (milli-Gauss) |
| Output Data Rate (ODR) | 10Hz / 50Hz / 100Hz / 200Hz |
| ADC Resolution | 16-bit per axis |
| Operating Temperature | -40C to +85C |
| Module Size | ~13 x 13mm |
QMC5883L vs HMC5883L
| Feature | QMC5883L (GY-271 new) | HMC5883L (GY-271 old) |
|---|---|---|
| I2C Address | 0x0D | 0x1E |
| Max ODR | 200Hz | 75Hz |
| Full Scale Range | +/-8G | +/-8.1G |
| Library | QMC5883LCompass | HMC5883L / Adafruit |
Why Choose GY-271 QMC5883L?
- 200Hz ODR - Fast update rate for dynamic heading in drones and fast-moving robots
- 16-Bit Resolution - 2mG resolution for accurate heading calculation
- I2C Interface - Simple 2-wire connection to any MCU
- 3.3V/5V Compatible - Onboard level shifter for both supply voltages
- Compact Module - 13x13mm fits in tight spaces
Typical Applications
- Drone and UAV compass heading (ArduPilot, Betaflight)
- Robot navigation and heading correction
- Electronic compass for hiking and outdoor devices
- IMU complement (combined with MPU-6050 for 9-DOF)
- Metal detection and magnetic anomaly sensing
- Autonomous vehicle heading reference
Arduino Library and Setup
Install QMC5883LCompass library by MPrograms. Connect SDA to A4, SCL to A5, VCC to 3.3V/5V, GND to GND.
compass.init(); compass.read(); int heading = compass.getAzimuth();
Calibrate by rotating the module in all directions to compensate for hard-iron distortion.
FAQ
Q: My GY-271 is not detected at I2C address 0x1E - why? Newer GY-271 modules use QMC5883L (address 0x0D), not HMC5883L (0x1E). Use the QMC5883LCompass library and address 0x0D.
Q: How do I get accurate heading from QMC5883L? Perform hard-iron calibration by rotating the sensor through all orientations and recording min/max values for each axis. Apply offset correction in software.
Package Contents
- 1x GY-271 QMC5883L 3-Axis Digital Compass Module
