Skip to main content
Visitor II
October 21, 2018
Question

LIS2DW12 Orientation (Tilt) implementation

  • October 21, 2018
  • 8 replies
  • 1813 views

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
    October 22, 2018

    What exactly is your question? It is not clear?

    erushAuthor
    Visitor II
    October 22, 2018
    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
    October 25, 2018

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

    erushAuthor
    Visitor II
    October 25, 2018
    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
    October 25, 2018

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

    erushAuthor
    Visitor II
    October 25, 2018
    Hello, I have attached 2 images that show the behavior.
    erushAuthor
    Visitor II
    January 16, 2019
    Hello Miroslav, I haven’t see an response from November 2019!
    ST Employee
    January 18, 2019

    Hello, I still don't see the images.