2021-01-19 10:52 AM
Hello,
I can succesfully have ready (DRDY) under interrupt (INT1) at low or normal power vfrequencies. Cool.
BUT I do not success in using threshold and duration.
Can anyone, can give me the correct configuration to do this:
In advance many thanks
2021-01-22 03:59 AM
Hi @PGoud ,
since the H3LIDS331DL is a high-g accelerometer, can you please define the threshold you want to set (as we discussed here)?
Please note that the minimum threshold that can be set on this device is FS/2^7 = 1.5g in the +-100g FS case (and it is bigger than the sensitivity / signal LSB), so you have to be sure that your acceleration signal is bigger than 1.5g for at least 5 seconds (50 samples at ODR10Hz).
For a general configuration of the threshold interrupt, you have to use a code similar to below pseudo-code:
1. Write C7h into CTRL_REG1 // Turn on the sensor and enable X, Y, and Z // LP mode ODR = 10 Hz
2. Write 40h into CTRL_REG3 // Interrupt activity 1 driven to INT1 pad
3. Write 00h or 01h into CTRL_REG4 // FS = ±100 g or ±200 g
4. Write XYh into INT1_THS // Threshold = XY * FS/2^7g
5. Write 32h into INT1_DURATION // Duration = 1/=DR * 50 = 5s
6. Write 0Ah into INT1_CFG // Enable for example XH and YH interrupt generation
7. Poll INT1 pad; if INT1=0 then go to 8 // Poll DRDY/INT1 pin waiting for the event
8. Read INT1_SRC // Return the event that has triggered the interrupt
9. (Event has occurred; insert your code here) // Event handling
10. Go to 6
If it still doesn't work, please try the same procedure but on INT2.
-Eleon
2021-01-22 06:59 AM
Thanks for the precisions.
I finally succeded in getting y INT1 interrupt.
But it was touchy when I was working with "small finger taps", at 10 Low Power hz it may be difficult to catch them.
About duration my concluision is that it must always at 0 if you plan to wake up on shocks.
The duration on wakeup should be used only fro long "free fall" events.
Do think that some filter parameters could help using Wakeup from 10Hz Lowpower, with small shocks at, let's say, between 1 to 10 Hz ?
Thanks
2021-01-25 11:44 AM
Hello,
Finally I'm still struggling...
My sensor is set with:
Then without any move the sensor is triggering.
Why ? +3.1G should be over the noise of the sensor ?
I have to set 2 (6,3 G !) to avoid interrupt, and that ok, I've to shake violently my sensor to get an interrupt.
Notice that I also tried with HF filtering activated on INT1 to remove TyOffset ... but still the same it's triggering when threshold is set to 1 !
2021-01-27 04:22 AM
Hi @PGoud ,
>> Do think that some filter parameters could help using Wakeup from 10Hz Lowpower, with small shocks at, let's say, between 1 to 10 Hz ?
It depends on how much small are the shocks... should be at least 2g and during at least a couple of ODRs, or the value you have set in the INT1_DURATION (33h) register.
>> Why? +3.1G should be over the noise of the sensor?
Youi should be able to detect it, is > of the typical zero g level of ±1g.
>> I have to set 2 (6,3 G !) to avoid interrupt, and that ok, I've to shake violently my sensor to get an interrupt.
6.3g is a big shock, but this sensor is designed for such shocks
-Eleon
2021-01-27 04:53 AM
>> Why? +3.1G should be over the noise of the sensor?
>>> Youi should be able to detect it, is > of the typical zero g level of ±1g
Surely I did not explain correctly.
I meant that with
==> it triggs one or several of 'hie'
BUT I expected it should never trig ! (again if i put 2 in threshold it does not trig)
2021-01-27 05:00 AM
Hi @PGoud ,
+-1g is the typical zero-g level, and on some devices it could be higher. Did you tried with other H3LIDS331DL, or by setting the minimum FS of 100g?
for small signal detection, the H3LIDS331DL is definitely not the suggested device... there is plenty of possible other choices with FS below +-16g of +-32g.
-Eleon
2021-01-27 05:18 AM
Hello,
We already use some other LIS (LIS2DE, ...) for low accs.
In that use case we need HIgh G measurement... I'm just minding about an error i can do because here we are to far from the expected "noise" of the sensor.
So my interrogation is also due to the fact that when, with previous parameter, when I read INT1 Status register and Raw Accs, just in the interrupt !
I can obviously see some hie and IA flags activated, but my three accs are really under the 3.1G threshold. ie always less than +/-324 (0x144 is the bigger i've seen) (raw value) which is indeed under 3.1G : (324 * 200 / 2^15) = 1,9 G (or according to ST h3lis331dlreg.c raw to mg: 324* 6.125 = 1918mg)