What is an MPU-6050 Triple-Axis Accelerometer & Gyroscope Module?
The MPU6050 is an IMU (Inertial Measurement Unit) device. It's a six-axis motion tracking device that uses data from a three-axis accelerometer and a three-axis gyroscope to calculate movement. The most significant benefit of this board is that it includes a digital motion processor. The importance of the DMP (Digital Motion Processor) is that it handles extremely complex calculations and operations on its own, freeing up the microcontroller's time. It offers motion data such as roll, pitch, yaw, angles, landscape, and portrait sense, among other things.
What is the use of MPU6050 sensor?
MPU6050 is a three-axis accelerometer and three-axis gyroscope Micro Electro-mechanical system (MEMS). It aids in the measurement of velocity, orientation, acceleration, displacement, and other motion-related features.
How does the MPU6050 work?
The MPU6050 combines a MEMS accelerometer and a MEMS gyroscope on one chip. The accelerometer measures linear acceleration on X, Y and Z, the gyroscope measures rotation rate, and the onboard DMP can fuse both. Data is read over I2C.
Does MPU6050 work with ESP32 and Raspberry Pi, not just Arduino?
Yes. The MPU6050 can be used with ESP32, Raspberry Pi, Arduino, and other compatible microcontrollers through its I²C interface. You can use the appropriate library for your platform to read accelerometer and gyroscope data. Robocraze also provides a step-by-step Raspberry Pi integration guide, while the associated tutorial references libraries for Arduino and ESP32/ESP8266.
What is the I2C address of the MPU6050?
The default I2C address of the MPU6050 is 0x68. If you connect the AD0 pin to 3.3V (HIGH), the address changes to 0x69, allowing you to connect two MPU6050 sensors to the same microcontroller simultaneously.
Does the MPU6050 have a magnetometer?
No, the MPU6050 is a 6-axis IMU (3-axis accelerometer + 3-axis gyroscope). It does not have a built-in magnetometer (compass). If your project requires heading/yaw relative to magnetic north, consider upgrading to the MPU9250 or BNO055.
Why does my MPU6050 drift?
Gyroscope drift is caused by tiny integration errors accumulating over time, often due to temperature changes or uncalibrated sensor offsets. Running a calibration routine to find and apply zero-offset values, or using sensor fusion (like a Kalman or Complementary filter), will significantly reduce drift.
What does the MPU6050 measure?
It measures linear acceleration (via the 3-axis accelerometer) and angular velocity/rotational speed (via the 3-axis gyroscope). Together, this 6-axis motion data can be used to calculate tilt, orientation, and movement dynamics.
Is the MPU6050 an IMU?
Yes. The MPU6050 is a 6-axis IMU (inertial measurement unit) with a 3-axis accelerometer and 3-axis gyroscope. It has no magnetometer, so for absolute heading use a 9-axis IMU like the BNO055.