Patent Description:
Generally, a contact sensor, such as a "Door/Window Contact," may detect an "Open/Close" event or status of a door or window. For example, a contact sensor may use a reed switch placed adjacent to a permanent magnet such that the "ON/OFF" status of the reed switch changes with a relative movement of the permanent magnet with respect to the reed switch. However, an intruder may attempt to tamper with the contact sensor by placing a second permanent magnet adjacent to the reed switch to change or alter the total magnetic field that affects the operation of the reed switch such that the relative movement of the original permanent magnet no longer affects the "ON/OFF" status of the reed switch.

Some known contact sensors detect such tampering attempts by adding additional reed switches close to the main reed switch. As such, one of the additional reed switches changes status if an intruder introduces an additional tampering magnet. However, these known contact sensors are unreliable, costly, and take up a lot more space. Accordingly, more reliable and cost-effective contact sensors are needed. <CIT> discloses a window sensing device with movement detection. It enables use of a window sensing arrangement to provide an indication even when a window sash that is open is moved, while an alarm system is armed. The window sensing device includes an accelerometer configured to sense movement of a window sash in a given direction. A magnetic sensor is configured to sense presence of a magnet when the window sash is in a closed position. An electronic controller outputs a normal state wireless signal when the magnetic sensor senses the magnet and outputs an alarm state wireless signal when the magnetic sensor does not sense the presence of the magnet.

Aspects of the present disclosure provide a contact sensor that uses two magnetic field sensors, such as Hall effect sensors, that are placed adjacent to a permanent magnet to: (<NUM>) detect an "Open/Close" event or status of a door or window, and (<NUM>) determine whether the contact sensor has been tampered with by adding a masking magnetic field.

In an implementation, for example, the present disclosure includes a contact sensor comprising: a permanent magnet; a first magnetic field sensor configured to make a first measurement of a magnetic field induced by the permanent magnet; a second magnetic field sensor configured to make a second measurement of the magnetic field; and a computing device in communication with the first magnetic field sensor and the second magnetic field sensor, the computing device configured to execute an "Open/Close" function based on at least one of the first measurement or the second measurement, and configured to execute a "Masking" function based on the first measurement and the second measurement, wherein the permanent magnet is movable between a first magnet position and a second magnet position, wherein a sensing direction of the first magnetic field sensor and the second magnetic field sensor is substantially in parallel to a magnetic field axis of the permanent magnet when the permanent magnet is at the first magnet position, and wherein the first magnetic field sensor and the second magnetic field sensor are positioned along an axis that is substantially perpendicular to the magnetic field axis of the permanent magnet when the permanent magnet is at the first magnet position.

In some instances, well known components may be shown in block diagram form in order to avoid obscuring such concepts.

Aspects of the present disclosure provide a reliable contact sensor that includes two magnetic field sensors, such as Hall effect sensors, that make two respective measurements of a magnetic field induced by a permanent magnet. The contact sensor uses the measurements of the magnetic field sensors to detect an "Open/Close" status of a door/window and also to detect a masking status, e.g., to recognize if a tampering or masking permanent magnet is introduced to tamper with the contact sensor. In an aspect, for example, the contact sensor may be a "Door/Window Contact.

According to the invention the two magnetic field sensors have a fixed position relative to one another, and have a sensing direction that is parallel to a direction of the magnetic field of the permanent magnet. Further, to enhance the masking detection capabilities by enabling easier detection of masking attempts, the contact sensors may be calibrated such that the two magnetic field sensors have their highest magnetic field measurements in response to the permanent magnet being in a closed position of the window or door.

The presently disclosed aspects may be applicable to any system that indicates a status of two components that move relative to one another, such as a security system that indicates an open/close status of entrance doors/windows, a home automation system that indicates an open/close status of entrance doors/windows and/or home appliance doors/windows, etc..

Turning now to the figures, example aspects are depicted with reference to one or more components described herein, where components in dashed lines may be optional.

