I have a system mounted on a door. I need to know when the door is open and when it is closed. I'm not able to have a switch on the door or modify the room where thedooris locatedin any way. I am looking at your MMA8453QT product as a solution. If the doo

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I have a system mounted on a door. I need to know when the door is open and when it is closed. I'm not able to have a switch on the door or modify the room where thedooris locatedin any way. I am looking at your MMA8453QT product as a solution. If the doo

785 Views
tomragsdale
Contributor I

I have a system mounted on a door. I need to know when the door is open and when it is closed. I'm not able to have a switch on the door or modify the room where the door is located in any way. I am looking at your MMA8453QT product as a solution. If the door is opened I need an interrupt sent to a microprocessor and again when the door is closed. This may be overkill but it looks like a good solution. How can I use this or another similar sensor to perform this task?

Tags (1)
0 Kudos
2 Replies

511 Views
tomragsdale
Contributor I

Thanks Anthony, Could you please direct me to an application note that covers this application? The FXOS8700 part looks like the perfect solution!

0 Kudos

511 Views
anthonyduhamel
NXP Employee
NXP Employee

Hello Tom,

For this kind of application, using an accelerometer only is not a suitable solution. I highly recommend to add a magnetometer (such as the MAG3110) to your system or a the combo accelerometer+magnetometer device alone (FXOS8700).

The magnetometer can be used to detect the door position (closed and non-closed state only) and the accelerometer to wake-up the system when a motion is detected. This allows to save a lot in the power consumption side. 

An algorithm using the magnetic distance between the closed and the non-closed position can be used to detect if the door is opened or not.

pastedImage_1.png

The algorithm must compute the magnetic distance (modulus on 2 axis) between the reference magnetic position and the current magnetic fields. If the current measurement is located in the reference area (initial position plus threshold radius), the door is assumed closed.
The magnetic distance is defined as:

                  = √(                  −          )²+ (                  −          )²
With:
-            the X magnetic closed door position
-            the Z magnetic closed door position
-                    the X magnetic current door position
-                    the Z magnetic current door position

pastedImage_1.png

If you want more details I can share additional material.

Thanks,

Anthony

0 Kudos