Design of intelligent residential perimeter anti-intrusion alarm system based on RS485 bus

Publisher:支持中文Latest update time:2013-11-30 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  1. Introduction

  With the rapid development of science and technology and economy, people's concept of home has changed from simple living to focusing on humanized housing needs, such as safe, comfortable, fast and convenient smart communities, among which safety is the primary goal of smart community design. The security system of smart communities is responsible for protecting the lives and property safety of community residents. It consists of subsystems such as perimeter intrusion alarm, video surveillance, electronic inspection, video intercom, entrance and exit control, and parking lot management. Among them, the perimeter intrusion alarm subsystem is one of the cores of the entire smart community security system.

  2. Overview of the Intelligent Community Perimeter Anti-Violation System

  The intelligent residential area perimeter anti-crossing system is to prevent people from breaking into the community from illegal entrances without authorization, so as to avoid various potential dangers. In order to take safety precautions on the perimeter of the community, prevent the walls or fences from being damaged and illegally climbed over, improve the reliability of the surrounding security precautions, shorten the time to discover illegal intrusions, and ensure the property and personal safety of each household in the community, infrared counter-radiation detectors, vibration detectors, and photoelectric counter-radiation detectors are installed according to the terrain around the community and the function of the detectors. When someone attempts to illegally cross the perimeter of the community, the alarm detector will output a signal, and the alarm signal will be transmitted to the monitoring host of the monitoring network system of the community management center through the monitoring module, and the alarm location signal will be displayed on the electronic map of the monitoring host, notifying the on-duty personnel to take measures to stop the intrusion in time, thereby completing the perimeter anti-crossing alarm. The main functional components of the system are: alarm detector, alarm controller and alarm information processing center. The system structure diagram is shown in Figure 1.

  

  2.1 Detector

  The detector is the eyes and nose of the entire system. It is used to sense external information, convert it into a level signal, and transmit it to the alarm controller [2]. There are many types of detectors with different functions. Commonly used detectors in residential alarm systems include: infrared beam detectors, vibration detectors, and photoelectric beam detectors. Infrared beam detectors use infrared light to pass through LED infrared light emitting diodes, and then focus through optical mirrors to transmit the light to a long distance and receive it by the light receiver. When the light is blocked, an alarm will be issued; vibration detectors are detectors that use the vibration of objects to send alarms. They can be pre-installed in the wall to send alarms when illegal personnel chisel through the wall or dig a hole. They can also send alarms through the vibrations generated by illegal personnel; photoelectric beam detectors are composed of a transmitter and a receiver. The light emitted by the transmitter directly enters the receiver. When illegal personnel block the light before passing between the transmitter and the receiver, the photoelectric switch generates a switch signal to send an alarm. When the alarm controller and the detector are usually geographically close, they can be connected using ordinary two-core or four-core wires.

  2.2 Alarm Controller

  The function of the alarm controller is to analyze, judge and process the signals from the detector. First, the controller will collect the switch quantity of each input port, convert it into 0, 1 state signal by comparator, and then compare it with the initial state to determine whether it is in the alarm state, and encapsulate the alarm data according to a certain protocol, send it to the alarm information processing center, and notify the security to take emergency measures.

  2.3 Alarm Information Processing Center

  The task of the alarm information processing center is to process the alarm information sent by each alarm controller in the community. Its main functions include interpreting the custom communication protocol, displaying detailed alarm information on the electronic map, recording the alarm source and the alarm response, querying historical alarm information, and performing system information management. Based on the alarm information, the community security personnel can quickly obtain information such as the alarm location, type, and surrounding environment, and take emergency measures to ensure the personal and property safety of the residents of the smart community.

  2.4 Alarm Information Transmission Protocol The selection of alarm information transmission protocol is the key to ensure that alarm information is transmitted in real time and reliably in the network. Telephone line networking has high operating costs and slow networking speed [3]. Although TCP/IP alarm networking has the advantages of flexible installation, convenience, high stability and reliability, TCP/IP alarms are now mostly used in residential areas, and wireless network access is also mostly used in areas where some residents have already renovated and it is inconvenient to lay additional cables. This network method is easily affected by network viruses and is prone to leaking alarm signals. Therefore, dedicated bus systems are still the most common in China.

  3. Design ideas

  This system uses the AT89S52 single-chip microcomputer chip to develop and design an intelligent community perimeter anti-theft alarm system based on the RS485 bus. The single-chip microcomputer chip used in this system is low-cost. After expansion, the front end has 32 defense zones, which can fully meet the functional requirements of a small- and medium-sized high-end intelligent community anti-theft alarm system and achieve the same functions as the XI7400 alarm host currently used in the market. In this system, the front-end alarm signal is transmitted to the alarm information processing center via the RS485 bus. The alarm signal transmission rate is fast, it is not easily affected by network viruses, and the security independence is good. In this system, the alarm information processing center displays the alarm information in the form of a simulated map, which is more economical and intuitive. Combining the design specifications of the intelligent community perimeter anti-intrusion alarm system and the basic principles of security system design, the design ideas are as follows:

  3.1 Design of perimeter anti-intrusion alarm system based on RS485 bus

  According to the perimeter terrain and regional functional requirements of the community, infrared detection, vibration detectors and photoelectric detection are selected. When an alarm signal is transmitted, the lower computer AT89S52 hanging on the infrared identifies the defense zone address. The lower computer AT89S52 is defined as a single defense zone, a double defense zone and an eight defense zone through the DIP switch. Then the RS485 bus is connected through the front-end transmitter MAX485 conversion module, and the signal is connected to the main control room through the RS485 bus. The signal is received by the back-end receiver MAX485 conversion module and transmitted to the upper computer AT89S52. The upper computer AT89S52 receives the signal and determines the address, controls the corresponding light-emitting diode at the back end to flash, and the buzzer sounds to remind the management officer. The upper computer drives the corresponding analog map on the defense zone (the analog map corresponds to the corresponding defense zone in advance) according to the given signal address. The administrator can know which defense zone has an alarm according to the prompt of the light-emitting tube and take corresponding measures. After hardware debugging, as long as the front detector detects the alarm signal, it will trigger the alarm. Because the RS485 transmission is not affected by network viruses, it is not easy to miss the alarm. In addition, the RS485 bus transmission can reach 1.2km, and the distance can be expanded by adding a repeater, which effectively increases the scope involved. The RS485 bus has only two transmission lines, which is easy to lay, and the interference is small after adding the terminal resistor. Therefore, this design research is practical, advanced and economical. The design scheme is shown in Figure 2.

  

  3.2 Backend display expansion

  When AT89S52 is used as the host computer, it has only four interfaces that can drive the alarm outputs such as light-emitting diodes and buzzers, and can realize the alarm display of 24 defense zones. If there are many alarm points in the community, the back-end alarm output points will inevitably be insufficient, so it needs to be expanded. We use a single-chip microcomputer and several chips such as 74HC595 to expand it. [page]

  3.3 Alarm Information Processing Center Simulation Map Design and produce simulation maps, and arrange the corresponding alarm points of each defense zone on the simulation map. The host computer drives the corresponding simulation maps on the defense zones in turn according to the given signal address (the simulation maps and the corresponding defense zones are corresponded in advance) to light up, and the buzzer will also sound a prompt to remind the danger. The alarm can only be stopped when the management personnel eliminate the danger.

  4. Specific implementation circuit

  4.1 Front-end alarm signal transmission and back-end display circuit

  The P1 port of the lower computer AT89S52 single-chip microcomputer is connected to the active/passive infrared detection. The language recognized by the single-chip microcomputer is a high-level language, that is, binary. Therefore, the front-end defense zone is defined directly based on whether the infrared is triggered as a binary switch quantity. When the single-chip microcomputer AT89S52 receives the signal from the infrared, the single-chip microcomputer uses the TXD and RXD ports to connect the signal to the A and B buses of RS485 through the DI and RO of the MAX485 chip. The back-end also receives the signal through the MAX485 chip A and B and connects it to the TXD and RXD of the AT89S52 single-chip microcomputer through DI and RO for communication, realizing the recognition of the front-end address.

  The lower computer AT89S52 can be defined as a single defense zone, double defense zone and eight defense zone modules through the DIP switch. The upper computer AT89S52 first uses the first two digits to determine the defense zone type, and then uses the last six digits to determine the defense zone address. When the back-end upper computer AT89S52 receives the trigger signal from the front-end defense zone, it controls the alarm output photodiode and buzzer of the corresponding defense zone address. The RET port of the microcontroller received at the back end is connected to the reset circuit. After checking the alarm, the administrator can press the reset button to reset and restart the next round of monitoring. The hardware wiring is shown in Figure 3.

  

  4.2 Back-end display circuit expansion

  The effective transmission distance of the 485 bus mode is 1.2km, and the defense zone can be expanded to 24 channels. The general encoder can realize the alarm display of 8 defense zones. In order to effectively expand, a single-chip microcomputer is used in this course design and the 74HC595 chip is used to expand it. As shown in Figure 4, it can be expanded to 128 channels.

  

  The 11th, 12th and 13th pins of the expansion chip 74HC595 are connected to each other respectively. In order to expand, the 9th pin of the previous chip is connected to the 14th pin of the next chip, and then expansion can be carried out.

  5. Communication Mode

  This system uses the serial port of the microcontroller to realize the multi-machine communication mode between the microcontrollers. The multi-machine communication system composed of the microcontroller often adopts a bus-type master-slave structure. In this system composed of multiple microcontrollers, only the upper microcontroller is the host, and the other lower machines as single-zone, double-zone, and eight-zone address modules are all slaves. The multi-machine communication of the microcontroller needs to complete three parts during the communication process.

  5.1 Address Identification Process

  In this process, the information sent by the host needs to be acceptable to all slaves. When setting the serial port mode, in addition to setting the slave to multi-machine communication mode, that is, SM2=1, the 9th data bit of the information sent by the host must be "1", that is, TB8=1. This is because in the multi-machine communication mode, the slave will only set the received data as valid if the 9th data received is "1", otherwise it will be regarded as invalid data and discarded.

  5.2 Data Communication Process

  When the host and the slave establish a connection, the next step is data communication. In order to complete the data transmission well, in general, the host and the slave that needs to communicate should be set to single-machine communication mode. During the entire communication process, both parties should keep the 9th bit of the sent data as 0 to prevent other slaves from receiving data.

  5.3 Data communication end process

  When a front-end alarm information is uploaded, that is, the data communication between the host and the slave is completed, the slave should be reset to the multi-machine communication mode to respond to the next round of monitoring. For example, in this system, the address of the single-zone slave is 51H. When the host calls the slave, data communication starts: the host sends a command, and the slave sends data to the host after receiving the command. When the data is sent, the multi-machine communication mode of the slave is restored.

  6. Conclusion

  The smart community perimeter anti-intrusion system is an important part of the smart community security system. The perfection of the system has also become an important basis for measuring the performance indicators of the smart community security system. The author believes that each smart community can choose a perimeter anti-intrusion system implementation plan according to its own size, comprehensively consider the technological advancement and reliability and economic feasibility, and choose a solution that suits itself. For small and medium-sized high-end smart communities, the smart community perimeter anti-intrusion system design provided in this article meets both functional requirements and economic requirements, and can be used for reference

Reference address:Design of intelligent residential perimeter anti-intrusion alarm system based on RS485 bus

Previous article:Research on Remote Control System of Switched Reluctance Motor Based on 80C51
Next article:Dormitory intelligent fire and theft alarm system based on 51 single chip microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号