2019-03-25 09:28 AM
Hi,
I was wondering if anyone had any information on how the 6 direction detection feature that is mentioned in INT_GEN_CFG_XL works. Obviously, to detect movement one would need to detect an acceleration change that can be either positive or negative. And also set a duration so we aren't woke by vibration.
2019-03-26 02:07 AM
hi, you can find some details on the 6D feature working principle checking similar iNemo app notes, for examples the LSM6DSO one (the concept is similar)
The device provides the capability to detect the orientation of the device in space, e.g. for automatic image rotation for mobile devices. Six orientations of the device in space can be detected; the interrupt signal is asserted when the device switches from one orientation to another. The interrupt is not re-asserted as long as the position is maintained. 6D interrupt is generated when, for two consecutive samples, only one axis exceeds a selected threshold and the acceleration values measured from the other two axes are lower than the threshold: the ZH, ZL, YH, YL, XH, XL bits of the INT_GEN_CFG_XL register indicate which axis has triggered the 6D event.
You can set all the mentioned thresholds in registers INT_GEN_THS_X_XL (07h), INT_GEN_THS_Y_XL (08h), INT_GEN_THS_Z_XL (09h), while the interrupt duration can be set from the INT_GEN_DUR_XL (0Ah) register.
Here a brief visual description of the feature:
Regards,
Eleon
2019-03-26 09:15 AM
Btw I suggest you to migrate to LSM6DSO(X) to have enhanced digital features and patter recognition (especially if you don't need the magnetometer (which is your target application, if I can ask?)
2019-03-26 09:38 AM
Hi Eleon,
I think I have a better idea of how this works. Our goal is to detect when we get a linear acceleration in any direction. We are going to be attached to a surface that will not see significant angular change.
If I understand things right we should:
Since XL,YL,ZL go high when less than minus the threshold, we should get an interrupt when the high-passed accelerometer vector leaves a cube with edges at the threshold.
2019-03-26 10:00 AM
if you want to detect if you are moving with an acceleration that exceeds the threshold value on each axis directions, your procedure is ok. I maybe didn't catch well the target app.
btw you also have to set the INT_GEN_DUR_XL (0Ah) if you don't want to be waken up by a vibration (not enough the HP filter)
2019-03-26 04:27 PM
Are the [X,Y,X]-axis high and low event interrupts triggered by magnitude? While sitting on my desk, if I enable all the low interrupts the unit continuously interrupts. Where if I only have all the highs on it seems that I get the behavior I want, triggering on an acceleration change in any direction.
Also do you know what the cuttoff frequency is when CTRL_REG7_XL.HPIS1 is 1? And is it possible to view this signal? I've tried setting CTRL_REG7_XL.FDS to 1, but I've had no luck.
2019-03-28 09:31 AM
are you filtering the gravity acceleration? if you are flat and you sense the g acceleration and the axis interrupts are in AOI and the threshold is less than 1g you will get an interrupt due to the gravity along z. But if you select the HPF in CTRL_REG7_XL reg should be ok... the HPF should be around 1Hz. regards