GY-521 MPU6050 6-Axis Gyroscope & Accelerometer Sensor – Pre-Soldered
1. What Is a GY-521 MPU6050 Sensor?
The GY-521 MPU6050 Sensor is a 6-axis motion-tracking module that combines a three-axis accelerometer and a three-axis gyroscope.
It uses the MPU-6050 motion sensing IC to measure acceleration and angular velocity along the X, Y and Z axes.
The module communicates with Arduino, ESP32 and other compatible microcontrollers using the I2C protocol.
It is commonly used in robotics, motion detection, tilt measurement, gesture recognition experiments and balancing robot projects.
This pre-soldered GY-521 MPU6050 module comes with an attached 8-pin header, eliminating the need to solder the connection pins before use.
2. What Can You Build With a GY-521 MPU6050 Sensor?
The GY-521 MPU6050 Sensor is suitable for projects such as:
- Self-balancing robot prototypes
- Arduino tilt detection systems
- Motion-controlled robotics
- Gesture-controlled electronic projects
- Digital inclination monitoring
- Robotic arm movement experiments
- Motion data logging
- Orientation monitoring systems
- Vibration and movement analysis
- ESP32 motion tracking projects
- Educational IMU experiments
- Electronic stabilization demonstrations
- DIY wearable motion-sensing prototypes
- Robotics and engineering projects
The sensor is particularly useful when a controller needs to measure movement and rotation in multiple directions.
3. Who Is It For?
The GY-521 MPU6050 Sensor is suitable for:
- Arduino beginners
- School and college students
- Engineering students
- Robotics enthusiasts
- ESP32 developers
- Electronics hobbyists
- Embedded systems developers
- STEM educators and trainers
- Motion-control project developers
It helps students understand acceleration, angular velocity, I2C communication and inertial measurement systems.
The pre-soldered version is particularly convenient for customers using breadboards or female jumper wire connections.
4. How Does the GY-521 MPU6050 Sensor Work?
The MPU6050 is a Micro-Electro-Mechanical Systems (MEMS) motion sensor.
It combines two sensing systems:
3-Axis Accelerometer
The accelerometer measures acceleration along three axes:
- X-axis
- Y-axis
- Z-axis
It detects acceleration caused by movement and gravity.
When stationary, accelerometer measurements can be used to estimate tilt relative to gravity.
3-Axis Gyroscope
The gyroscope measures angular velocity around three axes:
- Rotation around X
- Rotation around Y
- Rotation around Z
The gyroscope can detect how quickly an object rotates.
Combining Accelerometer and Gyroscope Data
The accelerometer and gyroscope measurements can be combined using sensor-fusion algorithms to estimate orientation.
For example, a complementary filter can combine accelerometer-derived tilt with gyroscope angular velocity to produce a more stable roll or pitch estimate.
I2C Communication
The MPU6050 communicates with a microcontroller using two primary lines:
- SDA – Serial Data
- SCL – Serial Clock
Working principle:
Physical Motion → MPU6050 Accelerometer & Gyroscope → I2C Data → Arduino / ESP32 → Motion Processing
The sensor does not independently provide an absolute compass heading because it does not contain a magnetometer.
5. Technical Specifications
| Specification | Details |
|---|---|
| Product Type | 6-Axis IMU Sensor Module |
| Module Model | GY-521 |
| Sensor IC | MPU-6050 |
| PCB Colour | Blue |
| Accelerometer | 3-axis |
| Gyroscope | 3-axis |
| Total Motion Axes | 6 |
| Accelerometer Ranges | ±2g, ±4g, ±8g, ±16g |
| Gyroscope Ranges | ±250, ±500, ±1000, ±2000°/s |
| Communication | I2C |
| Default I2C Address | 0x68 |
| Alternative I2C Address | 0x69 |
| Typical Breakout Supply | 3.3V–5V DC |
| MPU6050 Logic Voltage | 3.3V nominal |
| I2C Lines | SDA, SCL |
| Auxiliary I2C | XDA, XCL |
| Address Selection | AD0 |
| Interrupt Output | INT |
| Temperature Sensor | Integrated |
| Digital Motion Processor | Integrated DMP |
| Header Connections | 8 |
| Header Assembly | Pre-soldered |
| PCB Mounting | 2 mounting holes |
Technical Notes
- Accelerometer readings are commonly expressed in g or m/s².
- Gyroscope readings are commonly expressed in degrees per second or radians per second.
- The module includes a sensor temperature measurement, which is not a replacement for a calibrated ambient temperature sensor.
- Accelerometer and gyroscope values may contain measurement noise and offsets.
- Calibration may be required for accurate motion tracking.
- Gyroscope integration accumulates drift over time without correction.
- The GY-521 breakout board commonly has an onboard voltage regulator.
- Check I2C pull-up voltages and logic compatibility when connecting to 5V controllers.
6. GY-521 MPU6050 Sensor Pinout
The GY-521 has eight connections.
| Pin | Name | Function |
|---|---|---|
| 1 | VCC | Module power supply |
| 2 | GND | Ground |
| 3 | SCL | I2C clock |
| 4 | SDA | I2C data |
| 5 | XDA | Auxiliary I2C data |
| 6 | XCL | Auxiliary I2C clock |
| 7 | AD0 | I2C address selection |
| 8 | INT | Interrupt output |
Important Pin Functions
VCC: Supplies power to the module through the breakout circuitry.
GND: Connects to ground.
SCL: Carries I2C clock signals.
SDA: Carries I2C serial data.
XDA and XCL: Auxiliary I2C connections used for advanced external sensor interfacing. These are not required for ordinary motion readings.
AD0: Selects the sensor’s I2C address. LOW selects 0x68, while HIGH selects 0x69. Use a suitable 3.3V logic HIGH for the MPU6050.
INT: Outputs interrupt signals for supported event and data-ready functions.
For basic Arduino motion sensing, only VCC, GND, SDA and SCL are required.
7. How to Connect GY-521 MPU6050 to Arduino
The GY-521 MPU6050 Sensor can be connected to an Arduino Uno using the I2C interface.
Required Components
- 1 × Pre-Soldered GY-521 MPU6050 Sensor
- 1 × Arduino Uno
- 4 × Female-to-Male Jumper Wires
Wiring Connections
| GY-521 Pin | Arduino Uno |
|---|---|
| VCC | 3.3V, or 5V after verifying the breakout regulator and I2C levels |
| GND | GND |
| SCL | A5 |
| SDA | A4 |
| XDA | Not connected |
| XCL | Not connected |
| AD0 | Not connected |
| INT | Not connected |
Connection Procedure
- Identify VCC, GND, SCL and SDA on the GY-521.
- Connect VCC to a suitable supply.
- Connect GND to Arduino GND.
- Connect SCL to Arduino A5.
- Connect SDA to Arduino A4.
- Power the Arduino.
- Install the appropriate MPU6050 library.
- Upload the example program.
- Open the Serial Monitor.
- Rotate or tilt the sensor and observe the readings.
Important: When interfacing different logic voltages, verify that I2C pull-ups do not exceed the MPU6050’s permitted voltage limits.
8. Arduino Example Code
The following Arduino example reads acceleration and gyroscope data from the GY-521 MPU6050.
Required Arduino Libraries
Install the following through Arduino IDE Library Manager:
- Adafruit MPU6050
- Adafruit Unified Sensor
- Adafruit BusIO
Arduino Code
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
Adafruit_MPU6050 mpu;
void setup() {
Serial.begin(115200);
if (!mpu.begin()) {
Serial.println("MPU6050 not found!");
while (1) {
delay(10);
}
}
mpu.setAccelerometerRange(
MPU6050_RANGE_2_G
);
mpu.setGyroRange(
MPU6050_RANGE_250_DEG
);
mpu.setFilterBandwidth(
MPU6050_BAND_21_HZ
);
Serial.println("MPU6050 Ready");
}
void loop() {
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
Serial.print("Accel X: ");
Serial.print(a.acceleration.x);
Serial.print(" Y: ");
Serial.print(a.acceleration.y);
Serial.print(" Z: ");
Serial.println(a.acceleration.z);
Serial.print("Gyro X: ");
Serial.print(g.gyro.x);
Serial.print(" Y: ");
Serial.print(g.gyro.y);
Serial.print(" Z: ");
Serial.println(g.gyro.z);
delay(500);
}
How to Test the Module
- Connect GY-521 to Arduino.
- Install the required libraries.
- Upload the program.
- Open the Serial Monitor at 115200 baud.
- Keep the sensor still and observe its initial readings.
- Tilt the board forward and backward.
- Rotate it around different axes.
- Observe acceleration and angular velocity changes.
The Adafruit library reports acceleration in m/s² and angular velocity in rad/s.
9. Beginner Project: Arduino Tilt Detection
Build a simple tilt detection project using GY-521 MPU6050 and Arduino Uno.
Project Objective
Turn on an LED when the module tilts beyond approximately 30 degrees.
Components Required
- 1 × GY-521 MPU6050 Sensor – Pre-Soldered
- 1 × Arduino Uno
- 1 × 5mm Red LED
- 1 × 330Ω Resistor
- Breadboard
- Jumper Wires
Wiring
| Component | Arduino |
|---|---|
| GY-521 VCC | Verified compatible supply |
| GY-521 GND | GND |
| GY-521 SDA | A4 |
| GY-521 SCL | A5 |
| LED Anode | D8 through 330Ω resistor |
| LED Cathode | GND |
Arduino Code
#include <Wire.h>
#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <math.h>
Adafruit_MPU6050 mpu;
const int ledPin = 8;
const float tiltLimit = 30.0;
void setup() {
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);
if (!mpu.begin()) {
Serial.println("MPU6050 not found");
while (1) {
delay(10);
}
}
}
void loop() {
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);
float ax = a.acceleration.x;
float ay = a.acceleration.y;
float az = a.acceleration.z;
float tilt = atan2(
sqrt(ax * ax + ay * ay),
fabs(az)
) * 180.0 / PI;
Serial.print("Tilt: ");
Serial.println(tilt);
if (tilt > tiltLimit) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(200);
}
Project Working
- The MPU6050 measures acceleration along the X, Y and Z axes.
- Arduino uses the acceleration vector to estimate the board’s inclination relative to the vertical axis.
- When the calculated tilt exceeds 30 degrees, the red LED turns ON.
- When the tilt returns below the threshold, the LED turns OFF.
Important Note
This simple method estimates inclination from gravity while the sensor is relatively stationary.
Rapid movement and other acceleration can produce inaccurate tilt measurements.
For more stable motion tracking, use calibrated readings and a suitable sensor-fusion filter.
What Will Students Learn?
- Accelerometer fundamentals
- I2C communication
- Tilt estimation
- Arduino programming
- Mathematical processing of sensor data
- Event-based LED control
10. Related Products
Complete your GY-521 MPU6050 projects with:
- Arduino Uno R3 Compatible Board
- Arduino Nano Development Board
- ESP32 Development Board
- HC-05 Bluetooth Module
- HC-SR04 Ultrasonic Sensor
- 16×2 LCD Display
- 16×2 LCD Display with I2C Interface
- TM1637 4-Digit Seven Segment Display
- SG90 Servo Motor
- BO Motor Dual Shaft
- 65mm BO Motor Wheel
- 5mm Red LED
- 5mm Green LED
- RGB LED Module
- Breadboard
- Jumper Wires
- Resistors
11. Related Tutorials
Explore these learning topics:
- How to Connect GY-521 MPU6050 to Arduino
- MPU6050 Accelerometer and Gyroscope Explained
- GY-521 MPU6050 Pinout and Wiring
- How to Read MPU6050 Sensor Data
- How to Calculate Tilt Angle Using MPU6050
- How to Use MPU6050 with ESP32
- How to Calibrate MPU6050 Sensor
- MPU6050 I2C Address 0x68 vs 0x69
- Building a Self-Balancing Robot
- Understanding 6-Axis Motion Sensors
- Accelerometer vs Gyroscope
- Complementary Filter for MPU6050
12. Frequently Asked Questions
What is a GY-521 MPU6050 Sensor?
The GY-521 MPU6050 Sensor is a six-axis motion module featuring a three-axis accelerometer and three-axis gyroscope.
What does MPU6050 measure?
It measures linear acceleration and angular velocity along three axes.
Is MPU6050 a gyroscope or accelerometer?
It contains both a gyroscope and an accelerometer.
What does 6-DoF mean?
Six Degrees of Freedom refers here to three-axis acceleration and three-axis angular rate measurement.
Does the GY-521 come pre-soldered?
Yes. This Yagobotix listing is for the pre-soldered version with an attached eight-pin header.
Can I use the GY-521 with Arduino Uno?
Yes. The sensor communicates with Arduino through I2C.
Can I use MPU6050 with ESP32?
Yes. It can interface with an ESP32 through appropriately configured I2C connections and compatible voltage levels.
What is the operating voltage?
Common GY-521 breakout boards support a supply of approximately 3.3V to 5V through their onboard regulator circuitry. The MPU6050 IC itself uses 3.3V logic.
How many pins are available?
The module has eight connection pins.
What is the default I2C address?
The default address is usually 0x68.
Can I change the I2C address?
Yes. Driving AD0 HIGH at a suitable logic level selects address 0x69.
Can two MPU6050 sensors be connected to one I2C bus?
Yes. Two sensors can typically share the bus if configured with distinct addresses 0x68 and 0x69.
Can the MPU6050 measure tilt?
Yes. Accelerometer readings can be used to estimate pitch and roll relative to gravity when other accelerations are limited.
Can MPU6050 measure absolute compass direction?
No. It does not contain a magnetometer, so it cannot directly measure magnetic north.
Does it measure temperature?
Yes. The sensor includes an internal temperature measurement function.
Can I build a self-balancing robot with MPU6050?
Yes. The module can provide motion measurements for a self-balancing robot, but the project also requires a controller, motors, motor drivers and suitable feedback-control software.
Is calibration necessary?
Calibration is recommended for accurate measurements, particularly to compensate for gyroscope bias and accelerometer offsets.
Does MPU6050 work without an Arduino library?
It can be controlled directly through I2C registers, but using a suitable library simplifies programming.
What is the difference between a 3-axis gyroscope and a 6-axis MPU6050?
A standalone three-axis gyroscope measures angular velocity. The MPU6050 combines three-axis gyroscope readings with three-axis accelerometer measurements.
Does the module measure position directly?
No. It measures acceleration and angular velocity. Estimating position through integration can accumulate substantial error over time.
Where can I buy a pre-soldered GY-521 MPU6050 Sensor in Surat?
You can purchase the GY-521 MPU6050 Sensor from Yagobotix with same-day delivery and pickup available in Surat.
13. What Is Included?
- 1 × GY-521 MPU6050 6-Axis Gyroscope & Accelerometer Sensor Module – Pre-Soldered
The module includes:
- MPU-6050 motion sensor IC
- Blue GY-521 PCB
- Onboard power regulation circuitry
- Pre-soldered 8-pin header
- Mounting holes
Not included:
- Arduino or ESP32 board
- Breadboard
- Jumper wires
- External LEDs
- Power supply
- Mounting hardware
14. Compatibility
The GY-521 MPU6050 Sensor can be used with suitably interfaced controllers including:
- Arduino Uno
- Arduino Nano
- Arduino Mega
- ESP32
- ESP8266 NodeMCU
- STM32 Development Boards
- Raspberry Pi
- Other I2C-compatible microcontrollers
Compatibility Notes
Arduino Uno / Nano: Use the SDA and SCL I2C connections. Check the GY-521 breakout regulator and I2C voltage levels when using 5V systems.
Arduino Mega: Use SDA pin 20 and SCL pin 21, or the corresponding SDA/SCL header connections.
ESP32: Use suitable I2C-capable GPIO pins and compatible 3.3V signal levels.
Raspberry Pi: Connect through the Raspberry Pi I2C interface using suitable 3.3V levels.
Important: The module’s power input rating and its I2C logic levels are different specifications. Do not assume all breakout versions provide I2C voltage level shifting.
15. Buy GY-521 MPU6050 Sensor Online in India
Build motion tracking and robotics projects with the GY-521 MPU6050 6-Axis Gyroscope & Accelerometer Sensor – Pre-Soldered from Yagobotix.
Featuring a 3-axis accelerometer, 3-axis gyroscope, I2C communication interface and pre-soldered connection header, the GY-521 is suitable for Arduino, ESP32, robotics, tilt measurement and educational electronics.
Whether you are building a self-balancing robot, experimenting with movement detection or developing an orientation-monitoring system, the MPU6050 provides valuable motion measurements.
Why Choose Yagobotix?
- Pre-soldered module for convenient connections
- Six-axis accelerometer and gyroscope measurements
- Suitable for Arduino and ESP32 projects
- Electronics components for students, makers and engineers
- Shipping across India
- Same-day delivery available in Surat
- Same-day pickup available in Surat
Same-day services are subject to stock availability, delivery coverage and applicable order cut-off times.
Add the GY-521 MPU6050 Sensor – Pre-Soldered to your cart and start building your next motion-tracking project with Yagobotix!






There are no reviews yet.