2017-02-03 07:40 AM
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.
#lis3dh2017-02-06 02:32 AM
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:
2017-02-07 12:49 AM
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?
2017-02-07 03:14 AM
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:
I also did an analysis in excel and added moving average:
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.2017-02-07 03:37 AM
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?
2017-02-07 05:45 AM
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.
2017-08-02 08:39 AM
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?
2017-08-12 06:03 AM
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.
2017-08-14 04:11 AM
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.
2017-08-15 11:50 PM
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=falseReadings_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