Water Level Monitoring and Flood Alert System (Based on Environmental Factors)Objectives:
Software:
Read more- Monitor precipitation (rain) and atmospheric pressure as key indicators of potential floods or changes in water level.
- Transmit data wirelessly over long distances using LoRaWAN via The Things Stack, ideal for remote locations such as rivers, reservoirs, or rural areas.
- Generate early warnings for conditions that could lead to floods, allowing for proactive response.
- Visualize data on a cloud platform for continuous monitoring and trend analysis.
Objective Level: Intermediate
Prerequisites:- Fundamentals of Arduino (C/C++) programming.
- Basic concepts of electronics and sensors.
- Familiarity with the Arduino IDE or PlatformIO development environment.
- Understanding of LoRaWAN communication and The Things Stack operation.
- Basic knowledge of cloud IoT platforms.
- WISBLOCK Base: RAK19007 Base Board Rind Gen
- WISBLOCK Core: RAK3172 STM32WL5 (with integrated LoRaWAN)
- WISBLOCK Sensor:
- RAK12030 Rain Sensor
- RAK19006 BME680 Environment Sensor (for atmospheric pressure, temperature, and humidity)
- RAK12003 DS18B20 Temperature Sensor (for ambient or water temperature if immersed in a protective tube)
- WISBLOCK Miscellaneous:
- RAK1921 OLED Display (optional, for debugging and local reading)
- Other Components / Accessories:
- WisGate Edge Lite 2 (LoRaWAN Gateway)
- Battery Connector Cable
- Solar Panel Connector
- Solar Panel
- Screwdriver
- Arduino IDE or PlatformIO
- Arduino libraries for RAK modules (e.g., RAKwireless_RAK3372_BSP) and specific libraries for the sensors (e.g., Adafruit_BME680, DallasTemperature, OneWire, Adafruit_SSD1306, Adafruit_GFX).
- Configuration software for the RAK7268V2 gateway.
- Account on The Things Stack (for the LoRaWAN network) and a cloud IoT platform for visualization and alerts.
Estimated Duration: 8-12 hours.
Learning Outcomes:- Ability to design an environmental monitoring system focused on natural disaster prevention.
- Skill in interpreting precipitation and atmospheric pressure data in relation to flood risk.
- Mastery of LoRaWAN communication in potentially challenging environments (e.g., rural, with obstacles) using The Things Stack.
- Knowledge in configuring critical alerts and visualizing data for real-time decision-making.
- Experience in deploying IoT devices outdoors, considering water protection and energy autonomy.
- Hardware Assembly: Connect the RAK3372 (Core) module to the RAK1907 (Base Board). Connect the sensors (Rain Sensor, BME680, DS18B20) and the OLED Display (if used). Connect the battery cable and the solar panel.
- Development Environment Configuration: Install Arduino IDE/PlatformIO and support for the RAK3372 board. Install the necessary libraries for the sensors and the OLED.
- Node Programming (RAK3372):
- Write code to read data from the rain sensor (drop detection, or intensity estimation if the sensor allows).
- Read atmospheric pressure from the BME680 (a rapid pressure drop can indicate a low-pressure system and, therefore, bad weather and possible intense rain).
- Read temperature from the DS18B20.
- Implement logic to detect flood risk conditions (e.g., continuous rain for a given period, rapid and sustained pressure drop).
- Configure the RAK3372 as a LoRaWAN node and send data periodically, as well as alert messages when risk conditions are detected.
- Implement low-power modes (deep sleep) to maximize battery life.
- Gateway Configuration (RAK7268V2): Connect the gateway to the network and configure it to connect to The Things Stack.
- The Things Stack Configuration:
- Access The Things Stack console.
- Register the Gateway: Add the RAK7268V2 gateway.
- Create an Application: Create a new application.
- Register the Device (RAK3372 Node): Register the device with its LoRaWAN credentials.
- Configure the Payload Formatter (Decoder): Write Javascript code to decode the sensor payload.
- Configure Integrations for Alerts: Add an integration (e.g., "Webhook" or "MQTT") to an IoT platform or notification service to receive flood alerts.
- Testing and Deployment: Test the system in a real environment, simulating rain and observing changes in pressure. Ensure all components are inside a waterproof casing and that the rain sensor is properly exposed.
- Data Interpretation for Floods: Correlating sensor readings with actual flood risk may require more advanced data analysis and hydrological knowledge of the area. Consider integration with external meteorological data.
- Water Protection: All electronic components must be in a completely waterproof enclosure (IP67 or higher) if deployed outdoors and near water sources. The rain sensor must be designed for outdoor use.
- Rain Sensor Maintenance: The rain sensor may require periodic cleaning to prevent accumulation of dirt or debris that affects accuracy.
- Network Reliability: Ensure that LoRaWAN communication is robust in adverse weather conditions (rain, wind) and that the gateway has an optimal location.
- The system accurately monitors precipitation and atmospheric pressure.
- Flood risk alerts are generated promptly and reliably when predefined conditions are met.
- Data is clearly visualized on the cloud platform, allowing for effective monitoring.
- The device is resistant to environmental conditions and operates autonomously with solar power during the monitoring period.
- The code is robust, efficient, and the alert logic is effective.
11 projects • 9 followers
Teacher at Maude Studio & Erasmus+ project member: "Developing Solutions to Sustainability Using IoT" (2022-1-PT01-KA220-VET-000090202)
Thanks to Jose Miguel Fuentes.
Comments