Referring to <FIG>, one example of a contact sensor <NUM> includes a first magnetic field sensor <NUM> and a second magnetic field sensor <NUM> configured to make respective measurements of an adjacent magnetic field, wherein at least one of the magnetic field measurements is used to make an "Open/Close" decision regarding a corresponding door/window <NUM>, and at least one or both of the magnetic field measurements are used to make a "Masking" decision regarding an attempt to tamper with the contact sensor <NUM>. The first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be, for example, Hall effect sensors, microelectromechanical systems (MEMS) - based magnetic field sensors, or any other type of magnetometer. The contact sensor <NUM> includes a permanent magnet <NUM> attachable to a first door/window component <NUM> of the door/window <NUM>, wherein the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positionable adjacent to and opposing the permanent magnet <NUM> on a second door/window component <NUM> of the door/window <NUM>. According to the invention the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> have a fixed position relative to one another, and have a sensing direction <NUM> that is substantially parallel to a magnetic field axis <NUM> of the permanent magnet <NUM>. Further, the contact sensor <NUM> may be calibrated such that the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> have their highest magnetic field measurements in response to the permanent magnet <NUM> being in a closed position of the door/window <NUM>.

In an aspect, the first door/window component <NUM> may be a movable component of the door/window <NUM>, and the second door/window component <NUM> may be a door/window frame movably holding the first door/window component <NUM>. However, in an alternative aspect, the second door/window component <NUM> may be a movable component of the door/window <NUM>, and the first door/window component <NUM> may be a door/window frame movably holding the second door/window component <NUM>. In an aspect, for example, the first door/window component <NUM> may be hinge-ably attached to the second door/window component <NUM> and therefore may be movable with respect to the second door/window component <NUM> in a rotational direction along the hinge. Alternatively, the first door/window component <NUM> may be slide-ably attached to the second door/window component <NUM> and therefore may be movable with respect to the second door/window component <NUM> in a sliding direction in parallel to a plane where the first door/window component <NUM> and the second door/window component <NUM> extend.

It should be noted that the aforementioned are only some non-limiting example aspects, and the first door/window component <NUM> may be movable with respect to the second door/window component <NUM> in other ways. In some non-limiting aspects, for example, the door/window <NUM> may be a door that opens by a movement in a Z axis direction, may be a roller door that moves up/down in a Y axis direction, or may be a sliding door/window that opens in an X axis direction.

In either alternative aspect, a relative movement of the first door/window component <NUM> with respect to the second door/window component <NUM> may cause a relative movement of the permanent magnet <NUM> with respect to the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>. This relative movement causes a change in the magnetic field measurements made by the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>. For example, the permanent magnet <NUM> may move between a closed position and an open position relative to the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>. For instance, the closed position may be one of a plurality positions of the permanent magnet <NUM> that is closest to the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>. Similarly, the open position may be one of the plurality positions of the permanent magnet <NUM> that is different from the open position. Accordingly, the contact sensor <NUM> may detect an "Open/Close" status of the door/window <NUM> based on the magnetic field measurements made by at least one of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>.

For example, in an aspect, the contact sensor <NUM> may detect an "Open" status of the door/window <NUM> when the magnetic field measurements made by the first magnetic field sensor <NUM> is below an "Open" magnetic field threshold, and may detect a "Close" status of the door/window <NUM> when the magnetic field measurements made by the first magnetic field sensor <NUM> is above a "Close" magnetic field threshold. In an aspect, the "Open" magnetic field threshold may be substantially the same as the "Close" magnetic field threshold. In an alternative aspect, the "Open" magnetic field threshold may be smaller than the "Close" magnetic field threshold to allow for an "Open/Close" measurement tolerance.

In an aspect, for example, the "Open" magnetic field threshold and the "Close" magnetic field threshold may be fixed and pre-defined values that are pre-programmed (e.g., as hard-coded software) in the contact sensor <NUM> and indicate magnetic field strength values corresponding to "Open" and "Close" positions of the door/window <NUM>. In an aspect, the "Open" magnetic field threshold and the "Close" magnetic field threshold may be obtained as a result of research and development tests and/or may be set to meet standards requirements (e.g., Underwriters Laboratories (UL) requirements). In these aspects, the "Open/Close" decision may be decided when a magnetic field measurement is below/above a corresponding pre-defined threshold value. In an aspect, during installation, an installer positions the permanent magnet <NUM> on the first door/window component <NUM> and positions the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> opposing the permanent magnet <NUM> on the second door/window component <NUM>, such that the contact sensor <NUM> correctly indicates an "Open/Close" status of the door/window <NUM> based on the fixed, pre-defined, and pre-programmed "Open" and "Close" magnetic field thresholds that meet standards requirements. In addition, the installer may perform the positioning of the permanent magnet <NUM>, the first magnetic field sensor <NUM>, and the second magnetic field sensor <NUM> relative to one another to assure proper "Masking" detection. For example, as described below with reference to some non-limiting aspects that include the sensor board <NUM>, the installer may install the permanent magnet <NUM> and the sensor board <NUM> such that when the door/window <NUM> is closed the sensor board <NUM> is aligned with the center of the permanent magnet <NUM> and is equidistant from a North pole end and a South pole end of the permanent magnet <NUM>. Subsequently, in a second phase of the installation process and while the door/window <NUM> is closed, the contact sensor <NUM> may execute a calibration process to "learn" and calibrate the thresholds for making "Masking" decisions. Further details of the calibration process are described below with reference to <FIG>.

