Abstract
This paper realizes the design of home safety early warning system by studying the wireless communication networking technology of ZigBee and WiFi, as well as sensor communication technology, which is based on taking home safety monitoring as the application background. In this study, CC2530 chip was used as ZigBee wireless communication module. A novel home security IoT monitoring method was proposed through sensor triggering, human activity trajectory perception algorithm design, and wireless networking and communication optimization. Meanwhile, the safety early warning and remote monitoring of home staff can be realized, and home safety can be guaranteed. The system can achieve the purpose of home monitoring and early warning with low software and hardware cost through the experimental design and result analysis. It can not only provide reference for the design of sensor communication system, but also provide technical reference for aging society and response.
You have full access to this open access chapter, Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
With the rapid development of society, science and technology, people have higher and higher requirements for their quality of life. In particular, people pay great attention to home safety. Therefore, designing a home safety IoT monitoring system, which uses ZigBee and WiFi technology to collect and transmit data between nodes and between nodes and platforms. The sensor nodes form a wireless sensor network which distribute in every corner of the home. The system can not only realize the real-time monitoring of the home environment, but also ensure the safety of the elderly living alone preliminarily and reduce their need for care at home which provides great convenience for their children [1, 2].
In this system, CC2530 is used as the core of wireless transceiver and processing module [3]. CC2530 is an integrated chip, which uses the 8051 core and encapsulates the Z-stack protocol stack [4,5,6]. It can be used to transmit data in wireless sensor networks. The system uses CC2530 module to establish a small ZigBee network [7,8,9], which is composed of three node types: coordinator node, router node and sensor node.
With the changing needs of people, wireless access technology is more and more in line with the development trend of society. Therefore, people's demand for wireless sensor networks is increasing exponentially. Wireless sensor networks (WSN) adopts a distributed sensor network, which fully combines various advanced technologies such as distributed information processing technology, modern network and wireless communication technology [10, 11]. It can cooperate with each other to detect and collect all monitored area data in real time, and process the collected data. Then the data is transmitted wirelessly and transmitted to users in the form of wireless Ad Hoc network and multi hop network [12,13,14,15].
2 System Architecture Design
In the home security IoT monitoring system, it uses the low-cost and low-power ZigBee low-speed and short-distance wireless network protocol to detect the security parameters of the detected location. The system is mainly composed of coordinator, router, terminal, gateway, server, client and other components. The coordinator is in charge of creating Zigbee network at the mobile terminal, initializing the network, assigning an address to the mobile terminal node that initially needs to join the network and controlling the joining of the mobile terminal node. It can upload the collected data and realize the automation function of remote control of the terminal at the mobile terminal. The terminal equipment includes temperature and humidity sensor, MQ2 smoke sensor and human infrared sensor, which can realize indoor data acquisition, storage and transmission. The router is responsible for forwarding messages from other nodes.
In the system architecture design, the terminal collects the required data, and the coordinator receives the data through ZigBee sensor node networking. The coordinator uploads the data to the gateway through the serial port, and then the gateway sends its data to the computer. The WiFi module can also be driven through the protocol stack. The WiFi module can communicate with mobile phones, computers and routers, and load the collected data into HTTP format and send it to the cloud service OneNet cloud platform. The sensing layer of the system sends the data which collected by the sensor to the application layer through the network layer. The application layer analyzes and processes the data, and monitors it in real time. When the monitoring data is abnormal, it will send out alarm prompt information in time, so as to realize the management and monitoring of home safety. The systematic software flow chart is described in Fig. 1.
The architecture of the whole IoT system consists of three parts: IoT device end, device cloud platform and web background server [16]. The Internet of things device cloud platform is based on OneNet device cloud. The main steps of OneNet cloud platform accessing the development process are as follows [17]:
-
1)
Registered product information;
-
2)
Create equipment list;
-
3)
Establish TCP connection and upload data;
-
4)
View the data flow.
The device access flow chart of OneNet cloud platform is shown in Fig. 2.
3 Hardware Platform
The design of home IoT monitoring system is mainly composed of sensor, ZigBee gateway design and OneNet cloud platform [18]. The design of the systematic hardware architecture is shown in Fig. 3.
In the design of nodes, we mainly refer to several commonly used sensors in home security to meet the requirements of the system. The human infrared sensor adopts HC-SR501 [19] model, and its sensing range is less than 7m. We usually add a Fresnel lens to the sensor module to improve the sensitivity of human detection. DHT11 contains a temperature and humidity sensor with calibrated digital signal output [20, 21]. The module realizes the collection of temperature and humidity data by controlling the timing. It is necessary to wait 1 s after the sensor is powered on to ensure the accuracy of the measured data. MQ2 sensor is mainly used to detect gas leakage [22]. It has the advantages of high sensitivity, good anti-interference and long service life. In the setting of the system, if the concentration of natural gas leakage is higher, the voltage output from AO pin will be higher. Thus, the value after ADC conversion will be larger. The ESP8266 WiFi module has low power consumption, supports transparent transmission and does not have serious packet loss. It can not only realize data transmission, but also connect to a designated router as a WiFi client [23]. The buzzer of the active module is selected. The active module is driven by triode, which is triggered at low level, that is, when the I/O port inputs low level, the buzzer makes a sound.
4 Algorithm Design and Implementation
The system uses IAR Embedded Workbench platform to realize ZigBee data communication through the design of ZigBee connection algorithm. In this system, the terminal enters the SampleApp_ProcessEvent() event firstly, and then the terminal calls SampleApp_SendTheMessage() function collects data. In this function, it sends the data by calling AF_DataRequest() function. If the data sent by the terminal is received through the ZigBee coordinator, it will enter SampleApp_ProcessEvent() event, which triggers SampleApp_MessageMSGCB() function in turn, receives the data sent by the terminal, and then its data is displayed on the OLED screen.
In SampleApp.c, configuring the product apikey, device ID, router account and password of OneNet cloud platform to realize the data interaction between WiFi module and OneNet cloud platform. The configuration code is as follows:
![figure a](http://media.springernature.com/lw685/springer-static/image/chp%3A10.1007%2F978-981-19-2456-9_40/MediaObjects/520720_1_En_40_Figa_HTML.png)
MCU can use ESP8266 WiFi module to send AT command to realize the configuration of WiFi transmission module. The configuration command is shown in Table 1.
Since the data packet of DHT11 sensor is composed of 5 bytes [24] and its data output is uncoded binary data, the temperature and humidity data need to be processed separately. The calculation formulas of temperature and humidity values are shown in (1) and (2), where byte4 is the integer of humidity, byte3 is the decimal of humidity, byte2 is the integer of temperature, and byte1 is the decimal of temperature.
The resistance calculation of MQ2 smoke sensor is shown in formula (3), where Rs is the resistance of the sensor, Vc is the loop voltage, Vrl is the output voltage of the sensor, and Rl is the load resistance. The calculation of resistance Rs and the concentration C of the measured gas in the air is shown in formula (4), where m and n are constants. The constant n is related to the sensitivity of gas detection. It will change with the sensor material, gas type, measurement temperature and activator [25]. For combustible gases, most values of the constant m are between 1/2 and 1/3 [26]. According to the above formula, the output voltage will increase with the increase of gas concentration.
The human infrared sensor uses the algorithm of timer T1 query mode, and its safety alarm logic judgment steps are as follows. The function realization process of the alarm program is shown in Fig. 4.
-
1)
The InitT1() function initializes the timer.
-
2)
To configure the three registers T1CTL, T1STAT and IRCON of timer T1, that is, set T1CTL = 0x0d (the working clock is 128 frequency division, and the automatic reload is 0x0000-0xFFFF), T1STAT = 0x21(the status is channel 0, the interrupt is valid), and IRCON = 1 (you can judge whether the storage space is full by querying).
-
3)
To judge whether a person is detected and set DATA_PIN = 1 is detected.
-
4)
If no one is detected, judge whether the storage space is full.
-
5)
If the storage space is full, IRCON > 0, clear it, set IRCON = 0, and judge whether the unattended time count is within 12 h, so as to know whether there is any abnormality.
-
6)
If count > = 12 h, it is considered that the elderly living alone have an abnormal state, the buzzer gives an alarm and LED1 is off.
5 Experimental Analysis
5.1 Sensor Data
After the software and hardware of the system are designed, data acquisition is carried out in the laboratory. The temperature, humidity and MQ data measured by terminal 1 are shown in Fig. 5. If humidity or MQ value is detected excessively, the buzzer will sound an alarm. The information detected by terminal 2 is shown in Fig. 6. If no person detected is displayed in the detection results for a long time, LED1 light will be on and the buzzer will alarm.
5.2 OneNet Cloud Platform Data
Selecting the baud rate of 115200 on the serial port debugging tool after the configuration of OneNet cloud platform is completed. The configuration results are shown in Fig. 7. The WiFi module uses STA+AP mode. The WiFi serial port module establishes a TCP connection, configures a server with IP 183.230.40.33 and port number 80. In the transparent transmission mode, the data is transmitted, and the module is connected to the network through the router, so as to realize the remote control of the equipment by the computer.
After the system is docked through WiFi module and OneNet cloud platform, the temperature and humidity sensor uploads the collected data to the cloud platform successfully, as shown in Fig. 8. I take 10 groups of data as an example through the long-term collection of temperature and humidity data in the laboratory, as shown in Fig. 9.
6 Conclusion
This paper takes ZigBee technology as the core through the combination of ZigBee wireless Ad Hoc network and WiFi communication technology. The home IoT monitoring system is studied and designed, which integrates the Internet, intelligent alarm, communication network and other scientific and technological means effectively. The system adopts temperature and humidity sensor, human infrared sensor and MQ2 smoke sensor to realize the data acquisition of the home environment. For this data, if there is any abnormality, the buzzer will give an alarm. The system adopts ZigBee technology with low cost, low power consumption and strong networking ability, which not only increases the practicability of the system, but also can monitor home safety in real time for a long time, so as to avoid safety accidents and reduce losses.
References
Mei, M., Shen, S.: A data processing method in ZigBee life assistance system. Comput. Technol. Dev. (030): 005 (2020)
Das, R., Bera, J.N.: ZigBee based small-world home area networking for decentralized monitoring and control of smart appliances. In: 2021 5th International Conference on Smart Grid and Smart Cities (ICSGSC), pp. 66–71. IEEE, Tokyo (2021)
Bernatin, T., Nisha, S.A., Revathy, Chitra, P.: Implementation of communication aid using zigbee technology. In: 2021 5th International Conference on Intelligent Computing and Control Systems (ICICCS), pp. 29–32. IEEE, Madurai (2021)
Jia, N., Li, Y.: Construction of personalized health monitoring platform based on intelligent wearable device. Comput. Sci. 46(6A), 566–570 (2019)
Cen, R., Jiang, Q., Hu, J., Sun, M.: ZigBee WiFi gateway for smart home applications, 26 (1), 232–235 (2017)
Mamadou, A.M., Chalhoub, G.: Enhancing the CSMA/CA of IEEE 802.15.4 for better coexistence with IEEE 802.11. Wireless Netw. 27(6), 3903(2021)
Wang, D., Jiang, S.: A novel intelligent curtain control system based on ZigBee. In: 2020 5th International Conference on Mechanical, Control and Computer Engineering (ICMCCE), pp. 1010–1013. IEEE, Harbin (2020)
Abdalgader, K., Al Ajmi, R., Saini, D.K.: IoT-based system to measure thermal insulation efficiency. J. Ambient Intell. Hum. Comput. (2010)
Han, N., Chen, S., Zhang, X., Zhou, Y., Zhang, K., Feng, J.: Open architecture design of smart home integrated sensing device. Power Inf. Commun. Technol. 18(04), 104–108 (2020)
Li, P., Liu, H., Guo, L., Zhang, L., Wang, X., Wu, X.: High-quality learning resource dissemination based on opportunistic networks in campus collaborative learning context. In: Guo, S., Liu, K., Chen, C., Huang, H. (eds.) CWSN 2019. CCIS, vol. 1101, pp. 236–248. Springer, Singapore (2019). https://doi.org/10.1007/978-981-15-1785-3_18
Yan, X., Ruan, Y., Wen, Z.: Design of smoke automatic alarm system based on wireless infrared communication. Modern Electron. Technol. 44(8), 24–28 (2021)
Samijayani, O.N., Darwis, R., Rahmatia, S., Mujadin, A., Astharini, D.: Hybrid ZigBee and WiFi wireless sensor networks for hydroponic monitoring. In: 2020 International Conference on Electrical, Communication, and Computer Engineering (ICECCE), pp. 1–4. IEEE, Istanbul (2020)
Klobas, J.E., McGill, T., Wang, X.: How perceived security risk affects intention to use smart home devices: a reasoned action explanation. Comput. Secur. 87 (2019)
Impedovo, D., Pirlo, G.: Artificial intelligence applications to smart city and smart enterprise. Appl. Sci. 10(8), 2944 (2020)
Zhan, Q., He, N., Chen, Z., Huang, Z.: Research on ZigBee-based remote water temperature monitoring and control system. In: 2021 IEEE 2nd International Conference on Big Data, Artificial Intelligence and Internet of Things Engineering (ICBAIE), pp. 1074–1077. IEEE, Nanchang (2021)
Li, J., Zhang, Y., Man, J., Zhou, Y., Wu, X.: SISL and SIRL: two knowledge dissemination models with leader nodes on cooperative learning networks. Physica A 468, 740–749 (2017)
Parida, D., Behera, A., Naik, J.K., Pattanaik, S., Nanda, R.S.: Real-time Environment Monitoring System using ESP8266 and ThingSpeak on Internet of Things Platform. 2019 International Conference on Intelligent Computing and Control Systems (ICCS), pp. 225–229. IEEE, Madurai (2019)
Wang, D., Yuan, W., Wu, D., Liu, S.: Library environment monitoring system based on WiFi internet of things. Comput. Sci. 45(11), 532–5349 (2018)
Yongyong, Y., Chenghao, H.: Design of data acquisition system of electric meter based on ZigBee Wireless Technology. In: 2020 IEEE International Conference on Advances in Electrical Engineering and Computer Applications (AEECA), pp. 109–112. IEEE, Dalian (2020)
Qin, Z., Sun, Y., Hu, J., Zhou, W., Liu, J.: Enhancing efficient link performance in ZigBee under cross-technology interference. Mob. Networks Appl. 25(1), 68–81 (2019). https://doi.org/10.1007/s11036-018-1190-0
Kinoshita, K., Nishikori, S., Tanigawa, Y., Tode, H., Watanabe, T.: A ZigBee/Wi-Fi cooperative channel control method and its prototyping. Web Sci. 103(3), 181–189 (2020)
Shao, C., Hoorin, P., Roh, H., Wonjun, L.: DOTA: physical-layer decomposing and threading for ZigBee/Wi-Fi co-transmission. Web Sci. 8(1), 133–136 (2019)
Yasmine, B.A., Balaji, M., Vishnuvardhan, G., Harshavardhan, G., Lazer, M.T.: Development of animal collar for state of health determination of livestock. J. Inf. Optim. Sci. 41(2), 489–497 (2020)
Vallabh, B., Khan, A., Nandan, D., Choubisa, M.: Data acquisition technique for temperature measurement through DHT11 sensor. In: Goyal, D., Chaturvedi, P., Nagar, A.K., Purohit, S.D. (eds.) Proceedings of Second International Conference on Smart Energy and Communication. AIS, pp. 547–555. Springer, Singapore (2021). https://doi.org/10.1007/978-981-15-6707-0_53
Hernández, C., Villagrán, S., Gaona, P.: Predictive model for detecting MQ2 gases using fuzzy logic on IoT devices. In: Jayne, C., Iliadis, L. (eds.) EANN 2016. CCIS, vol. 629, pp. 176–185. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-44188-7_13
Gautam, A., Verma, G., Qamar, S., Shekhar, S.: Vehicle pollution monitoring, control and challan system using MQ2 sensor based on internet of things. Wireless Personal Communications 116, 1071–1085 (2021)
Acknowledgements
This work is partly supported by the National Key R&D Program of China under grant No. 2020YFC1523305; the National Natural Science Foundation of China under Grant No. 61877037, 61872228, 61977044, 62077035; the Key R & D Program of Shaanxi Province under grant No. 2020GY-221, 2019ZDLSF07–01, 2020ZDLGY10–05; the Natural Science Basis Research Plan in Shaanxi Province of China under Grant No. 2020JM-302, 2020JM-303, 2017JM6060; the S&T Plan of Xi'an City of China under Grant No. 2019216914GXRC005CG006-GXYD5.1; the Fundamental Research Funds for the Central Universities of China under Grant No. GK201903090, GK201801004; the Shaanxi Normal University Foundational Education Course Research Center of Ministry of Education of China under Grant No. 2019-JCJY009; the second batch of new engineering research and practice projects of the Ministry of Education of China under Grant No. E-RGZN20201045.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Copyright information
© 2022 The Author(s)
About this paper
Cite this paper
An, N., Li, P., Wang, X., Wu, X., Dang, Y. (2022). A Novel Home Safety IoT Monitoring Method Based on ZigBee Networking. In: Qian, Z., Jabbar, M., Li, X. (eds) Proceeding of 2021 International Conference on Wireless Communications, Networking and Applications. WCNA 2021. Lecture Notes in Electrical Engineering. Springer, Singapore. https://doi.org/10.1007/978-981-19-2456-9_40
Download citation
DOI: https://doi.org/10.1007/978-981-19-2456-9_40
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-19-2455-2
Online ISBN: 978-981-19-2456-9
eBook Packages: EngineeringEngineering (R0)