Magnetometer Errors and Calibration

Поділитися
Вставка
  • Опубліковано 18 сер 2024
  • In this video, I'll explain the various sources of error that affect magnetometer measurements. Then, I discuss how to calibrate your magnetometer sensor with the Magneto calibration software. Good luck!
    Resources:
    Magneto calibration software: sites.google.c...
    GitHub repo with my code: github.com/mic...
    Check out my blog: mwrona.com/
  • Наука та технологія

КОМЕНТАРІ • 60

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

    Unfortunately, the download link for Magneto no longer works. :'( If you know what happened to it, please comment below!

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

      did u find out what happened to it? how can i download it? do u know similar app?

    • @Re-lx1md
      @Re-lx1md 2 роки тому

      If it was freeware you could host a download link yourself!

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

      Here is another link: sites.google.com/view/sailboatinstruments1
      An intereting page that talks a lot calibration: sailboatinstruments.blogspot.com/2011/09/improved-magnetometer-calibration-part.html

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

      unfortunately your GitHub repo link is also no longer works...

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

    Thats the best magnetometer calibration tutorial on the internet! And believe me i was searching for a good explanation for 3 days now. Everything worked as expected according to the instructions. Thank you for the info and the source code!

  • @Re-lx1md
    @Re-lx1md 2 роки тому

    This video is incredibly useful. I'm making a project that requires the compass heading of a device that could be deployed anywhere in the country, so learning how magnetoneters are affected by changes in the local magnetic field and how to account for it has helped emmensly.

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

    very simple calibration and quite accurate -
    ofsetX =(readX_max + readX_min) / 2 ;
    ofsetY =(readY_max + readY_min) / 2 ;
    //calibration correction of measurement data
    Yread =danaY - ofsetY;
    Xread =danaX - ofsetX;

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

    Great video. Very informative!

  • @udenijayasinghe6112
    @udenijayasinghe6112 3 роки тому

    This is really great! Very helpful!

  • @shara6281
    @shara6281 3 роки тому

    very helpful and well explained video. Thank you :)

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

    hello and thank you for this great tutorial! the code link does not seem to be working, can you share a new link please?

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

    @MicWro Engr - I was able to collect the data from NOAA and my magnetometer. Magneto outputs a 3x1 matrix and two different 3x3 matrices. Are all of these needed to accurately calibrate? I don't quite understand the relevance of all of the Magneto 1.2 output and what to do with them.
    How do I apply the 3x3 and 3x1 matrices to my raw magX, magY, magZ readings to? Do you have the math to do this coded in C, C++? I don't do python but I could translate it to my cpp code.

  • @Solangizer
    @Solangizer 3 роки тому

    It's very helpful. Thanks a lot!!

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

    it seems relly good,thanks a lot

  • @ErArjunBala
    @ErArjunBala 3 роки тому +1

    Really Informative Video, Thanks for The Detailed Explanation, Can you explain how we can use those calibrated values in Arduino Code.

    • @micwroengr7851
      @micwroengr7851  3 роки тому +1

      Use the equation I introduce at 8:05. You can check out my code at 15:35 and see how it was used to correct measurements.

    • @ErArjunBala
      @ErArjunBala 3 роки тому

      @@micwroengr7851 thanks for the update

  • @MarkSMays
    @MarkSMays 3 роки тому

    Very helpful. Thanks.

  • @williampixton9023
    @williampixton9023 3 роки тому

    Hi, great video. I notice you took the readings in your bedroom but I assume you will be flying your drone elsewhere. If that is the case, will your readings and the corrections you have applied still be valid where you intend to fly the drone?

    • @micwroengr7851
      @micwroengr7851  3 роки тому +1

      Thanks for watching! It might be okay to use the values from indoors, but I highly recommend calibrating your sensor outdoors away from magnetic and paramagnetic disturbances. I had two steel file cabinets next to me, which definitely affected my calibration. I'll calibrate outside before flight!

  • @Foxie-1
    @Foxie-1 2 роки тому

    6:30 - Could you please advice where to find the "Big math", which describes the way acceleration affects the magnetometer reading?

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

    Thanks for this video. I've been trying to get a magnetometer to give me a compass heading for a while. I did everything in this video but I can never find how to apply the calibration to the raw x and y values.

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

      did you ever find this out? I have exactly the same question.

  • @minhnhatleinh3672
    @minhnhatleinh3672 3 роки тому +1

    Hi, i also try to write the Matlab script to follow your resources but the center of the calibrated magnetometer still far from (0,0,0) around (30,0,40). Do you have any idea about that?

    • @micwroengr7851
      @micwroengr7851  3 роки тому

      Did you apply the calibration parameters to your data using the equation at 8:08?

    • @minhnhatleinh3672
      @minhnhatleinh3672 3 роки тому

      @@micwroengr7851 yes, I applied the matrix from the calibration result (same format like your matrix) but the heading is not correct totally the variance around + - 5 degree

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

    hi! thanks for your great explaination.
    Sorry, I wanna ask how to get the value of A (soft iron, Scale factor)?

  • @aniksahajoy4012
    @aniksahajoy4012 3 роки тому

    very helpful video

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

    Hello, your GitHun is giving me 404 error, So how can i access your HitHun repo
    i Have a question:
    So i want make the magentometer MPU9250 to be able to negate all the magnetic field and only detect the magnets I am trying to apply on it, So I am doing a project that i want to know the orientation of my magnet

  • @ChantOfSpirit
    @ChantOfSpirit 8 місяців тому

    Repo with code is not available

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

    Hi,
    First of all, thank you for this useful video. I am using RM3100 magnetic sensor from PNI company. Unlike conventional mems sensors, it has very sensitive but 3 separate non-coincident coils. Is it possible to calibrate the sensor box with this method?

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

    how to validate the x, y, z,value if its correct or not

  • @TheCowpowah
    @TheCowpowah 3 роки тому

    Hey Michael, great video! I got a question tho: how often do you have to do a calibration? I heard magnetic field was moving...
    I'm trying to make a robot mower, and the compass part is way more difficult than expected... Is it possible for a robot to self calibrate? I mean with the sensor inside the robot, without removing it? (obviously a robot mower can only rotate around the Z axis)

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

      If you assume your vehicle (and compass) are level, you can simply use just the X and Y compass measurements to compute heading: hdng = -atan2(my, mx). To calibrate it, you can rotate the vehicle in a circle and record X, Y, and Z compass data. Then, in Magneto, just use the X and Y biases and the upper-left 2x2 (X and Y data) SF matrix values and divide the diagonal elements by 2 (from ellipsoid equation). That way, you'll get a 2x2 matrix and 2x1 measurement and bias vectors. That should give you a good enough 2D compass calibration. Hopefully that makes sense!

    • @TheCowpowah
      @TheCowpowah 3 роки тому

      @@micwroengr7851 Thank you, Micheal! 👍

    • @michaelwrona1835
      @michaelwrona1835 3 роки тому

      @@TheCowpowah Also, the time variance of Earth's magnetic field is not very much at all. Don't worry about that lol. You should recalibrate when 1) you make a significant structural change to your vehicle, 2) relocate the compass sensor, or 3) when you use the vehicle at a new location.

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

    where's your code?, In github it says page not available

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

    Hi, great video, but you didn't actually mention how to apply the calibration adjustments.

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

    when I plot my uncalibrated measurements in 3d, I dont get a sphere, I get a 2d ellipsoid which is slanted in the z plane. All of my measurements are on one plane. Is this normal?

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

      you should rotate the imu with mag in every direction

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

    Code link doesn't working ,could you fix it

  • @Abaqrino2020
    @Abaqrino2020 3 роки тому

    really it's a fantastic video. but i have one question how can i use this numbers of calibration in the arduino code to get write angle of yaw for example with any 9dof sensor ?

    • @micwroengr7851
      @micwroengr7851  3 роки тому +1

      Check out this article about computing heading from magnetometers, hopefully it helps you out: www.generationrobots.com/media/module%20boussole%203%20axes%20HMC5883L/29133-Compass-Module-Application-Note-2.pdf

    • @Abaqrino2020
      @Abaqrino2020 3 роки тому

      ​@@micwroengr7851 thank you , i read this article and it's very useful for me but i have confused between the offset and the bias and also between the scale factor of magneto and the scale factor that i can calculated by searching for the Xmax,min and Ymax,min . is that any difference ?
      can i use the matrix which we get from the magneto and apply the equation to find the accurate reading of magnetometer sensor ?
      if yes can you guide me how to make it ?

  • @signature445
    @signature445 3 роки тому

    Can you please tell which IMU are you using

    • @micwroengr7851
      @micwroengr7851  3 роки тому +1

      Adafruit's Precision NXP 9-DOF IMU. It has the NXP FXOS8700 accel/compass and FXAS21002 gyro. It's a pretty good sensor for $15! www.adafruit.com/product/3463

  • @40Nif
    @40Nif 2 роки тому

    Hellou, thank you very much for video .. i understood alot by your explanation ... But i am realy new at this and i have absolutely no idea how to use thease numbers whitch Magneto 1.2 generated.
    I am using very standart Adafruit library for HMC5883L Senzor and theres nohing in this code for inputing thease numbers ... just "Magnetic Declination" ... thats it ...i know that i am asking for alot but how do i use thease numbers ... thank you very much.
    Czech republic.

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

      Input your raw magnetometer measurements to the equation at 8:05. Magneto gives you the A-matrix and b-vector values. That equation will return calibrated measurements.

  • @KaarelPaal
    @KaarelPaal 3 роки тому

    Hi, is carbon fiber really paramagnetic? Could you refer to some sources? Thanks.

    • @micwroengr7851
      @micwroengr7851  3 роки тому

      My mistake. I don't think carbon fiber affects magnetometer/compass sensors much (negligible effects), although it does block RF signals. Thanks for the correction!

    • @KaarelPaal
      @KaarelPaal 3 роки тому

      @@micwroengr7851 Oh okay, thanks for replying.

  • @signature445
    @signature445 3 роки тому

    Aweosomeeeee

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

    404 Github link. I think this would have been fun to do, if it was possible to get to the relevant bits

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

    This is one of the biggest baits and scams I've seen with describing IMU XDDD

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

    Magneto (Unverified) : drive.google.com/file/d/1xFDOOaQSMza8PcDdrJCcDIvW02Dkvv9k/view

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

      Thanks for that

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

    www.ngdc.noaa.gov/geomag/calculators/magcalc.shtml#igrfwmm for magnetic field calculator