Skip to content

1. How does MPU6050 work?

Marcelo Arredondo edited this page Dec 28, 2023 · 1 revision

The MPU6050 is an IMU (Inertial Measurement Unit) with six degrees of freedom (DoF), as it includes a 3-axis accelerometer and a 3-axis gyroscope. This sensor is frequently used for stabilization, navigation, and goniometers.

Acceleration and accelerometers

Acceleration is the change in speed per unit of time, or the rate at which speed changes in relation to time: $acceleration = \frac{\Delta V}{\Delta t}$

The acceleration of a body with constant mass is proportional to the force applied on it, according to Newton's second law: $acceleration = \frac{F}{m}$

Accelerometers measure acceleration using this second idea, containing a MEMS (MicroElectroMechanical System) inside that functions as a spring mass system to measure acceleration.

The acceleration can be measured using an accelerometer, while considering that even in the absence of movement, the accelerometer will always detect the acceleration caused by gravity.

Using the accelerometer, indirect measurements can be performed. For instance, the acceleration can be integrated over time to determine the velocity, and then integrated again to determine the displacement. Both calculations require the initial location and velocity, respectively.

Angular Velocity and Gyroscope

When a body rotates about its axis, its angular velocity, or rate of change of angular displacement per unit of time, is measured:

The Coriolis effect is used by gyroscopes' MEMS (MicroElectroMechanical Systems) to measure angular velocity.

The angular speed can be measured using a gyroscope, and the angular displacement can be calculated by integrating the angular speed with respect to time (or angular position if the initial starting point of the rotation is known).

MPU6050 Accelerometer and Gyroscope Module

The MPU6050 module communicates with a microcontroller or other digital device using the I2C (Inter-Integrated Circuit) protocol. It features a built-in digital motion processor that performs sensor fusion algorithms, combining the gyroscope and accelerometer data to provide more accurate and stable motion tracking information.

I2C

I2C is a popular serial communication interface and protocol used for exchanging data between two digital devices. It utilizes two communication wires known as SDA (data line) and SCL (clock line). The protocol allows for the connection of up to 127 slave devices to the same bus, and it supports different data transfer rates such as 100, 400, and 1000 kbit/s.

I2C is also referred to as the Two Wire Interface (TWI). It is commonly used for connecting digital sensors to microcontrollers or other digital devices. Unlike serial ports, I2C offers features like data confirmation within the same frame, making it useful for reliable communication.

One of the key advantages of I2C is its ability to connect multiple devices to a single bus. It has a larger communication frame compared to other serial protocols like Serial TTL, allowing for more comprehensive and informative messages to be transmitted.

When using I2C, messages sent over the connection include an information byte, as well as addresses for the register and the sensor involved. The receiving device always acknowledges the received data, ensuring data integrity. This emphasizes the importance of distinguishing between the various components involved in this type of communication.

Features

  • MEMS 3-aixs accelerometer and 3-axis gyroscope values combined
  • Operating voltage: 3-5V
  • Communication : I2C protocol
  • Built-in 16-bit ADC provides high accuracy
  • Built-in DMP provides high computational power
  • Can be used to interface with other I2C devices like magnetometer
  • Configurable I2C Address

You can find the MPU6050's datasheet in the following link for further features and technical details: MPU6050 Datasheet.