cancel
Showing results for 
Search instead for 
Did you mean: 

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

AMans.1053
Associate II

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?

15 REPLIES 15
Eleon BORLINI
ST Employee

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

AMans.1053
Associate II

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?

AMans.1053
Associate II

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

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

AMans.1053
Associate II

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

AMans.1053
Associate II

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....

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

AMans.1053
Associate II

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

and which pull-up resistors value?