top of page
Writer's pictureNagashree R Nadig

Interfacing MPU 6050 Sensor with Arduino UNO

Updated: Sep 15


Learn how to interface the MPU 6050 - Accelerometer & Gyroscope sensor with the Arduino UNO board.


Hardware Components:


1. Arduino Uno:

#ArduinoUno board is used for interfacing the input-output elements to construct a project. It is an open-source microcontroller board that can be programmed according to user requirements.


Arduino Uno
Arduino Uno

2. MPU6050 sensor:

MPU-6050 is a 6 axis motion tracking device generally used in smartphones and wearable sensors. It has 3-axis MEMS (Micro-Electro-Mechanical Systems) gyroscope and accelerometer.

MPU6050 sensor
MPU6050 sensor

3. Jumper wires:

Jumper wires have connectors and pins that are used to connect different components on a breadboard.


Jumper wires
Jumper wires


Circuit Connections:


Circuit Connections
Circuit Connections
  1. Connect the Vcc pin of the MPU6050 to the 5V of the Arduino.

  2. Connect the ground of the sensor to the ground of the Arduino.

  3. Connect the serial clock (SCL) pin of the sensor to the A5 of the Arduino.

  4. Connect the serial data (SDL) pin of the sensor to the A4 of the Arduino.



Code:


Buy the Project code now -


Code Explanation -

  • Download the MPU6050_tockn.h and Wire.h libraries and include them in the Arduino IDE.

  • In void setup(), initialize the MPU6050 sensor pins and the I2C common port. Start the serial monitor output with a 9600 baud rate.

  • Using the mpu6050.calcGyroOffsets(), calculate the offset of the sensor.

  • In void loop(), using the mpu6050.update() function convert the raw data collected from the sensor into useful values.

  • Using the functions like mpu6050.getTemp(), mpu6050.getAccX, mpu6050.getAccAngleX(), etc. print the respective values obtained from the use of those functions.



Working:


The MPU6050 sensor is interfaced with the Arduino. Accelerometric and gyroscopic parameters are printed on the serial monitor output using the necessary functions.


Interfacing MPU 6050 Sensor with Arduino UNO
Interfacing MPU 6050 Sensor with Arduino UNO

Project By - Farhan Ahamed

Written by-

Name- Nagashree R Nadig


See also-

Controlling DC Motor with IR remote

 Interfacing Neopixel strip with Arduino-Tinkercad

Check out our Free Arduino Projects Playlist - Arduino Projects

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects

Check out our Free IoT Projects Playlist - IoT Projects

Check out our Free Home Automation Projects Playlist - Home Automation Projects

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects



Order Electronics Projects


Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607


You can -


  • Order Basic Electronics Projects

  • Order Embedded Systems Projects

  • Order IoT Projects

  • Order FPGA Projects

  • Order VLSI Projects

  • Order Image Processing Projects

  • Order Matlab Projects

  • Order TinkerCAD Projects

  • Order Proteus Projects


Click on the button below to fill out the project inquiry form -





Create Various Projects


Check out our Free Arduino Projects Playlist - Arduino Projects 

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects 

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects 

Check out our Free IoT Projects Playlist - IoT Projects 

Check out our Free Home Automation Projects Playlist - Home Automation Projects 

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects 



Follow us -


Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.




530 views2 comments

2 Comments


ashitanarvekar2002
Jul 29, 2023

Informative and concise! LearnElectronics India always delivers quality content.

Like

Anushka Gupta
Anushka Gupta
Jul 19, 2023

Learn Electronics India has done an outstanding job with this blog! The article not only covered the basics of interfacing the MPU 6050 Sensor with Arduino UNO but also delved into advanced topics. The real-life examples and troubleshooting tips added immense value. Keep up the excellent work.

Like
bottom of page