Measure Pitch Roll and Yaw Angles Using MPU6050 and Arduino

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everybody in this tutorial we are going to look how we can measure pitch roll and air using mpu 6050 gyroscope or accelerometer sensor so what can a gyro do actually it can detect the orientation so the gyro chip is right in the middle here and it detects the moment in 3 direction x axis y axis and z axis but in the terms of airplane we can demonstrate it through a small animation it has three terms pitch roll and ear the pitch is rotating in these axis and which should be shown as here roll represents in that direction and your rotates in this direction i think now you are clear about the direction of pitch roll and yaw so now let's move to the wiring of the sensor and its programming we will also show you some couple of demos as well so i have already made a few videos on mpu 6050 sensor so it's a i2c module we only need to interface its 4 pins to the arduino and they are bcc gnd scl and sda pin so we just need to hook them up with a4 and f5 pin of the arduino which are sdi and sel i have also added a small 0.96 inch i2c oled display to display the piece roll and air measurements this display module is also i2c module so we will connect the sdn scl pin to the same pin that we have connected with mpu 6050 sensor the scl pin is connected to the a5 pin of arduino and sda is also connected to the fo pin of the arduino now let's move to the programming part so here you need a working library for mpu 6050 sensor so for that go to the manage libraries and search for mpu 6050 and scroll all the way down until you see mpu 6050 underscore light by riftrik so this is the only library that worked for me after trying for a few hours uh before i have to add few more library but they were not working well so just install it and go to the file menu examples and then search for mpu 6050 lite and click on get angles so this is your final code so here under the void setup part they are calibrating mpu 6050 just saying do not move this is only important for calculating yeah so for calculating yeah you should calibrate your mpu6050 but for pitch and roll it is not compulsory so if you are working for pitch and roll you are you don't need to calibrate your sensor now on the serial port make sure you have got 9600 so to display the results on the oled display you need to install few more libraries and the driver as well full program code will be provided in the description of this video so don't worry so for now just upload the code by selecting your correct arduino board and com port so after a successful upload we are done with this so let's see some demos here you can see on the display for the first time it's saying hold it on in the stable position to calibrate the mph6050 sensor so you should hold it on the stable position and there we go so the piece roll and air can be seen on the display so this project may be very useful for you like if you are working with self balancing robots or drone projects or any other similar to this so now let me show you what happens when you don't calibrate your mpu6050 gyroscope sensor as you can see here the air is slowly increasing over a time the pitch and roll are somehow stable but a is just increasing up and within a few minutes it goes up to 20 to 50 value so i don't know what was the case you just need to calibrate it before using it so that's all for now i hope you enjoyed watching this video please do subscribe to this channel for more amazing content in future it's me elsan signing off for today see you soon on the next video thank you [Music] you
Info
Channel: IoT Projects Ideas
Views: 12,454
Rating: undefined out of 5
Keywords: calculate roll pitch yaw from accelerometer and gyroscope magnetometer, mpu6050 yaw pitch roll Arduino code, roll pitch yaw Arduino, roll pitch yaw calculation, how to calculate yaw angle, calculate roll pitch yaw from mpu6050, Measure Pitch Roll and Yaw Angles Using MPU6050 and Arduino, Pitch Roll and Yaw Angles Using MPU6050 and Arduino, Measure Pitch Roll and Yaw Angles Using MPU6050, Measure Pitch Roll and Yaw Angles Using Arduino, mpu6050 arduino, mpu6050 with arduino
Id: ythjrfQViRQ
Channel Id: undefined
Length: 5min 27sec (327 seconds)
Published: Wed Sep 14 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.