Design of wireless infrared anti-theft alarm system based on ZigBee

Publisher:茶叶侠Latest update time:2013-02-25 Source: 21IC Keywords:ZigBee Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
    At present, the signal transmission of alarm systems is mainly wired and wireless.

    The wired method has the advantages of reliable communication, strong anti-interference ability, and low device cost. It is suitable for newly built buildings where connection lines can be reserved in the wall. However, it has poor mobility and is inconvenient to adapt to the changing requirements of users and products. The maintenance and replacement of reserved connection lines are difficult and expensive. The wireless method can avoid the connection line between the probe and the host affecting the interior decoration. It has the advantages of flexibility and simplicity. The demand is expanding and it is increasingly recognized by users. It is a development trend, but it is easily interfered with, and the transmission stability and anti-interference are insufficient. The price is high.

    As a key product of anti-theft alarm, the wirelessization of passive infrared detectors has gradually become a trend. However, due to the following two reasons, the false alarm rate of infrared detection wireless alarm system is high: 1) The performance of infrared detectors is uneven; 2) The wireless transmission of alarm signals is easily interfered with, causing false alarms from the host.

    Therefore, the new short-distance wireless communication standard ZigBee with low power consumption, low cost and low rate is used to build an anti-theft alarm network. It not only solves the problems of difficult wiring, high cost and difficulty in expansion of traditional wired network systems, but also ZigBee technology can basically solve some problems existing in existing wireless alarm systems:

    1) False alarm problem: Surveys show that the high false alarm rate of alarms is the main reason for users to give up using them. Existing wireless alarm systems are easily affected by high-frequency interference signals from the power grid and the air. In order to avoid interference in the 2.4GHz public frequency band, ZigBee uses direct sequence spread spectrum technology to ensure signal transmission;

    2) Cost of use: The electricity bill for long-term use of alarms is a problem. In order to achieve the purpose of the alarm still working after a power outage or when the power is cut off artificially before the thief commits a crime, the user also needs to regularly replace the backup power supply such as the battery. Therefore, in the long-term use process, the user has to consider the cost. ZigBee chip is an ultra-low power wireless transceiver chip with a transmission power of only 1 mW. In addition, the chip has a short working cycle and adopts a sleep mode, so the power consumption of sending and receiving information is low.

1 ZigBee technology

    As an emerging wireless network technology, ZigBee is based on a standard of the IEEE Wireless Personal Area Network Working Group, known as the IEEE802.15.4 technical standard. It is mainly used for data transmission between various electronic devices with short distances, low power consumption and low transmission rates, as well as typical applications with periodic data, intermittent data and low response time data transmission. It can work in three frequency bands: 2.4 GHz (popular worldwide), 868MHz (popular in Europe) and 915 MHz (popular in the United States), with a maximum transmission

rate It is generally transmitted within a range of 10 to 75 m, but the range can also be expanded.

    In a ZigBee network, nodes can communicate with each other without passing through a central switch node, and have self-healing and self-organization functions. If any node is paralyzed or captured by the enemy, other nodes can choose other routes. After the new node is powered on, it can listen to the neighboring nodes and join the network as long as it meets the access standards. IEEE. 802.15.4 and ZigBee protocols define three types of topology: star network, tree network and mesh network, as shown in Figure 1. Regardless of the topology, each independent network has a unique identifier, namely the network number (PAN identifier). Based on the identifier, the various network devices can determine their subordinate relationship and communicate with each other. Each network has a unique coordinator, which is equivalent to the server in the wired LAN and has the management function of the network. It is responsible for initiating and establishing the entire network. The terminal devices joining the network are distributed within the coverage of the PAN coordinator and communicate directly with the PAN coordinator. The full-function nodes in the network can be used as routers, coordinators and terminals, while the simplified function nodes can only be used as terminal devices.
a.JPG

    The implementation of the ZigBee wireless network is based on the ZigBee protocol stack. The ZigBee protocol stack is based on the OSI (Open System Interconnect) basic reference model and is a simplified network model of the OSI seven-layer model. IEEE 802.15.4 defines the lowest two layers: the physical layer and the MAC layer, which are located at the lowest layer and are related to hardware; on this basis, the ZigBee Alliance defines the network layer (NWK) and the application layer (APL), which are built on the PHY and MAC layers and are completely independent of hardware. The layered structure is clear and easy to understand, which greatly facilitates design and debugging. The ZigBee standard uses the physical layer and MAC layer protocols of IEEE802.15.4 as part of the ZigBee protocol stack, and defines the network layer, application layer and security protocol by itself, so any ZigBee device is compatible with the IEEE standard.



2 Overall framework of the system

    The wireless infrared anti-theft alarm system network designed by the author adopts a star network topology, which is mainly composed of a server, a router and several terminal information collection nodes.
