GY-86 10DOF BMP085 Module MS5611 HMC5883L MPU6050 Module MWC Flight Control Sensor Module

SKU: FA2163
Operating Voltage

3V – 5V DC

Communication Protocol

I2C (up to 400 kHz)

Board Dimensions

Approx. 22mm × 17mm × 2mm

Weight

Approx. 30g

Operating Temperature

-40°C to +85°C

Gyroscope/Accelerometer Chip

MPU6050 (integrated)

Gyroscope Ranges

±250, ±500, ±1000, ±2000 °/s

Accelerometer Ranges

±2g, ±4g, ±8g, ±16g

Magnetometer Chip

HMC5883L

Magnetometer Range

±8 Gauss

Heading Accuracy

1° – 2°

Barometer Chip

MS5611

Pressure Range

10 – 1200 mbar

Altitude Resolution

10 cm (0.1 m)

I2C Addresses

MPU6050: 0x68, HMC5883L: 0x1E, MS5611: 0x77

Product Overview

The GY-86 10DOF Flight Control Sensor Module is a powerful, all‑in‑one motion‑tracking board that integrates four high‑performance MEMS sensors into a single compact package. Combining a 3‑axis gyroscope, 3‑axis accelerometer, 3‑axis magnetometer, and a high‑resolution barometer, this module provides a complete 10‑degree‑of‑freedom (10DOF) sensing solution for advanced motion and orientation applications .

Built around the popular MPU6050 (which integrates both gyroscope and accelerometer), the HMC5883L magnetometer, and the MS5611 barometer, the GY-86 is widely used in drones (UAVs), quadcopters, robotics, head‑tracking systems, and inertial navigation. It is also the sensor core for many MWC (MultiWii Copter) flight controllers, making it a favorite among drone enthusiasts and professional developers alike .

All sensors communicate via a shared I2C bus, requiring only two data lines (SDA and SCL) to connect to your microcontroller. The module operates on 3V to 5V power and includes onboard logic‑level conversion (LLC), making it directly compatible with both 3.3V and 5V systems such as Arduino, ESP32, ESP8266, Raspberry Pi, and STM32 .

Key Features

  • 10‑Degree‑of‑Freedom (10DOF) Sensing: Combines 3‑axis gyroscope (angular velocity), 3‑axis accelerometer (linear acceleration/gravity), 3‑axis magnetometer (magnetic heading), and 1‑axis barometric pressure (altitude) .

  • MPU6050 Integrated Gyroscope + Accelerometer: Digital motion processor (DMP) capable of processing complex motion algorithms onboard. User‑programmable gyroscope ranges: ±250, ±500, ±1000, ±2000°/s. Accelerometer ranges: ±2g, ±4g, ±8g, ±16g .

  • HMC5883L 3‑Axis Magnetometer: 12‑bit ADC with ±8 Gauss range, 1°–2° heading accuracy, and integrated degaussing straps for resetting the sensor .

  • MS5611 High‑Resolution Barometer: 24‑bit ΔΣ ADC with factory‑calibrated coefficients. Pressure range: 10 to 1200 mbar, altitude resolution down to 10 cm (0.1 meters) .

  • Single I2C Interface: All sensors share the same I2C bus – only 2 pins (SDA, SCL) are needed to communicate with all four sensors .

  • Wide Voltage Compatibility: Operates on 3V – 5V DC with onboard LLC circuit, compatible with both 3.3V and 5V microcontrollers .

  • Compact & Lightweight: Dimensions of approximately 22mm × 17mm and very light weight, ideal for drones and portable devices .

  • Immersion Gold PCB: High‑quality PCB with gold‑plated pads for improved solderability and corrosion resistance .

Technical Specifications

Parameter Operating Value
Operating Voltage 3V – 5V DC
Communication Protocol I2C (up to 400 kHz)
Board Dimensions Approx. 22mm × 17mm × 2mm 
Weight Approx. 30g 
Operating Temperature -40°C to +85°C 
Gyroscope/Accelerometer Chip MPU6050 (integrated)
Gyroscope Ranges ±250, ±500, ±1000, ±2000 °/s 
Accelerometer Ranges ±2g, ±4g, ±8g, ±16g 
Magnetometer Chip HMC5883L
Magnetometer Range ±8 Gauss
Heading Accuracy 1° – 2° 
Barometer Chip MS5611
Pressure Range 10 – 1200 mbar
Altitude Resolution 10 cm (0.1 m) 
I2C Addresses MPU6050: 0x68, HMC5883L: 0x1E, MS5611: 0x77

