The Wireless Environment Monitoring Alarm System Based on Self-organizing Network

Under complicated conditions, it is necessary for environmental monitoring to design a wireless monitoring alarm system which can replace the wired system or as a supplement. The system discussed here bases on ARM7 microprocessor named LPC1114 and transceiver module named CC2530. With ZigBee, CSM/GPRS, this system uses multiple sensors to self-organized form a data acquisition and monitoring network system with variety of sensors fusion in the region. The system has some characteristics such as quick, convenient and accurate. Combining with the GSM SMS or GPRS alarm, the system can accurately and reliably monitor temperature, humidity and other environmental factors, and realize remote monitoring in large area and the complicated environment. Thus, this system has high practical value.


Introduction
With the rapid development of economic and the unceasing enhancement of social modernization degree, the environment monitoring systems have played an important role in various industries. Environmental monitoring systems can be divided into two ways of wired environmental monitoring systems and wireless environment monitoring systems.
The wireless environment monitoring alarm system is is easy installed and reacts quickly. It monitors, perceives and gathers various detection objects' information in realtime which belongs to the regional environment of network, transmitting the information to the user or management platform for processing. The wireless environment monitoring alarm systems are widely used in personal families, residential quarters, public places, office buildings and warehouses, etc. The multi-node, more jump, peer-to-peer and wireless self-organized network (mobile AD hoc network) system is especially suitable for some areas where people cannot safely enter into, such as inflammable and explosive dangerous sites, as well as some places that cable network cannot reach, such as forest, grassland, remote areas, etc. [1].

Environmental monitoring system design
The system is composed of the main console of ARM and the ZigBee sensor network [2]. ZigBee sensor network collects data and timely feedbacks to the main console, the main console can display the current position distribution and status information from each terminal node, processing data, alarming the abnormal data. If there are no staffs there, it will inform administrator via the GSM network remotely, and then handle abnormal data in a timely manner [3]. The design block diagram about the system is shown as Fig. 1.

Main console hardware design
The main console is composed of LPC1114 microprocessor, keyboard, 12864 LCD module, AT24C02 storage module, ISD1420 voice module and buzzer alarm module [3].
NXP LPC1114 is the key of Main console, connecting ZigBee coordinator via the UART serial port for data exchange. The main console is composed of LPC1114 microprocessor, keyboard, 12864 LCD module, AT24C02 storage module, ISD1420 voice module and buzzer alarm module.
LPC1114 is produced by NXP, and it is the world's most popular 32-bit ARM Cortex-M0 microprocessor, using 32 KB Flash and 8 KB SRAM. Comparing with the existing 8/16 bits MCU, it has the advantages of high cost performance, low power consumption, simple instruction set and small code length.
ISD1420 is a single chip voice recording circuit, which is composed of the oscillator, voice storage unit, preamplifier, automatic gain control circuit, anti-jamming filter and output amplifier. It is the alarm sound module of information output in the system. While alarming happens, the recorded alarm sound will be read under the action of low level pulse.

ZigBee sensor network design
ZigBee is widely used now as a wireless network transmission technology. It uses the IEEE802.15.4 protocol standard which uses public frequency 2.4 GHz of global sharing. ZigBee wireless indoor transmission distance is 30-50m and can be raised up to 100m outdoor. As a result, according to change of the circumstance, the user will form a short distance wireless communication subnet, using wireless transceiver to transmit data quickly and easily. It does not only reduce the network cabling cost, but also improves the flexibility and extensibility of the application, and economizes human resources. The wireless-sensor network applies a star topology, includes ZigBee coordinator, ZigBee central node, ZigBee terminal nodes, and each sensor node responsible for collecting data. No matter what kind of network topology is adopted, the coordinator node can have the only one, which is located in the upper layer of sensor nodes, acts as a gateway, as a whole to monitor and manage all the devices in the wireless-sensor networks. In monitoring area, a large amount of sensors are placed, constituting a monitoring area network by wireless selforganized way, timely collecting data by ZigBee terminal nodes to upload to the ZigBee central node. According to the agreed scope of data, central node determines whether the received data is normal and displays data through the liquid crystal or not. If there is any abnormal data, it will send alarm information to the console, during the prescribed period if the abnormal information has not been processed and is resend. After be sent three times, if central node has not received the processing message, it can send SMS (phone) by GSM/GPRS module to the predefined staff's phone number. This system should possess the following sensors driver according to the needs as follows: DHT90 temperature and humidity sensors, smoke sensors, CO sensors, the human body infrared sensors , etc [4].

