cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DE12 Interrupt configs, Offset correction and ...

green_om_2006
Associate III
Posted on August 15, 2017 at 23:13

Hi,

I'm trying to use LIS2DE12 for position recognition of device, but i faced some strange problems !

1- I didn't find any solution to correct the offset values of X Y Z dimensions ! i.e after soldering the chip, when my device is on a flat surface which X and Y shod be 0 and Z = g, there is some offset (because of mechanical placement of chip or board in device). i.e X = 4, Y = -3 . now i want to adjust X dimension to interrupt after + - 15 degrees movement, but the problem i face is, i can only set one value for both plus and minus values ! means i can't set -4 Threshold and +14 THS !

I only can set i.e 10 in THS register, so X will interrupt on +10 or -10. because of the mechanical offset error, device will interrupt after 6 (4 to 10) steps on positive side but -14 (4 to -10) steps on negative side !

how can i solve this issue ?

i like to be able to set different values for upper or lower values ...

another problem is i didn't see any way to set different values for each dimension interrupts !

I think it's strange, not to be able to set different thresholds for different dimensions !  so what should i do if i want to set 10 THS for X, 20 THS for Y, and 80 for Z i.e ?!!!

I think those are important limitations which couldn't be much problem to enable them in chip design ... 

1 REPLY 1
Miroslav BATEK
ST Employee
Posted on August 16, 2017 at 11:23

To solve you issue with the offset you can enable high pass filter for the interrupt threshold in CTRL_REG2. Then for the interrupt generation only relative change will be evaluated and any static value (offset, gravity) will be omitted.

0690X00000607qTQAQ.png

In LIS2DE12 the threshold is only one and it is used for all three axis X, Y, Z. Is is not possible to set different threshold for each axis.