cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DE12: Movement detection over interrupt question

Simon_
Associate

Hello there,

I have a question about this sensor.

I'll be using it as a low-power device on a PIC, which is most of the time in sleep mode, and will wake up on interrupts from various devices. I want to configure this sensor so it will notify the PIC via interrupt also if some conditions are met.

The conditions are:

  • 1. As long as the sensor stays on "base" position, which can be any orientation, without (relevant) movement, no interrupt should be generated.
  • 2. If the orientation of the sensor changes, e.g if it's lift up/carried around by someone, turned around it's axis, there should be interrupts generated while this happens.
  • 3. If there's a vibration (or sth similar), which remains on for a desired time, interrupts should be generated during this.
  • 4. On short impacts, it would be cool if they could be ignored by the sensor, but not a must, I can do this by Software aswell.
  • 5. I can't/don't want to poll the sensor's values continuously for power saving reasons.

Registers are set as follows for now:

CTRL_REG1 = 0x2F OSD =10Hz, all axis enabled, this should be fine as is

CTRL_REG3 = 0x40 Enable interrupt on movement, should also be fine

INT1_CFG = 0x7F/FF* I'm currently testing combinations here, see below

INT1_THS = 0x03 Changes testwise

INT1_DURATION = 0x01 Changes testwise

*When the combination AOI/6D detection are set, that looks like a useful feature to me. Problem is, the "known zone" is z=1, xy=0, but it's possible the sensor will be in another base position in the final product. Is it possible to change this zone? That would probably be the best solution I can imagine.

Another option might be using the Goto Sleep/return from sleep functions (ACT_ Register), cause this seem to recognize ongoing movement itself. Is it possible to call an interrupt when waking up from sleep?

For testing purposes, I have a dedicated Evaluation Hardware and I use Unico v8.0.1.0 as Test Software.

Hardware is Carrier Board: STEVAL-MKI109V3, Demo Kit: STEVAL-MKI175V1.

I'll add some screenshots, Taken from Unico at 10Hz ODR 2g Full Scale, which shows some examples when the sensor should react. The red lines below indicate there should be one ore more interrupts, green means no interrupt should be generatad.

I will be grateful if someone could give me a hint how to go further 😉

Simon

1 REPLY 1
jonfs2000
Associate II

..