DEVELOPMENT OF A NEW GENERATION OF MAGNETIC CONTACT BASED ON HALL-EFFECT SENSOR

This paper describes the development of a new generation of magnetic contact. The development of this new generation of the magnetic contact is a part of the research activity of the security engineering laboratory. The new generation of magnetic contact is based on the Hall-Effect Sensor and microcontroller unit. Older magnetic contacts use a simple reed relay with only two states – normally closed or normally opened. The combination of the Hall-Effect Sensor and microcontroller unit provides advanced possibilities such as a programmable level of magnetic field sensitivity, adding different communication modules, programmable inputs/outputs etc. The results of this paper explain proposal of the new generation of magnetic contact, which can be used not only as a part of intruder alarm systems but also as a part of smart homes and other autonomous systems. The content of the paper can be used for even deeper research and by security systems developers as well. UDC Classification: 621.3 ; DOI: http://dx.doi.org/10.12955/cbup.v5.1087


Introduction
Magnetic contacts are one of the basic components of electrical security and distress alarm systems (they are mostly used in securing the object and therefore are only used partiallyin the alarm intruder system). They are very simple detectors of perimeter protection consisting of 2 parts (an encapsulated magnet and an encapsulated reed contact) which use magnetic hysteresis which values differ from one manufacturer to another. They are mostly used in securing windows and doors.

Magnetic contacts
Reed contact is a mechanical switch consisting of two ferromagnetic leads placed in a hermetically sealed glass capsule filled with inert gas. The magnet is installed on the movable part of the windows and doors and the reed contact onto the fixed part of windows and doors (frame). The magnetic contact can be in its standby state open or closed. Standby state is such when the magnetic field of the magnet does not act on the reed contact (figure 1) (Loveček et al., 2015). Magnetic contacts based on the technology of reed relay can be overcome by simple methods without making too much effort. To sabotage them, we can use a parasitic magnet with higher magnetic field intensity or bypass cables, which contacts are connected to the alarm intruder system control panel (Veľas, 2010). To increase the probability of intruder detection, we can use magnetic contacts with integrated reed relays using several mechanical switches in one glass housing with different standby states or polarized reed relays which change their standby mode only when a correctly oriented magnet comes in contact with them (Veľas, 2010). Due to the simplicity of magnetic contacts and the ease with which they can be overcome, it is necessary to test their technical parameters and reliability. The testing of magnetic contacts is the focus of norm STN EN 50131-2-6 (Alarm systems. Electronic security and distress systems. Part 2-6: Opening contacts (magnetic)) (STN EN 50131-2-6, 2014). The aim of these tests is to verify the functionality of magnetic contacts and thus their reliability in given conditions (Loveček, 2008). As part of its R&D activities, the Faculty of security engineering performed tests on many magnetic contacts and for the needs of this article, we have selected one specific magnetic contact from manufacturer USP SP-1000. All tests were performed in laboratory conditions, as specified by the norm: ▪ temperature 15°C -35°C, ▪ relative humidity 25 % -75 %, ▪ air pressure 86 kPa -106 kPa (Ripka, 2001;Loveček et al., 2015) (STN EN 50131-2-6, 2014). Tests were focused on measuring the distances of opening, which were clearly recorded in a chart and after calculating the arithmetic mean, they were compared with the technical documentation provided by the magnetic contacts manufacturer. During the first measurements, we used the UNI-T 70A multimeter in the mode for measuring the circuit integrity (short-circuit probe). After a few repetitions, we noticed a slow response of the multimeter and decided to create a simple electric circuit which served for optical signalization of "on" state (red LED lights up) and "off" state (red LED turns off) of the magnetic contact. To put it simply, it is a system which tests the electric continuity (figure 2) similarly to a connected multimeter, but the response is immediate. The procedure which we used in testing was as follows: 1. We created an electric circuit as described above.
2. Outgoing cables of the magnetic contacts were connected to the circuit. 3. The reed contact was placed on a solid pad using a 1-millimeter piece of paper. 4. The permanent magnet was moved on the millimeter paper back and forth, perpendicularly to the reed relay. 5. After each turning off of the LED, we recorded the distance between the permanent magnet and the reed relay into charts 1 and 2.
6. Using the formula ̅ = ∑ =1 we calculated the arithmetic mean of distance of closure when moving the magnet in or distance of opening when moving the magnet away. The results were compared to the technical documentation provided by the manufacturers. The measured results show that the magnetic contact made by USP SP-1000 is not suitable. The distance of opening after moving the permanent contact away was 13mm greater than the information given out by the manufacturer, which can create a big enough opportunity for the intruder to break the protection or use and install an espionage device without being detected. Apart from the simple overcoming of a magnetic contact, the risk to the security of the object is increased due to installing a magnetic contact with inaccurate specifications.

