Showing results for 
Search instead for 
Did you mean: 

Usage of lis2dw12 to detect shaking

Associate II


We are developing a device that will be needed to detect a back and forth shaking motion (not too unlike that of a cocktail shaker), sending a interrupt (we cannot afford to use polling unfortunately) to a MCU every time the device experiences a certain threshold of acceleration.

The use case is as follows:

-device is at rest (held in the user's hand)

-the user swings the device in a direction as part of the shaking motion, sensor picks up the comparatively large change in acceleration (exceeding a threshold) and sends interrupt to the MCU, a 1 second timer starts in the MCU and is reset at every interrupt.

-during the shaking motion the device experiences rapid changes in the direction of acceleration, each resulting in an interrupt

-once a sufficient number of interrupts, each no more than 1 second apart, is received, the device turns on a led

Earlier in the development project we have used a LIS2DH and it proved useful for our purposes, unfortunately supply issues forced us to turn toward the LIS2DW12 and, while we have successfully integrated the device, the performance has proved somewhat inferior to the LIS2DH, often requiring multiple shakes or pauses between shakes before the device correctly identified three of such changes in acceleration within one second. Despite numerous reading of the datasheet and application note we are no closer to figuring out a solution.

Could someone more experienced with the sensor help us further with the register configuration or figure out if the device is actually appropriate to the specific task?

Thanks in advance