MPU6050 pinout- wiring diagram and sample projects

4
4079

We will learn that how to use MPU6050 accelerometer and gyroscope sensor module. Specially we will learn MPU6050 pinout and MPU6050 wiring diagram. Afterwards we will share sample MPU6050 open source projects.

MPU-6050 Six-Axis (Gyro + Accelerometer) pinout

  • The MPU-6050™ designed for smartphones, tablets and wearable technologies.
  • Power consumption is low. It also has a low cost.
  • MPU-6050 includes 3-axis gyroscope and 3-axis accelerometer.

Mpu6050 is widely used in many robot projects such as flying vehicles, balance robots. It has 3-axis gyro and 3-axis angular accelerometer. Supports I2C communication protocol. Built-in voltage regulator. In this way, it is supplied with voltage values between 3v and 5v. The angular acceleration meter range is ± 2 ± 4 ± 8 ± 16 g, and the Gyro measuring range is + 250 500 1000 2000 ° / s.

 

 

MPU-6050 Arduino Wiring Diagram

MPU-6050 is generally used with arduino. That’s why we share the arduino wiring diagram with the MPU-6050 as an example.

Arduino connection with MPU-6050 should be done as above. In accordance with the I2C communication protocol, the SCL pin must be connected to the analogue pin A5 of the arduino, the SDA pin to the analogue pin A4 of the arduino, the VCC pin to the arduino 5V pin, the GND pin to the arduino GND pin, and the INT pin to the arduino digital pin 2.

MPU-6050 sample codes

You can download the library of the mpu 6050 accelerometer sensor:  MPU 6050 library

#include <Wire.h> 
#include <I2Cdev.h>   //I2C library added 
#include <MPU6050.h> //Mpu6050 library added MPU6050 
ivme_sensor; // renamed our sensor as ivme_sensor 
int16_t ax, ay, az; //acceleration definition 
int16_t gx, gy, gz; //gyro definition 

void setup() { 
Wire.begin(); 
Serial.begin(9600); 
Serial.println("I2C devices starting..."); 
ivme_sensor.initialize(); 
Serial.println("Test device starting..."); 
Serial.println(ivme_sensor.testConnection() ? "MPU6050 connection success" : "MPU6050 connection unsuccess"); 

}

 void loop() 
{ 
ivme_sensor.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); // read the acceleration and gyro values //Write to serial monitor 
Serial.print(ax); 
Serial.print("\t");
Serial.print(ay); 
Serial.print("\t"); 
Serial.print(az); 
Serial.print("\t"); 
Serial.print(gx); 
Serial.print("\t"); 
Serial.print(gy); 
Serial.print("\t"); 
Serial.print(gz); 
Serial.println("\t"); 
delay(500); //wait 0.5 second to see changing values well 
}

 

 

MPU-6050 class

Click to view the classes of the MPU 6050 Accelerometer sensor.

These are some important classes:

int16_t MPU6050::getAccelerationX()

Get X-axis accelerometer reading.

Returns:
X-axis acceleration measurement in 16-bit 2’s complement format
See also:
getMotion6()
MPU6050_RA_ACCEL_XOUT_H
bool MPU6050::getAccelXSelfTest()

Get self-test enabled setting for accelerometer X axis.

Returns:
Self-test enabled value
See also:
MPU6050_RA_ACCEL_CONFIG
uint8_t MPU6050::getClockSource()

Get clock source setting.

Returns:
Current clock source setting
See also:
MPU6050_RA_PWR_MGMT_1
MPU6050_PWR1_CLKSEL_BIT
MPU6050_PWR1_CLKSEL_LENGTH

 

MPU 6050 Alternatives

MPU 6050 isn’t alone in this field. There are some MPU 6050 alternatives in industry. These alternatives uses commonly too.

ADXL335 (Adafruit)

With this very low power consumption sensor module, you can collect angular data in 3 axes.

ADXL 335

You can output via analog communication channel. The module generates a separate analog voltage for each axis. Since the board has an internal voltage regulator circuit, you can operate it with a supply voltage of 3V to 5V.

LIS3DH Triple-Axis Accelerometer Module (SpurkFun)

The LIS3DH Breakout is an intelligent, low-power, three-axis, capacitive, micro-machined accelerometer with 12-bit resolution that you can use to add translation detection to your project. It is classified as either 3D or 3 degrees of freedom.

Top 10 MPU- 6050 Projects

MPU 6050 is great tool. A lot of projects are using this sensor. Especially, it uses about balance projects (like balancing robots), drone projects  and robot projects (for balancing). We also see this sensor being used frequently in wearable technologies.

 

 

In this project, an application that can control google earth was developed via Leap Motion. Leap Motion technology is often used to control devices without touching them.

 

9Project 2- Balancing Robot

One of the best ways to learn how to use ddd sensor is to build a balance robot. In this project every information about how to make a balance robot was given. The project also includes arduino codes.

 

You can use MPU 6050 to keep a platform for balance. In this project, pan / tilt mechanism of servo motor and MPU 6050 are used. This is a great project to start the MPU 6050 sensor.

 

With the movement of your hand, you can steer a vehicle the way you want. The sensor used this time is not the MPU 6050. But you can also do this project with the MPU 6050.

 

 

This robot uses another acceleration sensor, an alternative to the MPU 6050. Use this sensor if you wish. If desired, change the codes to match the MPU 6050. A low cost, easy project if you want to make the climbing robot.

 

This was made as a demonstration of how you can utilize both the chip, and how to display its results in the Serial monitor and physically through the LED matrix.

 

4Project 7- Hand Gesture Controlled Wheelchair

With the vision to use technology for the humankind, LPU Students built an accelerometer based, gesture-controlled wheelchair for the differently-abled people. Unfornutatelly, this isn’t an open source project. But if you understand how to work MPU 6050, you can do this project.

3Project 8- Home made gesture control Tank

 

It’s a beautiful project using the MPU 6050. Moreover, all the production stages of the project were shared.

2 Project 9- Hand Gesture Controlled Robotic Arm

This robotic arm project is great. If you add finger gestures to this project, it will be a better project.

We can say that this project is the peak of the mpu 6050 projects. Wearable IMU (inertial measurement unit) tracker which can be used for Virtual Reality applications as well as for any other application which makes use of real-time acceleration data or orientation data.

Result

We have shared with you the pinouts visuals of the MPU 6050 accelerometer, sample arduino circuit connections, sample MPU 6050 arduino codes and the best 10 MPU 6050 projects. After that, it’s your turn. You can share your projects with us in the comments section.

4 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here