In some alternative aspects, however, the "Open" magnetic field threshold and the "Close" magnetic field threshold may not be pre-defined and may instead be set during a calibration process after the permanent magnet <NUM> is positioned on the first door/window component <NUM> of the door/window <NUM> and the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned opposing the permanent magnet <NUM> on the second door/window component <NUM> of the door/window <NUM>. For example, the calibration process may include obtaining at least a first calibration magnetic field measurement made by the first magnetic field sensor <NUM> (and/or the second magnetic field sensor <NUM>) with the permanent magnet <NUM> mounted to the first door/window component <NUM> and in a "closed" position, and, optionally, a second calibration magnetic field measurement made by the first magnetic field sensor <NUM> (and/or the second magnetic field sensor <NUM>) with the permanent magnet <NUM> mounted to the first door/window component <NUM> and in an "open" position. In some aspects, the "Masking" decision may similarly be based on corresponding "Masking" threshold values that are set during installation in the calibration process. Further details of the calibration process are described below with reference to <FIG>.

In an aspect, only one of the first magnetic field sensor <NUM> or the second magnetic field sensor <NUM> is used to make the "Open/Close" decision in order to conserve battery consumption. In an alternative aspect, however, respective pre-defined "Open" and "Closed" values may be determined for each one of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>, and both of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be used to make the "Open/Close" decision.

In an aspect, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned in a pre-determined distance relative to one another, and having the sensing direction <NUM> substantially parallel to the magnetic field axis <NUM> of the permanent magnet <NUM>. In an aspect, the first magnetic field sensor <NUM>, the second magnetic field sensor <NUM>, and the permanent magnet <NUM> are positioned such that when the door/window <NUM> is closed, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> have their highest sensitivity to the magnetic field induced by the permanent magnet <NUM>. Such relative positioning of the first magnetic field sensor <NUM>, the second magnetic field sensor <NUM>, and the permanent magnet <NUM> may be obtained during the installation of the contact sensor <NUM>, and may result in easier detection of masking attempts.

For example, in one example aspect as illustrated in <FIG>, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are both positioned to have their highest sensitivity to magnetic fields in the direction of the Y axis. That is, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are both positioned such that the sensing direction <NUM> of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is substantially parallel to the Y axis. Further, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned relative to the permanent magnet <NUM> such that when the door/window <NUM> is closed, the magnetic field induced by the permanent magnet <NUM> at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is also substantially parallel to the Y axis. Thus, the sensing direction <NUM> of both the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is substantially parallel to the magnetic field axis <NUM> of the permanent magnet <NUM> in the closed position. It should be understood that although both the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are illustrated as being at a given Z axis height in <FIG>, they may be located at any height, preferably at which their magnetic field measurements in the closed position of the permanent magnet <NUM> are at a maximum value.

In an aspect, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned such that when the door/window <NUM> is closed, the sensing direction <NUM> of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is substantially parallel to a magnetic field axis <NUM> of the permanent magnet <NUM>. However, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be positioned such that when the door/window <NUM> is closed, the sensing direction <NUM> of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is either the same as or the opposite of the magnetic field direction along the magnetic field axis <NUM> of the permanent magnet <NUM>. In either case, the direction of the magnetic field of the permanent magnet <NUM> may be accounted for during calibration.