Development of magnetic contact based on advanced technologies
For an intruder who has sufficient knowledge on the installation of an alarm intruder system, overcoming a magnetic contact with a reed relay becomes a matter of seconds. Reed relay is a simple technology, its roots going back to the 1930s and they are used in today's alarm intruder systems mostly due to their simple structure and very low price (Ripka, 2001). Taking into account the aforementioned drawbacks of reed relay-based magnetic contacts, development has been initialized that would replace the reed relay in magnetic contacts with an integrated semiconductor circuit using the Hall-Effect technology. Using a more advanced technology in designing a next-generation magnetic contact will provide exact setting of distance for opening/closing of the contacts. Values of distance can be changed in real-time thanks to the implementation of a microprocessor. Its memory can be programmed to hold the intensity value of the magnetic field stemming from the permanent magnet in the dynamic part of the security system (Bahreyni, 2006). Once there is no magnetic field acting on the Hall-Effect Sensor, the alarm is sounded. Almost all magnetic contacts available on the market work based on this logic. Implementing a processor allows for the use of other functions which reed-relay-based magnetic contacts don't and can't have. The task of the microprocessor is not only to evaluate the alarm state based on losing the permanent magnet's magnetic field (Popovic, 2004). The high performance of a microprocessor allows for monitoring even the slightest changes of intensity of the magnetic field and based on this data, it can correctly analyze what sort of intrusion is occurringalarm or sabotage.