b.JPG


    The user-side alarm node mainly consists of two parts: a detector and an alarm host, as shown in Figure 2. Each monitoring area can detect moving human bodies, and the alarm host can make on-site sound and light alarms. Such a star network alarm system can integrate infrared information on a ZigBee node to form a wireless infrared anti-theft alarm system. In addition, this system has networking capabilities and can be wirelessly connected to the server in the duty room using ZigBee routing devices.

    The main functions of the system include:

    1) The infrared detector quickly and accurately detects abnormal conditions and sends them to the host wirelessly after confirmation;

    2) The host recognizes the signal after receiving it, and immediately issues an alarm on the spot (sound and light alarm or other methods) and displays the alarm zone and alarm situation on the display screen;

    3) The ZigBee wireless module on the alarm host transmits data wirelessly to the server in the duty room through the ZigBee routing device deployed in the area. The ZigBee routing device is a ZigBee coordination device with routing function in the network;

    4) The on-duty personnel can monitor the regional security through the monitoring software. Once an alarm is triggered, the monitoring software will display the alarm location and handle the emergency in a timely manner.
[page]


3 System hardware design

    In the wireless infrared anti-theft alarm system based on ZigBee, many sensor nodes are the basis of the entire network. The main content of this section is to design the hardware structure of a single node and draw a circuit diagram.

    In the process of hardware determination, the first step is to determine the model of the pyroelectric infrared sensor that collects infrared rays from the human body. The second step is to determine the specific model of the chip that supports the ZigBee protocol to complete the system design. The third step is to consult the information of the pyroelectric infrared sensor and the chip data sheet, design the schematic diagram, and draw the PCB (Printed cireuit board) diagram.

    CC2430 is a new generation of ZigBee wireless microcontroller series chips launched by chip giant TI after acquiring wireless microcontroller company CHIPCON. Based on CC2420, it is bound to the ZigBee protocol stack, has 128 kB programmable flash memory and 8 kB RAM and some other functions. In the receiving and transmitting modes, the current consumption is less than 27 mA or 25 mA respectively.
3.1 Human infrared monitoring module

    The sensor used in the human infrared monitoring module is a pyroelectric infrared sensor, which is generally installed on the ceiling to monitor whether there are people walking around, and then determine whether there are thieves breaking into the house. The pyroelectric infrared sensor can convert the infrared rays detected by people or animals into electrical signals for output. The principle is: when some crystals are heated, equal and opposite charges will be generated at both ends of the crystal, which is the pyroelectric effect. The human body has a constant body temperature, generally around 37°C, and emits infrared rays with a specific wavelength of about 10μm. In this article, an infrared sensor model RE200B is used, which is used in conjunction with the infrared pyroelectric processing chip BISS0001 to collect and amplify the signal, and a small number of external components are added to form a passive pyroelectric infrared signal processing circuit. The circuit principle of the human infrared monitoring module is shown in Figure 3. The P0.1 port of CC2430 is connected to the second pin VO of the BISS0001 chip through a resistor. When the module detects human activity, VO outputs a high level, otherwise it is a low level. Configure the IO external interrupt function of the P0.1 port of CC2430. When a rising edge pulse comes, the external interrupt wakes up, performs corresponding data processing, and sends the data to the coordinator.

c.JPG

3.2 Downloader slot

    The program of CC2430 must be downloaded from the PC to the flash of CC2430 with the help of a specific tool. IAR software is used to compile the program in this article. After the compilation is completed, the program is downloaded into the flash of CC2430 through the emulator connected to the jtag interface.

3.3 Serial port

    circuit The serial port circuit uses the MAX3232 chip and is powered by +3.3 V. The capacitance value in the circuit is 0.1μF in the MAX3232 chip manual. Among them: a 10 nF chip capacitor is added between pins 4 and 5, and the two capacitors between pins 2 and 6 have a value of 1μF.

3.4 Overall hardware circuit

    The overall hardware circuit is shown in Figure 4.

d.JPG
4 Software Design

4.1 Software Development Platform

    System software design is based on hardware design. Good software design is an important part of realizing system functions and the key to improving system performance. The node design is based on versatility and ease of development. The Z-Stack protocol stack of TI is transplanted. Its main feature is its compatibility. It fully supports the CC2430 system-on-chip solution of IEEE 802.15.4/ZigBee. Z-Stack also supports a wealth of new features, such as wireless download, which can download node updates through the ZigBee mesh network. The

    development platform selected for the software design of this system is the IAR integrated development platform. The C/C++ cross compiler and debugger of IAR Embedded Workbench (EW for short) are the most complete and easiest to use professional embedded application development tools in the world today.

    Based on the IEEE 802.15.4 standard and the ZigBee2006 specification launched by the ZigBee Alliance, TI/Chipcon has released a full-featured ZigBee2006 protocol stack and passed the certification of the ZigBee Alliance. The protocol stack is written entirely in C language, provided to users free of charge, and is backward compatible. An operating system is embedded in the protocol stack for unified scheduling of tasks. For users, they only need to make some designs and changes in the application layer to realize the functions of data sending, receiving and network building, and build a ZigBee wireless network with complete functions and stable performance. When designing a program, first add the corresponding tasks in the protocol stack application layer program, and then run the tasks to process.

    Z-Stack is built with the idea of ​​operating system and adopts event loop mechanism. After each layer is initialized, the system enters low power mode. When an event occurs, the system is awakened and starts to enter the interrupt processing event. After the end, it continues to enter low power mode. If several events occur at the same time, the priority is determined and the events are processed one by one. This software architecture can greatly reduce the power consumption of the system. The

    main workflow of the entire Z-stack is roughly divided into several stages: system startup, driver initialization, OSAL initialization and startup, and entering the task loop. The system flow chart is shown in Figure 5. [page]

