cancel
Showing results for 
Search instead for 
Did you mean: 

Are there methods to minimize magnetometer drift over time?

Bauf .1
Associate

Our project is using the ISM303DAC as an E-Compass. In our particular use case the product will be running remotely for several months. Are there any methods we can use to mitigate or minimize any general drift over time?

ST support suggested periodic calibration, however that is not possible in our use case as we will not have access to the device over the several months it is collecting data. We will only have the device beforehand, where we can calibrate it and then after it has finished collecting data for several months.

3 REPLIES 3
Eleon BORLINI
ST Employee

Hi @Bauf .1​ ,

I can say you that the usual ST Sensor reliability profile includes 168h, 500h and 1000h life tests and they are all PASS, so no appreciable drift in time under controlled conditions in these tests.

In the datasheet there is only the temperature drift, since it is the most important environmental variable: if customer monitors the temperature during the magnetometer .

 

>> Recommendations on how to minimize drift over time?

A typical suggestion is to periodically calibrate the magnetometer offset (possibly at the same temperature, or at least in a range close to the environmental temperature), at least for the hard iron effect. The computation of the hard-iron distortion field should be performed by an external processor.

You can refer to the X-CUBE-MEMS1 libraries for this purpose, and in particular to: Getting started with MotionMC magnetometer calibration library in X-CUBE-MEMS1 expansion for STM32Cube - User manual

Here also a design tip on this topic dt0103-compensating-for-magnetometer-installation-error-and-hardiron-effects-using-accelerometerassisted-2d-calibration-stmicroelectronics.pdf

If my reply helped you with your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

Hello Eleon,

Thank you for the response.

I do have some follow-up questions.

  1. Does ST have any recommendations for temperature compensation, or is it just as simple as enabling temperature compensation on the device? (Setting COMP_TEMP_EN to 1)
  2. As I mentioned in the original question, our product will used remotely for several months at a time so we will be unable to do any sort of periodic calibration requiring human interaction. Do you have any other recommendations to reduce drift that can be done autonomously or perhaps a way to correct previous data with some post-use calibration?

Hi @Bauf .1​ ,

  1. This is a good way, since it apply a look up table compensation to the magnetometer data. Of course, a pre-characterization of the specific device's behavior versus temperature would be the most accurate way.
  2. My other suggestion would be to try to find a "pattern" of the magnetic data during a (good) state for which you know the magnetometer is trustily working, after having well calibrated the hard-iron environmental effect (OFFSET_X_REG_L_M (45h), OFFSET_X_REG_H_M (46h) etc registers). From a post-processing comparison with this pattern (and maybe after a frequency analysis), you might understand if the magnetometer was behaving well or not. Not a real time suggestion indeed, but maybe better than nothing...

-Eleon