QST QMC5883L 3-Axis Digital Compass and Arduino MCU - The Basics

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 48

  • @TBM_PRODUCTIONS
    @TBM_PRODUCTIONS 2 роки тому

    I have no idea why i got recommended this, but I don't regret it

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому +2

      Thanks! And never regret anything - no need to if it was a good choice, and if it was a bad one call it a learning experience 🙂

  • @johnvine5731
    @johnvine5731 3 місяці тому

    Thanks very much for that. I've been struggling with the QMC for a couple of weeks now. I now understand the calibration process (lightbulb moment!).
    I find most libraries are not at all well commented, and leave the user very much in the dark as to what is truly going on.

    • @robertssmorgasbord
      @robertssmorgasbord  3 місяці тому +1

      I'm happy my video was useful to you 🙂 Anyway, most Arduino libraries are created by people who want to use a specific chip in a specific application. in my opinion we need to be thankful, that those people make their code available, even if it's not very well documented. From experience I know that properly documenting code (e.g. a library) can much more time than coding the thing in the first place.

    • @johnvine5731
      @johnvine5731 3 місяці тому

      @@robertssmorgasbord Yes, you are so right there. I will be more thankful to the library makers in future!
      I'm sure I spend more time writing comments than I do code, so I know what you are saying.

    • @robertssmorgasbord
      @robertssmorgasbord  3 місяці тому

      @@johnvine5731 Yup! Universities/colleges should offer some classes about software documentation. But at least when I was going to university, some 30 years ago, there was no such thing.

  • @eletronic_wisdom
    @eletronic_wisdom 4 місяці тому

    What a wonderful video, thank you so much!

  • @inasyrov7963
    @inasyrov7963 25 днів тому

    Hello, a very useful video. I want to make a compass for my boat on the control panel. At high waves, the readings change. How to exclude slopes?

    • @robertssmorgasbord
      @robertssmorgasbord  23 дні тому

      You need an accelerometer to compensate for the pitch and roll motion. Some day I might make a video about that (no promises). Meanwhile have a look at the MEMSIC MMC5983MA, a much more capable/precise digital compass chip ( ua-cam.com/video/BgSZ5XZTDDg/v-deo.html ).

  • @zyroxiot9417
    @zyroxiot9417 Рік тому

    thanks Robert, great tutorials. 🤝

    • @robertssmorgasbord
      @robertssmorgasbord  Рік тому +1

      You're welcome! And thanks for the praise! BTW I started a series about a much better digital compass. Here's a link to the latest installment: ua-cam.com/video/H1q5SxzyNtA/v-deo.html

  • @electronic7979
    @electronic7979 2 роки тому +1

    Helpful video. I liked it

  • @gillesletourneau
    @gillesletourneau 2 місяці тому

    Hi Robert, thanks for the info on the calibration. I downloaded your code for compass but at North I have the 0 degrees but then I get -1, -2 etc.. on South it stop at 179 then I get -179, -178, -177 etc.

    • @robertssmorgasbord
      @robertssmorgasbord  2 місяці тому

      To be honest, I have no idea what's going wrong. BTW it's not my code 😅 if you want to have a look at my code have a look at "The Details" videos about that chip (first one here ua-cam.com/video/NTDS2Vmnr-4/v-deo.htmlsi=hib-w7Kg9msAigIU ).

  • @mrkiky
    @mrkiky Рік тому

    This has been immensely helpful. Although I am using the HMC version. I couldn't figure out where my extra offset vector was coming from. I thought there were external magnetic fields around, or that my breadboard or header pins were magnetized, or that my sensor was busted. I didn't think they simply need software compensation 😅

    • @robertssmorgasbord
      @robertssmorgasbord  Рік тому

      Yes, those things definitely need some calibration (see the rest of this series up to "QST QMC5883L 3-Axis Digital Compass and Arduino MCU - The Details (5)" ua-cam.com/video/pfMf-4S9yzk/v-deo.html ).
      One question though: Is the HMC as noisy as the QMC? In the end I found the QMC had simply to much noise and drift to be used as a compass.

    • @harrylister804
      @harrylister804 Рік тому

      @@robertssmorgasbord Thanks, for the very good information on this chip. I'm struggling with it in MultiWii 2.3 . I will see if I can initalize it with setCalibration() because Multiwii will not calibrate it.

  • @user-ie4hu2hr6q
    @user-ie4hu2hr6q 4 місяці тому

    Hi Roberto,
    First of all thank you very much for the useful information you shared.
    I have a few questions for you.
    In the Cleaning Robot, I use the location information from this sensor so that the robot can perform automatic operation.
    I process the angle value coming from this sensor using PID control and enable the robot to go on the route I want.
    However, the sensor is very affected by magnetic fields (it is even affected by the phone) and therefore the angle value constantly changes. That's why the system, which works normally for a while, is disrupted due to magnetic effects.
    We used a magnetic protective spray to prevent the sensor from being affected by the magnetic field, but in this case, we could not even calibrate the sensor because the spray protected the device from the magnetic field.
    I have three questions for you.
    1- Do you have any suggestions for this problem? (Solving the sensor being affected by the magnetic field.
    2- Do you have any other sensor suggestions similar to this?
    3- How can I find the angle for this process using the output of an industrial sensor that gives analog x and y axis slopes?
    Thank you in advance for your help.

    • @robertssmorgasbord
      @robertssmorgasbord  4 місяці тому

      These are really interesting questions. First, a disclaimer: I have absolutely no experience with automatic/robotic cleaners/vacuums. With that out of the way ...
      Magnetic/compass sensors of any kind are out of the question for your application. There's no way you can shield/compensate for the changing magnetic fields in the environment.
      As I understand it most robotic vacuums use a combination of sensors: cameras, LIDAR, gyroscopes and accelerometers.
      One chip (that I know of) that combines gyroscopes and accelerometers is the TDK MPU-6050: invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf .
      Anyway, good luck with your project.

  • @matteoandreazza456
    @matteoandreazza456 Рік тому

    hello, great video! can i ask for help?
    i ran the calibration and uploaded the sketch to find the azimuth.
    the serial monitor always prints me about 230 , 233 , 232 etc and if I turn the sensor as if it were a compass the number practically does not change , what can it be ?? thank you

    • @robertssmorgasbord
      @robertssmorgasbord  Рік тому

      Are you sure you're having an QMC5883 and are using a QMC5883 library? There's also the pin, but not software compatible HMC5883 and libraries for the HMC5883 won't work with the QMC5883.

  • @abrahamdeaquino2774
    @abrahamdeaquino2774 11 місяців тому

    Hello Roberto, my question is, with this sensor can we measure the level of the stationary gas?
    please answer

    • @robertssmorgasbord
      @robertssmorgasbord  11 місяців тому +1

      Nope, it's a magnetic sensor, not a gas sensor. That said, if your gas has some magnetic properties (e.g. gas of lithium atoms cooled to 150 billionth of 1 Kelvin) you might be able to work out something.

  • @georgegu3374
    @georgegu3374 11 місяців тому

    great job robert

  • @aaronsantana7077
    @aaronsantana7077 2 роки тому

    Hello, amazing video ¿Do you know if I can get similar data with a HMC5883L?

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому

      First, thanks for the praise! Yes, of course you can get similar (or even better) data with the HMC5883L. But note that the HMC5883L is no longer manufactured by Honeywell. So if somebody is selling you an HMC5883L, chances are it's really an QMC5883L. Though, you might get some new old stock QMC5883Ls - for a price.

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому

      @@joymakerRC Yeah, I've seen that little BN-880 module too. But unless they're sitting on a whole lot of new old HMC5883L stock, they might just solder on the pin compatible (not software compatible) QMC5883L nowadays. However, if you're able to talk to the compass on a BN-880 module using a HMC5883L library, then these modules probably do use the original HMC5883L (or a good enough clone).

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому

      @@joymakerRC I see, so they do have HMC5883Ls on those modules. That's very good to know. You'll find a whole lot more code for the QMC5883L in "The Details" videos (link to the first one in the description). I really think I maxed out on that chip ... and found it lacking for my application (compass direction input for marine chart plotter). Anyway, you have a great day day too!

  • @PhuketExpeditionCAMP
    @PhuketExpeditionCAMP Рік тому

    thanks Robert

  • @markj3851
    @markj3851 2 роки тому

    HI Robert- great video. I have a really good use case for this sensor and wanted to see if you'd be willing to help me develop a solution. I'd like to use the digital compass to measure the 2 dimensional "level" of my motorhome when I arrive at the campsite. Ultimately if I could develop an interface that measures and calculates the up or down adjustments of the 4 corners required to get to a horizontal level. What do you think? Keep the videos coming!

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому +3

      Hi Mark, this is not the sensor you are looking for 😉 No seriously, what you want is a 3-axis accelerometer. Unfortunately the inclination of Earth's magnetic field varies from almost horizontal (at the equator) to basically vertical (at the magnetic poles). So you really can't use a magnetometer to level your RV. But fear not, the next sensor I cover will be probably be a 3-axis accelerometer.

    • @markj3851
      @markj3851 2 роки тому

      @@robertssmorgasbord Looking forward to the next video!

    • @robertssmorgasbord
      @robertssmorgasbord  2 роки тому

      @@markj3851 Which should be published this Sunday (QMC5883L - The Details 1) 😉

  • @sofiafrancis850
    @sofiafrancis850 6 днів тому

    Lopez Edward Moore Shirley Allen Kevin

  • @RoseBurnell-d2p
    @RoseBurnell-d2p 7 днів тому

    Taylor Laura Harris Edward Rodriguez Barbara

    • @robertssmorgasbord
      @robertssmorgasbord  7 днів тому

      Well, I thank you for commenting on my video, but I still don't get it.

  • @HdunshTshsnna
    @HdunshTshsnna 15 днів тому

    Young Sarah Gonzalez Paul Anderson Angela

  • @jaydipkavaiya6854
    @jaydipkavaiya6854 Рік тому

    Thank you for detailing in QMC5883l can I get Version5 code sample so I Can find Magnetic Heading or your Email so I can chat over there. Please

    • @robertssmorgasbord
      @robertssmorgasbord  Рік тому +1

      You're welcome! All versions are available on my Google drive drive.google.com/drive/folders/12kyof0Hg6CITjcA6A3DgAFln-HouaEX8?usp=sharing

    • @jaydipkavaiya6854
      @jaydipkavaiya6854 Рік тому

      @@robertssmorgasbord Thank You!