2019-10-29 01:53 AM
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?
2019-10-29 03:02 AM
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
2019-10-29 04:07 AM
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?
2019-10-30 02:51 AM
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
2019-10-30 04:39 AM
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
2019-10-30 05:02 AM
Thanks Eleon. If I keep the reset/reboot operation in a loop, will that max out the number of writes the register memory allows?
2019-10-30 10:57 PM
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....
2019-10-31 01:53 AM
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
2019-10-31 02:08 AM
I am using I2C. Vdd and Vddio are tied to 3.6V and the decoupling caps are as per the reference design.
2019-10-31 02:11 AM
and which pull-up resistors value?