AnsweredAssumed Answered

MAG3110 offset jumps

Question asked by Dennis Gallicchio on Apr 28, 2016
Latest reply on Sep 26, 2017 by Anthony Duhamel

Dear community,


i'm using the magnetometer MAG3110 to monitoring the occupancy of parking places.

The algorithm that calculates the occupancy, computes a value  that has to follow the measurement of RAW when the parking place is free. It has a temperature compensation to be able to follow the RAW measure of the axis.


General information

  • CTRL_REG1 = 0x1A:

  • CTRL_REG3 = 0xA0:

The data acquisition is made every cycle (cycle time can be 8 [s] up to ~1 minute). Between this "sleep period" the Microcontroller turn OFF the power of the sensor.


Generally, the sequence is:

Enable interrupt (to detect boot interrupt), Power ON Sensor, wait 10[ms] (datasheet spec.), disable interrupt, SET CTRL_REG2, SET CTRL_REG1, Start measure timer, Enable interrupt (to detect when measures are ready) , Set watchdog timer 120[ms] (100[ms] +20% of margin), Read Registers, Power OFF Sensor, Disable interrupt and general register Control  (and back to the initial state). Every cycle this procedure is made.



I take this opportunity to ask some questions:

  1. I noticed that during long periods, which rarely happens that some sensors have a jump  of the "offset" value (this can happen on the single axis until on all three). This causes a false detection and the algorithm requires time to react and understand that the change was not caused by the presence of a car. I observed that the jump of the offset, can be caused by an excessive magnetic field which "contaminates" the sensor. However on some sensors should not have been any strong field that caused this jump. What other possible reason can cause this phenomenon? The AUTO_MRST_EN reduces this kind of effect (offset jumps). The "manual" action Mag_RST has the same results as the AUTO_MRST_EN or it is "better" (acts in a different way) if it is exposed to an excessive magnetic field ?Example of jump:Offset_Jump_Example.png
  2. The power supply of the sensor is managed by a mosfet that turn ON/OFF  the MAG3110. I Observed some rare current peaks when the MOSFET switches ON (>100 [mA] for some [us]). Could these short current peaks cause offset jumps?
  3. It is recommended to remove the power to the sensor? If yes, with TM = 1 and AC = 0 (The ASIC will exit standby mode, perform one measurement cycle based on the programmed ODR and OSR setting, update the I2C data registers and re- enter standby mode.) is ideal in case you want to turn off the magnetometer? There is a most recommended configuration in the case we want to turn OFF the power ?
  4. The factory calibration has a temperature compensation. When i analyze data in a place without many changes of magnetic field i can see changing the measures of three axes with the temperature.Could be possible that I see changes with a delta of ~300 (temperature changes ~50 degrees). Example:

Temperature _Vs_Measures.png


Thanks for support and regards,


Dennis G.