Hybrid Extension for Advanced Technology Zone

This article deals with the software extension for metallic loops. This extension consists of using the binary signal which can be generated by the Control and Indicating Equipment (CIE) to unite analog and digital detectors. Designed improvement can be applied to all existing modes of analog CIE such as Normal Closed (NC), End of Line (EOL) or Advanced Technology Zone (ATZ). It can be also applied to all common digital bus.


Introduction
The main component of the Intruder Alarm System (IAS) is the CIE, which evaluates the information obtained from connected detectors. Due to the type of detector connected to the CIE, it can be divided in analog and digital. Nowadays, the most common way how to connect detectors to the CIE is using a digital bus. Using this manner brings many advantages like connecting several detectors to the one bus. That means efficient cable length. All connected detector can be also independently addressed by the CIE.
Despite these advantages, there are still some situations where analog metallic loops can be used. The analog connection is much easier than mentioned digital. Detectors connected to the analog loop must have Normal Closed (NC) contact. When the detector is activated, it automatically switches the contact to the closed state. Even this small change can be enough to evaluate a change in the circuit by the CIE. Using just one detector in one loop is not very efficient. Therefore, more detectors can be added to the single loop, but there is still a problem in addressing of each detector. This problem can be avoided by using the ATZ mode. Described circuit can be found in the following figure. The ATZ is the most used mode in the metallic loop because it has the biggest number of possible states and the biggest number of connected detectors. This mode is based on the different values of used resistors. Different values of resistors allow distinguishing which detector in the loop has been activated. [4] In common situations, the loop can be divided into three or more independent zones.
The actual state of the loop is evaluated by the CIE. Commercial CIE has usually up to 16 independent analog loops. [5] The signal from the loop is in the form of the voltage which can be affected by connected resistors. Before evaluation signal must be first converted from analog to digital signal using the Analog to Digital Converter (ADC). After this conversion measured value can be evaluated by the CIE.
Another possible way how to connect detectors to the CIE is using a single digital bus, which consists of several cables. These cables are commonly used for the power voltage and data transmission. In practice, connected detector has a unique address which is saved in the CIE. Detector periodically sends its actual state with its address. [3] According to this information CIE can react to received information.

Hybrid Extension
The goal of this article is to connect mentioned manners together. It means that to one designed loop can be connected up to six analog detectors which using the NC contact and up to sixteen digital detectors. This is possible when created loop using Two Wire Interface (TWI). TWI consist of two wires Serial Clock Line (SCL) and Serial Data Line (SDA). [6] CIE by the SCL generates the clock signal and data to each device can be transmitted by the SDA. In this extension, SCL is used not only for the clock signal but it is also used for the analog detectors. The amplitude of generated clock signal can be affected by the resistor value which can be added to the circuit by activating NC contact.
The main improvement of this extension is that the SCL can be sent through the analog loop. This signal is periodically generated by the CIE and then it is received back to it. The CIE can compare the received signal with the transmitted. When these two signals are equal it means that the loop is not affected by the analog detectors. Despite of this, digital detectors are controlled by a different part of the program. None of the commercial made CIE provide official schematics of created devices. The CIE cannot be programmed. According to this limitations, a new concept is created to achieve set goals.

Fig. 2. Designed circuit of CIE.
In practice, the SCK signal is shifted from 3.3 V up to 12 V using the optocoupler. Magnifying the SCK signal helps to increase the range where can be added analog detectors. According to the high frequency of the SCK, the conversion must be done very quickly by the microcontroller. Used ATmega2560 the microcontroller can use 8-bit or 10-bit conversion. For purpose of this research, 10-bit converter was used.
Every detector connected by the TWI should have a specialized device which is able to convert states into the TWI signal. The device should consist of TWI interface, power distribution, and the microcontroller. TWI interface follows the standard and it provides interface itself. Power distribution supplies connected detector. The main component is the microcontroller, which by the TWI interface communicates with the CIE. It also response to periodical impulse and it provides the unique name of each connected detector.
Created board consists of ATtiny26 the microcontroller which has built-in TWI interface and it has enough input pins to collect all needed information from the detector. The power supply for the board is 12 V but the microcontroller operates at 5 V. On the board is voltage regulator due to mentioned problem. Voltage regulator converts 12 V to the 5 V which is suitable for the microcontroller.
The used microcontroller is fast enough to accomplish the TWI requirements. Every microcontroller has a simple program which consists of the periodical response to broadcast signal generated by the CIE. It also has conditions for every state that can occur. The final circuit can be found in the following figure. The device has two terminal blocks. First is used for the power supply and the TWI interface. The second is used for the alarm states from the detector. Every possible state can be distinguished by the extension board. These states are the alarm, anti-masking, failure, battery. More states can be added in the future if needed.
Program of this board can be very simple. The microcontroller periodically checking the alarm pins (PA0 -PA3) and responding to broadcasted signal. When the alarm signal is received, the microcontroller sends the message to the CIE. The program in the CIE than process the incoming message. ATtiny26 the microcontroller was used due to its small package, low price, and small power consumptions.

Experiment and Measurement
The experiment was done in the laboratory of Tomas Bata University in Zlín at Faculty of Applied Informatics. Used components are listed below: x ATmega2560 the microcontroller x Oscilloscope Hameg Instruments HMO-722 x Digital multi-meter M-3900 The testing circuit from figure 2 with ATmega2560 the microcontroller was assembled. The circuit consists of optocoupler which shifts the voltage from 5 V to 12 V. There are also components which help to protect the circuit against the overvoltage. Receiving part consist of the voltage divider which creates the suitable voltage level for the microcontroller.
Using ATmega2560 the microcontroller was created rectangular signal by the TWI. This signal must be generated continuously. The TWI has given several speeds by the standard. In this case, the microcontroller uses frequency 100 kHz which means that 10-bit string can be transmitted within 0.1 ms. According to the legislation CSN EN 50131-1 ed. 2 CIE must be able to detect alarm signal lasting longer than 400 ms. [2] Used SCL clock is fast enough to detect the alarm signal.
The main measurement was done by using schematics from figure 2 with resistors from table 1. A single resistor and NC switch were used instead of the real detector. Each switch was activated to display the change using Hameg Instruments HMO-722 the oscilloscope. Every possible state was measured and displayed. Measurement results can be found in the following figure.   figure 4 can be seen the gap between each state. Each state has its own mark. The measurement proved that SCL signal is not distorted when it passes through several resistors. Another ATmega2560 the microcontroller was connected to the loop to prove flawless communication. The time base was set to 50 ms. This test was applied to all possible states which can occur. Measured voltage levels match with calculated values from table 1.

Conclusion
This article presents a connection between the analog and digital wiring. Designed schematic uses advantages of analog and digital connection using the TWI. The experiment proved that this method works and it can be implemented in the modern CIE. SCK signal is not affected by connecting detectors to it. More research can be done using an extension of this design to another interface.