IoT-Based Smart Agriculture and Automatic Irrigation System for Nepal
A practical final-year IoT project for Nepali engineering students using ESP32 or ESP8266, soil and environmental sensors, automatic irrigation, a custom database, web app, and mobile app.
- Smart Agriculture
- Automatic Irrigation
- Nepal
- Final Year Project
- Engineering Students
- ESP32
- ESP8266
- Soil Moisture
- WEB APP
- Mobile APP
- Database
- IOT Dashboard
- Published
- Reading time
- 5 min read
- Author
- Saroj Chaudhary
- Role
- IoT & Embedded Systems Engineer
An IoT-based smart agriculture and automatic irrigation system is a strong final-year project for engineering students in Nepal because it combines embedded systems, sensors, wireless communication, automation, databases, and software applications in one complete system.
The same architecture can also be used globally for farms, greenhouses, nurseries, research plots, and other agricultural monitoring applications.
Instead of building only:
Soil Sensor -> ESP32 -> Pump
a Bachelor-level project can be developed as a complete IoT platform with a custom database, web application, mobile application, remote monitoring, alerts, and automatic irrigation control.
Project Objective
The main objective is to monitor field conditions and automatically supply water only when required.
The system can measure:
- soil moisture
- temperature
- humidity
- water-tank level
- optional rainfall
- optional light intensity
When soil moisture falls below the configured threshold, the controller starts irrigation. When the required moisture level is reached, irrigation stops automatically.
Why This Project Is Relevant in Nepal
Agriculture remains an important application area for IoT in Nepal, where irrigation availability, changing weather conditions, labor requirements, and efficient water use can vary significantly between locations.
A student prototype can be designed for:
- vegetable farms
- greenhouse farming
- nurseries
- rooftop agriculture
- polyhouses
- research farms
- small irrigation systems
The project can first be tested on a small prototype and later extended for larger agricultural deployments in Nepal or other countries.
Suggested System Architecture
A complete final-year implementation can use the following architecture:
Soil Moisture Sensor
Temperature / Humidity Sensor
Water-Level Sensor
|
v
ESP32 / ESP8266
|
+------------------+
| |
v v
Automatic Control Wi-Fi / GSM
| |
v v
Relay / MOSFET API / Server
| |
v v
Water Pump Custom Database
|
+---------+---------+
| |
v v
Web App Mobile App
|
v
Analytics / Reports
For a field installation without reliable Wi-Fi, an ESP32 can also be combined with a GSM modem or another suitable communication method.
Hardware Components
A typical prototype can include:
| Component | Purpose |
|---|---|
| ESP32 or ESP8266 | Main IoT controller |
| Soil-moisture sensor | Measures soil condition |
| Temperature/humidity sensor | Monitors local environment |
| Water-level sensor | Checks irrigation-water availability |
| Relay or suitable MOSFET driver | Controls the pump or valve |
| DC water pump | Supplies irrigation water |
| Power supply | Powers controller and pump |
| Optional rain sensor | Detects rainfall |
| Optional flow sensor | Measures water consumption |
For long-term outdoor deployment, use properly selected agricultural sensors rather than relying only on low-cost resistive soil probes.
Automatic Irrigation Logic
The basic control can be:
Read soil moisture
|
v
Is soil too dry?
/ \
Yes No
| |
v v
Pump ON Pump OFF
|
v
Monitor moisture
|
v
Target reached
|
v
Pump OFF
Additional conditions can make the project more reliable.
For example, irrigation should not start when:
- the water tank is empty
- a maximum pump run-time has been reached
- the system is in manual mode
- a sensor fault is detected
Custom Database
Instead of depending entirely on a third-party IoT dashboard, students can develop a custom database for the project.
The database can store:
- device ID
- timestamp
- soil-moisture value
- temperature
- humidity
- tank level
- pump status
- irrigation duration
- manual/automatic mode
- alerts
- water usage
Example data structure:
timestamp
device_id
soil_moisture
temperature
humidity
tank_level
pump_status
operating_mode
Possible database technologies include PostgreSQL, MySQL, MongoDB, or another database selected according to the application architecture.
This makes the project stronger because students can demonstrate the complete path from sensor data to storage, visualization, and control.
Web Application
A custom web application can provide a dashboard for farmers, researchers, or system administrators.
The web dashboard can show:
- current soil moisture
- temperature and humidity
- water-tank level
- pump status
- Auto/Manual mode
- historical graphs
- irrigation history
- water usage
- device status
- alert history
For projects with multiple agricultural fields, the web application can also display several sensor nodes from one dashboard.
Mobile Application
A mobile application can provide quick field access to the same system.
Useful mobile features include:
- live sensor readings
- irrigation ON/OFF control
- Auto/Manual selection
- threshold configuration
- low-water alerts
- dry-soil alerts
- device-offline alerts
- irrigation history
The mobile app should communicate with the same backend/API and custom database used by the web application instead of maintaining a separate data source.
Remote Monitoring and Alerts
The IoT platform can generate alerts when important conditions occur.
Examples include:
Soil moisture too low
Water tank nearly empty
Pump running too long
Sensor not responding
Device offline
Irrigation completed
Notifications can be delivered through the mobile application, web dashboard, email, SMS, or another service depending on the project scope.
ESP32 or ESP8266?
Both can be used for a prototype.
ESP8266
ESP8266 is suitable when the project requires:
- Wi-Fi connectivity
- a small number of sensors
- basic irrigation automation
- low-cost prototyping
ESP32
ESP32 is usually the stronger choice for a final-year project when students want:
- more GPIO
- more sensors
- additional communication interfaces
- larger firmware
- future expansion
- more advanced local processing
For a larger final-year implementation, ESP32 is generally easier to expand.
Features That Make the Project Stronger
A good Bachelor-level version can include:
- automatic irrigation
- manual remote control
- configurable moisture threshold
- custom database
- REST API or MQTT communication
- responsive web dashboard
- mobile application
- historical data
- charts and reports
- irrigation history
- tank-level monitoring
- alerts
- water-use measurement
- device health monitoring
Students do not need to implement every feature at once. The project can be developed module by module.
Suggested Development Stages
Stage 1: Sensor Prototype
Connect the soil-moisture, temperature/humidity, and water-level sensors to ESP32 or ESP8266.
Stage 2: Automatic Irrigation
Add the pump-control circuit and implement moisture-based automatic irrigation.
Stage 3: IoT Communication
Send sensor readings to a backend using Wi-Fi, GSM, HTTP, MQTT, or another suitable communication method.
Stage 4: Custom Database
Store sensor readings, pump activity, alerts, and device information in the project database.
Stage 5: Web Dashboard
Develop the web application for real-time monitoring, historical graphs, configuration, and reports.
Stage 6: Mobile Application
Develop a mobile interface for monitoring, alerts, and remote irrigation control.
Stage 7: Testing
Test:
- sensor accuracy and repeatability
- irrigation threshold
- pump response
- network failure behavior
- database logging
- mobile/web synchronization
- alert delivery
- water usage
Possible Final-Year Research Questions
Students can turn the prototype into a stronger academic project by investigating questions such as:
- How much water can automatic irrigation save compared with fixed-time irrigation?
- How reliable is soil-moisture-based irrigation under different soil conditions?
- What communication method is most suitable for the selected agricultural site?
- How does network failure affect remote irrigation?
- Can historical sensor data improve irrigation scheduling?
These questions provide measurable results for the final report instead of treating the project only as a hardware demonstration.
Final Project Outcome
A complete system can demonstrate:
Agricultural Sensors
↓
ESP32 / ESP8266
↓
Automatic Irrigation
+
IoT Communication
↓
Custom Backend/API
↓
Custom Database
↓
Web Application
+
Mobile Application
↓
Monitoring + Alerts + Reports
For Nepali engineering students, this project provides a practical way to combine embedded systems, IoT, agriculture, databases, web development, mobile development, and automation in one final-year project.
At the same time, the architecture is not limited to Nepal and can be adapted for smart-agriculture applications anywhere irrigation efficiency and remote monitoring are required.