Research on Harmful Gas Detection and Alarm System Based on ZigBee Technology

Based on ZigBee technology, several gas sensors are combined into a monitoring system, which is used in the environment or places with pollution and harmful gas. With the support of ZigBee technology, the gas sensor alarm instrument is used. When the gas data detected by the sensor is greater than the preset value, ZigBee sends a signal to automatically control the opening or closing of related equipment in the internal network, and people receive the alarm signal. So as to solve or reduce the occurrence of human casualties caused by harmful gases. It can also be used to view the real-time data of gas or remote control environment. It can also be connected to the Internet through ZigBee technology to report to the system to solve security problems while alarming.


1.Introduction
There are pollution and harmful gas which lead to casualties. Some gases are colorless and tasteless, and have been a threat to the human body in the invisible way. When the body responds, it is too late, because the gas damage can not be reversed.
With the development of society and science and technology, the control of detection equipment and monitoring system is the future direction. The main function of the harmful gas detection system is to combine the gas sensor and CC2530 chip to collect and read the gas concentration value to be detected by the environment in real time; use LCD to achieve the display data and alarm the abnormal data. When the gas concentration exceeds the preset value, LCD display flashes, and the buzzer sends out alarm. The system background output signal is sent to ZigBee networking connected equipment to control start or close. If the air quality data is too poor, the system sends signals to ZigBee network.
ZigBee is a kind of wireless connection. As a wireless communication technology, ZigBee has many characteristics Because the transmission rate of ZigBee is low, the transmission power is only 1MW, and the sleep mode is adopted, the power consumption is low, so the ZigBee device is very power-saving. ZigBee protocol is royalty free. Low cost is also a key factor for ZigBee. The delay of communication and activation from sleep is very short. The delay of typical search device is 30 ms, that of activation from sleep is 15 ms, and that of active device channel access is 15 ms. ZigBee technology is suitable for wireless control applications with strict delay requirements. A star ZigBee network can hold up to 254 slave devices and one master device. There can be up to 100 ZigBee networks in a region at the same time, and the network composition is flexible. The collision avoidance strategy is adopted, and the special time slot is reserved for the communication service which needs fixed bandwidth to avoid the

ZigBee technology support
The design of the alarm system not only breaks away from the tradition of only giving an alarm to remind people, and then manually shutting down or starting the device by people, but also uses the Internet of things to control the device to start or shut down. Using ZigBee networking technology, ZigBee technology is an advanced two-way wireless communication technology with short distance, low complexity, low power consumption, low data rate, unlicensed frequency band, low cost, high reliability and high security. Upload to the Internet through ZigBee coordinator, send to the cloud database, upload the real-time data to the mobile device, in case of force majeure, can timely communicate to the professional rescue personnel to solve the problem.

3.1.MCU module
In the MCU module, we choose CC2530 chip, which has the excellent performance of leading RF transceiver, industry standard enhanced 8051 CPU, programmable flash memory in the system, low energy consumption, 8-kb ram and many other powerful functions.

A / D converter
The system adoptsA/ D converter, which has the characteristics of two channels switching, and its resolution level is very high, the working time interval is 32hs, which improves the operation efficiency and feasibility. And it can process the signal by controlling di interface. The connection between its pin and MCU is CS, CLK, do, di. When CS input high level command, A/ D chip does not run, and the level of other ports is not limited. When the converter converts the signal, the MCU will send out the low level command, and connect the CS port with P10 to become low level. After the signal level conversion is completed, the signal conversion continues for a period of time.

Gas detection module
The finished gas sensor has four pins. Pins 1 and 2 are used to output current through the heater, and pins 3 and 4 are used to receive signals. If conditions permit, the sensor can also be used as a reducing substance. The semiconductor with negative charge and under this condition will have a general chemical reaction, so that the oxygen on the surface of the semiconductor will be reduced, so that the electric potential energy on the surface of the conductor will be reduced, so that the resistance of the sensor will be reduced, and the effect of detecting the detected gas will be achieved.
When the sensor comes into contact with combustible gas, it will react immediately. The combustible gas will be transformed into electrical signal through the sensor. When it passes through the signal amplifier, the signal will be amplified and transmitted to the A / D converter. The signal will be transformed into digital signal through the A / D converter and sent to the single chip microcomputer, and then the single chip microcomputer will issue instructions for the next operation.

Alarm module
In the alarm module, the single-chip microcomputer is connected with an external buzzer. When the data collected by the sensor is greater than the preset value, the single-chip microcomputer operates through the program, the alarm module is activated, the buzzer sounds, and the single-chip microcomputer transmits the signal. The ZigBee networking technology is used to wake up the corresponding equipment to start or shut down, and the corresponding measures are automatically taken to reduce the collected value, so as to return to the standard state When the data collected by the loop program is still larger than the preset value, the ZigBee Coordinator will upload it to the management department through the online database, and the professional personnel will help solve it.

Display module
The display screen is LCD, which can control the maximum temperature by pressing the key. If the monitored value changes, the display screen will make real-time display changes quickly. Using ZigBee networking technology, the collected data can be displayed in real time on the central control screen of ZigBee networking, and the corresponding values of sensors in each section can be displayed. It can be uploaded to the online server through routing, and the residential data can be displayed in real time on the mobile phone. Figure 2 Schematic diagram of hardware composition of the system The whole circuit is controlled by single chip microcomputer, including interface circuit, alarm device, temperature and humidity sensor circuit and digital tube display circuit. The interface circuit is composed of gas sensor and A / D converter. The gas sensor is mainly used to collect various gas contents in the environment, and then the data is transmitted to the single chip microcomputer through A / D converter; the temperature and humidity sensor transmits the collected loop data to the single chip microcomputer The alarm device can detect the content of various gases in the air, and then give an alarm when it exceeds the preset value according to the judgment. The most important single chip microcomputer can detect the gas concentration, temperature and humidity, and calculate and compare the detected data with the preset value. If it is greater than the original value, the alarm system will be started, and the output signal will control the electronic equipment connected in the ZigBee network, so as to achieve the purpose of removing the danger.

Terminal node sensor test
Place the paint sample near the gas detection system. OLED shows formaldehyde value is over standard, the buzzer sends out sound, and the output signal changes from low level to high level.

Automatic control test in ZigBee network
Two ZigBee terminal node modules with fan and LED lamp are connected to ZigBee network wirelessly. When the output signal changes from low level to high level, fan starts, LED light will be on. This signal can be regarded as the external output signal can control the equipment in ZigBee network, such as air purifier, open window, open exhaust fan, open humidifier, etc.

Network service connection test
The data collected by ZigBee terminal node is transmitted to ZigBee coordinator and then uploaded to network server through gateway route. Mobile phone connects to the cloud. The value of each ZigBee terminal node module can be viewed in real time on the mobile phone. When the alarm program triggers, the alarm notice is sent to the Internet, including informing the management department and informing the mobile equipment end and maintenance personnel.

Summary
On the basis of ZigBee technology, the single chip microcomputer and gas sensor are combined to form a detection system. The original intention of the system design is to get rid of the traditional control and monitoring methods, so as to achieve the communication between objects and realize the function of harmful gas detection and control. It can work from the physical layer to the network layer, connect to the Internet through the gateway and upload to the network terminal, realize the real-time observation of the value at the mobile end and the management end, adjust the value, view the past historical records, and realize two-way communication signal communication. The temperature, humidity and the concentration of various gases in the monitoring area are indispensable parameters for calibrating the environment, which are hidden and harmful to human health. Some gases are colorless and tasteless, the human body can not feel its presence by smell, so the detection of harmful gases is very important, which is the guarantee of people's healthy life.