In one implementation, for example, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may have their highest sensitivity to the magnetic field of the permanent magnet <NUM> when the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned in a same plane that is perpendicular to the magnetic field axis <NUM> of the permanent magnet <NUM> in the closed position of the door/window <NUM>, and when the same plane is aligned with a center of the permanent magnet <NUM>, e.g., equidistant between a South pole and a North pole on the magnetic field axis <NUM> of the permanent magnet <NUM>. Also in addition to being in the same plane, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are positioned along a same axis (such as at a same Z axis height) perpendicular to a plane containing the magnetic field axis <NUM> of the permanent magnet <NUM> in the closed position of the door/window <NUM>. Thus, with this same plane and same height arrangement, the magnetic field values measured by the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are maximal with the permanent magnet <NUM> in the closed position of the door/window <NUM> during calibration. As a result, when the door/window <NUM> is closed, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> have their highest sensitivity to the magnetic field induced by the permanent magnet <NUM> when the door/window <NUM> is closed. Further, since the magnetic field values measured by the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are maximal with the permanent magnet <NUM> in the closed position of the door/window <NUM>, any increase in such measured values may be detected by the contact sensor <NUM> as a masking attempt.

It should be understood, however, that various fixed arrangements of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are possible depending on the sensor type used and/or the manufacturing of the sensor enclosures. For example, in one non-limiting implementation, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be sensors that have their highest sensitivity to magnetic fields in the direction of the Y axis when the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are installed "flat" on a device board <NUM> that is attachable to the second door/window component <NUM>. In this case, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be directly installed on the device board <NUM>. However, in an alternative non-limiting implementation, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be sensors that have their highest sensitivity to magnetic fields in the direction of the Y axis when the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are mounted on a sensor board <NUM> that is perpendicularly attachable to the device board <NUM>, where the device board <NUM> is attachable to the second door/window component <NUM>. Further details of the aspects that implement the sensor board <NUM> are described below.

In an aspect, the device board <NUM> includes an electronic board such as a printed circuit board (PCB). In an aspect, the device board <NUM> houses a computing device <NUM>, such as a microcontroller, that is configured to receive magnetic field measurements from the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> to make an "Open/Close" decision regarding the door/window <NUM> and/or a "Masking" decision regarding the contact sensor <NUM>.

In aspects that include the sensor board <NUM>, the device board <NUM> may substantially extend in an X-Y plane, and the sensor board <NUM> may substantially extend in an X-Z plane. In a non-limiting example aspect, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are substantially aligned along the X axis on the sensor board <NUM>. When the door/window <NUM> is closed, the magnetic field axis <NUM> of the permanent magnet <NUM> substantially extends along the Y axis, regardless of the polarity or direction of the magnetic field axis <NUM>, and the sensor board <NUM> is positioned substantially against the center of the permanent magnet <NUM> to allow for maximal measurement of the magnetic field of the permanent magnet <NUM> by the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>.

In an aspect, the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> may be positioned, either on the device board <NUM> or on the sensor board <NUM> as applicable, with a known distance apart from each other, and the distance between the first magnetic field sensor <NUM> and the center of the permanent magnet <NUM> may be smaller than the distance between the second magnetic field sensor <NUM> and the center of the permanent magnet <NUM>. Accordingly, the magnetic field of the permanent magnet <NUM> may be stronger at the location of the first magnetic field sensor <NUM> as compared to the location of the second magnetic field sensor <NUM>. Further, as the door/window <NUM> opens, the magnetic field of the permanent magnet <NUM> may decrease at the location of the first magnetic field sensor <NUM> and at the location of the second magnetic field sensor <NUM>.

In an aspect, the distance between the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>, either on the sensor board <NUM> or on the device board <NUM> as applicable, may be set according to the performance/features/sensitivity of the sensor types selected for the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>, which may be Hall effect sensors.

In an aspect, at least some calibration may be performed during manufacturing of the contact sensor <NUM>. For example, as explained above, predefined open/close values or thresholds may be set during the manufacturing process.

In an aspect, the installation of the contact sensor <NUM> includes a calibration process. For example, in an aspect, the masking thresholds may be set during a calibration phase during the installation of the contact sensor <NUM>. For instance, when the door/window <NUM> is closed, the positioning of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is adjusted such that they each have a respective maximum magnetic field measurement.

