9-Axis IMU LESSON 10: Making a Tilt Compensated Compass with Arduino

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • You guys can help me out over at Patreon, and that will keep this high quality content coming:
    / paulmcwhorter
    In this lesson we show you how to achieve a tilt compensated compass from accelerometer, gyro and magnetometer readings. This builds on our earlier lessons in this series, and we are using a BNO055 9-axis sensor.
    Adafruit BNO055 IMU Sensor:
    amzn.to/2lbwsnc
    I strongly suggest picking up an arduino nano, since it can plug directly into the breadboard, making a portable system more practical. You can pick one up here:
    amzn.to/2WXTC2M
    [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. This means if you visit the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.]
    #Arduino
    #IMU
    #NineAxis
    #BNO055
    #Compass

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

  • @cliffnormand2577
    @cliffnormand2577 21 день назад

    I have been working on a project requiring complimentary filters. I have scoured the web for anything that would help me understand (and implement) what was "under the hood". You have done a remarkable job. I'd venture to say, hands down...the best tech tutorial I've ever seen and I've been around a long time. ~Best and thank you very much for your hard work.

    • @paulmcwhorter
      @paulmcwhorter  19 дней назад

      It really is interesting math. I find complimentary filters more understandable than Kalman filters. Thanks for watching.

  • @danielhoven570
    @danielhoven570 4 года назад +10

    I'm building a flight telemetry computer to control the recovery system, and monitor the precise in flight thrust characteristics of a hybrid fueled rocket. My research team is developing a suborbital launch vehicle that can reach space, and return with a small payload for use in atmospheric science, education, and microgravity research. Our goal is reducing the cost of suborbital throttled ascent launch systems to a tier available to high schools. I use more complicated maths (like quaternion algebra), but I find your videos helpful in the overall networking and debugging process. (I'm a rocket scientist, but a horrible programmer). As always thanks for the entertainment and educational resource you provide, and I'm especially interested in how you read data into visual python.

  • @Julian-ti1bv
    @Julian-ti1bv Год назад +1

    Thank you, Paul, for this great series of lessons! I am really looking forward for the next videos.
    I have seen some comments wondering how to derive Xm and Ym. I don't know if this was your approach (please correct me if I am wrong) but this was how I derived the solution for me:
    When reading the measurements [mag.x() mag.y() mag.z()] we basically read from a coordinate system that was rotated around the x-axis by our roll and rotated around the y-axis by our pitch. What we want to achieve, is to get equivalent values [xm ym zm] (well we don't really need zm) from a coordinate system that was not rolled or pitched and thus is only subject to yaw.
    So what I did was to apply two rotational matrices. Rx to rotate the vector [mag.x() mag.y() mag.z()] around the x-axis by our roll and Ry to rotate it around the y-axis by our pitch (Rx and Ry for 3D space can be easily googled). The coordinates of the non-pitched/rolled vector can then be calculated as [xm ym zm] = Ry*Rx*[mag.x() mag.y() mag.z()].
    As mentioned earlier we do not need z but when sticking to the vector / matrix notation we can use standardized operations and simply forget about z later.
    This leads to almost the same solution, except for some different signs. If you are using the newer Adafruit IMU with a StemmaQT connector, you also have a coordinate system printed on the board. If you stick to it with all the mathematical conventions, the solution using rotation matrices works right off the bat.
    Maybe this will help you or if I misunderstood something, maybe you can help me :)

  • @yasirubenaragama232
    @yasirubenaragama232 4 года назад

    I used an MPU 9055 IMU instead of a BNO. i followed what you did carefully and got it to work. i just want to thank you for your commitment in making these tutorials and being an inspiration to all. thanks Paul

  • @philtaylor5467
    @philtaylor5467 3 года назад +1

    Still here so far in London, England. I want to apply this to a satellite tracker system I’m building. So crazy, it might just work! Thanks Paul for the most excellent and clear lessons.

  • @epiendless1128
    @epiendless1128 3 года назад +1

    Thanks. I'm using a Nano 33 IoT with built-in IMU. It's only a 6 axis IMU, but most of this is relevant.

  • @DixieJoeLottolex
    @DixieJoeLottolex 4 года назад +1

    boooooommmm! Like you say in your videos! Congratulations from Brazil. Your videos on IMU have been excellent learning influence here. Thanks a lot!

  • @paolotanedo1420
    @paolotanedo1420 Год назад +1

    amazing tutorial! Love the enthusiasm as well. A step above pretty much anything on youtube.

  • @MiguelOMatic
    @MiguelOMatic 4 года назад +6

    Excellent work, Paul! Would love to see you tackle a Kalman filter implementation, perhaps, after passing the raw data to Python. I may attempt this myself...

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

    I am just learning Arduino, and this are grate classes ,Thank you.

  • @dartbird
    @dartbird 3 года назад +1

    Great explanation, well structured, and everything on the pinpoint.

  • @dingowhiz481
    @dingowhiz481 Месяц назад

    Best IMU tutorial !

  • @aatt3209
    @aatt3209 3 года назад +1

    I am onto lesson #11!! Thank you so much for this series on IMU.

  • @waltmetcalf5354
    @waltmetcalf5354 4 года назад +1

    I’m still here and following along. Very interesting project.

  • @dougmclellan9257
    @dougmclellan9257 4 года назад

    This is very helpful. I'm using BNO055's for an accurate wind vane on a self sailing RC sailboat.

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

    Cool lesson! This might be one of the best series of lessons! A lot of good stuff! Thanks So much for making this!

  • @toddduffett1378
    @toddduffett1378 4 года назад

    Yet another excellent video explaining a complex subject in a very understandable way. Thanks Paul. Looking forward to next weeks lesson.
    Todd

  • @NaveenKumar-rx9zk
    @NaveenKumar-rx9zk 4 года назад

    Half way through, another half to go thanks for tutorial Paul have a nice day.

  • @aklmini-makers4304
    @aklmini-makers4304 2 года назад +1

    Another great lesson! I'm catching up with the math - one question: Does the Magnetometer need compensation for us in the Southern Hemisphere? For it to point North, I ended up reversing the [your] Xm and Ym values as follows: Xm=-mag.x()*cos(thetaRad)+mag.y()*sin(phiRad)*sin(thetaRad)-mag.z()*cos(phiRad)*sin(thetaRad); and Ym=-mag.y()*cos(phiRad)-mag.z()*sin(phiRad); The Magnetometer output is noisy [maybe the indoor environment?], but anticipate to cross that bridge later progressing through these Lessons. Great work, Paul. You certainly have a knack of making tech accessible.

  • @LifeWithMatthew
    @LifeWithMatthew 3 года назад

    These have been some great lessons! I've been working on a system to get lots of data about my bike rides and this will be the last bit I need to get direction and incline!

  • @timothedecroux4146
    @timothedecroux4146 3 года назад

    Been watching all your series of video, the art of making complex project with clear and simple explanation, thank you so much. Would be great to have an implementation of a kalman filter. Big support from france !

  • @pascalpoznan9632
    @pascalpoznan9632 4 месяца назад

    Thank you!

  • @qck57594
    @qck57594 4 года назад

    What a great learning experience, thank you Paul. I don't have the Jetson yet but will doing that too.

  • @jkoehler56
    @jkoehler56 3 года назад

    Excellent series Paul. Thank you.

  • @michaelbishton9439
    @michaelbishton9439 4 года назад

    I have a BNO055 and was going through various tutorials (including Adafruit) that gave formulas and output. I am so thrilled that I found yours. NONE of them (that I can find, and I have been looking) take the time to break down the individual sensor capabilities to show how they work better together. Thank you for that! So much more of it makes sense to me now. How long did it take for you to plan this series. Very thoughtful. I would love to learn more. Please keep going.
    My only comment on your production - first episode: I would explain to people that you think you can read the accelerometer to get change in speed in any direction, Gyro to get change in pitch, and the compass to get magnetic heading. That is not the case. That is why you will want to stay through the whole series to see how to get them to work together to get change in speed, attitude, and direction.
    I am a glider pilot with lots of instruments in the panel. I have also taken to flying Quicksilver MXL Ultralights, where the only "instrument" is a Hall wind meter like the ones at www.hallwindmeter.com/gliders.php. I like the idea of providing a single display that adds the information derived from a BNO055 and an RC aircraft I2C airspeed indicator. It would not be a critical component because the primary indicators are; the wind meter, the wind on my face, and the gravity sensor in my butt. Please keep going.

  • @andreasbrazier6889
    @andreasbrazier6889 4 года назад +2

    So I added 180 to the [-180 to 180] range so it would always read as if reading off of a compass (0 to 360), but I have a question if anyone knows the answer! Is it possible to transition our inverse tan equation into an either sine or cosine equation? That would take care of the asymptotes if I'm not mistaken and save us the issue of the Arduino flashing between the asymptotic values... non mathematician here, just a thought!
    As of now I made a low pass filter to prevent so much noise and when it reads higher than 359 or lower than 1 I had it ditch the low pass filter and delay for a half second to prevent the slow jump... didn't work as planned hahaha

  • @chrismurray5526
    @chrismurray5526 4 года назад +2

    You have to admire the shirt colour continuity on playlists :)

    • @paulmcwhorter
      @paulmcwhorter  4 года назад +1

      That is actually harder than you might think.

    • @TYGAMatt
      @TYGAMatt 3 года назад

      Hard it may be, but makes it somewhat easier for us to keep track of the subject

  • @plinioa.rodriguez2110
    @plinioa.rodriguez2110 2 года назад

    Sir, this is an amazing work! I love the video! Thanks for the explaination!

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

    I'm a little late to class, but I wanted to complement your ability for making what seems to be impossibly complex relatively simple for those with basic math skills. I'd rather not say how long I've been looking for a library to do this using an Adafruit LSM9D1. I'm giving up and writing from scratch thanks to your help.

  • @TYGAMatt
    @TYGAMatt 3 года назад

    An MPU6050 came my way the other day, unfortunately before I found you tutorial. However, managed to put a lot of it to good use on my ESP32.

  • @bluehornet6752
    @bluehornet6752 4 года назад

    Great video series Paul, thanks so much for making this series. Some of these videos are review for me, but on some of them I feel like you've just peeled-back the top of my head...and dumped in some knowledge! So thanks for making the effort that these things take to produce. Not only have I subscribed, but I also hit your Patreon page as well. Looking forward to working through the rest of these videos once the BNO055 gets here!

    • @paulmcwhorter
      @paulmcwhorter  4 года назад +1

      Thanks for the kind words, and really appreciate your most generous help!

  • @sanjayg786
    @sanjayg786 4 года назад

    Hi... Paul...
    very interesting series.... learn a lot .... not only sensors ...arduino....but trigonometry some functions....

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

    Hey Paul. Thanks for the great video. My application is going to be with a raspberry pi for a sailboat autopilot and visualization of heading info. I had planned to use the HMC5883 Compass but the tilt error is enough to make a junior coder cry. I'm going to try a GY-9255. So much fun. Thanks brother.

  • @farzanehsalehi4963
    @farzanehsalehi4963 7 месяцев назад

    thank you very much

  • @mortenwesteraa7910
    @mortenwesteraa7910 4 года назад +4

    We are still here, would never miss it. In the Bosch documentation it is mentioned that we can save calibration data from previous sessions and load them during startup. Has anybody looked into that?

    • @genepierson1728
      @genepierson1728 4 года назад

      On Adafruits website: The BNO doesn't contain any internal EEPROM, though, so you will need to perform a new calibration every time the device starts up, or manually restore previous calibration values yourself.

  • @manukulshreshtha3460
    @manukulshreshtha3460 4 года назад

    Great!! had a IMU6050 and bought a hmc5883l for compass.. following and working till now with STM32 , very neat Paul!! waiting for the lab when you would calculate the position based n these inputs!!

    • @emmetray9703
      @emmetray9703 4 года назад

      Hi Manu, I have MPU6050 and HMC5885L ,. Roll and pitch is working but I have problems with Yawing,
      I did everything by same way as Mr. Paul did, but Yaw is chaning when I'm tilting.. Can you upload source code somewhere?

  • @billfield8300
    @billfield8300 4 года назад

    still here Paul. Learning a lot!

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

    Love it!

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

      I do wish that I could get the same serial plotter that you have.

  • @atufashireen6238
    @atufashireen6238 Год назад +1

    You might wanna make update in the code:
    - where converting thetaM to degree is done with /2/3.141592654*360
    - and doing this conversion again while calculating psi

  • @nhlhockeyallstar
    @nhlhockeyallstar 3 года назад +1

    haircut looks great today!

  • @kevinshaver5613
    @kevinshaver5613 4 года назад

    Loving this.Have been following along at home.The only problem so far is calibrating my accel. It takes quite a while. I don't think the code is wrong , just my BNO055.

  • @tylerfinch9491
    @tylerfinch9491 3 года назад

    You are the man. Thank you!

  • @zazatevzadze8111
    @zazatevzadze8111 3 года назад

    Bravo.

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

    it works!

  • @Syria..
    @Syria.. 3 года назад +1

    32:00 girl after seeing me done that ohh that the man who I want always

  • @johndixon9594
    @johndixon9594 4 года назад +1

    Thanks Paul , brilliant tutorial. Followed all series but final tilt compensation does not seem to work on the heading. Code looks ok but "mag" appears in orange. should this happen?

  • @jimguo3572
    @jimguo3572 3 года назад

    Thank you so much!

  • @opalprestonshirley1700
    @opalprestonshirley1700 4 года назад +1

    I love this on the compass. I've used a compass for many years and always wondered how an electronic version works. I'm still having problems with my output to the Serial Plotter. My code corresponds with yours exactly so it's not the code itself. I've watched the output to the serial monitor and noticed one thing when calibrating, the "System" value stays at "0" and will not change, where as before it took a little bit but went to "3" no problem, but the other values still go to "3" quickly. So I've ordered another BNO055 to see if I've done something to damage the board. Keeping my fingers crossed, sorry can't hold my breath that long...LOL.

  • @mikecole3248
    @mikecole3248 4 года назад +3

    Kudos Paul on all the great work you put into this series!! I'm following each lesson, with all the same hardware. The value I get for psi (heading) jumps around a lot (+/- 5 degrees), so I added a low-pass filter to the Xm and Ym values, but even with heavily weighted filters (0.9999 on prior and 0.0001 on new values), I still see lots of noise in psi. I'm thinking I should try moving the filter further upstream, to the mag.x(), mag.y(), and mag.z() values, and to use an averaging window on the prior 10 or so values (perhaps the root mean square of these). Do you have any suggestions on best methods to filter the noise out of psi?

    • @waynep4802
      @waynep4802 2 года назад +2

      Would love to know how you solved the noisy psi signal? Mine is very noisy and it's not a code issue. Interference from being indoors? Mine jumps easily 20 degrees which makes it unusable. Thank you.

  • @1975Per
    @1975Per 3 года назад +1

    I'm adapting your code for the new BNO080, and I'm gonna use this for an autotpilot for a boat. Could you quickly go over, or point the direction somehow, on what I would need to do in order to get what you call "the proper math". (I did all the calc etc. in university, I'm a CompSci major, but it's 25 years ago now... I'm mainly a coder.)

    • @mostafaezzeldein2082
      @mostafaezzeldein2082 3 года назад

      I was going to ask Mr. Paul the same question too. I'm glade to see your comment.
      Mr. Paul, could you please highlight the calculations you mention in the lessons?

  • @synergize-earth
    @synergize-earth 3 года назад

    Thanks a lot !!!!

  • @user-vb2sb5qf5j
    @user-vb2sb5qf5j Год назад

    I have been loving this series. I has given me a better understanding of using my Adafruit BNO055. I am having difficulties with this lesson. I have followed all the steps but I am still getting tilt from the pitch and roll when just looking at the Yaw values. Any ideas on what I am doing wrong?

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

    It would be awsome if you explained this 3D trygonometry in some way. It would help. Even though VERY GREAT WORK !

  • @javest
    @javest 22 дня назад

    Where could i find the link to your Arduino sketch?

  • @chefseg
    @chefseg 5 месяцев назад

    Great video, I provided a like! Question, how do the heading tilt compensation equations (xm, ym) change for the MPU9250 magnetometer sensor? I know that the magnetometer is oriented differently relative to the gyro/accel sensor. Thank you for the help.

  • @emmetray9703
    @emmetray9703 4 года назад

    I'm using MPU and HMC5883L together, but I have problem with Yawing. Is magnetometer callibration neccesarry? I just want to have same direction(even wrong) when I'm tilting.
    I did everything by the same way as you did . Roll and Pitch are working fine. Please help somebody, I'm working on YAWING almost 3 weeks and still not finished yeat...

  • @lukaswiedermann5040
    @lukaswiedermann5040 4 года назад

    But there is no strong magnetic field inside could you do it with the accelerometer and gyrosensor only too? Could you help me? I really like your project and coded alson until here. Really hoped to find a way to calculate the heading without using the magnetometer

  • @genepierson1728
    @genepierson1728 4 года назад

    Yes, stuck through. Still here!

  • @MikeDu-it9wl
    @MikeDu-it9wl 4 года назад +1

    Hello, teach Paul! I have a question here: In this lesson, we are determining Yaw using magnetometers. So does that mean that by using accelerometer and gyroscope cannot get the data of YAW? If so, it would be confusing as if you see X-aixs, Y-axis and Z-axis, I think there is no different in their properties, they are all just directions, so how come we cannot get YAW data with accelerometer and gyroscope only?

    • @botlarry4437
      @botlarry4437 4 года назад

      Accelerometer and Gyro use the gravitational vector as a reference vector; however, they have no reference vector for the Yaw axis. Magnetometer provides a reference vector for the Yaw axis from the Magnetic North vector. Paul mentions this in the beginning of the video. I hope I'm making sense. I also had the same question :)

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

    I watched the whole series. It is fantastic. I have a small note: I believe the earth's field vector direction at 7:30 should be in the reverse because you said that the x-axis of the sensor is in the direction of the north ( so is it the north pole of the earth's permanent magnetic? Or the geographic north?). Thanks

  • @k1jo939
    @k1jo939 3 года назад

    I originally purchased the BNO055 to add to an azimuth/elevation rotator for ham antennas tracking satellites. However, if I need to perform the calibration every time I turn on the rotator, it will be very difficult to climb my antenna tower, unmount the controller, perform the calibration and then remount it for accuracy.
    So, my question is, will this IMU work in my situation?
    Thanks in advance. Great tutorial...much appreciated!

  • @marktenuta5994
    @marktenuta5994 4 года назад

    This has been the best tutorial i have ever watched and especially for a 9-Axis IMU, but will you be showing how do use the sensor past 45 degrees. especially to have it work upside down. if you are not going to make a video on it, would you be able to point me in the right direction.
    Thank you,
    Huge fan of your work

    • @paulmcwhorter
      @paulmcwhorter  4 года назад

      Patience grasshopper . . .it will come later

    • @marktenuta5994
      @marktenuta5994 4 года назад

      @@paulmcwhorter ok thank you are the best, also do you know roughly when that will be?

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

    how do i calibrate for soft or hard iron error ?

  • @anothertime
    @anothertime 4 года назад

    Do you if the pass through mode on the mag will persist even after power off?

  • @Bobs1Models
    @Bobs1Models 4 года назад

    Paul I have problem my yaw reads
    North 170
    East - 90
    West 70
    South 0
    I cannot figure out what is wrong. I even downloaded your sketch and its the same help please

    • @BiancaDianaT
      @BiancaDianaT 4 года назад

      In general on an IMU the magnetometer has axes different (even opposite) of the acc/gyro.
      You have to align the mag. to the axes of the acc/gyro., look into the datasheet of the IMU and you'll find the drawing of how the arrows point.
      In your case it sounds like North and South are swapped, maybe there should be a minus in front of that mag.x and y.

  • @NaveenKumar-rx9zk
    @NaveenKumar-rx9zk 4 года назад

    Btw you are looking younger in the new look I like it.

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

    Hello Paul, super nice video.
    Can I get this code running in Arduino Uno R3? I want to build a wind vane
    Thanks
    Fede

  • @mbuhamad
    @mbuhamad 3 года назад

    You are the best. Would you please tell me how can I find heading with BNO55 with raspberry pi and python. I'm can read all the sensor parameters but Its not doing me any good finding the heading.

  • @dansimpson6844
    @dansimpson6844 4 года назад +1

    What?! All that work on my fighter jet and now I can’t use this? ☹️
    But my biggest problem is that I built the darn thing in the basement and I have no idea how to get it out of there.

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

    Superb. Really fantastic. Thanks. I was wondering something. Does the Adafruit library not output a tilt compensated value for yaw? I thought it did, but this video is the only place where I have found a clear explanation of how to get this done.

  • @dragondodger8322
    @dragondodger8322 4 года назад

    Hi Paul really enjoying the IMU series, you say the tilt reporting is limited to 45 deg.
    is it therefore possible to mount the sensor at neg 45 deg, and calibrate to zero
    in order to get a 90 deg. swing from horizontal to vertical.
    At 90 deg. the sensor would still be at 45 deg. keeping within the 45 degree limitation.

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

    Hello Paul.
    I am enjoying your lessons about how to use the IMU. Very informative and easy to follow along. Of course you're teaching a lot more than just the IMU because your' also giving insight into building arduino sketches.
    I was wondering if it's possible for you to consider guiding us through the process of programing the BNO055 into the RPi Pico. I understand the mechanics/math for determining "tilt" but would like to know how to capture the data from the IMU directly from it's registers into the RPi Pico.
    I'm building an automated leveling platform for a very large (4ft X 4ft) 3D Printer and think that an IMU would work great. However, I'm not sure about is the "calibration".
    It won't be practical to spin the IMU around like we did in your BNO055 lessons since it will be embedded in my large scale 3D printer.
    Any help on how to do the calibration a different way?
    Thank you so much for what you are doing. God Bless.

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

    still here, paul.

  • @snowflakes003
    @snowflakes003 3 года назад

    can you please give me the reference of the formula for calculating yaw from the magnetometer reading? please?

  • @Juli0924thitaree
    @Juli0924thitaree 3 месяца назад

    Hi guy, anyone knows how to calculate yawrate? It is not simple because from 0 deg to 359 degree make a huge mistake result!

  • @nick43213
    @nick43213 3 года назад

    AT David Tableaux Stem Academy high school we are thinking about flying this on a satellite How would we do an auto calibrate? great vodep

  • @wnekuu
    @wnekuu 3 года назад

    Why use angles from other sensors when you just have 3 values from magnetometer?

  • @kekocan2900
    @kekocan2900 4 года назад

    Hey Paul, I have a dilligent question: Is it possible to place a more dimensional measurement unit into a cnc router? With the intention that a router would be able to cut in more dimensions. Is the measurement unit a helpful tool for a cnc-router?

    • @danielhoven570
      @danielhoven570 4 года назад

      No, you use stepper motors for this, which use angular position tracking rather than acceleration, and are far more accurate since they use the number of magnetic stator windings as the division units of their unit circle. This allows you to precisely set where you want an object (like a mill bit) to be in space by using 3 axis, 4 axis (like mine) or even 5 - 6 axis control, with each axis controlled by a single stepper.

  • @Hino_55
    @Hino_55 4 года назад

    I can understand how Ym was derived but for some reason I can't comprehend how we got the equation for Xm.
    Nonetheless, still a great lesson Sir Paul!

  • @emilejomphe6625
    @emilejomphe6625 4 года назад

    Hi, what type of "maths for real" would we have to do in order to get this device working precisely for angles greater than 45 degrees?
    Thank you, nice series, and I should really try this black coffee on ice with no sugar!

  • @slavav2974
    @slavav2974 3 месяца назад

    where is i can find source code for this lesson ?

    • @paulmcwhorter
      @paulmcwhorter  3 месяца назад

      The purpose of these lessons is to teach how to program, not to teach how to copy and paste. I show you how to do it, code it, man!

  • @aumeerwafiik875
    @aumeerwafiik875 4 года назад

    Hello great video... how you would put a low pass filter to remove the sudden jerk?

    • @paulmcwhorter
      @paulmcwhorter  4 года назад

      Keep watching, covered in a future lesson

  • @orndorff52
    @orndorff52 4 года назад

    Man, I screwed something up along the way!! Tilt compensation was magnified instead of compensated out after writing the code. I’ve been using x,y,z instead of phi,theta,psi because it’s easier for me to visualize, so I suspect I got some values crossed along the way. I’ll tackle it again tomorrow after resting the brain. I also noticed I have a lot of soft metal interference when I put the setup on my metal desk vs the glass table next to my desk. Are we going to learn any filters for soft metal interference?

    • @orndorff52
      @orndorff52 4 года назад

      Ok... fixed it!! Double counted an angle... onward and upward!!

  • @pratosh666
    @pratosh666 4 года назад

    Following your series Sir. Sir, could you provide me a link on Yaw angle measurement, measured from any plane just like how you said of the projecting those vectors into a 2D plane. I am very much interested, Sir.

  • @GCRickerNH
    @GCRickerNH 4 года назад

    Hi Paul. Yes I do watch all your videos all the way through, and yes, I am following along at home using the same hardware as you are. I'm particularly interested in the math behind this, and have been understanding the trigonometry up to now. However, without your explanation on the 3D trigonometry, I'm disappointed I just have to follow that section of your code. I do understand that it's difficult to explain without being able to write in 3D. Does this mean you will not be teaching us Quaternion math? Can you recommend a RUclips video or other website that may be able to teach us how you derived this 3D tilt formula? Thanks.

  • @waynewelshans1172
    @waynewelshans1172 4 года назад

    Still here and still enjoying. Are you eventually going to show us a magic library that has commands built in to do this all for us or does that not exist?

    • @mortenwesteraa7910
      @mortenwesteraa7910 4 года назад

      It is already done. Try to use: imu::Vector eul = my_imu.getVector(Adafruit_BNO055::VECTOR_EULER); and you will get very nice results.😊

  • @WagonLoads
    @WagonLoads 3 года назад

    Hi Paul, I found this video because I was looking for a compass that works on a MPU9250. I would like to try something with an esp8266 or esp32 that would work like a wireless 3d mouse or like a Wii controller. But yes, I am also working on robots and storing data in mysql.. I have seen a few videos on self balancing robots. (2 wheel type and one called Ballbot) I hope you can help in these areas.

  • @prateekmusicoffcial
    @prateekmusicoffcial 4 года назад

    sir am not getting the final output...after adding that modification its still showing the same error

    • @TheRealFrankWizza
      @TheRealFrankWizza 4 года назад

      same here, I even copy pasted his code to try it. Did you figure it out?

    • @TheRealFrankWizza
      @TheRealFrankWizza 4 года назад

      Changing
      Xmag=m.x()*cos(thetarad)-m.y()*sin(phirad)*sin(thetarad)+m.z()*cos(phirad)*sin(thetarad);
      to
      Xmag=m.x()*cos(thetarad)+m.y()*sin(phirad)*sin(thetarad)-m.z()*cos(phirad)*sin(thetarad);
      seems to have fixed it for me.

  • @quaternion-pi
    @quaternion-pi 4 года назад

    Outstanding project, and you explain it brilliantly. I'm hoping you will decipher those pesky quaternions while rotating an object with visual python and the BNO055 data stream. "Patience young grasshopper"?

    • @paulmcwhorter
      @paulmcwhorter  4 года назад

      We will use quaternions, but there is really no explaining them. It is like a three dimensional imaginary room. We can explain the simple math, but hard to really show an intuitive explanation of how they actually solve the free rotating rigid body problem. But, like I say, in the end we use them and that is what will make the visualization work perfectly.

    • @aliismail2962
      @aliismail2962 4 года назад

      Check the channel 3Blue1Brown he has couple of videos about explaining and visualizing quaternions.

  • @emmetray9703
    @emmetray9703 4 года назад

    is it possible to make Tilt Compensated compass with UNCALIBRATED magnetometer? Please somebody answer me.. :((

    • @synchro-dentally1965
      @synchro-dentally1965 3 года назад

      I believe that it would have to be calibrated. However, in another video they logged the min and max values for each axis of the magnetometer (full rotations about each axis) found each axis' respective median value and subtracted the median value from the raw data. This essentially "centered" the raw data thus "calibrating" the magnetometer.

  • @Felipe-hi6nh
    @Felipe-hi6nh 3 года назад

    Not working here :/

  • @stargazer7644
    @stargazer7644 4 года назад

    The Ada in Adafruit comes from founder Limor Fried's online handle Ladyada, which in turn comes from the computer science pioneer Ada Lovelace. Ada is pronounced like this: ruclips.net/video/dh43dn9OMfs/видео.html

  • @richardsalazar9954
    @richardsalazar9954 4 года назад

    I'm not sure if you figured out how to plot 3 vectors in a 3D environment but here is an online application that you can pretty much use for illustration purposes of your lesson above for the yaw angle.
    www.geogebra.org/3d?lang=en