Design of ESP8266 in Environmental Monitoring System

DOI: 10.4236/oalib.1105546   PDF   HTML   XML   306 Downloads   564 Views  

Abstract

Aiming at the current situation of traditional artificial stagnation mode (high cost, small monitoring amount and slow update of monitoring data) in the field of environmental monitoring in most areas of China, this paper designs an automatic environment monitoring system, which is based on STM32F103RCT6 Collect environmental parameters such as atmosphere, water and soil, and then transmits the data to the terminal collection server through UDP through the ESP8266 module. The terminal collection server transmits the data to the management monitoring center through the internet network, and finally realizes remote environment monitoring. After preliminary text, the system has low energy consumption, strong stability, accurate data transmission and low cost, and has certain practicability.

Share and Cite:

Zhang, C. , Qiao, Y. , Li, R. and Liu, Z. (2019) Design of ESP8266 in Environmental Monitoring System. Open Access Library Journal, 6, 1-6. doi: 10.4236/oalib.1105546.

1. Introduction

The environment is the basis for human survival, but with the development of industry and economy, environmental problems are becoming more and more serious [1] . The development of smart and environmental protection and the role of intelligent monitoring equipment in environmental monitoring are important measures to promote environmental monitoring and governance in China [2] .

In 2016, Sichuan Province proposed three major battles of “blue sky”, “clear water” and “green land”, and carried out large-scale greening and deepening Sichuan operations [3] , but most of the existing monitoring systems use internal personnel to read measurement parameters [4] . The method has the disadvantages of high measurement cost, long measurement period and untimely update of measurement parameters, which is not conducive to the development of China’s environmental protection strategy [5] . Based on the ESP8266 wireless communication module, this project designs a parameter collection and control system for environmental monitors with remote monitoring, wireless communication and real-time early warning. The system has the advantages of low manufacturing cost and stable transmission, which is conducive to promoting environmental monitoring.

2. Overall System Design

The system network data transmission diagram is shown in Figure 1. The environmental detector monitors the atmosphere, water and soil in the environment, and the environmental monitoring point reads the pollution parameters collected by the front-end environmental monitor, and builds corresponding points at each monitoring point. The server collects the environmental information collected by the monitoring environment monitor through the wireless router, including air quality, pollution degree and related meteorological parameters, and then transmits the corresponding data to the network for storage and subsequent analysis and processing through the server. Administrators and users can remotely manage and browse based on the privilege level.

3. Hardware Design

The environmental monitoring instrument parameter acquisition and control system has parameter acquisition, real-time display and wireless communication functions. The hardware part of the system mainly includes five modules: data

Figure 1. System network data transmission diagram.

acquisition, touch screen module, power module, wireless communication and microcontroller unit (MCU). The overall structure is shown in Figure 2.

Among them, the environmental detector uses the existing environmental monitoring equipment supporting RS232 interface, collects the pollution index of atmosphere, soil and water, and transmits it to the MCU. The MCU processes the original data in the initial stage and transmits it to the wireless through the wireless communication module. Routing, in turn enables data exchange with the server. At the same time, the administrator sends a control command through the server, transmits it to the MCU through the wireless communication module, and controls the work of the system through the MCU. In addition, the touch screen has real-time display and parameter setting functions, and the information collected by the environmental monitor can be displayed on the touch screen in real time, and the parameters can be input through the touch screen to set the system parameters, which is convenient for the user to configure the system.

3.1. MCU Module

The MCU is the core of the system. In this system, the MCU module is initialized by the GPIO port control environment monitor, touch screen, and wireless communication module. MCU adopts stm32f103rct6 of STM32 company, which adopts CortexTM-M3 kernel [6] , has 256KFlash and 5 serial port outputs, which can meet the requirements of parameter acquisition, display module, wireless communication and software debugging. RS232 asynchronous communication is used to communicate with the environmental monitor through Usart1, and

Figure 2. Hardware system structure diagram.

