CAPACITIVE SENSING DOOR / WINDOW DISPLACEMENT DETECTOR
Example implementations include a method, apparatus, and computer-readable medium comprising measuring a capacitance value between two measurement points in a capacitive sensing sensor of a door/window displacement detector, wherein the capacitance value between the two measurement points changes based on a proximity of the two measurement points to a door/window; and determining an open/close status of the door/window based on the capacitance value.
1 . A method comprising:
measuring a capacitance value between two measurement points in a capacitive sensing sensor of a door/window displacement detector, wherein the capacitance value between the two measurement points changes based on a proximity of the two measurement points to a door/window; and
determining an open/close status of the door/window based on the capacitance value.
2 . The method of claim 1 , wherein, when the door/window is open, the capacitance value is lower as compared to when the door/window is closed.
3 . The method of claim 1 , wherein measuring the capacitance value comprises periodically measuring the capacitance value by a microcontroller in the door/window displacement detector.
4 . The method of claim 1 , further comprising determining to operate in a self-calibrate mode associated with an initial installation of the door/window displacement detector.
5 . The method of claim 4 , further comprising:
measuring the capacitance value in at least one open/closed state of the door/window; and
self-calibrating the door/window displacement detector based on the capacitance value measured in the at least one open/closed state of the door/window.
6 . The method of claim 5 , wherein measuring the capacitance value in the at least one open/closed state of the door/window comprises measuring the capacitance value at multiple fully open states and multiple fully closed states of the door/window.
7 . The method of claim 5 , wherein measuring the capacitance value in the at least one open/closed state of the door/window comprises measuring the capacitance value at least at one fully open state, one fully closed state, and one partially open state of the door/window.
8 . The method of claim 1 , further comprising:
recording a history of the capacitance value measured by the door/window displacement detector over a period of time;
detecting a drift over the period of time in the capacitance value measured by the door/window displacement detector; and
re-calibrating the door/window displacement detector to compensate for the drift.
9 . The method of claim 1 , wherein the two measurement points comprise two metal elements comprising a capacitor in the capacitive sensing sensor.
10 . The method of claim 9 , wherein the two metal elements are implemented as patterns in a copper plating on a printed circuit board in the capacitive sensing sensor.
11 . An apparatus comprising:
a memory; and
a processor communicatively coupled with the memory and configured to:
measure a capacitance value between two measurement points in a capacitive sensing sensor of a door/window displacement detector, wherein the capacitance value between the two measurement points changes based on a proximity of the two measurement points to a door/window; and
determine an open/close status of the door/window based on the capacitance value.
12 . The apparatus of claim 11 , wherein, when the door/window is open, the capacitance value is lower as compared to when the door/window is closed.
13 . The apparatus of claim 11 , wherein the processor comprises a microcontroller in the door/window displacement detector, wherein the microcontroller in the door/window displacement detector is configured to periodically measure the capacitance value.
14 . The apparatus of claim 11 , wherein the processor is further configured to determine to operate in a self-calibrate mode associated with an initial installation of the door/window displacement detector.
15 . The apparatus of claim 14 , wherein the processor is further configured to:
measure the capacitance value in at least one open/closed state of the door/window; and
self-calibrate the door/window displacement detector based on the capacitance value measured in the at least one open/closed state of the door/window.
16 . The apparatus of claim 15 , wherein, in order to measure the capacitance value in the at least one open/closed state of the door/window, the processor is configured to measure the capacitance value at multiple fully open states and multiple fully closed states of the door/window.
17 . The apparatus of claim 15 , wherein, in order to measure the capacitance value in the at least one open/closed state of the door/window, the processor is configured to measure the capacitance value at least at one fully open state, one fully closed state, and one partially open state of the door/window.
18 . The apparatus of claim 11 , wherein the processor is further configured to:
record a history of the capacitance value measured by the door/window displacement detector over a period of time;
detect a drift over the period of time in the capacitance value measured by the door/window displacement detector; and
re-calibrate the door/window displacement detector to compensate for the drift.
19 . The apparatus of claim 11 , wherein the two measurement points comprise two metal elements comprising a capacitor in the capacitive sensing sensor, wherein the two metal elements are implemented as patterns in a copper plating on a printed circuit board in the capacitive sensing sensor.
20 . A non-transitory computer-readable medium storing instructions executable by a processor, wherein the instructions, when executed, cause to the processor to:
measure a capacitance value between two measurement points in a capacitive sensing sensor of a door/window displacement detector, wherein the capacitance value between the two measurement points changes based on a proximity of the two measurement points to a door/window; and
determine an open/close status of the door/window based on the capacitance value.