'HAETAE' is a legendary Korean animal that controls water.It was designed to create a product that can control the huge natural disaster of flooding.
The record heavy rain that occurred around August 2022 exceeded the capacity of the city's drainage system design. Accordingly, the Seoul Metropolitan Government announced plans to increase the capacity of the drainage system and install several large-scale rainwater storage and drainage facilities.According to a news report eight months ago, in addition to the large-capacity facilities, the rainwater basin on the side of the road was full of garbage, so it did not play its role properly and even conducted related experiments.
There are many reasons for flooding, but garbage is buried or blocked in the "storm drain" which basically drains accumulated water, so proper drainage is not achieved.The reasons for poor rainwater management are as follows.Basically, there is a huge amount of rainwater catch and no system to control it.There is no system for continuous monitoring and interaction of rainwater basins through sensors.
We propose a monitoring service that can manage, maintain, and repair storm drain in Seoul (or certain areas).It detects odors, water levels, camera in real time using IoT devices.Communicate information using the MOBIUS platform if a certain level of sensing value or higher is obtained.A camera 'subscribing' each sensor (MOBIUS function) takes a picture of a rainwater trap.It is handed over to the server, and the server periodically checks the status of the rainwater catch through the web page.
The picture above shows a service scenario.The sensor checks the condition of the storm drain at all times (with arduino/sensor).In the event of heavy rain forecast or odor detection, request rainwater management/monitoring to the server, respectively.When forecasting heavy rain, the manager monitors the condition of the storm drain and takes preventive measures.When odor is detected, request and take action to monitor the condition of the storm drain.The scenario described above is aimed at facilitating the management of rainwater collectors more effectively than the current method.
To enable sensing and perform computations, an Arduino board was connected to a Raspberry Pi via serial communication. The MOBIUS server was utilized as the server for data transmission.The protocols used HTTP and MQTT protocols, which are part of the oneM2M protocol.HTTP was used to upload and import data, and MQTT was used for subscriptions.The POST method was used to upload data, and the GET method was used to retrieve data periodically. In addition, subscription was used to receive data asynchronously.Due to the nature of using the camera, File Transfer Protocol (FTP) was available, but I simply wanted to byteize the image, load it on Mobius, and drag it from the server and save the picture (HTTP).
- Communication management: Provides communication with other CSEs, AEs, and NSEs
- Data management: Data storage and arbitration capabilities
- Subscription and Notification: Provides subscriptions and corresponding notifications to track events occurring on a resource
Connect Arduino Mega and Raspberry Pi 4 via serial communication.In Arduino, an operation for sensing values and event situation detection was conducted, and the odor threshold and the water level threshold were set through tests.It is judged that drainage does not proceed as it is recognized that the odor caused by foreign substances has occurred when the odor and water level to the degree of exceeding the threshold are generated.Serial communication sends signals to raspberry pi 4 in the rain pits.The Raspberry Pi continuously reads values from the Arduino and triggers an abnormal state when values are transmitted. Information from the gas sensor is sent as gas(CNT) and information from the water level sensor is sent as water(CNT) using the POST method.
Each CNT(gas and water) is subscribed to by the AE. When data is received in the gas(CNT) or water(CNT) the camera starts capturing images.
The captured images are converted into bytes and uploaded to the camera(CNT) using the POST method.
The server (MOBIUS Ubuntu Server) executes Python code when buttons are pressed on the web page to retrieve the camera byte information stored in MOBIUS using the GET method.
The retrieved byte information is decoded and stored on the server.
Users (administrators) can use the web page to maintain, repair, and monitor the status of the rainwater collector in real-time or when abnormal situations are detected.
- Gas Sensor / Camera Operation
When Arduino performs calculations and exceeds a certain threshold, it sends the information to Raspberry Pi via serial communication. Once an abnormal situation occurs, Raspberry Pi identifies the sensor from which the information was received and sends '1(True)' as a signal. Afterward, the data is stored in the MOBIUS server, and since there are subscriptions for each CNT, the camera starts capturing images and the image resources are stored in the camera(CNT).
- Water Sensor Operation
Similarly, when the water level sensor exceeds a certain threshold(over 512(int)) or the value does not decrease, it sends '1(True)' to the MOBIUS server.
- CV
The OpenCV (Computer Vision) library is utilized to detect the lid area where water is falling. Initially, the Canny algorithm is applied to extract the contour lines. Then, the HoughLinesP algorithm is used to apply the Hough transform and extract the number of lines present. By adjusting the min_threshold and max_threshold values to lower values, even smaller lines can be detected, making the detection more sensitive.
When there is no trash or obstruction, only the lines of the lid are visible. However, if there is trash or an obstruction that blocks the hole on the lid, the number of lines and their patterns are analyzed to determine the current situation. In such cases, the system captures the current scene and sends the captured image to the server.
As for the form of the web page, the server used node.js and made it using HTML and Bootstrap.On the web page where you can directly monitor the rainwater catch, if the values of the sensor exceed a certain number, you can receive pictures taken by the camera and check them in real time.When each raindrop button is pressed on the web page, the monitor screen detects an abnormal situation and shows a picture taken by the notified camera. The administrator can check the photos to manage, repair, and maintain specific storm drains.
There are about 430, 000 storm drains in Seoul. It is very difficult and inefficient for a person to manage it daily. If it is possible to continuously monitor the condition and provide feedback, it will be possible to manage rainwater receiving more efficiently. By actively managing storm drain in real-time using various sensors, it is possible to take proactive measures to reduce the damage caused by disasters such as floods. Additionally, there is a significant preventive effect on the odor and environmental pollution caused by foreign substances or waste.HAETAE's Storm Darin Monitoring System will be a step in efforts to address/prevent the worsening flood damage.
[YouTube] https://www.youtube.com/watch?v=2rTyg_ZOa-Q&t=1s
[Hackster.io] https://www.hackster.io/haetae/storm-drain-monitoring-services-3b4000