Sensor Details

MPU6050 – 3‑Axis Gyroscope & 3‑Axis Accelerometer

The MPU6050 is the world’s first integrated 6‑axis motion tracking device that combines a 3‑axis gyroscope and a 3‑axis accelerometer on the same silicon die. Key features include:

  • Digital Motion Processor (DMP) : Onboard processor capable of running complex motion algorithms, offloading work from the main microcontroller.

  • 16‑bit ADCs for both gyroscope and accelerometer outputs.

  • User‑programmable ranges: Gyroscope: ±250, ±500, ±1000, ±2000°/s; Accelerometer: ±2g, ±4g, ±8g, ±16g .

  • Programmable low‑pass filter for noise reduction.

HMC5883L – 3‑Axis Magnetometer (Digital Compass)

The HMC5883L measures the Earth’s magnetic field to determine absolute heading (direction). Key features include:

  • 12‑bit ADC with 2 mG per LSB resolution.

  • ±8 Gauss measurement range.

  • Integrated degaussing straps to reset the sensor and remove residual magnetic offset.

  • Heading accuracy of 1°–2° after calibration .

MS5611 – High‑Resolution Barometer (Altimeter)

The MS5611 is a high‑resolution altimeter sensor optimized for altitude measurement. Key features include:

  • 24‑bit ΔΣ ADC for high‑precision pressure conversion.

  • Factory‑calibrated coefficients stored in internal PROM – no user calibration required.

  • Pressure range: 10 to 1200 mbar (covers altitudes from below sea level to approximately 9,000 meters).

  • Altitude resolution: Up to 10 cm (0.1 meters) .

  • Built‑in temperature sensor for accurate thermal compensation.

Pinout & Connection Guide

The GY-86 module features a standard 8‑pin configuration. Pin labeling may vary slightly between manufacturers; always verify the silkscreen on your specific board .

Pin Definitions

Pin Label Function Description
VCC VCC / 3-5V Power Supply Connect to 3.3V or 5V DC power source
GND GND Ground Common ground connection
SCL SCL I2C Clock Line Connect to SCL pin of your microcontroller
SDA SDA I2C Data Line Connect to SDA pin of your microcontroller
XDA XDA Auxiliary I2C Data Optional – for external magnetometer connection
XCL XCL Auxiliary I2C Clock Optional – for external magnetometer connection
AD0/SDO AD0 I2C Address Select Sets MPU6050 I2C address (GND = 0x68, VCC = 0x69)
INT INT Interrupt Output Optional – MPU6050 interrupt output

I2C Pin Mapping for Common Development Boards

Development Board SDA Pin SCL Pin Power Note
Arduino Uno / Nano A4 (SDA) A5 (SCL) VCC to 5V
Arduino Mega 2560 20 (SDA) 21 (SCL) VCC to 5V
ESP32 GPIO21 GPIO22 VCC to 3.3V
ESP8266 (NodeMCU) GPIO4 (D2) GPIO5 (D1) VCC to 3.3V
Raspberry Pi GPIO2 (Pin 3) GPIO3 (Pin 5) VCC to 3.3V
STM32 (Blue Pill) PB7 (I2C1_SDA) PB6 (I2C1_SCL) VCC to 3.3V

Wiring Diagram (Arduino Uno)

text
GY-86 Module          →    Arduino Uno
─────────────────────────────────────────
VCC                   →    5V
GND                   →    GND
SCL                   →    A5 (SCL)
SDA                   →    A4 (SDA)
AD0 (optional)        →    GND (default address 0x68)
INT (optional)        →    Leave unconnected

Important Notes on I2C Bus & MPU6050 Bypass Mode

Critical: The HMC5883L magnetometer is connected internally to the auxiliary I2C bus of the MPU6050, not directly to the main I2C bus of the module . To access the magnetometer, you must configure the MPU6050 to operate in I2C bypass mode. This is done by setting the following registers :

cpp
// Enable I2C bypass mode to access magnetometer and barometer
mpu.setI2CMasterModeEnabled(false);  // Disable I2C master mode
mpu.setI2CBypassEnabled(true);       // Enable I2C bypass mode
mpu.setSleepEnabled(false);          // Wake up the sensor

