mpu 6050 arduino tutorial for beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello all welcome to another our Dino sensor tutorial in this video we will learn how to wire and code MP u 60 50 that is MP u 6 0 5 0 or 6 axis accelerometer sensor with Arduino board of course so let's get started [Music] m e u 60 50 is the world's first integrated sixaxis motion tracking device that combines a 3-axis gyroscope a three axis accelerometer and a digital motion processor or a DMP all in a 4 X 4 X 0.9 mm package which is this I see in the middle it is based on I - C protocol now rather than discussing the specifics let's jump in the distro toriel right away starting with hardware MP you 60 50 comes in a module form with 8 pins but don't worry we will use only four important pins and it will be sufficient to integrate our Arduino board so we have VCC crown which takes any input from 2 volt to 5 volt and since this board has a voltage regulator on board it supports 3.3 volt logic and 5-volt logic high next we have few complementary capacitors resistors in SMD form and most important part the MP u 60 50 IC which is a MEMS or say micro electromechanical system which changes the voltage depending on the change in access position this IC also has SC l SDA pins which are I to see communication protocols or i2c pins and x3a XC l which are auxilary serial pins we won't use them in this Arduino tutorial we also have a D 0 which is address select between auxilary and primary ports lastly we have int pin for connections we will only use VCC ground SC l SDA pins which are 5 volt ground a 5 and a 4 you know uno and Arden on an abortion only the SCL and SDA pins changed for the different Arduino boards and that's all for connection let's move on to our computer for coding part before we start coding we will need a library called as Hadi no mpu 60 50 by just crack you can find a link to all necessary resources in description the library has quite a few examples to start with let's check out Cairo scope example in this example file we have added wire and MPU 6050 libraries basically in this example we will see if our sensor is working or not we will also display the data on the serial monitor so we begin the serial monitor in setup part in this while loop the sensor test sequence is executed sometimes they are making a project and have to set our sensor in a specific orientation we need offsets we don't need offset for this tutorial but to change the offset simply uncomment this lines next there is calibration line which will virtually set our sense of flat remember offset in calibration are two different things offset would give you defined calibration for example you can mount the sensor at a weird angle and yet it will act as a reference point for zero next we have sensitivity which is set to default as three in the checkup section basic Hardware checking is done I highly suggest to leave this loop as it is now coming to the loop section which is the most important part of this entire code that is getting the values from a sensor we first need to call the variables using MPU dot read draw a row or MPU dot read normalized cairo now the concept of this row and normalize is such that draw are basically numbers and normalized values are values which go through the filters and calculation or you can say processed data we have three accesses called as X Y & Z which can be called using the variable name which we set as row guy row followed by a name of axis to make a project we need this three values of XY and z axis using this variable name dot XS command now that our example code looks like it is ready to go let's upload this and see if our sensor is working in our serial port don't forget to match the serial port with the baud rate which we defined in the start of the core if your wiring and hardware is proper you should get the values of each access on the serial port now this was the very basic part we can use our sensor to control a model paper plane using processing software but that's a tutorial for our next video subscribe and hit the notification button to never miss any update from mission-critical also give this video a thumbs up and share it with your friends until the next one goodbye [Music] you
Info
Channel: Mission Critical
Views: 55,834
Rating: 4.7696333 out of 5
Keywords: mpu 6050, mpu-6050, mpu, 6050, arduino, tutorial, accelerometer, gyroscope, schematic, library, dmp, REES52 GY-521, gy 521
Id: SVI_NldMjlE
Channel Id: undefined
Length: 5min 54sec (354 seconds)
Published: Fri May 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.