The calibration process may be performed based on readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> and based on a known polarization of the magnetic field induced by the permanent magnet <NUM>. In an aspect, the calibration process is conducted based on reading the readouts, and/or recording the readouts, of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> when the door/window <NUM> is closed, e.g., the permanent magnet <NUM> is in the closed or calibration position. In cases where masking-related calibration is also performed during manufacturing, the installation on a door or window may be simulated through use of a calibration fixture, which can have similar mounting arrangements/configuration, and, optionally, similar movements, as a real door or window. As such, the contact sensor <NUM> may be mounted onto the calibration fixture for masking-related calibration. The calibration process may include measuring and recording a polarity of the permanent magnet <NUM> when the door/window <NUM> is closed. The calibration process may further include measuring and recording a magnetic field induced by the permanent magnet <NUM> at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> when the door/window <NUM> is closed. Further details of the calibration process are described below with reference to <FIG>.

In aspects that include the sensor board <NUM>, the contact sensor <NUM> may be installed according to an installation process including, for example, assembling the sensor board <NUM> and the device board <NUM> on the second door/window component <NUM> such that the sensor board <NUM> extends on the X-Z plane and is perpendicular to the device board <NUM> which extends on the X-Y plane, and that the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> are aligned along the X axis. The installation process may further include assembling the permanent magnet <NUM> on the first door/window component <NUM> such that the when the door/window <NUM> is closed, the magnetic field axis <NUM> of the permanent magnet <NUM> substantially extends along the Y axis, and the sensor board <NUM> is positioned substantially against the center of the permanent magnet <NUM>.

In an aspect, the above installation steps may be verified based on readouts of the permanent magnet <NUM> and the second magnetic field sensor <NUM>. In an aspect, if the magnetic field values measured by the permanent magnet <NUM> and the second magnetic field sensor <NUM> during installation are not within a pre-defined window for each of sensor, the installation is determined to have failed.

In an aspect, the readouts of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM> may be compared against respective recorded values that have been determined during the calibration process, in order to make a "Masking" decision indicating whether an additional permanent magnet is applied to tamper with the contact sensor <NUM>. For example, in an aspect, a first tampering permanent magnet <NUM> or a second tampering permanent magnet <NUM> may be placed in the vicinity of the contact sensor <NUM> to tamper with the "Open/Close" decision determined by the contact sensor <NUM>. For example, the first tampering permanent magnet <NUM> may be placed close to the permanent magnet <NUM> and/or the second tampering permanent magnet <NUM> may be placed close to the device board <NUM> to affect the readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>.

In an aspect, if the first tampering permanent magnet <NUM> is placed with an opposite magnetic polarization compared to the permanent magnet <NUM>, the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is reduced, and the "Open/Close" function of the contact sensor <NUM> may indicate that the door/window <NUM> has been opened. However, in some optional aspects, if the contact sensor <NUM> has already received an indication that the door/window <NUM> is locked, for example, based on another sensor indicating a "Door Locked" status, the contact sensor <NUM> may compare the aforementioned reduced readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective calibrated thresholds to make a "Masking" decision indicating the tampering.

Similarly, if the second tampering permanent magnet <NUM> is placed with an opposite magnetic polarization compared to the permanent magnet <NUM>, the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is reduced, and the "Open/Close" function of the contact sensor <NUM> may again indicate that the door/window <NUM> has been opened. However, the reduction in the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> due to the second tampering permanent magnet <NUM> may be substantially different than the reduction in the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> due to the door/window <NUM> opening. For example, if the second tampering permanent magnet <NUM> is placed with an opposite magnetic polarization compared to the permanent magnet <NUM>, the reduction in the readout of the second magnetic field sensor <NUM> may be greater than the reduction in the readout of the first magnetic field sensor <NUM>. Accordingly, even without having another sensor indicating a "Door Locked" status, the contact sensor <NUM> may compare the aforementioned reduced readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective calibrated thresholds to make a "Masking" decision indicating the tampering. Alternatively and/or additionally, in some optional aspects, the contact sensor <NUM> may also receive an indication that the door/window <NUM> is locked, for example, based on another sensor indicating a "Door Locked" status, and then compare the aforementioned reduced readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective calibrated thresholds to make a "Masking" decision indicating the tampering.