ZigBee coordinator nodes' hardware design
ZigBee coordinator node is the rule maker of the whole sensor networks. The hardware design block diagram is shown as Fig. 3. The coordinator node can take the initiative to scan all the sensors of coverage areas in the wireless network, and be responsible for receiving data from sensors, transmitting to the main console via a serial port, connecting ZigBee sensor network, and completing the node joining and deleting as well as the conversion of network protocol and so on. [5] Indicator light ZigBee coordinator node is equipped with a rod module, which is crucial for data transmission; Power supply module is 5V power supply, which is transformed to 3.3 V by TPS73033 and MIC29302 chip, supplying the power to a CC2530 chip. Liquid crystal display module

ZigBee central node and terminal node hardware design
ZigBee central node is located between ZigBee coordinator and ZigBee terminal nodes. It is necessary to monitor environmental parameters around, but also as a transit point to support communication between ZigBee central node and ZigBee terminal nodes. Moreover, ZigBee central node is connected to the GSM module and will timely send an abnormal message to the phone of the administrator to ensure that administrators have the realtime understanding of abnormal information in the case of the main console unattended [6]. ZigBee terminal devices are tiny nodes running on battery, taking own sensor be responsible for collecting environmental data around, regularly uploads data to ZigBee central node.

System software design
The system software design is composed of two parts which are the main console software design and ZigBee node software design. ZigBee node software design is divided into ZigBee terminal nodes for collecting data, ZigBee central node for forwarding the data and ZigBee coordinator node for receiving the data. The followings only describe the software design of ZigBee coordinator node [7].

Main console software design
LPC 1114 microprocessor is embedded by Linux operating system as a support, adopting MDK + ULINK2 as compilers and emulators, writing the main program and interactive interface of the main console in QT / Embedded environment, using JTAG interface of the LPC1114 to easily debug program and download code through emulator ULINK2, and realizeing system functions ultimately.   Figure 6. The software diagram of ZigBee coordinator node It is primary that main console is started, system is initialized and time and temperature are displayed. Through the keys, time can be adjusted, the temperature alarm thresholds are set and all node data are checked. CC2530 forwards data ZigBee terminal node transmitting to the main console [8]. The block diagram of main console program design is shown as Fig. 5.

ZigBee coordinator software design
After ZigBee coordinator starts, ZigBee coordinator sends a network message to the central node. If the networking is successful, ZigBee coordinator waits for forwarding data of the main console or ZigBee central node, transmitting a confirm information, opening timer, and then waits for a reply. In the event of timeout, retransmitting will happen [9]. Its specific software flow chart is shown as Fig. 6.

System performance testing and results
The wireless environmental monitoring system is tested from the reliability, transmission distance and real-time performance of data. Firstly, temperature values collected and air-conditioning temperature values displayed are basically the same. The error does not exceed 0.5 when the node is placed conditioned room. Obviously, the deviation is in the allowable range. Humidity difference is 3%RH, some of the testing data are shown as Tab.1.
On the top, it is installed the human body infrared sensor outside the door. The side-mounted is reflection infrared sensor, which makes accuracy reach more than 99% in the day and at the night. The alarm accuracy rate of sensitivity of CO sensors and smoke sensor at room is more than 99%. When the main console is unattended, after one minute, GSM short message is successfully sent (1000 tests). Secondly, the transmission distance of actual measured data is about 100 meters in case of accessibility, it reaches about 50 meters in case there is an obstacle. In addition, two nodes are placed in different places of the open outdoors, where the distance between two nodes is in the range of the wireless sensor network (the distance between two nodes is 200m). The nodes can receive data of all nodes that send packets in about 20 seconds. The difference is in the allowable range. The test results above show that wireless environment monitoring alarm system designed in this paper can complete the intended functions.

Conclusions
This paper presents a design and implementation scheme of wireless sensor networks which can be used in the harsh environment monitoring. It uses low-power ARM7 microprocessor LPC1114 as the main control console, consists of a variety of sensor by the ZigBee, CSM/GPRS, forming a multi sensor fusion of the data acquisition and monitoring network system. The system overcomes the bottleneck of traditional transmission rate of wireless sensor network. The ZigBee nodes in the system are powered by battery, so each monitoring point will sent data to the main control console when it receives command of the main control console or monitors the environment abnormality, or, it will not send data. So it reduces the energy consumption of the power supply. The main console can receives the ZigBee terminal nodes' data in real time and check the monitoring area sensors' data at any time. According to the practical running tests, it shows that this system has some characteristics such as high reliability, low cost, strong adaptability, easy expansion and high practical value.