MPU6050 – Accelerometer and Gyroscope Module

MPU6050 Accelerometer and Gyroscope Module
MPU6050 Module

It is the world first six dimension motions tracking device. It was designed for low cost and high performances smartphones, tablets and wearable sensor. It is capable of processing nine-axis algorithms, it captures motion in X, Y and Z axis at the same time.

MPU6050 is used in different industrial projects and electronic devices to control and detect the 3-D motion of different objects.

In today’s post, we will have a look at its working, pinout, protocol, it’s interfacing with Arduino, features, applications, etc.

MPU6050 Module Pinouts

Pin Numbers and Names Functions
1 – VCC

Provides power for the module, can be +3V to +5V. Typically +5V is used

2 – GND

Connected to Ground of system

3 – SCL (Serial Clock)

Used for providing clock pulse for I2C Communication

4 – Serial Data (SDA)

Used for transferring Data through I2C communication

5 – Auxiliary Serial Data (XDA)

Can be used to interface other I2C modules with MPU6050. It is optional

6 – Auxiliary Serial Clock (XCL)

Can be used to interface other I2C modules with MPU6050. It is optional

7 – AD0

If more than one MPU6050 is used a single MCU, then this pin can be used to vary the address

8 – INT (Interrup)

Interrupt pin to indicate that data is available for MCU to read.

MPU6050 Features

  • MEMS 3-aixs accelerometer and 3-axis gyroscope values combined
  • Power Supply: 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 IIC devices like magnetometer
  • Configurable IIC Address
  • In-built Temperature sensor

I2C Protocol in MPU6050 Module

MPU6050 was first introduced by the Philips semiconductors in 1982. For sending and receiving data between two or more devices we need a path which called BUS. I2C is a bidirectional two-wire bus which use to send data between integrated circuits.

I2C consist of three data transfer speed which is, standard, fast-mode, and high-speed mode. I2C sports 7 bit and 10-bit address devices.

I2C is the best choice where simplicity and low manufacturing cost are more important than speed.

For a better understanding of how I2C protocol works, let’s see is a picture.

MPU6050 Module I2C
MPU6050 Module I2C

Interfacing MPU6050 Module with Arduino

Arduino MPU6050 Circuit Interfacing
Arduino MPU6050 Circuit

The library provides two example programs, which can be found at File -> Examples -> MPU6050. In these two examples one will give raw values while the other will give optimised values using the DMP. The following data values can be obtained using this example program.

  • Quaternion Components [w, x, y, z]
  • Euler angles
  • Yaw, Pitch, Roll
  • Real world Acceleration
  • World frame acceleration
  • Teapot invent sense Values

Out of all these data, the Yaw, Pitch, Roll us commonly used. However the library is capable of performing more than that and can be used for different purposes. Once the program is uploaded, open serial monitor and set it to 115200 baud rate and you should see the data being printed on the screen.


Leave a Comment

Your e-mail address will not be published. Required fields are marked *