Further, if the first tampering permanent magnet <NUM> is placed with an opposite magnetic polarization compared to the permanent magnet <NUM>, and the first tampering permanent magnet <NUM> is strong enough to reverse the magnetic polarization of the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>, the contact sensor <NUM> may detect such change in the magnetic polarization in the readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> and make a "Masking" decision indicating the tampering.

Similarly, if the second tampering permanent magnet <NUM> is placed with an opposite magnetic polarization compared to the permanent magnet <NUM>, and the second tampering permanent magnet <NUM> is strong enough to reverse the magnetic polarization of the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>, the contact sensor <NUM> may detect such change in the magnetic polarization in the readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> and make a "Masking" decision indicating the tampering.

In an aspect, if the first tampering permanent magnet <NUM> is placed with the same magnetic polarization as the permanent magnet <NUM>, the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> increases, and the contact sensor <NUM> may compare the readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective calibrated thresholds to make a "Masking" decision indicating the tampering.

Similarly, if the second tampering permanent magnet <NUM> is placed with the same magnetic polarization as the permanent magnet <NUM>, the effective magnetic field induced at the location of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> increases, and the contact sensor <NUM> may compare the readouts of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective calibrated thresholds to make a "Masking" decision indicating the tampering.

In an aspect, the contact sensor <NUM> may periodically make and/or update the "Masking" decision during the time when the door/window <NUM> is closed, e.g., to detect a change in value corresponding to one of the "Masking" conditions described above.

In an aspect, the contact sensor <NUM> may apply a threshold value to the readouts of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM> when making the "Open/Close" decision and/or the "Masking" decision. In an aspect, the threshold values used for making the "Open/Close" decisions may be pre-determined fixed values obtained/decided during development of the contact sensor <NUM>, and may be related to sensor features, such as sensitivity, of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM>. Further, the threshold values used for making the "Masking" decision may be obtained/decided during the calibration process.

In an optional aspect, for example but not limited to this example, a tolerance may be applied to a readout of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM> and may be less than <NUM>% of the magnetic field value measured by the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM>.

<FIG> illustrates an example block diagram providing further details of the computing device <NUM> of the contact sensor <NUM>. In an example, the computing device <NUM> may include a mother board <NUM>, and the mother board <NUM> may include a processor <NUM> configured to make an "Open/Close" decision and/or a "Masking" decision based on readouts of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM> that are subject to a magnetic field induced by the permanent magnet <NUM>. In an aspect, the computing device <NUM> may communicate with an external computing device <NUM> regarding the operation of the contact sensor <NUM> and/or any decisions/detections made by contact sensor <NUM> and/or the readouts of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM>, as will be discussed below in more detail.

The processor <NUM> may be a micro-controller and/or may include a single or multiple set of processors or multi-core processors. Moreover, the processor <NUM> may be implemented as an integrated processing system and/or a distributed processing system. The mother board <NUM> may further include memory <NUM>, such as for storing local versions of applications being executed by the processor <NUM>, related instructions, parameters, etc. The memory <NUM> may include a type of memory usable by a computer, such as random access memory (RAM), read only memory (ROM), tapes, magnetic discs, optical discs, volatile memory, non-volatile memory, and any combination thereof. Additionally, the processor <NUM> and the memory <NUM> may include and execute an operating system executing on the processor <NUM>, one or more applications, display drivers, etc., and/or other components of the computing device <NUM>.

Further, the mother board <NUM> may include a communications component <NUM> that provides for establishing and maintaining communications with one or more other devices, parties, entities, etc. utilizing hardware, software, and services. The communications component <NUM> may carry communications between components on the computing device <NUM>, as well as between the computing device <NUM> and external devices, such as devices located across a communications network and/or devices serially or locally connected to the computing device <NUM>. For example, the communications component <NUM> may include one or more buses, and may further include transmit chain components and receive chain components associated with a wireless or wired transmitter and receiver, respectively, operable for interfacing with external devices.

Additionally, the mother board <NUM> may include a data store <NUM>, which can be any suitable combination of hardware and/or software, that provides for mass storage of information, databases, and programs. For example, a data store <NUM> may be or may include a data repository for applications and/or related parameters not currently being executed by processor <NUM>. In addition, the data store <NUM> may be a data repository for an operating system, application, display driver, etc., executing on the processor <NUM>, and/or one or more other components of the computing device <NUM>.

