Skip to main content
Visitor II
October 29, 2019
Question

LIS3MDL deviates from stable magnetic values ad hoc all of a sudden

  • October 29, 2019
  • 10 replies
  • 2570 views

We are using LIS3MDL in our product to detect cars. Most of the times the magnetic field values are stable. We are using adaptive baselining to derive the baseline field. However we have observed that on an ad hoc basis the magnetic field values suddenly varies significantly even when there is no external influence. As a result of this we get a false positive that a car is present. What could be the reason?

    This topic has been closed for replies.

    10 replies

    ST Employee
    October 29, 2019

    Hi @AMans.1053​ , is it a single data or a small group of consecutive data that are failing, and on which axis? And does the magnetometer gets spontaneously back to its original good behavior? Are you sure there are no magnetic field disturbance in the neighborhoods of the device in that moment? Btw, please check if your issue can be related to this thread. Regards

    Visitor II
    October 29, 2019

    Hi Eleon,

    Thanks for your prompt reply! I am doing a running average of past 30 samples. FAST ODR selected with XYZ axis in high performance mode and single conversion mode. After I read the data checking the DATARDY, I put the mag into power down. The mag does not go back to its original behaviour.

    I read through the link you provided and looks similar to what I am facing. But unsure how lowering the ODR and enabling BDU help?

    Visitor II
    October 30, 2019

    Hi Eleon,

    I was going through some other posts where it was mentioned that performing a SW Reset or Reboot can rectify this issue, as this may be caused by corrupted registers losing the calibration. Please can you confirm if its valid?

    Regards

    Arif

    ST Employee
    October 30, 2019

    Yes it could be, if it is a calibration register related issue. However it unfortunately don't perform for examples an hard iron compensation, in case of the effect of an external electrical field, or in case of unwanted permanent magnetization. Regards

    Visitor II
    October 30, 2019

    Thanks Eleon. If I keep the reset/reboot operation in a loop, will that max out the number of writes the register memory allows?

    Visitor II
    October 31, 2019

    So effectively what I do is per loop iteration (infinite loop), read the XYZ values per loop iteration, after reading the XYZ value I do a REBOOT operation, after REBOOT since it goes to idle state, I then send command to trigger single measurement....

    ST Employee
    October 31, 2019

    I'm wondering if it could be a communication-related issue... which protocol are you using? I2C or SPI? and which the Vdd / Vddio values? Did you applied the proper decoupling capacitors? Regards

    Visitor II
    October 31, 2019

    I am using I2C. Vdd and Vddio are tied to 3.6V and the decoupling caps are as per the reference design.

    ST Employee
    October 31, 2019

    and which pull-up resistors value?

    Visitor II
    October 31, 2019

    13K pull up

    ST Employee
    October 31, 2019

    and how often do you face the "instability" issue?

    Visitor II
    October 31, 2019

    It is pretty adhoc, to the point that its now getting frustrating. I am sure there are no external influences playing here. Please advise what should be done?

    Regards

    Arif

    Visitor II
    November 1, 2019

    Hi Eleon...one more thing that I thought to share with you....the MCU uses a DC-DC converter which is built inside the module. Would this cause this issue?0690X00000ArWlAQAV.png

    Visitor II
    November 1, 2019

    Distance between MCU and MAG is 23mm

    ST Employee
    November 12, 2019

    Hi @AMans.1053​ , the MCU and magnet are quite close, but anyway safe... Is it possible for you to synchronize the magnetometer acquisition and DC-DC converter action in order to check if the issue can be related to a cress-talk between the two chips? Regards