The GY-271 QMC5883L 3-Axis Digital Compass Module is a compact, high-sensitivity magnetic field sensor designed for compass heading, orientation detection, and magnetic field measurement applications. Built around the QMC5883L chip (CHN version), this module is a popular and cost-effective alternative to the older HMC5883L, offering improved performance and wider availability. It is ideal for Arduino projects, robotics, navigation systems, and DIY electronics.
At the heart of the module is the QMC5883L, a 3-axis magnetic sensor with 16-bit ADC resolution that measures magnetic fields across three axes (X, Y, Z). The sensor provides ±2 Gauss to ±8 Gauss user-selectable measurement ranges, making it suitable for both weak and strong magnetic field environments. The I2C digital interface simplifies connection to microcontrollers, requiring only two data lines (SDA, SCL) plus power and ground.
The QMC5883L features built-in signal processing including self-test, temperature compensation, and offset cancellation, ensuring stable and accurate readings across temperature variations. The module includes onboard voltage regulation and level shifting, allowing it to operate from 3V to 5V supplies — making it directly compatible with both 3.3V and 5V microcontrollers like Arduino Uno, ESP32, and STM32.
The GY-271 module breaks out the QMC5883L chip onto a compact PCB with a standard pin header for easy connection to breadboards and jumper wires. The board includes onboard pull-up resistors for the I2C bus and a 3.3V regulator for reliable operation. The module measures approximately 16 × 16 mm.
Supported development environments include Arduino IDE (with the QMC5883L library by MPrograms or similar), ESP-IDF, and MicroPython. The module is widely used for compass heading, tilt compensation (when combined with an accelerometer), magnetic field detection, and position sensing.
Whether you are building a robot with navigation capabilities, a handheld compass, a metal detector, or an orientation-aware device, the GY-271 QMC5883L provides a reliable, cost-effective foundation for magnetic sensing. It is suitable for individual makers, students, and businesses purchasing in bulk for product development or educational programs.
Features
-
QMC5883L 3-axis magnetic sensor — Measures magnetic fields in X, Y, and Z axes
-
16-bit ADC resolution — High-resolution magnetic field measurement
-
User-selectable ranges — ±2 Gauss to ±8 Gauss measurement ranges
-
I2C digital interface — Simple connection with only two data lines
-
Wide supply voltage — 3V to 5V operation with onboard regulation and level shifting
-
Built-in signal processing — Self-test, temperature compensation, and offset cancellation
-
Compact module form factor — 16 × 16 mm with standard pin header
-
Onboard pull-up resistors — For reliable I2C communication
-
Wide library support — Compatible with QMC5883L Arduino libraries
-
Direct replacement for HMC5883L — Popular alternative with improved availability
Technical Specifications
| # | Parameter | Specification |
|---|---|---|
| 1 | Sensor Chip | QMC5883L (CHN) |
| 2 | Axes | 3-axis (X, Y, Z) |
| 3 | ADC Resolution | 16-bit |
| 4 | Measurement Range | ±2 Gauss to ±8 Gauss (user selectable) |
| 5 | Interface | I2C (address 0x0D) |
| 6 | Supply Voltage | 3V – 5V DC (onboard regulator) |
| 7 | Operating Temperature | -40°C to +85°C |
| 8 | Module Dimensions | Approx. 16 × 16 mm |

















