GY-271 Magnetoresistive Electronic Compass Module – 3-Axis, 3–5V, I2C

GY-271 Magnetoresistive Electronic Compass Module – 3-Axis, 3–5V, I2C
Click image for Gallery
  • Brands GY
  • Product Code:SQ1058
  • Availability: 1000
  • $1.25
  •  
  • Ex Tax:$1.25
This product has a minimum quantity of 4
+
-


Tags: GY-271, Electronic Compass Module, 3-Axis Magnetometer, HMC5883L, QMC5883L, Magnetoresistive Sensor, I2C Compass, Arduino Compass

The GY-271 Electronic compass module is a compact three-axis magnetoresistive sensor module designed to measure the Earth's magnetic field on the X, Y, and Z axes and calculate a compass heading. It is one of the most widely used electronic compass modules in the Arduino and Raspberry Pi ecosystem, valued for its low cost, I²C interface, and straightforward library support. The module is typically populated with either the Honeywell HMC5883L or the pin-compatible QMC5883L magnetoresistive sensor, depending on the production batch and supplier.

The sensing element uses anisotropic magnetoresistive (AMR) technology: a thin-film permalloy material changes its electrical resistance in response to an applied magnetic field. This resistance change is converted by an integrated ASIC—which includes amplification, offset cancellation, and a 12-bit analog-to-digital converter—into a digital value that corresponds to the magnetic field strength along each axis. The result is a heading accuracy of approximately 1° to 2°, with a measurement range of ±1.3 to ±8 Gauss and a resolution of roughly 2 milligauss (5 milligauss per the SunFounder listing). The sensor supports data rates of up to 160Hz, making it suitable for dynamic orientation tracking as well as static compass readings.

The module operates from a 3V to 5V supply and communicates over I²C. The HMC5883L variant uses the fixed I²C address 0x1E, while the QMC5883L variant uses 0x0D (or 0x0C on some boards). The board includes 10kΩ pull-up resistors on the I²C lines and a level shifter so that the 3.3V sensor core can be connected safely to 5V microcontrollers. A DRDY (data ready) pin is also exposed for high-speed data streaming. The module measures approximately 14 × 13 × 4mm (with slight variations between suppliers) and is a passive sensor breakout—it does not include a display, battery, or enclosure.

GY-271 Electronic compass module Application

  1. Digital compass and heading indication in handheld and wearable devices.
  2. Robot navigation and orientation sensing for ground robots and drones.
  3. Arduino, Raspberry Pi, and ESP32 heading and magnetometry projects.
  4. Tilt-compensated compassing when paired with an accelerometer.
  5. Magnetic field anomaly detection and educational magnetometry experiments.
  6. Position tracking and dead-reckoning in GPS-denied environments.

GY-271 Electronic compass module Specifications

  1. Product Model: GY-271 (also sold as GY-273 with HMC5883L)
  2. Sensor IC: Honeywell HMC5883L or QMC5883L (variant-dependent)
  3. Sensor Technology: Anisotropic magnetoresistive (AMR)
  4. Measurement Axes: 3 (X, Y, Z)
  5. Measurement Range: ±1.3 to ±8 Gauss
  6. Resolution: Approximately 2 milligauss (12-bit ADC); 5 milligauss per SunFounder listing — see QC report
  7. Heading Accuracy: Approximately 1°–2°
  8. Supply Voltage: 3V–5V DC
  9. Interface: I²C
  10. I²C Address: 0x1E (HMC5883L); 0x0D or 0x0C (QMC5883L)
  11. Pull-up Resistors: 10kΩ on SDA/SCL
  12. Level Shifter: Onboard (3.3V sensor core to 5V logic)
  13. Data Rate: Up to 160Hz (QMC5883L)
  14. DRDY Pin: Yes (data ready output)
  15. Dimensions: Approximately 14 × 13 × 4mm (varies by supplier)
  16. Module Weight: Approximately 2–3g (estimated, not specified in source)
  17. Form Factor: Compact breakout PCB with pin header
Interfaces
Interface Type I2C
Sensor Parameters
Accuracy 1° ~ 2°
Internal ADC 12 bit
Measuring range -8 gauss ~ +8 gauss
Output Type Digital
Resolution 2 milli-gauss
Electrical Parameters
Frequency 160Hz
Input Voltage 3V ~ 5V
Current Measurement mode: 100uA , Sleep mode: 2uA
Board Parameters
Main Chip HMC5883L
Pin Count 5 Pin
Physical Parameters
Size 14.5mm x 13.5mm

Write a review

Note: HTML is not translated!
   Bad           Good
Captcha
Electronic & Robotic Supplier

Your B2B Supplying Partner in Mainland China

Worldwide Shipping

Using Vast Majority of International Couriers

Secure Payments

Always Pay with Trust by PayPal Express Checkout