Keszoox
GY-271 QMC5883L Triple-Axis Compass Magnetometer Module — I²C, 3–5V, Arduino
GY-271 QMC5883L Triple-Axis Compass Magnetometer Module I²C, 3–5V, Arduino
Couldn't load pickup availability
GY-271 QMC5883L Triple-Axis Compass Magnetometer — I²C, 3–5V, Arduino & Drone Navigation
The GY-271 module is built around the QMC5883L triple-axis magnetometer IC, delivering digital compass heading and magnetic field strength data over I²C. With ±2 Gauss full-scale range, 12-bit resolution, and 3–5V dual-voltage support, it is the standard compass module for Arduino, ESP32, STM32, and Raspberry Pi projects requiring geomagnetic orientation sensing.
Key Specifications
| Parameter | Value |
|---|---|
| Sensor IC | QMC5883L |
| Interface | I²C (up to 400kHz fast mode) |
| I²C Address | 0x0D (fixed) |
| Supply Voltage | 3.0–5.0V |
| Full-Scale Range | ±2 Gauss |
| Resolution | 12-bit per axis |
| Output Data Rate | 10 / 50 / 100 / 200 Hz (selectable) |
| Operating Temperature | -40°C to +85°C |
| PCB Size | ~13.5 × 13.5mm |
Why Choose GY-271 QMC5883L?
- QMC5883L replaces HMC5883L — same I²C protocol, pin-compatible, widely stocked replacement for the discontinued Honeywell HMC5883L
- 3–5V dual voltage — onboard LDO regulator works with Arduino (5V) and ESP32/Raspberry Pi (3.3V) without level shifters
- 12-bit resolution — sufficient for ±1° heading accuracy after calibration
- Onboard pull-up resistors — plug directly into I²C bus, no external components needed
- 200Hz max ODR — fast enough for real-time drone attitude estimation
Compatible With
- Arduino UNO R3, Nano, Mega 2560
- ESP32, ESP8266 (3.3V I²C)
- STM32 (Blue Pill, Black Pill)
- Raspberry Pi (via I²C GPIO)
- Libraries: QMC5883LCompass (Arduino), smbus2 (Python)
Typical Applications
- Drone / UAV compass heading — used as external magnetometer in ArduPilot and Betaflight setups to avoid FC interference
- Robot navigation — heading reference for differential-drive robots using ROS or custom PID
- Electronic compass — handheld compass display with OLED and Arduino Nano
- IMU sensor fusion — combined with MPU-6050 for 9-DOF AHRS (Attitude and Heading Reference System)
- Geomagnetic anomaly detection — metal detection and field mapping projects
Frequently Asked Questions
Q: Is the GY-271 compatible with HMC5883L libraries?
A: Not directly. The QMC5883L uses I²C address 0x0D (vs 0x1E for HMC5883L) and different register maps. Use the dedicated QMC5883LCompass Arduino library for correct operation.
Q: Can I use this with a 5V Arduino without a level shifter?
A: Yes. The GY-271 module includes an onboard 3.3V LDO and 5V-tolerant I²C pull-ups, making it safe to connect directly to Arduino UNO’s 5V I²C bus.
Q: What heading accuracy can I expect?
A: After hard-iron and soft-iron calibration, typical heading accuracy is ±1–2° in a magnetically clean environment. Accuracy degrades near motors, speakers, or ferrous metals.
Package Contents
- 1× GY-271 QMC5883L Triple-Axis Magnetometer Module
