Ep. 57 Arduino Accelerometer & Gyroscope Tutorial MPU-6050 6DOF Module
Vložit
- čas přidán 29. 08. 2024
- If you're curious about some of my ventures since the start of the channel, I've recently launched a newsletter with my thoughts on technology, business, entrepreneurship and more. You can check it out for free and subscribe if you're interested on my personal website:
www.vladromano...
Thank you for your contributions to my projects. With your help, I am able to showcase, teach and inspire people all over the world.
Patreon: / ee_enthusiast
Software:
github.com/VRo...
In this video, I will be walking you through the full implementation of an accelerometer and a gyroscope with the use of an Arduino and an MPU-6050 Breakout board. The tutorial is much more in depth than what I usually do and fully explains every single register and bit I am using to get the final data.
Hardware Required (See detailed list on EEEnthusiast.com):
- Arduino Uno
- MPU-6050
- Breadboard
- Jumper cables
Get in touch:
Facebook: / eeenthusiast
Twitter: / ee_enthusiast
Website: eeenthusiast.com
GitHub: github.com/VRo...
Personal website: vladromanov.com
Relevant Search Terms:
Arduino Uno
Arduino Accelerometer
Arduino Gyroscope
MPU-6050
6 Degrees of freedom
Robot
Quadcopter implementation
Motion control circuit
Balancing arduino
First tutorial I've found for this module that actually explains what's going on.
And the first one with working code too!
This is what all tutorials should be! Kudos for actually explaining how the code works, and why it looks like that. Now I'm significantly less intimidated by this sensor
superb video tutorial. by far the best for the 6050 I've seen here. I've watch a lot in anticipation of getting a pair for my project. The full explanation on registers and setting them correctly was well worth the 30 mins. Thank you!
Thank you sir!
Thank you sir!!!!!!!!!!
The same Thank you ! you saved me alot of time
@@EEEnthusiast
hello friend , i want to know how can i calulate number of 360 degree rotations completed by MPU6050 using arduino . it would be nice if u help me
Agreed. This is still the best real world explanation for this MRU and its registers. Whole lot more of the same on your channel. Amazing. Thank you.
A little over 5 years since this video was produced. First time viewer. Excellent tutorial. Thank you!
BEST EXPLANATION ❤❤😊😊😊
I searched a lot but can't find a video that makes me understand .
Until now make more videos like this ❤❤❤❤
this is the first time i see the real tutorial for this mpu6050 , this is the best tutorial i have ever seen . tq very much sir
This is by far the best tutorial for MPU 6050 I've seen so far. It's very helpful to learn it this way going all the way to the littlest of details. Thanks a lot!!
Great, in-depth and clear demonstration. The way you skipped using MPU6050 libraries really helped me understand more. Can't thank you enough!
Excellent video; low level commands with direct reference to the data sheet.
People get more out of this thing when they dig to this level.
Well done.
thanks Anthony
No one else has explained the code along with the data sheet so well! Cleared a lot of my doubts and got to learn new things as well. Thank you for such a content!! Keep posting :)
Thanks a lot !
A friend and I are building a drone for a school project, and all the other programs for the MPU-6050 were impossible to understand with our lack of experience in Arduino... You made it completely clear, so we owe you much ^^
Fantastically explained!
No one (except you) bothers to explain the basics.
Thanks a lot.
Hi, I am colombian, I love your video, It helpe me a lot. I am doing my grade work, It is a sign language translator glove, I am using a similar sensor MPU9250 and your video was very helpful. I understood many things that were driving me crazy . THANK YOU :D!!
This is the best video ever. I really like how you go down in to each registers to explain stuff. it is really difficult to find other people doing the same demonstration. What leaners need is not how to write digital write and digital read. They need to understand how it works.
Took me several days to find a video that goes over a datasheet approach to how to use this sensor. THANK YOU!
this video is a godsend, thank you. note to beginners (like me) who have little experience with arduino: make sure you solder the pins to the mpu6050 first, because the code won’t work otherwise
i initially thought u could just use the components unsoldered but that isnt the case
all the best :)
I don't know how I would ever get anywhere with this sensor without this tutorial. Thanks so much!
This is the best tutorial i've found on this topic. You answered all my question in less than 30 minutes.
thank you!
how do we get roll, pitch, and yaw
Just perfect!! I was trying to understand the meaning of the results for the accelerations x,y,z and it's perfeclty explained here. Thanks a lot.
Best video coverage of the MPU6050. In-depth explanation of the code and how the device works. A well-earned like.
The Wire.read() on the left hand side is executed first
giving us 8 bits of information. For example purposes, make that
yyyyyyyy. The
I realize you left this comment 2 years ago, but i just wanted to say thank you so much! It was driving me crazy trying to figure out what that line meant. Wish this comment was pinned to the top!
Nice one. But why there is a need to read twice
@@kaousheik9985 That's because you read the first 8 bits first and then the last 8 bits. You combine them with an OR (|), which in binary its essencialy adding them both, and you get the 16 bit number. Note that the first read has to be shifted to the left, so if you have 11110000, after you shift you'll have 1111000xxxxxxxx. Then if you add using OR: 11110000yyyyyyyy. That's the 16 bit number that the MPU gives you by giving 2 bytes in a row.
Big thanks.
The best tutorial actually explaining the code properly I found finally. Though 29 minutes but worth every second. Thank you sir.
Appreciate the feedback! Is there anything else you'd like to see me cover? Any other projects you're working on?
EEEnthusiast
1) Could you make a video on how to use esp8266(without shield) with arduino for serial communication with smartphone over espWifi. Can be used to make wifi based smartphone controlled car just like many tutorials on hc05 bluetooth controlled.
2) Secondly can I get in touch with you please. I am a student and want some proper tech support from people like you.
Could you make a video on how to read a pwm signal such as a throttle signal from fsi6 using pin change interrupts on an arduino.
@@EEEnthusiast sir how to find position of the object using this data
@@ajinkyakhaladkar4823 algebra and trigonometry
I watched this video a few months ago while trying to build my quadcoptor from scratch, and to be honest i was intimidated by all the registers and everything as it seemed like complicated stuff. I am rewatching this now, and it is such a great video, and you explain everything so well. Thanks!
I have worked through the best of my best tutors, but I have never come to a detailed tutorial as this, I have learnt both the mpu and the wire library both of which were difficult for me on the same video thanks so much❤.
Looking forward to watching more of your videos.
Thank you for making this video about how to program the module itself and not just its applications!
the most usefull & most generous video on the MPU6050 i´ve found. thank you very much!
Finally understood how to interpret the raw Gyroscope and Accelerometer readings. Thank you for this tutorial. Good luck!
Wow, this video saved me so many hours of figuring the datasheet out. Thank you so much for explaining in such a simple, and yet advanced enough method to implement more advanced project.
Again, thank you.
Keep up the good work.
Thank you so much for this tutorial! It was the first one I watched about 6050 MPU and then went down the rabbit hole to find more information about this sensor. But now watching this video again at last, I am surprised how easy and effective your explanation was about the registers and accessing them, etc. Thanks again!
Best mpu6050 tutorial on youtube.
Great job.
REALLY THANK YOU GUY, I WAS LOOKING THIS TO FINISH MY TCC PROJECT, AND YOU HELP ME REALLY HARD. THANK YOU MAN!!!
TVC?
was working on my school project and this comes in really handy when i was trying to understand about mpu6050. thank you so much!!!!
I have a slightly different MPU-6050 than what I've found online (an extra pin and split: 5 on one side, 4 on the other). Following all of the information and libraries I found, nothing worked. Yours is the only one that worked. Whatever you setup in your libraries is what got it working.
Best MPU 6050 tutorial anywhere on the earth. You helped me a lot with this video. Keep pouring your knowledge on us. Thanks a ton. looking for more tutorials from you.
Thanks a million for this video!!! It's good to actually LEARN this I2C stuff. I set the MPU address to 0x69 (RTC used 0x68). Allegedly, my MPU is a 9250. I checked the datasheet and the gyro/accel addresses were the same. Thanks again.
Best MPU related video I have seen till data period
I haven't seen a so well explained video in a long time! Congratulations!
Great tutorial. This has helped me to kick start my 3-D displacement measurement project.
Thanks a lot!
can i connect with you because the object is the same like your project?
What happens if you change 3B to 3D?
@@Mustafa-mm4wz @Joseph I have the same project. Can you both share the findings ? i am trying to find displacement with help of MPU6050 accelerometer.
I have the same project. Can you share the findings ? i am trying to find displacement with help of MPU6050 accelerometer.
Ok, it was quite an easy fix...just run a setup read of gyro data, store it in a new temp variable, then ammend the processdata function to subtract that value before dividing by 131. Thanks again for this video..thumbsup.
Purely superb tutorial! After a long time surfing the web, I finally found this amazing one. Great Job!
The best tutorial I've ever seen. Thank you! However, if your raw data is wrong, your calculation will be wrong, so you should set the offset values of MPU6050. This information may be help other audience.
man what a great tutorial! so informative just to get things off the ground. keep up the good work.
how do we get roll, pitch, and yaw
Уважаемый Владимир, с удовольствием просмотрел Ваше видео. Изучаю вариант применения датчика MPU-6050 для коррекции угловых отклонений для радиоуправляемых моделей кораблей. Спасибо!
Thank you very much for making things simple, finally able to understand the code and take readings from MPU6050. Seemingly Impossible task now possible.
Bro, this is a very great tutorial! The most important aspects of the applications had been covered including the theory behind the heart of the device. Going line by line on the sketch allows the viewers to immediately identify how they can specifically use the device in a particular application. Superb!!!
I love that you're just using the Wire library and explaining it stepbystep to us n00bs and not just directing us to a library. can you do a video on the DS1302 RTC or the PCF8574T lcd module?
This was such a great tutorial. I understand a lot more about the mpu6050 thanks to you now. Can't wait to use it in my robot! Thank you again!
Thank you sir, glad you liked it.
thank you a lot you are explaining actual working of it. I really appreciate you for doing it without using other library.
Thanks dude, this helped me get the sensor working on my nRF9160 DK, and now I understand a bit better how I2C actually works. Not just a silly person using a library anymore :)
Thank you very much. This was really enlightening. I could understand everything as a novice.
Very informative . I was struggling to understand gyroscope and accelerometer readings but now i will be able to manipulate them.
gone through so many video but yours is most accurate and easiest to understand
thank u .
best video of all about 6050, I recommend to use Serial Plotter to see variations easily
Thanks
Juste 2 mots:
- Excellent!
- Merci :-)
how do we get roll, pitch, and yaw
The best explanation I ever encountered🤩
So I used your code in order to find the position of a rotating arm (pendulum). A few things you need to change if you want to do that. 1) set all of the variables to floats 2) you need to calibrate the sensor, there should be a +/- in the rotx,y,z equation 3) change the delay time to something smaller to get more accurate results. Otherwise amazing vid.
How did you find the position? I mean, we are getting angular velocity from gyroscope and linear acceleration from accelerometer, right? How did you calculate position from this?
Best Video about MPU I have ever seen
Thank so much for the video, it is very easy to me to understand about the MPU - 6050 shortly.
Thank you for this, very thorough. One note, rather than dividing with 16384, you can just do a binary right shift 14 places, since 2^14 = 16384.
very very thanks because of you i learn how to read datasheet you are the best
CZcams unfortunately doesn't allow thumbs up more than once. Excellent video. Please keep going.
Best Tutorial ever for MPU6050
Great Video and thank you so much Vladmir for the clarity and superb explanation.Good job and well done
Best tutorial i have seen for MPU units
outsatanding....best explanation of any thing i have seen ever on youtube.....and thank you very much....it helped a lot
Thanks for explaining and not downloading an example. I want to learn how to implement these projects into my own. So again thanks and subscribed
great video tutorial.a lot of learning about MUPU 6050,,
i watch a lot of video about MPU 6050 but this one is really adorable..
best tutorial for mpu6050, clear and the code is kept simple , thank you !
Very Nice and best video in all, Thank You sir.
We have planned to do Sensor fusion including MPU-6050 with GPS on robot using Filter techniques..., I Honorably publish further proceeding in our work.
Now I have to work in calibration of MPU-6050, For this thanks to you again. :)
best explanation ever. To do this on register level givs more
understanding what to do, then using some already done
library. Thank you :)
Amazing Tutorial !!
Its nice to see you explain which registers are to be addressed for the setup and retrieval of data.
Cant wait to implement this myself =D
Thank's A lot !!
Live long and prosper _/\_
.
You are a perfect person. Can't be explained better
This is excellent, lots of coins fell in place for me after watching this video! Id like to see how we can combine the accelerometer -and gyroscope data to measure angels or other interesting motion things! once again, excellent tutorial keep it up!!!
You are the best out there bro really loved your video never got such in-depth knowledge before this
Good explanation, which is needed for a guy from Mechanical Engg like me. :)
Thank you very much for your Video, all youtube videos should be done like your, brief and clear. Well done!!
This IS the professional method to control the silicon. Controlling a chip through someone else's imperfect drivers is limiting and can be harder that directly reading and writing to registers..
Awesome explanation man... There is no word to pride you...
My greeting and thanks for this very informative and helpful Video , just a very tiny and small comment ( to convert the output values ´from accelerometer into g by the mentioned Example , it has to be (2*20000 /16384 = 2.44 g ). Also the new data sheet doesn't have all of those details unfortunately., and the LSB is now g not mg . That means you have to check the LSB sensetivity in the data sheet:
Really a great Work.
SO Good, thank you for explaining these details!
well done bro. It really help us in our quardcopter controlling and balancing using MPU6050..
I got it working. Thank you so much for explaining the process with such great detail !
You are great!! I have been looking for a video this detailed. Thank you for everything I hope you produce many more tutorials.
this video has literaly saved my project. Thank you so much
Thank you the best tutorial on CZcams
Excellent explanation about MPU6050 !
Fantastic video! Been searching for a tutorial just like this!
That was the most descriptive and complete explanation which made it easier for me to understand. A big thumbs up buddy... :)
BTW can you explain self balancing using this MPU6050 ???
this is the best tutorial Ive seen so far in youtube regarding MPU6050! oh man cant thank enough. some youtubers are lazy to explain line by line. Just one thing may I know what does accelx = wire.read()
Really big thanks, followed your tutorial, but used MPU9250... Quite similar, just on MPU9250 it has also sleep mode for accel and gyro. :)
perfect, just what i was looking at, thanks
Thanks a lot ! Really the best tutorial about about MPU6050 .
Thank you sir. Appreciate the kind feedback
Awesome 😍 video. Man.. Now, I am your fan. Just the stuff I needed. Brilliantly explained. Keep it up. Let me know if there's anything I can do for you ever.
Very nice and complete explanation, thank you very much
Thanks a lot for the lesson! You just helped me solving an issue in my university's project!
great video man! loved it and very nicely put together! TQ :) keep it up man
dividing raw gyro data by 131, you actually get deg/s. So if you want to get the actual position in degrees you'll need to multiply that by time component
Thanks for this video. It helped fill in the blanks for my project.
Thanks man, I loved your explanatory skills and content.
Amazing demonstration and tutorial, has helped me learn a lot for my project.