Skip to main content
Visitor II
April 29, 2021
Solved

setting up test for wake up options on LIS2DW12

  • April 29, 2021
  • 4 replies
  • 2038 views

Hello, I want to set up checks for HP filter mode, relative reference mode and absolute reference mode in the device LIS2DW12(according to the document ST released.

However I do not understand how should I see the difference between the modes.

Can you reference me to a document explaining the difference between the modes?

Thank you

Maya

    This topic has been closed for replies.
    Best answer by niccolò

    Hi @Msaga.1​ ,

    for the cut-off frequencies of the HP and LP filters, you need to change bits BW_FILT[1:0] of register CTRL6 (25h).

    you can refer to Table 41 (Digital filtering cutoff selection) on page 42 of the datasheet.

    the values are dependent from the ODR value, so you have to keep that into consideration when selecting your cut-off frequency.

    regarding the two reference modes, I was not aware of those definitions, but I now understand what they mean.

    the absolute reference mode is designed to have the "sleep position" set manually by the user, changing the values of X_OFS_USR, Y_OFS_USR and Z_OFS_USR registers.

    with relative reference mode you need to place the sensor in your "sleep position" and then set the HP_REF_MODE bit of register CTRL7. now that is the "sleep position" and if you move it from that position you trigger the wake up interrupt (if set up properly).

    I hope this is clearer now, but feel free to ask more precise questions =)

    Niccolò

    4 replies

    ST Employee
    April 30, 2021

    Hi Maya @Msaga.1​ ,

    you might be then interested in the application note AN5038, p. 12:

    The high-pass filter can be configured in reference mode by setting the HP_REF_MODE bit in the CTRL7 register to 1. In this configuration the output data is calculated as the difference between the measured acceleration and the output values captured when reference mode was enabled. In this way only the difference is applied without any filtering.

    This picture is probably mote explicative: 

    0693W00000AN0fjQAD.pngAn example related to the wake up feature is then explained:

    This feature can be combined with the wake-up functionality described in Section 5.4 in order to detect when the device is displaced with respect to a specific orientation, i.e. the orientation of the device when the HP_REF_MODE bit was set to 1. When the output acceleration exceeds the wake-up threshold defined by the WK_THS[5:0] bits in the WAKE_UP_THS register for a duration longer than the one defined by the WAKE_DUR[1:0] bits in the WAKE_UP_DUR register, an interrupt is generated. If the device is moved back to the original reference orientation, the interrupt is deactivated.

    If my reply answered your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster. 

    -Eleon

    Msaga.1Author
    Visitor II
    May 2, 2021

    Thank you for the answer Eleon,

    However I still do not understand the difference between relative reference and absolute reference modes, what is the propose of each mode?

    And as for High pass flite; I read that the high pass filter can isolate the linear acceleration and a low pass filter can help isolate the gravity, what is the difference between the high pass and low pass mode , (is there a threshold difference?)

    ST Employee
    May 3, 2021

    Hi @Msaga.1​ ,

    the difference between the two "high pass filter modes" (i.e. with reference mode enabled and disabled) are depicted in the figure above:

    • Case high-pass filter reference mode disabled (default): the output signal is filtered from the DC component and from the slow varying components up to the HP cut-off frequency (according to the configuration of the CTRL6 (25h), datasheet p.42);
    • Case high-pass filter reference mode enabled: the DC component is removed with reference to the moment in which this configuration has been enabled, but the slow variation in the acceleration are still there; you can use this configuration when the signal you want to detect is at very low frequency but not constant in time. In particular, this mode uses the Reference block depicted in the block diagram of the datasheet, p.3.

    Is it clearer now?

    -Eleon

    Msaga.1Author
    Visitor II
    May 3, 2021

    Hi @niccolo.ruffini​ ,

    so the absolute reference mode is the position in relation to the earth?

    if in the relative reference mode  if you move it from that position you trigger the wake up interrupt (if set up properly)., so how do i trigger the wakeup interrupt in absolute reference mode?

    maya

    ST Employee
    May 3, 2021

    Hi maya @Msaga.1​ ,

    absolute reference is absolute in the sense that the still state is given as absolute by the user (through the registers X/Y/Z_OFS_USR), while the relative reference is relative in the sense that the sensor senses the still state itself.

    for the relation with the earth, you can think at the HP filter as the filter that takes out the information of the position in relation to the earth, because without DC component you can't know the inclination of the sensor.

    in absolute reference mode the interrupt is triggered whenever the sensor is not in the position defined by the X/Y/Z_OFS_USR registers.

    the main difference is the way the "still state" or "sleep position" is defined.

    other small differences are defined by other registers settings.

    Niccolò

    Msaga.1Author
    Visitor II
    May 3, 2021

    Thank you!