cancel
Showing results for 
Search instead for 
Did you mean: 

setting up test for wake up options on LIS2DW12

Msaga.1
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions

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ò

View solution in original post

9 REPLIES 9
Eleon BORLINI
ST Employee

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.1
Associate II

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?)

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

Hi @Msaga.1​ ,

to elaborate on Eleon's answer in a very basic way:

with a low pass filter you see only signals that do not change rapidly. It can be used for an inclinometer, where you put your device in place and wait a moment for the signal to stabilize, then the signal does not change with fast vibrations of the surface so you can check the axis and compute the inclination.

On the other side, the high pass filter enables to see only the vibrations (if you are interested in them and not in the static 1g module of the gravity).

The threshold refers to the frequency to cut (in case of the lowpass filter, you select the highest changing frequency of the signals you want to see, for the highpass filter you select the lowest).

Can I ask you were did you read about relative reference and absolute reference?

I only encountered a "reference mode" in my experience.

Hope this helped,

Niccolò

Thank you @niccolo.ruffini​ , so the thresholds are something that I can change as I see fit? where can I find the information on how can I change them?(which registers)

I have found the information here( starting pg3).

Thank you, Maya

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ò

Msaga.1
Associate II

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

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.1
Associate II

Thank you!