Razor 9DOF - magnetometer drift


I'm currently building my quad and noticed that I have a lot of motor vibration causing a lot of noise on my IMU data. I use the razor 9dof. And yes I allready read that a lot of poeple don't like this imu for mulitcopter projects because it is sensitive to noise. But I got this imu so I wan't to finish my quad with this one.

When I was looking at the raw data comming from the  HMC5843 (triple-axis, digital magnetometer sensor). I noticed some strange behaviour that I can't explain. I noticed that the data comming from HMC5843 is not sensitive to vibration, because amplitudes stay the same in all cases at all motorspeeds. But when I powerup the motors the data shifts upwards. This happens on al 3 axis (x,y,z)

I think this behaviour will cause drift when I use the AHRS code with DCM calculations. Because the data shifts up lineair to my motorspeed I should be able to hardcode a compensation. But I would like to understand why this happens? someone has en idea?3690920022?profile=original

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Developer

    DC currents - like from the battery to the esc - cause static magnetic fields that will affect the magnetometer.  This is what you are seeing; as you increase the throttle the current increases, and the magnetic field produced by your power system increases.  You need to work on your layout to isolate the magnetometer from unwanted sources of magnetic disturbance.

  • EMF noise caused by the motors. See if you can do a frequency spectrum analysis of it and you may be able to filter it out in software (or even hardware if your have the space).

This reply was deleted.


Laurie J. Troy liked Jasper Kueppers's profile
Apr 1
Timothy Miller liked Joseph Udofia's profile
Mar 18