The computing device <NUM> may also include a user interface component <NUM> operable to receive inputs from a user of the computing device <NUM> and further operable to generate outputs for presentation to the user (e.g., via a display interface to a display device). The user interface component <NUM> may include one or more input devices, including but not limited to a keyboard, a number pad, a mouse, a touch-sensitive display, a navigation key, a function key, a microphone, a voice recognition component, or any other mechanism capable of receiving an input from a user, or any combination thereof. Further, the user interface component <NUM> may include one or more output devices, including but not limited to a display interface, a speaker, a haptic feedback mechanism, a printer, any other mechanism capable of presenting an output to a user, or any combination thereof.

In an aspect, the computing device <NUM> further includes a power source <NUM> that provides AC or DC power (e.g., battery power operated device) to power up the computing device <NUM>. Alternatively, the computing device <NUM> may be powered up by a power source that is external to the computing device <NUM>.

In an aspect, the computing device <NUM> may use the communications component <NUM> to communicate, either wirelessly or through a wired connection, with an external computing device <NUM> regarding the operation of the contact sensor <NUM> and/or any decisions/detections made by contact sensor <NUM> and/or the readouts of the first magnetic field sensor <NUM> and/or the second magnetic field sensor <NUM>. For example, the computing device <NUM> may communicate an "Open/Close" decision and/or a "Masking" decision to the external computing device <NUM>. The external computing device <NUM> may be, for example, a central security control system, and may include any components described above with reference to the computing device <NUM>. Alternatively, the external computing device <NUM> may be, for example, a user device such as a cellular phone or a wearable device configured to alert a user of an "Open/Close" decision and/or a "Masking" decision.

In an aspect, the computing device <NUM> and/or the external computing device <NUM> may be configured to allow for taking a mitigating security action in response to an "Open/Close" decision and/or a "Masking" decision made by the contact sensor <NUM>, such as activating a visual or audio alarm, turning on one or more lights in the vicinity of the door/window <NUM>, enabling a central lock system, etc..

<FIG> is a flowchart of a method <NUM> of installation and calibration of the contact sensor <NUM>. The method <NUM> may be performed by an apparatus such as the computing device <NUM> as described herein with reference to <FIG>.

At <NUM> the method <NUM> may include determining if the contact sensor has been installed properly by determining if the contact sensor makes correct "Open/Close" decisions based on pre-defined and hard-coded "Open" and "Close" threshold values. For example, a user/person may install the permanent magnet <NUM> on the first door/window component <NUM> of the door/window <NUM>, and install the device board <NUM>, including the first magnetic field sensor <NUM>, the second magnetic field sensor <NUM>, and the computing device <NUM>, on the second door/window component <NUM> of the door/window <NUM>. The person/user may then observe the "Open/Close" decisions and indication output by the contact sensor <NUM>, where such decisions/indications are made by the contact sensor <NUM> by comparing the magnetic field measurements of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> with respective pre-defined and hard-coded "Open" and "Close" threshold values. As such, the pre-defined and fixed threshold values may be used to decide if the installation is correct or if the installation needs re-adjusting. If the contact sensor <NUM> makes incorrect "Open/Close" decisions, the person/user may determine that the installation is not OK and may repeat <NUM>.

In an aspect, the person/user may adjust the installation of at least one of the permanent magnet <NUM>, the device board <NUM>, the sensor board <NUM>, the first magnetic field sensor <NUM>, or the second magnetic field sensor <NUM> in the "Closed" position of the door/window <NUM> until the magnetic field measured by the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> is at its maximum.

After proper device installation at <NUM>, the values that will be associated with "Masking" decisions may be calibrated. In an aspect, for example, further measurements may be made to obtain calibrated "Masking" measurements for making the "Masking" decision, as follows.

At <NUM>, the method <NUM> may optionally include receiving user input indicating that the door/window is in a closed position. For example, the user may close the door/window <NUM> and provide a corresponding indication. For example, in an aspect, there may be provided a measure (e.g., a switch) to set the device into learning (calibrating) mode.

At <NUM>, the method <NUM> may include obtaining closed calibrated measurements by the first magnetic field sensor and the second magnetic field sensor. For example, the device may read the measurements of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> in the closed position of the door/window <NUM>.

