Storm drains are found everywhere. They are at the end of your driveway, in the middle of the downtown intersection, and distributed throughout your favorite park. A proper functioning storm drain is essential to manage storm water.
Storm water backup will result in immediate flooding around the grates and can cause significant flood damage to the resulting area. In addition, instead of the storm runoff going through the sewers to a proper reservoirs, it now pollutes the streets and yards with all the filth the water picks up along its drain path. An IoT ultrasonic sensor can be mounted underneath a storm drain to alert stakeholders when it is time to give their storm drain the love and attention it needs to keep their water moving.
Storm Water Catch Basin DiagramThe drain defender will be attached on the underside of the storm drain. Wherever it can have line of sight on the water level of the drainage pipes. The drain defender will indirectly measure flow using an ultrasonic level sensor that will monitor the water level height below it. The sensor will record when rain is falling and how quickly the drain is filling or draining. This sensor is attached to the AVR-IoT Cellular mini enabling the data to be sent to Microsoft Azure IoT Hub. Once data is collected there it is easy to set a height threshold to send an alert to a utility service.
Design and ComponentsThis design only requires a couple of components to have a valuable asset added to any storm drain.
AVR-IoT Cellular Mini - Microcontroller with LTE connectivity allows the Drain Defender to be placed in the most remote of locations. It will interpret the fill height of the catch basin and send the data via MQTT to a web server.
JSN-SR04T Ultrasonic Distance Sensor - This distance sensor can measure both water height during a rain event and the height of accumulated garbage within the catch basin.
3.7V Rechargeable Battery - The ability to recharge the sensor when necessary is critical. Battery life can also be extended by putting the microcontroller in a deep sleep mode between readings and only increasing sample rate during a rain event.
AssemblyElectrical assembly of the board and sensor is straight forward. The ultrasonic sensor has four pins that attach to the AVR-IoT Cellular Mini as shown in the schematic. A 3.7 V rechargeable battery can be used to power the board when ready to deploy in the field.
Board Provisioning for LTE and MQTT
The AVR-IoT comes with a prepaid sim card that must be activated to enable LTE connectivity. A great reference can be found in another Hackster.io project post found here: quick start guide
To provision the AVR-IoT to send measurement data to Azure IoT Hub, the provision.ino sketch must be used from the examples in the github library here: https://github.com/microchip-pic-avr-solutions/avr-iot-cellular-arduino-library.
It is recommended to use Putty to communicate with the Arduino after uploading the provision.ino sketch. It requires that you put the Azure IoT Hub device name in and it didn't work with the Arduino IDE for me. Anytime I would hit enter after entering a character via the serial terminal, it would register two enter clicks and prevent me from entering the correct information.
I then used Microsoft Azure IoT Explorer to view the telemetry data to ensure the right data was being sent. This just requires obtaining the primary connection key from Azure IoT Hub for your given device name.
Now that the AVR-IoT Cellular Mini is collecting sensor data and sending the data to Azure IoT Hub a minimum viable product can be constructed.
Mechanical Design : A 3D printed enclosure can easily be designed to house the microcontroller, a battery, and the ultrasonic sensor. The design intent is to expose the waterproof transducer outside the enclosure and face it towards the bottom of the catch basin. In addition, the enclosure should match the thickness of the storm drain grates so it doesn't impede the flow of water. Ultimately a 6" x 1" enclosure can be constructed that can mount underneath the grate and be affixed using cable ties.
Backend Server : Now that the height data resides at Azure IoT Hub, the messages must be routed to a webserver that can utilize the information. The plan is to set the baseline threshold height 6 inches below the outlet sewer pipe. The server will pull data from a weather forecasting api that can correlate the rainfall and height after rainfall to better predict when obstructions above the grate are present as well.
ConclusionsOverall, the concept of remotely monitoring storm drain function seems viable. This may also reduce the work of routine maintenance throughout crowded cities and allow workers to focus on the storm drains that need the attention.
Comments