Raspberry Pi Pico W LESSON 40: Measuring Acceleration with the MPU6050 Six Axis IMU

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ต.ค. 2023
  • UPDATE: If you are getting an error when you try and import IMU, then change the name of the library folder on your pico from libs to lib. That should fix it.
    You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    In this class we will be using the Sunfounder Raspberry Pi Pico W Keppler Kit. It will make things a lot easier if we are working on identical hardware. the link below is to amazon, and is for the identical hardware I will be using in this entire class.
    amzn.to/3ubMRs1
    In this video, I will show you how to measure acceleration using the MPU6050 Six Axis IMU chip. I will give an explanation of the math and physics behind measuring acceleration, and will show you how to incorporate the MPU6050 into your projects. Enjoy!
    [Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
    #IMU
    #mpu6050
    #micropython
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 94

  • @paulmcwhorter
    @paulmcwhorter  7 หลายเดือนก่อน +10

    UPDATE: If you are getting an error when you try and import IMU, then change the name of the library folder on your pico from libs to lib. That should fix it.
    Seems it is an issue for some and not for others. In any event, if it is a problem, rename the folder.

    • @drdentin3215
      @drdentin3215 7 หลายเดือนก่อน +1

      I found that out. Thanks for confirming. Charlotte mentioned that in the premier. I tried a second Pico and changed the library name at the same time. It had to be one or the other.

    • @jimworden9021
      @jimworden9021 3 หลายเดือนก่อน

      I had this problem and (after a bit of research) ran across this bit of code:
      import sys
      sys.path.append("/libs")
      Seems to work fine. Now I have both /lib (which contains to ssd1306 libraries) and /libs. Is there a downside to this method?

  • @deskriptamcl3966
    @deskriptamcl3966 18 วันที่ผ่านมา

    Dear Paul, this video is maybe the best spent time for me on TH-cam ever. I like the scientific secrets you reveal, to know how engineering was able to make that those tiny elements are aware of the sensation that we humans are able to feel (but only to some extent). I find that fascinating, and your explanations are very concise and full of information. Thank you so much. I have just discovered this channel.

  • @karl-heinzwaldmann6389
    @karl-heinzwaldmann6389 8 วันที่ผ่านมา

    Dear Paul, I would like to thank you for the excellent presentation of this topic. I wasted a lot of time on German tutorials and didn't understand anything. Your channel then brought me enlightenment. Greetings from Germany and my appreciation

  • @quaternion-pi
    @quaternion-pi 7 หลายเดือนก่อน +7

    Love the under the hood discussions. The more math and engineering details, the better. Would love to hear more about your hands-on experiences in nanotech.

  • @louistoweill4232
    @louistoweill4232 หลายเดือนก่อน

    I appreciated your explanation of the mechanics and physics behind this process!

  • @diggee172
    @diggee172 7 หลายเดือนก่อน +3

    I love this detail. This stuff wasn’t invented when I was in school Paul. I’m retired and I’m older than you😅. I thank God everyday I’m still learning.

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน +1

      Oh wow!

    • @luizbergo
      @luizbergo 7 หลายเดือนก่อน

      It's always time to learn, all we need is humility and strive. Keep going and congratulations.

  • @polkcountymike6274
    @polkcountymike6274 7 หลายเดือนก่อน +2

    Paul, I really appreciate your descriptions of what is going on under the hood. I understand accelerometers, but I didn't know it was done with ic technology. Thank you.

  • @philkelsall1207
    @philkelsall1207 4 หลายเดือนก่อน

    19:16 Having work with accelerometers on an industrial scale. Great to hear how micro-electronic versions work

  • @rickbonari4493
    @rickbonari4493 7 หลายเดือนก่อน +3

    Great lesson Paul. Please continue with your great explanations including the math. This makes everything easier to understand. Thanks again for your awesome lessons and teaching skills and amazing technical knowledge !!!!!

  • @bobvines00
    @bobvines00 7 หลายเดือนก่อน +1

    Paul, please continue explaining the details of subjects like MEMS and other items used with microcontrollers/SBCs that you cover!

  • @singingadwita2846
    @singingadwita2846 6 หลายเดือนก่อน

    I just hooked up to your channel and the details you take through are invaluable.

  • @nejatpolat
    @nejatpolat 5 หลายเดือนก่อน

    I love this extra theoretical information. I have never heard of micro-mechanical devices built in chips. I thought only electronic devices were inside these chips. I follow your lessons with admiration, excitement, and a huge curiosity. My appreciation!

    • @paulmcwhorter
      @paulmcwhorter  5 หลายเดือนก่อน

      Glad you enjoyed it!

  • @davidbosserman3247
    @davidbosserman3247 4 หลายเดือนก่อน

    Rumble is the new free speach YT for the moment.

  • @luizbergo
    @luizbergo 7 หลายเดือนก่อน

    Thanks sir, we may call this a Masterclass. Indeed, I've found problem with libs directory, change to lib and fix, "surprising" I've found measurement on z axis, but makes sense. What I noted is this is less than 1G, I think it's because I'm almost 1 thousand meters high from sea level. Thanks for the opportunity to learn with you.

  • @DrDave327
    @DrDave327 7 หลายเดือนก่อน

    I always enjoy your videos when you are explaining what is happening under the hood, Paul!

  • @merrymonkey5172
    @merrymonkey5172 7 หลายเดือนก่อน

    I really like your lessons. Simple, straightforward, very useful!

  • @louisdirect
    @louisdirect 7 หลายเดือนก่อน +3

    I had to rename the subfolder ''libs'' as ''lib'' to get the program to run from the root folder. We are going to have lots of fun with the MPU6050.

  • @DrDave327
    @DrDave327 7 หลายเดือนก่อน

    I predict the mpu6050 will be sensing a positive G force of 1, from the force of the tabletop supporting it, keeping it from falling. I had a mishap with my PicoW connection and regret I cannot complete the homework this week.
    Thanks for the great content, Paul!!!!

  • @qzorn4440
    @qzorn4440 7 หลายเดือนก่อน

    A wonderful Acceleration video. Something that is used so much and I know very little about like drones? Let the games begin! 😎 Thank you.

  • @leeg.1402
    @leeg.1402 7 หลายเดือนก่อน

    Great lesson Paul, Thanks.

  • @cbrombaugh
    @cbrombaugh 7 หลายเดือนก่อน

    This is a great lesson! The explanation of how the accelerometers work is very interesting. Please include similar information in future lessons. I spent a couple hours with the libs issue and a couple operational problems, but adding the z-axis data was done in a couple minutes.

  • @jamescullins2709
    @jamescullins2709 5 หลายเดือนก่อน

    I love the details and you do it so well!

  • @ilagallainebenedictc.2830
    @ilagallainebenedictc.2830 7 หลายเดือนก่อน

    really love this man, much respect!

  • @scottwait8883
    @scottwait8883 7 หลายเดือนก่อน

    Thank you so much Paul!

  • @sirfredericksonfasbeangerp1673
    @sirfredericksonfasbeangerp1673 7 หลายเดือนก่อน

    I love your lessons sir. I've just started learning about the Arduino board and your channel has helped me a lot

  • @garethhunt6220
    @garethhunt6220 7 หลายเดือนก่อน

    hi paul really appreciate classes, i love you taking the time to explain the math and physics of how these amazing devices work! how great it would have been to work on these in their infancy, would love to hear more on your works! - good stuff looking forward to the next lesson❤

  • @stephenlightkep1621
    @stephenlightkep1621 7 หลายเดือนก่อน

    Thanks Paul. I love your MEMS and Hookes Law explanation. You rock. My prediction is not zero because of gravity.

  • @reb13262
    @reb13262 25 วันที่ผ่านมา

    love these videos! Keep it up you are doing a wonderfull work!

  • @AleksandrIvin
    @AleksandrIvin 7 หลายเดือนก่อน

    Nice lesson!

  • @edSabio572
    @edSabio572 7 หลายเดือนก่อน

    Thanks Paul! I had a bit of a problem with Thonny loading the libraries but now everything works.

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน

      If you have trouble importing the library, rename libs to lib on the pico.

  • @MmWw-zk7hv
    @MmWw-zk7hv 7 หลายเดือนก่อน

    Thank you sir for great videos.

  • @mobiletitan4484
    @mobiletitan4484 7 หลายเดือนก่อน

    Sir my carrier changed by your Arduino tutorial 4years ago I really appreciate it and you are always mentor for me .

  • @freddyveza
    @freddyveza 2 หลายเดือนก่อน

    I have that IMU from Sunfounder's Raphael Kit (RPi Kit). X and Y axes are returning negative on the direction pointed for those little arrows marked on PCB, just the opposite you mentioned on 34:09, only Z axis works properly

    • @freddyveza
      @freddyveza 2 หลายเดือนก่อน

      Forget it, everything is working fine...

  • @pieretjo
    @pieretjo 5 หลายเดือนก่อน

    brilliant

  • @zflipside
    @zflipside 7 หลายเดือนก่อน +1

    OMG!! You're TEACHING RASBERRY PI TOO!!! THANK YOU SO MUCH ;u; SIR You're a blessing!!!!

  • @johnsnow7043
    @johnsnow7043 7 หลายเดือนก่อน

    Please make tutorial on the
    FreeRTOS
    And Embedded Linux
    You are the best teacher ever i found.
    If you have paid version i am ready to pay.
    Please 🙏 please 🙏

  • @user-oe5kp5ee5m
    @user-oe5kp5ee5m 7 หลายเดือนก่อน

    Can arduino be used to implement in a product that should work 27x7???

  • @arnoldschmucker9977
    @arnoldschmucker9977 7 หลายเดือนก่อน

    I had a problem while using a PC with Windows 11. The Thonny didn't recognize the directory /libs. I had to change the directory to simply /lib to get it to work. Any thoughts?

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน

      People are reporting that. So, yes if you have the problem, rename libs to lib.

  • @richardvanworkum4964
    @richardvanworkum4964 7 หลายเดือนก่อน

    I created the lips directory and added the Kepler libraries. The pick w file structure looks exactly like in the video. When I try to import imu I get an error - no module named imu. Any lead of what the problem might be? Thanks.

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน +1

      If you have trouble importing the library, rename libs to lib on the pico.

    • @richardvanworkum4964
      @richardvanworkum4964 7 หลายเดือนก่อน

      Changing libs to lib worked. Thanks Paul.😊

  • @crj9416
    @crj9416 7 หลายเดือนก่อน

    I also like the "under the hood" discussions. I didn't make a video but when I added the Z-axis, it reads 1G which is expected because the force of gravity is normal (down) toward the earth. Also when I turned the breadboard on any of the edges, the Z-axis becomes 0G and either the X-axis or Y-axis becomes +/-1G depending on the board orientation.

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน +1

      Which means we could use it to make a . . . ?

    • @crj9416
      @crj9416 7 หลายเดือนก่อน

      @@paulmcwhorter a level

  • @rupadarshisamanta3288
    @rupadarshisamanta3288 4 หลายเดือนก่อน

    Traceback (most recent call last):
    File "", line 6, in
    File "/lib/imu.py", line 95, in __init__
    MPUException: No MPU's detectedTraceback
    help me to get over this error please.

  • @deniszawad
    @deniszawad 7 หลายเดือนก่อน

    Fun fun fun

  • @rupadarshisamanta3288
    @rupadarshisamanta3288 4 หลายเดือนก่อน

    When i run the program it always throws an error like : MPUException: No MPU's detected.
    I did everything perfectly, can anybody help me to get over this ?

  • @EETechStuff
    @EETechStuff 7 หลายเดือนก่อน

    Absolutely brilliant. I'm not worthy 😁 What I've never understood about those nanometer-type mechanics is how it's possible to get, for example, super tiny springs that have the right combination of tininess and also the right amount of spring force for such a tiny "proof mass". And also the tiny wires which connect to the proof mass and substrate to measure capacitance. How can their presence not impact the motion of the mass? Every time I pick up my smart phone and it detects the acceleration and turns on the screen I'm scratching my head how it's possible. I guess I've always assumed that instead of springs it used some type of magnetic repulsion force. Thanks.

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน +3

      OK the answer is very complicated, but let me at least give a few simple answers. As far of tiny, understand that with IC manufacturing I can lay down a layer of material to almost atomic precision. That is, the thickenss of the layer is exactly what I want, within the thickness of an atom. Secondly, I can then etch it to create a structure in x and y to almost atomic precision. So the tiny spring I want is exact in width, height and length. Now as far as tiny wires to connect, the springs themselves are conductive, so I connect to the proof mass electrically through the springs themselves. The springs are the wires if you will. Matybe I should do a live stream on how these things are made in detail.

    • @EETechStuff
      @EETechStuff 7 หลายเดือนก่อน

      @@paulmcwhorter Ahh, okay, conductive springs. Though my brain is exploding trying to imagine designing and fabricating atomic-level springs. Why not use magnets instead of springs, like when we see a repelling magnet hovering above another magnet? Thanks much!!

    • @TheTechRancher
      @TheTechRancher 7 หลายเดือนก่อน

      @@paulmcwhorter I would enjoy a live stream on this.

  • @crs1548
    @crs1548 7 หลายเดือนก่อน

    I love looking under the hood!

  • @Fbarrett
    @Fbarrett 7 หลายเดือนก่อน

    Anybody else get this error? File "", line 1, in
    ImportError: no module named 'imu'

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน

      If you have trouble importing the library, rename libs to lib on the pico.

    • @Fbarrett
      @Fbarrett 7 หลายเดือนก่อน

      @@paulmcwhorter Thanks Paul .It works now.

  • @alialebady2376
    @alialebady2376 7 หลายเดือนก่อน

    Hello sir.
    I want class about Kallman filter plz

  • @user-oe5kp5ee5m
    @user-oe5kp5ee5m 7 หลายเดือนก่อน

    can you do a tutorial for Arduino Mega?

  • @taurus548
    @taurus548 7 หลายเดือนก่อน

    No I don't hate it!

  • @TheTechRancher
    @TheTechRancher 7 หลายเดือนก่อน

    Homework Solution Link: th-cam.com/video/-xruJ5hRZSw/w-d-xo.html Thanks Paul for the great explanation on under the hood of the MPU6050

  • @patrickfox-roberts7528
    @patrickfox-roberts7528 7 หลายเดือนก่อน

    hmmm 9.81 appears ?? :)

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน

      hmmm . . . we will learn more next week.

  • @bigbogeyface
    @bigbogeyface 7 หลายเดือนก่อน +1

    Here's my homework: th-cam.com/video/jmbA3FXizSc/w-d-xo.htmlsi=icliv1u1rSjzC83w
    I have recorrelated the Axis to align with general consensus 🤷🤷🤷

  • @briankelly4095
    @briankelly4095 หลายเดือนก่อน

    I'm very late handing in my assignments Paul. Life gets in the way sometimes. But I will catch up! Here's my homework for Lesson 40 th-cam.com/video/paxBIhAeAgI/w-d-xo.html
    Please continue explaining the math & physics in your lessons. It's important that people understand the principles behind the technology. Thanks for all your hard work.
    PS - I like the new trailer, the armed guards were a bit of a surprise. And did Suno create your soundtrack from a lyric sheet ?!? . I'd like to hear about the creation process.

  • @LiamAllbright
    @LiamAllbright 7 หลายเดือนก่อน +1

    Why has no one commented yet-

    • @paulmcwhorter
      @paulmcwhorter  7 หลายเดือนก่อน

      I review all comments before publishing them. So, lots of people had commented, I had just not reviewed. I review comments once a day.