Concept of the new-generation magnetic contact -The nju:MAG
The proposed next-generation magnetic contact (nju:MAG) is the result of a project, which was originally meant to utilize the MEMS technology (MicroElectroMechanical Systems). MEMS integrate a set of mechanical elements, sensors, action members and control and analysis electronics onto a ceramic substrate using various production technologies. Today this technology is an inseparable part of all smartphones, laptops, office tech, cars, planes … (Bilotti et al., 1997) The MEMS based magnetic contact would offer a range of advanced functions. For instance, the tremor detection seemed a very attractive function. The high sensitivity of MEMS sensors and digital communication in combination with a high-performance microprocessor would allow for distinguishing knocking from an attempted intrusion by damaging the opening fillings (breaking a window, the destruction of doors, …etc.). Evaluation of these states is possible, but it would require programming complex algorithms for the microprocessor, which would increase the market price. Within our project, we decided to stay away from similar functions and only focus on the main function of the magnetic contactdetection of the permanent magnet's magnetic field. Due to this rationale, there is no reason to utilize MEMS technology and substantially simpler semiconductor technology can be used for the magnetic field detection. MEMS will therefore not be used as the basis for the nju:MAG magnetic contact. However, a microprocessor as the centre for evaluating states remained as well as all other circuits ensuring the magnetic contact works as it is supposed to. The MEMS sensor was replaced with BiCMOS technology, specifically a Hall-Effect Sensor. The CMOS technology is known to be sensitive to temperature changes. The manufacturer took this into account and the Hall-Effect Sensor compensates for the temperature changes which ensures accurate output values within the entire range of the working temperatures (Randjelovic et al., 2002). There was a very significant change as far as communication is concerned between the selected type of sensor and the microprocessor. While the MEMS sensor communicated with the microprocessor using the I 2 C or SPI digital interfaces, the Hall-Effect Sensor outputs a continuous analog signal (Kanda & Migitaka, 1976). The output from the Hall-Effect Sensor can be connected directly into the microprocessors input pin, which processes the analog signal and converts it into a digital one (Analogue-to-digital converter -ADC). In the nju:MAG magnetic contact, the Hall-Effect Sensor output is connected to the analogue input of the microprocessor using a differential amplifier, which amplifies the output signal from the probe, doubling it, and changes the range of the output voltage of the Hall-Effect Sensor from the original 2.5-4.5V to 0-3.8V (Loflin, n.d.). The microprocessor implemented in the nju:MAG magnetic contact can process an analog signal with a resolution of 10 bits, which represents 1024 (0-1023) values of the duty cycle. To calculate the value of the voltage of one step of the duty cycle, we use the value of the microprocessor's system voltage and resolution of the analogue input of the microprocessor. These values we then put into equation 1: Due to the modified range of the output voltage of the Hall-Effect Sensor amplified by the differential amplifier, which reaches values between 0-3.8V, the 10-bit resolution of the ADC won't be fully utilized. The maximum value of duty cycle, which can be achieved can be calculated using equation 2: Even despite the fact that we're only using approximately two thirds of the entire range, initial tests have shown that in real-life conditions, this was no effect on the work of the magnetic contact. For future use, however, using and external reference voltage set exactly to 3.8V is being considered (Loflin, n.d.). The microprocessor and other circuits are supplied stable, constant voltagethis is ensured using a linear voltage regulator, its input terminals can be connected to up to an 18V power supply. Use of such linear voltage regulator proves ideal, because components of alarm intruder system usually are supplied by voltage of 12V. The nju:MAG magnetic detector is capable of detecting any sabotage attempt: ▪ forcible removal from a wall, ▪ forcible opening of the front cover, ▪ detection of a parasitic magnet ▪ detection of partial opening of the door. Sabotage through the forcible removal from a wall or opening of the front cover is detected using two switches. The switch dedicated to the detection of forcible removal from the wall is placed on the back side of the motherboard, the switch responsible for detecting the forcible opening of the front cover is placed on the front side of the motherboard.
The detection of a parasitic magnet and partial opening of the door is possible thanks to the principle on which the Hall probe works; it measures the intensity of the magnetic field of the permanent magnet and based on the programmed values, the microprocessor can recognize it with a probability close to 1. The nju:MAG magnetic detector integrates an RGB LED light to display information of the current status. Colours of individual states can be programmed; intensity of the light can also be adjusted and set at different values for each state, just like the color. Communication with the alarm intruder system, specifically with the control center, is done only through a bus, and a loop circuit is not possible. A loop circuit would not be problematic from technical standpoint however, all advanced functions offered by the nju:MAG detector would go unused (Veľas, 2015). This is the main and only reason, why only a bus connection to the control unit was considered. Conclusion Initial tests of magnetic contacts performed as part of the research and development activities show the actual need for testing magnetic contacts. Not all magnetic contacts correspond to the specifications stated in the technical documentation of the manufacturers or coincide with the conditions specified by technical norms. Based on these findings and results of testing the specifications and resilience of magnetic contacts, a project was designed focused on eliminating their negative properties. The aim of the article is to design a nju:MAG magnetic contact, which brings new functions to this field and increases the amount of security provided. It offers advanced sabotage detection for any attempted breach and allows for programming of specific parameters of permanent magnets in real-time. The nju:MAG magnetic detector is without a doubt a great asset not only from a R&D standpoint, but also an interesting product for manufacturers and companies focused on security projects and installation of alarm intruder system.