Hi guys, I’m working on project where I need to detect even the smallest movements of the device to any direction by built-in accelerometer (LIS2DH12) while keeping everything ultra-low-power.
I’m struggling to find out the best configuration for LIS2DH12 and even the datasheet is not very helpful on some values (especially the meaning of threshold and duration parameters of alarms).
I’m attaching configuration where the accelerometer alarm works, but at some angles the alarm is very insensitive - I can move the box by hand over the room easily and the alarm is not triggered.
I’m moving with my project to Hardwario from another platform and I had excellent results with ADXL362 accelerometer; while both datasheets claim very similar sensitivity, I was able to trigger alarm from ADXL362 even with indirect shake, like touching the table on which the device is lying on.
At this point, I don’t know if I’m doing something wrong with LIS2DH12 configuration or it is just the hardware limitation and I’ll need to use another accelerometer like ADXL362. Any thoughts?
Best configuration for alarm I’ve found so far:
Addr 0x30, writing: 0 # disable_irq Addr 0x32, writing: 10 # set_threshold Addr 0x33, writing: 0 # set_duration Addr 0x22, writing: 40 # set_reg3 Addr 0x25, writing: 2 # set_reg6 Addr 0x24, writing: 0 # set_latch Addr 0x30, writing: 7f # set_cfg1 Addr 0x20, writing: 2f # continuous_conversion Addr 0x0f, reading: 51 # who_am_i Addr 0x23, writing: 80 # set_reg4
Thank you in advance for any help!