IoT Flood and River Water-Level Early Warning in Nepal
A practical final-year IoT project for Nepali engineering students using ESP8266, ESP32, or Raspberry Pi to monitor river level, generate local warnings, send alerts, and visualize flood conditions through a custom database, web app, and mobile app.
- Flood Early Warning
- River Water Level
- Nepal
- Final Year Project
- Engineering Students
- ESP32
- ESP8266
- Raspberry PI
- LoRa
- GSM
- Ultrasonic Sensor
- WEB APP
- Mobile APP
- Database
- IOT Dashboard
- Published
- Updated
- Reading time
- 6 min read
- Author
- Saroj Chaudhary
- Role
- IoT & Embedded Systems Engineer
An IoT flood and river water-level early warning project is a highly practical final-year project for engineering students in Nepal.
The system continuously measures river, stream, canal, or drainage water level and generates warnings when the level crosses configured thresholds.
A strong Bachelor-level project should go beyond only displaying the sensor value. It can combine ESP8266 or ESP32 sensor nodes, LoRa or GSM communication, local sirens, a custom database, web dashboard, mobile application, historical graphs, and alert management.
Project Objective
The main objective is to detect rising water levels early and communicate the condition locally and remotely.
A basic monitoring logic can use three stages:
Normal
↓
Warning
↓
Danger
Each stage can trigger a different response.
For example:
Normal -> Monitor only
Warning -> Dashboard + mobile alert
Danger -> Siren + SMS/mobile alert + dashboard warning
Why This Project Is Relevant in Nepal
Nepal has many rivers, streams, steep catchments, lowland flood-prone areas, and settlements where rapid changes in water level can create serious risks.
A student prototype can be designed around use cases such as:
- river monitoring
- flood-prone communities
- roadside drainage
- irrigation canals
- small streams
- culverts
- local early-warning demonstrations
The same architecture can also be adapted for flood and water-level monitoring projects anywhere in the world.
Suggested System Architecture
A complete project can use one or more water-level monitoring nodes.
Ultrasonic / Water-Level Sensor
|
v
ESP8266 / ESP32
|
+------+------+
| |
v v
Local Siren LoRa / GSM / Wi-Fi
|
v
Raspberry Pi Gateway
(Optional)
|
v
Custom API / Server
|
v
Custom Database
|
+-----+-----+
| |
v v
Web App Mobile App
|
v
Live Water Level
Warning Status
Historical Graphs
Alerts and Reports
For a remote site without reliable Wi-Fi, ESP32 with GSM or LoRa is often more practical than depending on a nearby router.
ESP8266, ESP32 and Raspberry Pi Options
ESP8266
ESP8266 is suitable for:
- low-cost prototypes
- Wi-Fi-based river monitoring
- a small number of sensors
- laboratory demonstrations
It is a good choice when the monitoring point has reliable Wi-Fi.
ESP32
ESP32 is generally the stronger option for a field-oriented final-year project because it provides:
- more GPIO
- more serial interfaces
- more processing capability
- easier integration with GSM or LoRa
- better expansion for additional sensors
- Wi-Fi and Bluetooth
ESP32 is a good main controller for a complete flood-monitoring node.
Raspberry Pi
Raspberry Pi can be added as an edge gateway when several ESP32 or ESP8266 nodes are deployed.
It can handle:
- MQTT communication
- local data buffering
- local database
- multiple sensor nodes
- local dashboard
- edge analytics
- internet-failure storage
- forwarding data to the main server
A larger project can use:
Several ESP32 River Nodes
↓
LoRa
↓
Raspberry Pi Gateway
↓
Local Storage / Processing
↓
Cloud Server
Main Hardware Components
A typical monitoring node can include:
| Component | Purpose |
|---|---|
| ESP32 or ESP8266 | Main controller |
| Ultrasonic sensor | Measures distance to water surface |
| Water-level sensor | Optional direct level measurement |
| LoRa module | Long-range node communication |
| GSM/LTE modem | Remote internet/SMS connectivity |
| Siren or buzzer | Local warning |
| LED indicators | Normal/Warning/Danger indication |
| Battery | Backup or main power |
| Solar panel | Optional remote power source |
| Raspberry Pi | Optional edge gateway |
For outdoor deployment, weatherproofing, mounting stability, condensation, power reliability, and sensor placement are as important as the software.
Measuring River Water Level
An ultrasonic sensor can be mounted above the water surface.
It measures the distance between the sensor and water.
If the sensor mounting height is known:
Water Level = Reference Height - Measured Distance
Example:
Reference height = 300 cm
Measured distance = 180 cm
Water level = 120 cm
As the river rises, the measured distance becomes smaller and the calculated water level becomes larger.
Warning-Level Logic
Students can define threshold levels based on the prototype or study site.
Example:
0-100 cm -> Normal
101-150 cm -> Warning
Above 150 -> Danger
The actual thresholds must be selected from the physical site, project assumptions, or an appropriate reference.
Do not present arbitrary student-demo thresholds as official flood-warning levels.
Local Early Warning
A field system should not depend only on internet connectivity.
The ESP32 can trigger a local siren when the danger level is reached.
Example:
Water Level
|
v
Threshold Check
|
+---- Normal -> Green LED
|
+---- Warning -> Yellow LED
|
+---- Danger -> Red LED + Siren
This allows the prototype to demonstrate local warning even if cloud communication is unavailable.
Communication Options
Wi-Fi
Suitable for:
- laboratory testing
- campus projects
- locations with stable network access
GSM/LTE
Suitable for remote sites where cellular coverage is available.
It can provide:
- cloud data upload
- SMS alerts
- remote monitoring
LoRa
LoRa is useful when several river-monitoring nodes need to send small amounts of data over longer distances to one gateway.
Example:
River Node 1 ─┐
River Node 2 ─┼── LoRa ──> Gateway
River Node 3 ─┘
The gateway can then use Wi-Fi, Ethernet, or GSM to send data to the server.
Custom Database
A custom database can store every river-level reading and system event.
Useful fields include:
timestamp
device_id
location
water_level
distance
warning_status
battery_voltage
signal_strength
siren_status
communication_status
Possible database technologies include:
- PostgreSQL
- MySQL
- MongoDB
A custom database allows the web app and mobile app to use the same central data source.
Web Application
The web dashboard can show:
- current river level
- Normal/Warning/Danger status
- sensor-node location
- last update time
- battery voltage
- signal strength
- historical water-level graph
- alert history
- node online/offline status
For multiple river stations, the dashboard can also include a map.
Example:
Station A -> Normal
Station B -> Warning
Station C -> Danger
This makes the project suitable for multi-location monitoring instead of only one sensor.
Mobile Application
A mobile application can provide quick access for users, field teams, or local authorities.
Useful features include:
- current water level
- warning status
- station map
- push notifications
- alert history
- historical graph
- device status
- battery status
The mobile app should use the same backend/API and custom database as the web application.
Alerts and Notifications
The system can generate alerts for conditions such as:
Water level reached Warning stage
Water level reached Danger stage
Sensor stopped responding
Device offline
Battery low
Communication failed
Possible alert channels include:
- mobile push notification
- web dashboard
- SMS
- local siren
For a final-year project, students can compare the reliability and delay of different alert methods.
Data Logging and Historical Analysis
Historical data is important because it allows students to study how water level changes over time.
Possible analysis includes:
- rate of water-level rise
- peak water level
- daily trends
- rainfall vs river-level relationship
- warning duration
- communication outages
- sensor reliability
A dashboard can display graphs such as:
Time
↓
Water Level
↓
Normal -> Warning -> Danger -> Falling
Optional Rainfall Integration
The project can be improved by adding a rainfall sensor or rain gauge.
This allows students to compare:
Rainfall
↓
River Response
↓
Water-Level Increase
A larger research project can investigate the time delay between heavy rainfall and rising river levels.
Optional Raspberry Pi Edge Gateway
A Raspberry Pi can make the system more advanced when several nodes are deployed.
The Pi can:
- receive LoRa or MQTT data
- store data locally
- run a local database
- calculate trends
- detect rapid water-level rise
- continue operating during internet failure
- synchronize stored data later
Example:
ESP32 Nodes
↓
LoRa / Wi-Fi
↓
Raspberry Pi
↓
Local Database
↓
Internet Available?
/ \
Yes No
| |
v v
Upload Data Store Locally
|
v
Upload Later
This adds an edge-computing element to the final-year project.
Suggested Development Stages
Stage 1: Water-Level Measurement
Connect an ultrasonic sensor to ESP8266 or ESP32 and calculate the water level.
Stage 2: Warning Logic
Implement Normal, Warning, and Danger thresholds.
Stage 3: Local Siren
Add LEDs and a siren for local warning.
Stage 4: Communication
Send readings through Wi-Fi, GSM, or LoRa.
Stage 5: Custom Database
Store water level, timestamp, warning status, and device information.
Stage 6: Web Dashboard
Display live and historical information.
Stage 7: Mobile Application
Add remote monitoring and alert notifications.
Stage 8: Raspberry Pi Gateway
Optionally add a Raspberry Pi for multi-node communication, buffering, and local processing.
Stage 9: Testing
Evaluate:
- sensor repeatability
- threshold detection
- communication reliability
- alert delay
- power backup
- offline behavior
- database logging
- web/mobile synchronization
Possible Final-Year Research Questions
Students can strengthen the academic side of the project by investigating:
- How accurately can an ultrasonic sensor track changing water level?
- How quickly does the system detect a rapid rise?
- Which communication method is most suitable for the selected Nepal deployment?
- How much data is lost during network failure?
- Can a Raspberry Pi gateway improve reliability?
- How reliable are local and remote alerts under different conditions?
- Can rainfall and water-level data be used together to identify rising-risk patterns?
Final Project Outcome
A complete final-year implementation can demonstrate:
River / Stream
↓
Water-Level Sensor
↓
ESP8266 / ESP32
↓
Local Warning
+
LoRa / GSM / Wi-Fi
↓
Optional Raspberry Pi Gateway
↓
Custom Backend / API
↓
Custom Database
↓
Web Application
+
Mobile Application
↓
Live Monitoring
Historical Graphs
Alerts
Reports
For engineering students in Nepal, this project combines embedded systems, sensing, disaster-risk applications, IoT communication, databases, web development, mobile development, and edge computing in one practical final-year project.
The same architecture can also be adapted for river, reservoir, canal, drainage, and flood-monitoring applications internationally.
Safety and Deployment Note
A student prototype should be tested from a safe location.
Do not enter floodwater, unstable riverbanks, or dangerous channels to install or retrieve electronics.
For real community early-warning deployment, sensor installation, warning thresholds, communication reliability, maintenance, and official emergency procedures require professional and institutional coordination.