Without these settings, you will only be able to read the MPU6050 (gyro/accel) but not the HMC5883L magnetometer. The barometer (MS5611) is accessible directly without special configuration.

Pull‑Up Resistor Requirements

The I2C bus requires pull‑up resistors on the SDA and SCL lines. Most GY-86 modules include onboard 4.7kΩ pull‑ups, but if you experience communication issues, adding external 4.7kΩ resistors can improve reliability, especially with long cables or multiple I2C devices.

Usage Guide

Software Setup (Arduino IDE)

Step 1: Install Required Libraries

The GY-86 module is supported by several libraries. The most comprehensive is Jeff Rowberg’s I2Cdevlib, which provides individual libraries for each sensor.

  1. Download the libraries from: https://github.com/jrowberg/i2cdevlib

  2. Copy the MPU6050HMC5883L, and MS5611 folders to your Arduino/libraries directory

  3. Restart the Arduino IDE

Step 2: MPU6050 Bypass Mode Configuration – VERY IMPORTANT!

To access the HMC5883L magnetometer, you must configure the MPU6050 to enable I2C bypass mode. Add the following lines immediately after initializing the MPU6050 :

cpp
#include <Wire.h>
#include "I2Cdev.h"
#include "MPU6050.h"
#include "HMC5883L.h"

MPU6050 mpu;
HMC5883L mag;

void setup() {
  Wire.begin();
  Serial.begin(115200);
  
  // Initialize MPU6050
  mpu.initialize();
  
  // CRITICAL: Enable I2C bypass mode to access HMC5883L and MS5611
  mpu.setI2CMasterModeEnabled(false);  // Disable I2C master mode
  mpu.setI2CBypassEnabled(true);       // Enable I2C bypass mode
  mpu.setSleepEnabled(false);          // Wake up the sensor
  
  // Now initialize the magnetometer
  mag.initialize();
  
  // Verify connections
  Serial.println(mpu.testConnection() ? "MPU6050 OK" : "MPU6050 ERROR");
  Serial.println(mag.testConnection() ? "HMC5883L OK" : "HMC5883L ERROR");
}

Step 3: Complete Sensor Reading Example

cpp
/*
  GY-86 10DOF IMU – Complete Sensor Reading Example
  Reads all three sensors: MPU6050 (gyro/accel), HMC5883L (magnetometer), MS5611 (barometer)
*/

#include <Wire.h>
#include "I2Cdev.h"
#include "MPU6050.h"
#include "HMC5883L.h"
#include "MS5611.h"

// Create sensor objects
MPU6050 mpu;
HMC5883L mag;
MS5611 baro;

// Variables for sensor data
int16_t ax, ay, az;     // Accelerometer raw values
int16_t gx, gy, gz;     // Gyroscope raw values
int16_t mx, my, mz;     // Magnetometer raw values
float pressure, temperature, altitude;

void setup() {
  Wire.begin();
  Serial.begin(115200);
  
  // Initialize MPU6050
  mpu.initialize();
  
  // CRITICAL: Enable I2C bypass mode to access HMC5883L and MS5611
  mpu.setI2CMasterModeEnabled(false);
  mpu.setI2CBypassEnabled(true);
  mpu.setSleepEnabled(false);
  
  // Initialize magnetometer
  mag.initialize();
  
  // Initialize barometer
  baro.init();
  baro.reset();
  delay(100);
  baro.readPROM();  // Read factory calibration coefficients
  
  Serial.println("GY-86 Sensors Ready");
  Serial.println("-----------------------------");
}

