MPU6050 with Arduino - GY-521

Поділитися
Вставка
  • Опубліковано 30 лис 2024

КОМЕНТАРІ • 83

  • @diyengineers
    @diyengineers  21 день тому

    Where to buy [Amazon Affiliate]:
    Arduino UNO: amzn.to/3U7xAoT
    MPU-6050 Accelerometer/Gyroscope (GY-521): amzn.to/3U6oMiZ

  • @himadreemctavish5092
    @himadreemctavish5092 Рік тому +7

    This was so far the most straight forward and best tutorial on mpu6050. Thanks man.

  • @tomastoledo7864
    @tomastoledo7864 26 днів тому

    THANKS BROTHER, LOOK AT A THOUSAND TUTORIALS AND NONE LIKE THIS!!!! GREETINGS FROM ARGENTINA

  • @shivpat6522
    @shivpat6522 9 місяців тому +13

    toxiclibs doesnt exist in my processing ide for some reason. may I get assistance for that?

  • @HaseebAdnan0
    @HaseebAdnan0 9 місяців тому +2

    So Paul McWhorter's channel should be your go to for getting started with arduino, and then this channel is good to do more advanced projects

  • @avivbello
    @avivbello Рік тому +2

    Hi, thank you for the great video!
    Say, if I follow your tutorial step by step exactly, and the Arduino won't connect with the sensor, serial outputs: "MPU6050 connection failed",
    How would you suggest to find the connection problem?
    Thank you again!

  • @justinc2633
    @justinc2633 Рік тому

    you should test the accuracy of this, by moving it a whole bunch and calculating where it should be then measuring any discrepancy

  • @martinlentz-nielsen6361
    @martinlentz-nielsen6361 3 роки тому +3

    Thank you, thank you, thank you for the video!!! ❤️❤️❤️

  • @AlexIdk.
    @AlexIdk. 3 роки тому +3

    The link to download Processing IDE: processing.org/download

    • @diyengineers
      @diyengineers  3 роки тому

      Thanks for watching and sharing!

    • @AlexIdk.
      @AlexIdk. 3 роки тому

      ​@@diyengineers Hello, do you have an idea why the 3D model does not point to the position of the module instead it points in a different direction?

    • @AlexIdk.
      @AlexIdk. 3 роки тому

      Nevermind i found out why, it was oriented diffrently but now after a while it moves random but it might be because of noise

  • @kalamabidin922
    @kalamabidin922 Рік тому +3

    in processing ide, i tried to add toxic lib. but it is not showing the library name, can u tell what to do now, followed all your instructions/steps

    • @usaamahebrahim2161
      @usaamahebrahim2161 Рік тому

      Had the same issue, I'm not exactly sure how to add it manually as well. Please let me know if you find a solution, thanks

    • @usaamahebrahim2161
      @usaamahebrahim2161 Рік тому

      ua-cam.com/video/kyX9cRxJNdo/v-deo.html

    • @danielem2362
      @danielem2362 9 місяців тому

      Had the same issue, ...can anyone help?

  • @aaronmccombs4966
    @aaronmccombs4966 Місяць тому +1

    Everything was nice and dandy until he mentioned the TOXIC library at 6:52... and I thought to myself: "how a developer can be such a deadbeat to name a library TOXIC?" And then I remembered what Joler said: "Very poor choice of words..." then I went to use Blendix, a safer library that actually works. And then I remembered another Joker quote, this time from The Killing Joke: " Sorry, but no..."

  • @bh641
    @bh641 2 роки тому +2

    My program stops working after around 20 seconds, is there anyway I can fix this? Appreciate it!

    • @oguve278
      @oguve278 2 роки тому

      I realized to prevent this, just disconnect and stop using the Interrupt pin...

  • @IttesafHossain27
    @IttesafHossain27 2 роки тому +2

    Can anyone tell me the difference between MPU6050 and GY-521?

    • @Meddlmoe
      @Meddlmoe Рік тому

      MPU6050 is the chip on the GY-521 break out board

  • @SuleymanErtugrulSahin
    @SuleymanErtugrulSahin 8 місяців тому

    I have the 4.3 version and ToxicLib is not available in the library. How can I get past this problem?

  • @mircevojvoda6478
    @mircevojvoda6478 7 місяців тому +1

    toxiclibs are nonexistent in processing, as I see that library is deprecated.

  • @jstro-hobbytech
    @jstro-hobbytech 2 роки тому

    I'm like a tick. Sorry.
    Did you have to write all the filters and such to keep the gyro from drifting?

  • @IgorSantarek
    @IgorSantarek Рік тому

    It works for few seconds and then the whole arduino frezees. I did connect AD0 pin to ground, the SCL and SDA are connected to VCC by resistors each 10kOhm, the INT pin connected to pin 2 on my Arduino Mega 2560 board. I can see the plane rotating and then everything freezes and only restarting arduino fixes this. :|
    I have been trying to fix it for few hours now and nothing works. Only when I use libraries that does not use DMP, the arudino doesn't freeze and everything works smoothly but I don't have any precision and the results get inaccurate pretty quickly.

  • @thelazycat_
    @thelazycat_ 2 роки тому

    I don't have a processing and teapot folder, know why?

  • @shadowhunter8803
    @shadowhunter8803 Рік тому +1

    If i install nodemcu here, can the 3d model work wirelessly as well?

  • @ahmednader4377
    @ahmednader4377 2 роки тому +1

    Is it possible to use mpu6050 to calculate the displacement of a moving robot , Thanks in advance !

    • @diyengineers
      @diyengineers  2 роки тому

      Hi! It will be very difficult to do so accurately because doing so would require performing an double integration of acceleration over time. The issue is that the error in measurement would be greatly amplified during such integration, which would lead to gross error in total displacement. Net, great in theory, but not so much in practice.

  • @FlightheroRC
    @FlightheroRC Рік тому

    how do i turn this into an artificial horizon

  • @PranayKumar-ns1uw
    @PranayKumar-ns1uw 2 роки тому

    How can I use this 6dof Stewart platform

  • @friendlybear5924
    @friendlybear5924 Рік тому

    Hey there! I really like your video and followed your steps. The visualization in P5 works great. However, only for a couple seconds. After that the rotation drifts off until there is no more data coming from the arduino. Is there a way to ensure a constant data stream?

  • @lucasrba
    @lucasrba 3 роки тому

    Why acceleration is showing this values of the video?
    It should not show something near to (0, 9.81, 0), considering an almost orthogonal orientation?

  • @thisisgood44
    @thisisgood44 9 місяців тому

    sir can you help me? my mpu6050 gives accelerometer z which is the yaw to be a constant even when i rotate, i dont understand why, but some comments suggest to buy an imu with magenotometer, but the gyro z that i read is still updating when i turn the imu sensor
    edit : i used adafruit library but after trying the electronic cats library i think it works

  • @qzorn4440
    @qzorn4440 11 місяців тому

    Most interesting. 😎 Thanks.

  • @frenkkotarigan
    @frenkkotarigan 2 роки тому

    Hallo sir
    I want to make an active suspension for an rc car base on gyro and accelerometer
    But i am beginer on arduino
    Could you help me? 🙏

  • @PixelCodes
    @PixelCodes Рік тому

    It won't download on the arduino uno. Help!

  • @michealsakr3830
    @michealsakr3830 2 роки тому

    what is the unit of the real acceleration shown in the video?
    is it g or 2*g?

  • @zejunlooi4270
    @zejunlooi4270 3 роки тому +1

    Thanks for the detailed explanation about MPU6050. Do I need a plane shown in the vid for 3D visualization? Would appreciate your advice

    • @diyengineers
      @diyengineers  2 роки тому

      I think you can actually use other models for the visualization.

  • @carlacavazzuti2785
    @carlacavazzuti2785 2 роки тому

    Hi, amazing project! But my processing doesn't work...while data are available on serial monitor.
    Could you help me?

    • @haroldfinz5031
      @haroldfinz5031 2 роки тому

      2 things I did before I got Processing to work: I closed arduino's serial monitor, because I was getting a "port busy" error; (2) I printed the values of "Serial.list()" and I saw that the port that matched what Arduino was using was at index [2], not [0]. btw I'm using a Mac.

  • @michaelzajac5284
    @michaelzajac5284 3 роки тому

    I was seriously considering about wireless to sensor pin inside the aircraft or rocket.

    • @diyengineers
      @diyengineers  3 роки тому +1

      Thanks for watching! You would just want to make sure you pick a micro controller that's appropriate considering the space constraints and then figure out how to address the wireless communication for your application.

    • @michaelzajac5284
      @michaelzajac5284 3 роки тому +1

      @@diyengineers
      I obviously the SpaceX Land was test in same circuit.

    • @diyengineers
      @diyengineers  3 роки тому

      LOL 😂

  • @RandomloserDK
    @RandomloserDK 2 роки тому

    Is it normal for the main loop to end after ~10 sec?
    I can't tell if there's a way to extend it.

    • @michealsakr3830
      @michealsakr3830 2 роки тому

      remove the interrupt wire and stop it manually

  • @AbdulRahman-jz3px
    @AbdulRahman-jz3px 2 роки тому

    Hi, thanks for the excellent explanation. i want to ask, is it linear acceleration or angular acceleration which can be measured by MPU6050? can it be used to measure angular acceleration?

    • @ianyu4281
      @ianyu4281 Рік тому

      It can measure both since it has an accelerometer and a gyroscope hence then name 6 axies of freedom

  • @bruhmetsaiharnet6595
    @bruhmetsaiharnet6595 2 роки тому

    superb"specified folder/zip file does not contain a valid library"problem installing i2cdev.library,no problem encountered installing zip libraries before but with this one i had problem.any idea why?Thanks in advance.

  • @eshanverma1496
    @eshanverma1496 Рік тому

    Can it go forward and backward?

  • @joegreener4092
    @joegreener4092 3 роки тому

    Nice video, how would you change the code so the range is +-8g for real acceleration
    ?

    • @mibrahim4245
      @mibrahim4245 2 роки тому

      You should find the address of the corresponding register from the datasheet

  • @astrogaming2336
    @astrogaming2336 2 роки тому

    For the serial port, it is deciding to spew out random characters, and not actual numbers. Idk why its doing this, but could someone help?

    • @ismaildz5795
      @ismaildz5795 Рік тому +2

      Switch the serial monitor window to 115200 baud

  • @shuttyskenzin9237
    @shuttyskenzin9237 3 роки тому

    hi, i have a code error for the mpu6050 code. C:\Users\admin\OneDrive\Documents\Arduino\libraries\MPU6050\src\MPU6050.cpp:254:6: note: implicit this pointer type mismatch
    void MPU6050::setFullScaleGyroRange(uint8_t range) {

    • @eggxecution
      @eggxecution 2 роки тому +1

      After downloading the library from the video, I saw that there are other libraries that are required to run the code maybe it is a factor. I read the line:
      // I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files
      // for both classes must be in the include path of your project

    • @diyengineers
      @diyengineers  2 роки тому

      Make sure you have all the required libraries! Thanks for watching.

  • @shuttyskenzin9237
    @shuttyskenzin9237 3 роки тому +1

    Hi, could anyone copy paste the mputeapot code for the process ide because i cant find it so if anyone can see it then please copy paste it in here thank you.

    • @diyengineers
      @diyengineers  3 роки тому

      Hi! Thank you for watching this video and for calling out that the link wasn't available. The link to the Processing IDE download can be found on the blog post related to this video. The only issue is that I originally placed the link to the wrong post on the video description, but I have now corrected this.
      Thanks for watching. Please let me know if you have other questions.

    • @shuttyskenzin9237
      @shuttyskenzin9237 3 роки тому

      @@diyengineers Oh I just realized that i do have the process ide link but what i am looking for is the teapot code thing which will show the 3d visualization screen. so i need to code not the ide. I already have the ide. Thanks

    • @diyengineers
      @diyengineers  3 роки тому

      Hi! See below (these instructions are on my blog as well):
      Once you have deployed the code above in your Arduino, go back to Processing IDE and go to File, then Open. Go to the folder where the MPU6050 Arduino library was installed. Once you get to the folder, open the Processing file with the name “MPU Teapot”.
      To find this file, go to the folder where all Arduino main files are located, then follow this path: Documents\Arduino\libraries\MPU6050\examples\MPU6050_DMP6\Processing\MPUTeapot.
      If you have trouble finding the location of the main Arduino folder, within Arduino, click on File, then click on Preferences. Go to this folder and follow this path within Processing IDE (after clicking File -> Open).

  • @PreciousOpal
    @PreciousOpal 2 роки тому

    I want to jump off the highest bridge, hell...just help me and ill jump off the quadcopter i make, im mad af, i cant get multiwii to aknolege my arduino board, sensors work i seen the cereal port work, then i kept getting issues with the processingide software download dont have the ide in the unzipped files....then now the cereal port shows axis gyro but after like 2 seconds stoops reporting sensor like it stoped, i unplug it plug it back and its work again but stops after a few seconds....i cant get the processing app downloaded, any guidance would help, right now i feel like tossing all these modules for arduino and getting a full on flight controller and saying to hell with arduino

    • @PreciousOpal
      @PreciousOpal 2 роки тому

      i was wanting to build a flight board with ports to make it completly modular with gyro not with flight controller, making the gyro replacement easy as unplug jst

  • @Venaber
    @Venaber Рік тому

    so much thanks

  • @MariaAnderson-e4i
    @MariaAnderson-e4i Місяць тому

    Martinez Sandra Brown Jeffrey Davis George

  • @VINCENT-sb3zs
    @VINCENT-sb3zs Місяць тому

    6:10

  • @JenniferThomas-z7l
    @JenniferThomas-z7l Місяць тому

    Gonzalez Linda Garcia Steven Walker Margaret

  • @EmpyreanLightASMR
    @EmpyreanLightASMR Рік тому

    Your code is so full of errors, when I compile from a brand new version of that code, it's just a fountain of errors. I'm new so I have no idea what to do.

  • @yori1
    @yori1 2 роки тому +1

    my serial monitor is printing things like "⸮

    • @tangguh9796
      @tangguh9796 2 роки тому +1

      change your baud rate to 115200

    • @oguve278
      @oguve278 2 роки тому

      @@tangguh9796 Thanks

    • @tangguh9796
      @tangguh9796 2 роки тому

      @@oguve278 do you have problem with 3D simulation ?

    • @oguve278
      @oguve278 2 роки тому

      tangguh oh no no, your comment to change the baud rate solved my problem 👍

    • @tangguh9796
      @tangguh9796 2 роки тому

      @@oguve278 I'm just asking, cause my simulation doesn't move at all
      but in the serial monitor work perfectly