GY-271 Digital Compass Module to Give Robots and Drones a Heading

GY-271 3-Axis Magnetometer Compass Module (HMC5883L / QMC5883L)

Rs. 420 - Out of stock - SKU ABH-SENS-0399 - Brand Generic

The GY-271 is a 3-axis magnetometer (digital compass) module with an HMC5883L or QMC5883L chip and an I2C interface. It measures the Earth's magnetic field to give heading for robots, drones and navigation projects.

Delivery anywhere in Pakistan for a flat Rs. 250 paid in advance, product price Cash on Delivery. 7-Day Checking Warranty.

Key features

Specifications

ChipQMC5883L or HMC5883L (batch dependent)
Axes3
InterfaceI2C (0x0D or 0x1E)
Supply3.3-5V
Rangeapprox. ±8 Gauss

What's in the box

Use cases

Description

Overview

A magnetometer senses the direction of magnetic north. Combine its X and Y readings and you get a compass heading in degrees, which robots and drones need to know which way they are facing.

Chip versions

Most new GY-271 boards use the QMC5883L (I2C address 0x0D), while older ones used the HMC5883L (0x1E). They need different libraries. Run an I2C scanner to see which you have.

Libraries

Calibration

Rotate the sensor in all directions to record min and max values, then apply offsets. Keep it away from motors, magnets and steel, which distort readings.

Applications

Robot heading control, drone and rover navigation, digital compasses, metal detection experiments and orientation sensing.

Frequently asked questions

Why does my GY-271 not work with the HMC5883L library?

Your board probably has the QMC5883L chip. Use a QMC5883L library.

How do I calibrate it?

Rotate it through all directions, record min and max on each axis, then apply offsets.

Why are my compass readings wrong?

Nearby motors, magnets or steel distort the field. Mount the sensor away from them.

In-stock alternatives and related products

All Sensors & Sensor Modules