cancel
Showing results for 
Search instead for 
Did you mean: 

6D orientation detection with LIS3DH

Gian Luigi Baldini
Associate II
Posted on February 03, 2017 at 16:40

Hi all,

I'm using a LIS3DH accelerometer and I would like to detect the device orientation in the space. According to the specifications I could do this by means of the 6D orientation detection function, but I'm not getting any result. Can anyone tell me which is the correct setting of the registers of the LIS3DH in order to use the 6D orientation detection function?

Thanks to everybody who can help.

#lis3dh
9 REPLIES 9
Miroslav BATEK
ST Employee
Posted on February 06, 2017 at 11:32

Please read Chapter 6 - 6D/4D orientation detection in application note

https://my.st.com/resource/en/application_note/cd00290365.pdf

.

You can see example of 6D orientation settings in following picture:

0690X00000606FkQAI.png
Posted on February 07, 2017 at 08:49

Thank you for your answer, Miroslav.

Actually, what I'm trying to do is to detect the movement of a sliding door along a linear path.

Is this possible by using the LIS3DH or is this beyond the scope of the accelerometer?

I'm afraid that, dealing with gravitational acceleration, a linear move doesn't generate any change on the three axes, so I can't detect anything. Am I wrong?

Posted on February 07, 2017 at 11:14

Hello,

in principle it is possible to detect movement of sliding doors. The gravitation acceleration will be in perpendicular axis to the door movement, so it is not a problem.

I did quick test with automatic doors in our office (stick accelerometer on sliding door record the acceleration), here you can see the results:

0690X000006067IQAQ.png

I also did an analysis in excel and added moving average:

0690X00000605vSQAQ.png

I can imagine that this could be used for example to make counter of door opening.

I don't know what exactly is your target, in any case you will have measure acceleration of your doors, because each door can generate different pattern.
Posted on February 07, 2017 at 11:37

Hello Miroslav,

my target are mainly manually operated doors, not only sliding doors but also swing doors. The goal is to swicth lights on upon opening detection. 

I got results by monitoring the z axis, as you suggest (assuming that the LIS3DH plane is parallel to the plane of the door), but the problem is that I have to keep the detection threshold very low (INT1_THS as low as 0x03) in order to detect movement. However, in this condition the device becomes very sensitive to acoustic noise, like hand claps and also music.

Did you ever face the problem of shielding the accelerometer against acoustic noise?

Posted on February 07, 2017 at 13:45

I would recommend you to monitor all axis from the accelerometer and try to find the best axis (or combination of axis) for the detection.

In case of swing doors there will be two forces, centrifugal force and tangential force. Maybe you will need to do some data processing in a microcontroler, because embedded feature of the LIS3DH won't be suitable for your needs.

Concerning the acoustic noise, I don't have any experience with solving this problem. But I suppose the door creates quite big area which capture the acoustic waves and transfer them to accelerometer. So I would try to isolate the acceleromter from the door with some foam or malleable material.

Posted on August 02, 2017 at 15:39

Hi Gian, could you provide sensor settings? I have requirement same type of application and I have tried with my self also and got the interrupt also when door is moving but door is completely open/close decision is not understand. So, on which basis we have to decide that door is full open,half open or fully close?

Posted on August 12, 2017 at 13:03

Batek.Miroslav

‌ Hi Miroslav,

Can you please share how did you analyze the accelerometer readings & how did you identified the movement of the door as 'open' or 'close' as you have shown in your graphs.

Kindly help me out to understand this...

Thank you.

Posted on August 14, 2017 at 11:11

The decision if the sliding doors are opening or closing was made by the sign of the acceleration at the beginning of the movement.

According to sensor orientation the sign will be positive when opening and negative when closing or vice versa.

I recommend you to make a trial, record the acceleration data and make the analysis offline.

Posted on August 16, 2017 at 06:50

Thank you for your reply Miroslav!

Observed the scenario with LIS2DE12 accelerometer that the sign is negative when the door is closed, & it tends to be positive when the door is opened.

Please find the accelerometer readings observed with the different position of the device with 6D enabled.

Thank you.

________________

Attachments :

Readings_1(Z high).jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyV4&d=%2Fa%2F0X0000000b8j%2F8jLEf52GRl2BhELIbftYM030ltRYvrow8DI4p3_wxWc&asPdf=false

Readings_2(x high).jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyUz&d=%2Fa%2F0X0000000b8i%2FWxPeh33qASvlWr6FKUYg4qNnbnq9QL2H6sxKEHfH0OI&asPdf=false