e.JPG
4.2 Design of data acquisition node

    The data acquisition node is responsible for monitoring the environment within a certain range, receiving signals, and performing data processing and communication. Its software part mainly includes monitoring module data acquisition program and network communication program.

    In the program design flow chart, the first is initialization, among which initializing StackRAM, initializing board I/O, and initializing HAL layer driver are the hardware initialization part; initializing NV FLASH, initializing MAC layer, allocating 64-bit long address, reading NV ITEMS, and initializing OSAL are the software initialization part. Then set the timer and send a binding request to the central node. After the binding is successful, start the timer and set the cycle to 8 s. Collect a signal once in each cycle, and then judge whether the collected signal is the set alarm signal. If it is the set signal, select the chip I/O port as the AD input channel, perform AD conversion and data processing, send the processed data to the central node, and then wait for the next cycle to continue collecting signals; if it is not the set signal, wait for the next cycle to continue collecting signals.

4.3 Design of the central node

    The central node (i.e., network coordinator) is responsible for the configuration and management of the network. On the other hand, it also accepts data sent by each sensor node, merges and organizes it and transmits it to the computer. This part of the software mainly includes programs such as device initialization, wireless data transmission and processing.

    In the program design flow of the central node, the first is initialization, which is divided into hardware initialization and software initialization. Then set the timer to accept the binding request of the data acquisition terminal node. After the binding is successful, start to receive the data sent by the data acquisition node, process the data, and send the processed data to the host through the serial port.

    Central node program:

f.JPG

g.JPG

5 Conclusion

    This paper applies ZigBee technology to the infrared anti-theft alarm system, adopts wireless networking technology, and uses the cost-effective CC2430 chip to realize the mutual communication between nodes in the wireless system; designs the data acquisition node using RE200B pyroelectric infrared sensor and BISS0001 chip and the central node using MAX3232 chip. IAR integrated development platform is selected as the system software development platform to complete the program design of data acquisition node and central coordinator node respectively. After testing the system, the expected functions of the system are verified.

    This system has only completed the overall framework design and basic functions of the wireless infrared anti-theft alarm system network based on ZigBee, which is still a long way from practical use and needs further improvement and improvement. Future work can be carried out from the following aspects: 1) Improvement of system functions. The PC is not connected to the Internet. In the future, it can communicate with the external network through the GSM network, so as to realize the interconnection between the anti-theft alarm system and the Internet and realize network transmission. 2) Data fusion. Under the premise of controlling costs, the number of sensors can be appropriately increased, and multi-sensor data fusion processing can be used to avoid the influence of interference factors, improve accuracy, and reduce false alarm rate.
Keywords:ZigBee Reference address:Design of wireless infrared anti-theft alarm system based on ZigBee

Previous article:Application of voice chips in smart meters
Next article:How to realize multiple burning of EMC microcontroller

Recommended ReadingLatest update time:2024-11-17 00:01

Comparative Analysis of ZigBee and Other Short-Range Wireless Communication Technologies
In recent years, various wireless communication technologies have developed rapidly, greatly improving people's work efficiency and quality of life. Currently, the more mature wireless communication technologies are ZigBee, Bluetooth, infrared (IrDA) and wireless LAN 802.11 (Wi-Fi). At the same time, there are some
[Analog Electronics]
Design of tree cluster network monitoring system based on ZigBee technology
Abstract: This paper introduces a warehouse wireless real-time monitoring system solution based on ZigBee protocol stack Z-Stack. The hardware platform is realized by using CC2430, the first single chip supporting ZigBee protocol, and a variety of sensors. The working principle of Z-stack NWK layer is analyzed, and
[Security Electronics]
Design of remote medical monitoring system based on ZigBee technology
Abstract: Introducing wireless sensor networks into medical monitoring systems, this paper proposes a remote medical monitoring system architecture and specific implementation method consisting of ZigBee sensors and wireless local area networks. In the system, the short-range communication standard used by node
[Medical Electronics]
Design of remote medical monitoring system based on ZigBee technology
Smart Home Wireless Technology Competition: WiFi and ZigBee Comparison
    At present, "wireless replacing wired" has become an irreversible trend worldwide, and this trend is even more obvious in the field of home Internet of Things. It can be said that home automation, commonly known as "smart home", has become an arena for advanced wireless technology. Different companies have adopted
[Security Electronics]
Smart home system solution based on Linux system and ZigBee
Abstract: According to the development needs of modern home, this paper proposes an overall design of smart home system, with ARM11S3C6410 as the core processor and Linux embedded system as the home center monitoring system. Linux Qt is used to complete the writing of control program and human-machine interface, GPR
[Analog Electronics]
Smart home system solution based on Linux system and ZigBee
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号