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 - วิทยาศาสตร์และเทคโนโลยี
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.
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.
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?
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.
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
Excellent!
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.
Excellent!
I appreciated your explanation of the mechanics and physics behind this process!
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.
Oh wow!
It's always time to learn, all we need is humility and strive. Keep going and congratulations.
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.
19:16 Having work with accelerometers on an industrial scale. Great to hear how micro-electronic versions work
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 !!!!!
More to come!
Paul, please continue explaining the details of subjects like MEMS and other items used with microcontrollers/SBCs that you cover!
I just hooked up to your channel and the details you take through are invaluable.
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!
Glad you enjoyed it!
Rumble is the new free speach YT for the moment.
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.
Excellent
I always enjoy your videos when you are explaining what is happening under the hood, Paul!
I really like your lessons. Simple, straightforward, very useful!
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.
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!!!!
A wonderful Acceleration video. Something that is used so much and I know very little about like drones? Let the games begin! 😎 Thank you.
Great lesson Paul, Thanks.
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.
I love the details and you do it so well!
really love this man, much respect!
Thank you so much Paul!
I love your lessons sir. I've just started learning about the Arduino board and your channel has helped me a lot
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❤
Thanks Paul. I love your MEMS and Hookes Law explanation. You rock. My prediction is not zero because of gravity.
love these videos! Keep it up you are doing a wonderfull work!
Nice lesson!
Thanks Paul! I had a bit of a problem with Thonny loading the libraries but now everything works.
If you have trouble importing the library, rename libs to lib on the pico.
Thank you sir for great videos.
My pleasure
Sir my carrier changed by your Arduino tutorial 4years ago I really appreciate it and you are always mentor for me .
Keep it up!
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
Forget it, everything is working fine...
brilliant
OMG!! You're TEACHING RASBERRY PI TOO!!! THANK YOU SO MUCH ;u; SIR You're a blessing!!!!
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 🙏
Can arduino be used to implement in a product that should work 27x7???
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?
People are reporting that. So, yes if you have the problem, rename libs to lib.
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.
If you have trouble importing the library, rename libs to lib on the pico.
Changing libs to lib worked. Thanks Paul.😊
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.
Which means we could use it to make a . . . ?
@@paulmcwhorter a level
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.
Fun fun fun
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 ?
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.
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.
@@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!!
@@paulmcwhorter I would enjoy a live stream on this.
I love looking under the hood!
Anybody else get this error? File "", line 1, in
ImportError: no module named 'imu'
If you have trouble importing the library, rename libs to lib on the pico.
@@paulmcwhorter Thanks Paul .It works now.
Hello sir.
I want class about Kallman filter plz
can you do a tutorial for Arduino Mega?
No I don't hate it!
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
LEGEND!
hmmm 9.81 appears ?? :)
hmmm . . . we will learn more next week.
Here's my homework: th-cam.com/video/jmbA3FXizSc/w-d-xo.htmlsi=icliv1u1rSjzC83w
I have recorrelated the Axis to align with general consensus 🤷🤷🤷
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.
LEGEND!
Why has no one commented yet-
I review all comments before publishing them. So, lots of people had commented, I had just not reviewed. I review comments once a day.