Raspberry Pi Pico W LESSON 42: Measuring Tilt With an MPU6050 Accelerometer

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2024
  • 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 then show you how using trigonometry will allow you to quantitatively calculate the amount of tilt from the Z axis acceleration reading. I will give an explanation of the math and physics behind problem, 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

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

  • @vaughntaylor2855
    @vaughntaylor2855 9 หลายเดือนก่อน +20

    Paul, please continue teaching all the math. Yes there are those who would rather use existing libraries and they can do so. But speaking for myself, I enjoy trying to understand the math!, Thank you and God Bless you and yours!

    • @scottwait3585
      @scottwait3585 9 หลายเดือนก่อน +2

      I agree, the math behind the work is really important to understand.
      It really helps a lot!

    • @robakers6127
      @robakers6127 9 หลายเดือนก่อน +2

      my opion as well. I hate to use code with no understanding but it works, so use it. Thank you.

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

      I also agree 150%. Math is the fuel in the Electrical Engineer's Mind.

  • @ÖmerYılmaz-n2i
    @ÖmerYılmaz-n2i 6 วันที่ผ่านมา

    Perfect video as always, i like the way you teaching

  • @dariush_derki
    @dariush_derki 10 วันที่ผ่านมา

    Thank you Paulo, it was very important material, I used it, thank you

  • @qzorn4440
    @qzorn4440 9 หลายเดือนก่อน +2

    First of all Paul it is very cool to find out you worked with these devices in the early development days. 🥳 As for myself the math is the main thing I want to understand. Then writing the code makes more sense if all these trig terms are second nature. The creative thinking kicks in when the MPU6050 mystery is understood. 😎 Thank you so much.

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

    I agree with Vaughn, Please continue teaching the math involved. Libraries are fine and have their place, but I like the details of what is actually happening and how to get there. Nine times out of ten it includes math!! Thanks for all that you do.

  • @user-ng2ly6nf1c
    @user-ng2ly6nf1c 9 หลายเดือนก่อน +1

    Great video! Thanks. I like the way you present this motivating people to understand the math behind.

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

    I was able to do the homework assignment. After having it on my mind for four days it came to me in the shower. The direction of the tilt was quite simple. The direction of tilt is the direction of, in this case, yAccel. One if statement…..LEGEND! Thanks for the challenging homework.😊

  • @cvicracer
    @cvicracer 9 หลายเดือนก่อน +1

    Keep up the explanation exercises it helps alot in the learning process

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

    I like the direction you are sending us.

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

    Great! This is just what I want to learn behind the theory.

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

    hi Paul absolutely love where we are going wirh this right now i love you explainations and how this should be done right! keep up the good work sir

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

    excellent video thanks

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

    Feels like a straight road from idea to something tangible, without math - red lights, getting in the way.

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

    Paul, like most of the other commenters, I ask that you continue covering the math to teach how to think like an Engineer rather than those who simply try to find libraries or code instead of developing their own solutions. I don't have a Sunfounder kit yet, but hope to get one between now and Christmas so I can restart these lessons from scratch and develop my solutions.

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

    Thank you so much Paul!

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

    Great video! This kind of "physics" thinking does not come easily to me. It is a bit more than just math thinking IMO. I appreciate you taking the time to explain it carefully and drawing those helpful diagrams.

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

      Thanks! Hope to see more homework solutions from you soon.

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

      @@paulmcwhorter I am trying to catch up so may just make a video once we get to the full tilt-o-meter project. I didn't have any unique takes on any of the homework so far. If I do, I will share it. Thanks for all you do!

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

    Great solution

  • @TheTechRancher
    @TheTechRancher 9 หลายเดือนก่อน +1

    You gave enough

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

    I never thought to use the Z axis. I assumed I had to work with xAcel to find theta X. Silly mistake. I was using cos(1-xAcel/1) it would give an accurate reading from 0 to 90, but would give an error every time xAcel went below 0. I tried adding Abs() - for absolute value - but that didn't fix it. So I folded up like a cheap walmart lawn chair! haha

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

    Please keep up the math!

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

    Thanks again

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

    Thank you Paul for all your work you put into these tutorials .. I have a question regarding the math .. I see the formula written to go from Radians to Degrees as
    "degrees = theta/2*pi * 360 but when you code it it's written " thetaDeg= theta/2/pi*360 .. what am I missing ? They don't appear to use the same computation... TY !

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

    Thanks Paul. Math rocks keep it coming! What type of critter was swimming in the river behind you?

  • @Bob-zg2zf
    @Bob-zg2zf 9 หลายเดือนก่อน

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

    25:07 I need to understand first principles of the maths (UK spelling) so can work things out in future projects.

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

    Teach us how to do the math,, best way I think

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

    Thanks Paul! I was going to use libraries but thought better of it. Will try again with the math. By the way,🤔 someone was swimming in the background... But never came up (?)

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

      Didnt notice that, but those guys are fishermen. Sometimes they go down to work on their nets. They stay under a really long time, and sometimes come up what seems like a half mile away. Incredible lung capacity.

  • @charlotteswift
    @charlotteswift 9 หลายเดือนก่อน +3

    Here is my video for lesson 41 (very late due to thunder and lightning, floods, trees falling down, power cuts, no internet or telephone etc) : th-cam.com/video/4VZEM_NsWLM/w-d-xo.html

  • @kenblanch4178
    @kenblanch4178 9 หลายเดือนก่อน +1

    Hi I am following this lesson and I get a tilt angle reading of aprox 19 deg sitting flat on the table is this a problem with my Accelerometer.
    ps. love your work

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

      Check your program very carefully. It should be way more accurate than that. Very unusal for one of these components to be bad, so check your work carefully.

    • @hermanngeness679
      @hermanngeness679 5 หลายเดือนก่อน +1

      I'm having the same problem. My MPU sitting on the table reads between 25 and 28 degrees. And its not even a static value. Did you manage to solve this?

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

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

    My Z gives a maximum of 0.88 G instead of the expected ~1 G : - (

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

    I thought I had a solution, but kept gettin math errors when the angle got to 90° for x & y or 0° for z

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

      Yes, if you are using atan, it will error at 90 degrees. So we have to treat that as a special case.

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

    It took me weeks to feel that I had a proper solution for lesson 42. Here's my homework for 41 & 42 combined. th-cam.com/video/2l2G6pBajdk/w-d-xo.html
    Thanks for all the work you put into these lessons Paul. Keep the math coming !

  • @PhysicsAssignmentHelp
    @PhysicsAssignmentHelp 9 หลายเดือนก่อน +2

    I think i did this homework last week... Positive pitching raises the nose and lowers the tail of aircraft, and positive rolling raises the left wing and lowers the right wing. I'm sharing it again th-cam.com/video/YgxmvZeMtyk/w-d-xo.html