Skip to main content
erush
Associate
Oct 21, 2018 1:48 PM UTC
Question

LIS2DW12 Orientation (Tilt) implementation

I have followed the DT097 (design tip for 6d orientation detection). When I moved from vertical position (face up) and rotated the board around X (or Y) axis the interrupt that I got ia when it is angle-complement of what I have selected e.g. 20 degree when I have selcted 70 degree). When I rotated back then the interupt happened at the angleas was selected e.g. 20 degree.

The registers setting: CTRL2=0xA4, CTRL4=0x80, TAP_THS_X=0x20, CTRL1-0x30, BS_INT_CFG=0x20.

BTW, when I have selcted 4D it works as was expected!

    This topic has been closed for replies.

    8 replies

    ST Employee
    Oct 22, 2018 12:19 PM UTC

    What exactly is your question? It is not clear?

    erush
    erushAuthor
    Associate
    Oct 22, 2018 1:04 PM UTC
    Hi, I tried to implement a tilt application i.e. I want to get an interrupt when the device changes its position from one of the positive or negative X, Y and Z axis as it is illustrated in the DT097 document (see below).

    In fact the 6D interrupt happens not as expected i.e. 70° from Y axis (see the following picture). The first interrupt happens 20° from Y axis and then another interrupt happens when the device is turn back 70° from axis Y.

    When I changed the setting to 4D (TAP_THS_X=0xA0) it works i.e. I’m getting interrupt when the device is less than 70°, however it happens once unless I rotated my device around different axis e.g. X axis!
    ST Employee
    Oct 25, 2018 8:25 AM UTC

    It is standard behavior. The interrupt signal is asserted when the device switches from one orientation to another. The tolerance (angle of cone) of each position is the angle-complement (90°-x) of what you have selected.

    E.g. if you selected 70°, the interrupt will be triggered each time the board is in position 20° far from one of the six position (landscape up, landscape down, face up, face down, portrait right portrait left).

    erush
    erushAuthor
    Associate
    Oct 25, 2018 9:15 AM UTC
    H Miroslave,
    See the following picture that describes what I did. Is it a standard behaver!? When I have selected 4D it works as expected!
    ST Employee
    Oct 25, 2018 12:00 PM UTC

    Can you please try to attach the pictures, they are not visible in your last and previous post.

    erush
    erushAuthor
    Associate
    Oct 25, 2018 1:25 PM UTC
    Hello, I have attached 2 images that show the behavior.
    erush
    erushAuthor
    Associate
    Jan 16, 2019 3:59 PM UTC
    Hello Miroslav, I haven’t see an response from November 2019!
    ST Employee
    Jan 18, 2019 9:22 AM UTC

    Hello, I still don't see the images.