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.
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.
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.
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.
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]
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:
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.
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
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Detailed explanation and engineering practice of unmanned monitoring technology (Xie Jianbin, Li Peiqin, Yan Wei, Liu Tong, Lin Chenglong, Hong Quanyi, Zhou Hongfei, Cui Yibing)
- Introduction to Wireless Sensor Networks (Edited by Ma Sasa et al.)
- Introduction to the Internet of Things (Liu Yunhao)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- [Chuanglong TL570x-EVM] Unboxing and sharing of learning experience
- [Runhe Neptune Review] Unboxing and hardware appreciation
- Will mobile phones last four days on a single charge in the future? Are you looking forward to the world's first 2nm chip?
- Follow the expert and challenge yourself to learn FreeRTOS in 21 days~Win gifts + cash
- Infineon ADAS solutions ensure your safety every time you travel. Participate and win prizes!
- EEWORLD University - Analyzing battery protection and fuel gauge solutions, TI experts meet with you face to face
- A brief introduction to UWB
- [Anxinke NB-IoT Development Board EC-01F-Kit] 2. Power-on test and RX0/TX0 compatibility issues
- The perfect Baidu Netdisk is about to dominate the Internet's download resources
- [Raspberry Pi Pico Review] Unboxing and Power-On Test