MPU6050 with Arduino - GY-521

Поделиться
HTML-код
  • Опубликовано: 7 янв 2025

Комментарии •

  • @diyengineers
    @diyengineers  2 месяца назад

    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 2 месяца назад

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

  • @HaseebAdnan0
    @HaseebAdnan0 11 месяцев назад +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

  • @shivpat6522
    @shivpat6522 10 месяцев назад +14

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

  • @martinlentz-nielsen6361
    @martinlentz-nielsen6361 3 года назад +3

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

  • @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!

  • @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 Год назад

      ruclips.net/video/kyX9cRxJNdo/видео.html

    • @danielem2362
      @danielem2362 11 месяцев назад

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

  • @aaronmccombs4966
    @aaronmccombs4966 2 месяца назад +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..."

  • @justinc2633
    @justinc2633 2 года назад

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

  • @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...

  • @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?

  • @qzorn4440
    @qzorn4440 Год назад

    Most interesting. 😎 Thanks.

  • @SuleymanErtugrulSahin
    @SuleymanErtugrulSahin 9 месяцев назад

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

  • @ahmednader4377
    @ahmednader4377 3 года назад +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.

  • @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

  • @thisisgood44
    @thisisgood44 11 месяцев назад

    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

  • @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? 🙏

  • @shadowhunter8803
    @shadowhunter8803 2 года назад +1

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

  • @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.

  • @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?

  • @michealsakr3830
    @michealsakr3830 2 года назад

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

  • @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.

  • @PranayKumar-ns1uw
    @PranayKumar-ns1uw 2 года назад

    How can I use this 6dof Stewart platform

  • @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?

  • @thelazycat_
    @thelazycat_ 2 года назад

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

  • @FlightheroRC
    @FlightheroRC Год назад

    how do i turn this into an artificial horizon

  • @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

  • @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.

  • @eshanverma1496
    @eshanverma1496 Год назад

    Can it go forward and backward?

  • @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

  • @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.

  • @PixelCodes
    @PixelCodes Год назад

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

  • @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

  • @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 😂

  • @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

  • @mircevojvoda6478
    @mircevojvoda6478 8 месяцев назад +1

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

  • @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 года назад +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).

  • @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 3 года назад +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.

  • @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

  • @VINCENT-sb3zs
    @VINCENT-sb3zs 2 месяца назад

    6:10

  • @Venaber
    @Venaber Год назад

    so much thanks

  • @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.

  • @MariaAnderson-e4i
    @MariaAnderson-e4i 3 месяца назад

    Martinez Sandra Brown Jeffrey Davis George

  • @JenniferThomas-z7l
    @JenniferThomas-z7l 3 месяца назад

    Gonzalez Linda Garcia Steven Walker Margaret

  • @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