At <NUM>, the method <NUM> may optionally include receiving user input indicating that the door/window is in an opened position. For example, the user may open the door/window <NUM> and provide a corresponding indication.

At <NUM>, the method <NUM> may optionally include obtaining opened measurements by the first magnetic field sensor and the second magnetic field sensor. For example, the device may read the measurements of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM> in the opened position of the door/window <NUM>.

At <NUM>, the method <NUM> may include, based on the closed measurements (and, optionally, the opened measurements), setting calibrated values for making "Masking" decisions. Such calibrated values may include, for example, calibrated sensor measurements, corresponding thresholds, and/or calibrated polarity measurements.

<FIG> is a flowchart of a method <NUM> of operation of the contact sensor <NUM> to provide an "Open/Close" and/or a "Masking" indication. The method <NUM> may be performed by an apparatus such as the computing device <NUM> as described herein with reference to <FIG>.

At <NUM>, the method <NUM> may include obtaining measurements by the first magnetic field sensor and the second magnetic field sensor. For example, after installing and calibrating the contact sensor <NUM> on a door/window <NUM> and closing the door/window <NUM>, the computing device <NUM> may periodically obtain measurements of the first magnetic field sensor <NUM> and the second magnetic field sensor <NUM>.

At <NUM>, the method <NUM> may include executing an "Open/Close" function and/or a "Masking" function based on the measurements. For example, the computing device <NUM> may execute an "Open/Close" function and/or a "Masking" function based on at least one of the measurements, for example, as described herein with reference to <FIG> or as recited in the appended claims.

Optionally, at <NUM>, the method <NUM> may further include, in response to executing an "Open/Close" function and a "Masking" function based on the measurements, generating an open/close decision to indicate an "Open/Close" status of a door or window where the contact sensor is installed, and/or generating a masking decision to indicate whether a masking attempt has been performed on the contact sensor.

Optionally, at <NUM>, the method <NUM> may further include communicating the "Open/Close" decision and/or the "Masking" decision to an external computing device. For example, in further optional implementations, computing device <NUM> may communicate the "Open/Close" decision and/or the "Masking" decision to the external computing device <NUM> (<FIG>), which in response may generate/output a notification (e.g., present a notice on a display of the external computing device <NUM>) and/or an alert (e.g., generate an audible alarm on a speaker of the external computing device <NUM>), depending on the value of each decision. For instance, if a masking attempt is indicated by the "Masking" decision, then the external computing device <NUM> may trigger an alarm and/or may perform other security functions (e.g., lock programmable locks, etc.) with one or more other security devices associated with the system.

In some implementations, the apparatus of the present disclosure may be in the form of a kit of parts that can be assembled to form the apparatus. For instance, in an aspect contact sensor kit is provided. The contact sensor kit may include the permanent magnet <NUM>, the first magnetic field sensor <NUM>, the second magnetic field sensor <NUM>, the sensor board <NUM>, the device board <NUM>, and the computing device <NUM>.

Claim 1:
A contact sensor (<NUM>) comprising:
a permanent magnet (<NUM>);
a first magnetic field sensor (<NUM>) configured to make a first measurement of a magnetic field induced by the permanent magnet (<NUM>);
a second magnetic field sensor (<NUM>) configured to make a second measurement of the magnetic field; the first and the second magnetic field sensors being arranged apart from each other; and and
a computing device (<NUM>) in communication with the first magnetic field sensor (<NUM>) and the second magnetic field sensor (<NUM>), the computing device (<NUM>) configured to execute an "Open/Close" function based on at least one of the first measurement or the second measurement, and configured to execute a "Masking" function based on the first measurement and the second measurement,
wherein the permanent magnet (<NUM>) is movable between a first magnet position and a second magnet position, wherein a sensing direction (<NUM>) of the first magnetic field sensor (<NUM>) and the second magnetic field sensor (<NUM>) is substantially in parallel to a magnetic field axis (<NUM>) of the permanent magnet (<NUM>) when the permanent magnet (<NUM>) is at the first magnet position, and wherein the first magnetic field sensor (<NUM>) and the second magnetic field sensor (<NUM>) are positioned along an axis that is substantially perpendicular to the magnetic field axis (<NUM>) of the permanent magnet (<NUM>) when the permanent magnet (<NUM>) is at the first magnet position.