the pollution parameters collected by the environmental monitor are collected and pre-processed, and the functions of the wireless communication module initialization, connection server, data transmission and reception, etc. are controlled by the external 1 k pull-up resistor. Data transmission and command transmission between the MCU and the server, and the MCU sends control commands through the Usart2 to control the operation of the serial port screen to realize system configuration and real-time display functions.

3.2. Wireless Communication

In the system, the wireless monitoring module implements wireless communication between the monitoring point MCU and the server, introduces a CRC check to ensure the integrity and stability of the data transmission, and ensures the stability of the communication link by sending a heartbeat command and a response command. The module transmits the environmental monitoring data of the monitoring point and the control commands sent by the administrator through the server to ensure the timely update of the monitoring data and the remote monitoring of the administrator.

The wireless communication adopts the ESP8266 module, which has built-in TCP/IP protocol stack [7] and has two transmission modes of UDP/TCP. The circuit diagram is shown in Figure 3.

The ESP8266 module is connected to the STM32f103rct6 serial port Usart3, with a baud rate of 115,200 Hz. The UDP transmission is used to transmit the environmental parameters collected by the data acquisition terminal to the server.

4. Conclusion

The ESP8266-based environmental monitor remote parameter acquisition and control system transmits the pollution parameters of the atmosphere, water and soil collected by the environmental monitor to the server through ESP8266, and then realizes the communication between the administrator and the server through the internet network, and finally realizes the Remote monitoring of environmental

Figure 3. Wireless module circuit diagram.

pollution. The system has the advantages of high stability, logical rigor, low price, etc. Compared with the traditional measurement method, it saves human resources, optimizes the data collection speed, and further realizes intelligent monitoring, which is beneficial to China’s environmental monitoring business.

Acknowledgements

This work was supported by Sichuan Science and Technology Program (2018TJPT0008, 2019YFG0430). Key project number of department of education (17ZA0023).

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Zhao, J.H. and Zhang, C.X. (2016) An Environment Detection System Based on Wireless Communication. Computer & Digital Engineering, 30, 1963-1966.
[2] Fan, X.L. (2016) Application of ESP8266 in Intelligent Home Monitoring System. Micro-controllers & Embedded Systems, 16, 52-56.
[3] Xu, X.Y., Zhang, Y., Ji, M.H. and Song, Y. (2013) Determination of Effective Transmission Distances of Wireless Sensor Network Nodes for Agro-Ecological Environment Monitoring. Transactions of the Chinese Society of Agricultural Engineering, 29, 164-170.
[4] Zheng, X., Zhao, Z. and Liu, D. (2008) Integrated Mining Model Framework for Soil Environmental Monitoring Data-Based on Data Warehouse. Transactions of the Case, 24, 162-168.
[5] Leonardi, M., Vera, J. and Tarifeno, E. (2009) Diseases of the Chilean Flounder Paralichthys adspersus (Steindachner, 1867) as Biomarkers of Marine Coastal Pollution near the Itata River (Chile). Part I: In Situ Macroscopic Lesions. Archives of Environmental Contamination and Toxicology, 56, 536-545.
https://doi.org/10.1007/s00244-008-9208-4
[6] Schmitt, C.J., Brumbaugh, W.G. and May, T.W. (2009) Concentrations of Cadmium, Cobalt, Lead, Nickel, and Zinc in Blood and Fillets of Northern Hog Sucker (Hypentelium nigricans) from Streams Contaminated by Lead-Zinc Mining: Implications for Monitoring. Archives of Environmental Contamination and Toxicology, 56, 509-524. https://doi.org/10.1007/s00244-009-9288-9
[7] Zhai, J.W., Liu, W.H., Fu, W.Q. and Tian, J.J. (2016) Intelligent Environmental Monitoring Laboratory Information Management System. Environmental Science and Management, 41, 150-153.

  
comments powered by Disqus

Copyright © 2020 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.