Urban waterlogging monitoring system based on LoRa technology

. In the construction of smart city, this paper proposes a new waterlogging measurement mode: multiple small sensors are used as waterlogging information collection terminals, LoRa technology forms a wide area information network, STM32 series microcontroller and LoRa technology feed back the waterlogging terminal information to the information processing terminals. Digital mapping technology to get an intuitive map of waterlogging conditions, Through digital map technology, intuitive waterlogging map can be obtained, and the water level of each point can be networked to serve waterlogging prevention and control in smart cities in a more specific and accurate way.


Introduction
In modern society, with the rapid advancement of urbanization and the relative delay of infrastructure construction, urban drainage function.
In the field of wireless communication, bluetooth, ZigBee, GPRS and other wireless communication technologies are widely used.However, in the context of smart city, Bluetooth and ZigBee cannot meet the long-distance information transmission of kilometer level.In the aspect of cost, the cost burden caused by GPRS traffic charge is larger.LoRa(Long Range) technology is a new generation of wireless data transmission technology suitable for Long and ultra Long distance, which can maximize the longer distance communication and lower power consumption, while saving additional repeater costs.
The existing urban waterlogging detection and early warning network still has some problems, such as low accuracy of detection data, slow information transmission speed and low efficiency of system information processing.This paper explores the establishment of an urban waterlogging monitoring system based on LoRa technology and STM32 series single-chip microcomputer, combined with sensor technology and digital map technology, which has important engineering application value for the establishment of a complete and efficient urban waterlogging monitoring and warning network.

System design scheme
This project system mainly has three parts: information collection, information transmission and information processing.

Information collection and sending
It mainly includes two parts: information collection module and signal processing module: (1) Information collection module: including resonant water pressure sensor to collect water information in real time.
(2) Signal processing module: including STM32 single chip microcomputer, the information obtained from the water pressure sensor will be analyzed and re-coded.
(3) Information transmission module: including the transmission module of SX1278 wireless transceiver based on LoRa technology.

Information reception:
It mainly includes the receiving module of SX1278 wireless transceiver based on LoRa technology and the USB-TO-TTL module.The SX1278 wireless module connects to the USB-TO-TTL module through serial port communication.The USB-to-TTL module transmits the information received by the SX1278 wireless module to the upper computer.

Information processing and storage:
Including information processing terminal and storage terminal.The upper computer software mounted on the PC of the information processing terminal will automatically read the obtained information, analyze, process and transform it, and form the heat map of waterlogging situation by digital map drawing.At the same time, data is uploaded to the MySql database on the server for data storage.
3 System hardware design

System device
According to the design of the system, including information collection and sending part, information receiving part and information processing and storage part of the hardware design.
Schematic diagram of information collection and transmission devices is shown in Figure 1: The power supply circuit uses LM2596S-5V produced by Texas Instruments as a voltage regulator chip, which converts the battery power supply into a stable 5V output.The control core adopts STM32f103C8T6 minimum system development board.The information collecting and sending part of the device is integrated on a PCB board, with stable performance, minimal interference and high integration.

System software design
According to the design of the system, including data analysis and visualization, data upload and storage software design.

Platform front end
At the front end of the platform, winform framework is used to set up the upper computer.The functions of the upper computer include reading serial port data, analyzing data and uploading it to the MySql database of the cloud server, and drawing hot spot map and water volume change line chart with the data.

Platform backend
The back end of the platform uses Ali Cloud student server as the platform and MySql as the database.MySQL is an open source relational database management system (RDBMS).It uses the most commonly used database management language --Structured Query Language (SQL) for database management.MySQL is widely used because of its speed, reliability, and adaptability.

Data analysis and visualization
After receiving the data, the LoRa receiver transmits the corresponding data to the upper computer through the USB interface through the USB-TO-TTL converter.The software platform of the upper computer reads and analyzes the data, visualizes the data, and draws the hot spot map and trend map of waterlogging situation.

Data Upload and Storage
The upper computer uploads data to the MySql database on the cloud server to realize data storage.MySql database is carried on aliyun student server, which realizes the association between the host computer and the cloud database, and realizes data acquisition by multiple remote computers.

Conclusion
On the basis of the embedded software design and hardware design of the lower computer, the upper computer was built and the overall test was completed.In addition, the upper computer platform is improved by adding a database to store relevant information: the ITM Web of Conferences 47, 01019 (2022) CCCAR2022 https://doi.org/10.1051/itmconf/20224701019monitoring point location, monitoring point number, time, water level and other information are stored in MySQL database.At the same time, Ali Cloud is used as the server, and MySQL database is built on the network server, so as to realize simultaneous access to data and real-time data acquisition on multiple devices.The overall system has high performance, which can achieve stable long-distance communication and accurate water level monitoring.The upper computer platform can intuitively display the waterlogging situation, and realize the cloud connectivity of data.The project completed the independent design from the lower computer to the upper computer and then to the cloud, which really realized the system.