void loop() {
  // Read MPU6050 (gyroscope + accelerometer)
  mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);
  
  // Read HMC5883L (magnetometer)
  mag.getHeading(&mx, &my, &mz);
  
  // Read MS5611 (barometer)
  baro.startPressureConversion(MS5611_OSR_4096);
  delay(10);
  pressure = baro.getPressure(MS5611_OSR_4096);
  
  baro.startTemperatureConversion(MS5611_OSR_4096);
  delay(10);
  temperature = baro.getTemperature(MS5611_OSR_4096);
  
  // Calculate altitude using sea level pressure (1013.25 hPa default)
  altitude = baro.getAltitude(pressure, 1013.25);
  
  // Display results
  Serial.print("Accel (g): ");
  Serial.print(ax / 16384.0); Serial.print(", ");
  Serial.print(ay / 16384.0); Serial.print(", ");
  Serial.println(az / 16384.0);
  
  Serial.print("Gyro (°/s): ");
  Serial.print(gx / 131.0); Serial.print(", ");
  Serial.print(gy / 131.0); Serial.print(", ");
  Serial.println(gz / 131.0);
  
  // Calculate heading in degrees (0° = North)
  float heading = atan2(my, mx);
  if (heading < 0) heading += 2 * M_PI;
  heading = heading * 180 / M_PI;
  Serial.print("Heading: ");
  Serial.println(heading);
  
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");
  
  Serial.print("Pressure: ");
  Serial.print(pressure / 100.0);
  Serial.println(" hPa");
  
  Serial.print("Altitude: ");
  Serial.print(altitude);
  Serial.println(" m");
  
  Serial.println("-----------------------------");
  
  delay(500);
}

Step 4: MS5611 Oversampling Settings

The MS5611 supports multiple oversampling settings that trade off between conversion speed and noise level:

OSR Setting Oversampling Ratio Conversion Time Resolution Best For
OSR_256 256 ~1.2 ms 0.065 mbar High‑speed applications
OSR_512 512 ~2.3 ms 0.042 mbar General purpose
OSR_1024 1024 ~4.6 ms 0.027 mbar Higher accuracy
OSR_2048 2048 ~9.1 ms 0.018 mbar Higher accuracy
OSR_4096 4096 ~18.2 ms 0.012 mbar Maximum precision

For most altitude measurement applications, OSR_4096 provides the best altitude resolution (10 cm) .

Q: What does "10DOF" mean?

10DOF stands for 10 Degrees of Freedom: 3 axes from the gyroscope + 3 axes from the accelerometer + 3 axes from the magnetometer + 1 barometric pressure channel (altitude) 

Q: Why can't I read the HMC5883L magnetometer?

This is the most common issue with the GY-86. The HMC5883L is connected to the auxiliary I2C bus of the MPU6050, not directly to the main I2C bus. You must configure the MPU6050 to enable I2C bypass mode by calling mpu.setI2CMasterModeEnabled(false); and mpu.setI2CBypassEnabled(true); . Without these settings, you cannot access the magnetometer.

Q: What are the I2C addresses for the sensors?
  • MPU6050 (gyro/accel) : 0x68 (default) or 0x69 (if ADO pin is high)

  • HMC5883L (magnetometer) : 0x1E

  • MS5611 (barometer) : 0x77

Q: Can I use the GY-86 with a 5V microcontroller like Arduino Uno?

Yes. The GY-86 includes onboard logic‑level conversion (LLC), making it compatible with both 3.3V and 5V systems. Connect VCC to 5V and SDA/SCL directly to the I2C pins .

Q: What is the purpose of the AUX I2C pins (XDA/XCL)?

The XDA (auxiliary I2C data) and XCL (auxiliary I2C clock) pins are used to connect additional I2C sensors (e.g., a second accelerometer) to the MPU6050’s auxiliary bus. For basic operation, leave these pins unconnected .

Q: How do I calculate the heading (compass direction)?

Use the magnetometer readings (mx, my) with the formula:

cpp
float heading = atan2(my, mx);
if(heading < 0) heading += 2 * PI;
heading = heading * 180 / PI;  // Convert to degrees

This gives the magnetic heading. For true north, you must apply the local magnetic declination.

Q: How do I calibrate the magnetometer?

Rotate the module in a figure‑eight pattern while recording max/min values for each axis. Calculate the offsets and apply them:

cpp
mx = raw_mx - offset_x;
my = raw_my - offset_y;
mz = raw_mz - offset_z;
Q: What is the maximum altitude the MS5611 can measure?

The MS5611 pressure range of 10 to 1200 mbar corresponds to altitudes from approximately -500 meters to +9,000 meters (about 30,000 feet) .

Q: Can the GY-86 be used for drone flight control?

Yes. The GY-86 is specifically designed for MWC (MultiWii Copter) flight controllers and is widely used in DIY drone projects .

Q: What is the power consumption of the GY-86 module?

Total active current is approximately 6-8 mA (MPU6050: ~3.9 mA, HMC5883L: ~0.5 mA, MS5611: ~1.5 mA), making it suitable for battery‑powered applications.