DOI : https://doi.org/10.5281/zenodo.18889713
- Open Access

- Authors : Prasant Pradhan, Shayel Rai, Ayush Sharma, Rewaj Basnett
- Paper ID : IJERTV15IS020842
- Volume & Issue : Volume 15, Issue 02 , February – 2026
- Published (First Online): 06-03-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Intelligent Irrigation System with Crop-Specific Control and Rain-Aware Water Harvesting
Prasant Pradhan
Professor & Head, Department of Computer Engineering, Sikkim Institute of Science and Technology South Sikkim, Sikkim, India
Shayel Rai, Ayush Sharma, Rewaj Basnett
Student, Department of Computer Engineering, Sikkim Institute of Science and Technology South Sikkim, Sikkim, India
Abstract:- Water scarcity and inefficient irrigation methods threaten sustainable agriculture worldwide. This paper presents an IoT-based intelligent irrigation system incorporating crop- specific moisture thresholds and rain-aware water harvesting. Using an ESP32 microcontroller interfaced with soil moisture and rain sensors, the system automates irrigation, suspending watering during rainfall and directing rainwater to harvesting tanks via a servo-controlled shed. Real- time monitoring and control are enabled through a Firebase cloud platform and web dashboard, allowing remote threshold adjustments and system management. Experimental results demonstrate precise irrigation control, enhanced water conservation, and adaptability to varying crop requirements. Future work includes integrating weather forecasts and solar power for improved autonomy.
Keywords: Internet of Thing (IoT), Smart Irrigation, ESP32, Soil Moisture Sensor, Rain-Sensor, Firebase, Crop-Specific Control, Rainwater-Harvesting, Automation, Precision Agriculture.
INTRODUCTION:
Efficient water use in agriculture is critical given the increasing global water scarcity and agricultural demands. Traditional irrigation methods often lead to water wastage due to over or under-irrigation, impacting crop yield and sustainability. This project proposes a low- cost, automated smart irrigation system that integrates crop-specific irrigation control with rain detection and rainwater harvesting techniques to optimize water usage and improve crop productivity.
The system employs soil moisture sensors to monitor individual crop zones, applying water only when moisture falls below crop-specific thresholds. Rain sensors detect precipitation, automatically halting irrigation and deploying a servo-operated shed to channel rainwater into a reservoir for harvesting. An ESP32 microcontroller manages sensor data processing, actuator control, and communication with a cloud-based Firebase backend, enabling real-time remote monitoring and control via a web dashboard. This integrated approach supports precision agriculture, promotes sustainable water management, and aids farmers in water-stressed regions by optimizing irrigation based on environmental conditions and crop requirements [[1], [9], [26]]
LITERATURE REVIEW:
Several researchers have explored IoT-based smart irrigation systems to improve water efficiency and crop productivity. In [1], an IoT-based smart irrigation system integrating soil
moisture sensors with weather prediction algorithms was proposed. The system combined real-time soil data with rainfall prediction models to automate irrigation scheduling and reduce water wastage. However, the study required manual intervention to switch off the pump and did not clearly specify the accuracy of rain prediction, leading to potential false rainfall detection. In [2], an Arduino-based smart irrigation system was developed for small-scale applications such as gardens and greenhouses. The system automated irrigation using soil moisture thresholds to reduce water waste. While effective for basic irrigation control, it did not incorporate rainwater harvesting mechanisms and lacked scalability for large agricultural deployments. Subhani et al. (2025) [3] proposed an automated rain shed system using Arduino to protect crops from unseasonal rainfall. The system deployed a protective shed instantly upon rain detection. Although cost-effective and suitable for small farmers, the system did not consider additional environmental parameters such as soil moisture, crop type, or rain intensity for adaptive decision-making. Ashfaq Syed (2021) [4] developed a smart rain detector system using a simple rain sensor integrated with Arduino. The system successfully detected rainfall and triggered alerts. However, it focused only on rain detection and warning mechanisms, without integrating automated irrigation control or cloud-based monitoring frameworks. Chougale et al. (2021) [8] discussed the use of Firebase as a cloud platform for real-time data management in IoT applications. The study highlighted Firebases ability to provide scalable, low-latency synchronization between devices and cloud servers. Nevertheless, it lacked integration with intelligent irrigation decision systems. Rane and Kadam (2021) [9] examined Firebase Authentication mechanisms for secure user login systems. Their work emphasized secure access control using multiple authentication methods. However, the study did not address integration with hardware-based IoT irrigation control systems.
COMPONENTS USED:
- power supply and regulator
- a set of soil Moisture sensors
- Rain sensor
- ESP-32 Microcontroller
- Servo Motor
- Relay Module
- Water Pump
- Bread-Board
PROPOSED SYSTEM :
ESP-32:
Fig.2 ESP-32(Wroom 32)
- ESP32 is a low-cost microcontroller with built- in Wi-Fi and Bluetooth for IoT applications.
- It reads analog data from soil moisture sensor and digital signals from rain sensor using its 12- bit ADC.
- It controls the relay (water pump) and servo motor based on predefined irrigation logic and uploads data to Firebase cloud.
PIN CONFIGURATION:
Fig: 1 Block diagram of proposed system
POWER SUPPLY:
- Step down transformer-230v to 12v.
- To power a ESP-32 microcontroller and other elements, DC source is required.
SENSING UNIT:
- The soil moisture sensor measures water content in the soil using conductivity-based detection.
- Sensor probes are inserted inro the soil medium for real-time monitoring.
- The analog output is proceed using the ESP-32 ADC module.
- A rain sensor detects precipitation through surface resistance variation.
- Sensor data is transmitted to the microcontroller for irrigation decision-making.
Fig.3 Pin Configuration of ESP-32
- 30+ GPIO pins available for digital input/output operations.
- 2-bit ADC pins used for analog sensor inputs (Soil Moisture Sensor connected to GPIO34).
- Digital input pin used for Rain Sensor (GPIO32).
- Relay module connected to GPIO21 for controlling water pump.
- Servo motor connected to GPIO15 for shed operation.
- 3.3V and GND pins used for powering sensors and modules.
SYSTEM ARCHITECTURE OF INTELLIGIENT IRRIGATION SYSTEM:
Fig.4 System Architecture of Irrigation System
The system architecture of the proposed smart irrigation system is designed around the ESP32 microcontroller, which serves as the central processing unit. The architecture integrates sensing cmponents, control mechanisms, and actuation devices to enable automated irrigation and rain- aware water management. The soil moisture sensor is connected to the analog input pin of the ESP32. It continuously monitors the water content in the soil and sends real-time analog values to the microcontroller. These readings are compared with predefined crop-specific threshold values to determine whether irrigation is required. The rain detection sensor is connected to a digital input pin of the ESP32. When rainfall is detected, the sensor sends a signal to the controller, which immediately overrides irrigation operations to prevent overwatering. The relay module is interfaced with the ESP32 to control the 12V submersible water pump. Since the pump operates at a higher voltage than the ESP32, the relay acts as an electrically isolated switching device between the low- voltage control circuit and the high-power pump circuit. The servo motor is connected to a PWM-enabled GPIO pin of the ESP32. It controls the mechanical shed system used for rainwater harvesting. When rain is detected, the servo adjusts the shed position to either allow natural irrigation or redirect rainwater into storage. The entire system is powered using a 12V battery supply, with appropriate voltage regulation provided to safely operate the ESP32 and peripheral components.
SYSTEM DESIGN:
The proposed smart irrigation system is designed using a layered architecture consisting of three primary layers: the sensing layer, control layer, and application layer. This modular design ensures efficient data acquisition, intelligent decision-making, and seamless user interaction.
Sensing Layer
The sensing layer comprises the soil moisture sensor and rain detection sensor. The soil moisture sensor continuously measures the water content present in the soil and transmits analog signals to the ESP32 microcontroller. These readings are used to determine whether irrigation is required based on predefined crop-specific threshold values. Different crops can be assigned distinct moisture thresholds, enabling precise and optimized irrigation control. The rain detection sensor identifies the presence of rainfall and sends a digital signal to the ESP32. Upon detection of rainfall, the system immediately overrides irrigation operations to prevent overwatering. Additionally, rainfall detection triggers the activation of the servo motor mechanism for rainwater harvesting operations.
Control Layer
The control layer is built around the ESP32 microcontroller, which serves as the core processing unit of the system. It receives input from both the soil moisture and rain sensors and executes decision logic based on real-time environmental conditions.
The implemented decision logic operates as follows:
- If soil moisture falls below the predefined threshold and no rainfall is detected, the irrigation pump is activated.
- If rainfall is detected, irrigation is immediately stopped regardless of soil moisture conditions.
- When rainfall is detected and soil moisture exceeds the threshold value, the servo motor is activated to open the shed mechanism, directing rainwater into the storage reservoir.
- Once rainfall stops, the servo motor retracts to close the shed.
The ESP32 also establishes a Wi-Fi connection to Firebase for real-time data transmission and retrieval of user-defined parameters.
Actuation Layer
The actuation layer consists of the servo motor, relay module, and water pump. The servo motor mechanically controls the movable shed system used for rainwater harvesting. It operates using PWM signals generated by the ESP32. The water pump is responsible for irrigation when soil moisture levels are
below the required threshold and no rainfall is detected. Since the ESP32 cannot directly drive high-power devices, a relay module is used as an intermediary switching component. The relay provides electrical isolation between the low-voltage microcontroller circuit and the high-voltage pump system, ensuring safe and reliable operation.
Application Layer
The application layer integrates Firebase Real-Time Database and a web-based dashboard for remote monitoring and control. The cloud platform stores sensor readings (soil moisture and rain status), system states (pump status and servo position), and user-defined crop thresholds. The web dashboard, developed using HTML/React integrated with Firebase, provides an intuitive interface for farmers. It allows users to monitor real-time environmental conditions, observe device status, switch between automatic and manual irrigation modes, and configure crop-specific moisture thresholds. This multi- layered system design enables intelligent irrigation management, efficient water utilization, and real-time remote accessibility.
WORKING:
- The soil moisture sensor continuously senses the moisture level of the soil.
- The sensed value is sent to the ESP32 microcontroller for processing.
- The system compares the soil moisture value with the predefined crop-specific threshold.
- If the soil moisture value is less than the threshold, the relay module activates the water pump.
- If the soil moisture value is greater than or equal to the threshold, the pump remains OFF.
- The rain detection sensor continuously monitors rainfall conditions.
- If rain is detected, the pump is immediately turned OFF to prevent over-irrigation.
- When rain is detected and soil moisture is already sufficient (Moisture Threshold), the servo motor activates to adjust the shed for rainwater harvesting.
- When rainfall stops, the servo motor retracts and the system returns to normal irrigation mode.
- Sensor readings and system status are uploaded to Firebase for real-time monitoring and control.
PROTOTYPE MODEL:
Fig.5 Prototype of irrigation system
IMPLEMENTATION:
The proposed smart irrigation system can be implemented in agricultural fields for automated irrigation and rainwater management. The ESP32 microcontroller is used as the main control unit to monitor soil moisture and rainfall conditions. Based on the threshold values set for different crops, the system automatically controls the water pump and shed mechanism. The relay module is used to operate the 12V submersible pump safely, while the servo motor controls the rainwater harvesting shed. The system also connects to Firebase using built-in Wi-Fi for real-time monitoring and remote control through a web dashboard.
ADVANTAGES:
- Low-cost and suitable for small-scale farmers.
- Reduces water wastage through automatic threshold- based irrigation.
- Prevents over-irrigation using rain detection mechanism.
- Supports rainwater harvesting through servo- controlled shed.
- Enables real-time monitoring and control using Firebase dashboard
CONCLUSION:
The proposed IoT-based intelligent irrigation system successfully integrates crop-specific irrigation control with rain-aware water harvesting. The system automates irrigation decisions based on real-time soil moisture and rainfall conditions, thereby conserving water and improving crop productivity. With remote monitoring through a user-friendly interface, the system enhances operational efficiency and supports sustainable agricultural practices, especially in water- scarce regions.
FUTURE SCOPE:
Future enhancements of the proposed system include the integration of weather forecasting APIs to enable predictive irrigtion scheduling based on upcoming climatic conditions. The addition of water level sensors in the rainwater harvesting tank can help monitor storage capacity and prevent overflow. Incorporating solar power systems would improve energy independence and make the solution more suitable for remote agricultural areas. Furthermore, implementing machine learning models can enhance irrigation prediction accuracy by analyzing historical soil and weather data. The development of a dedicated mobile application would provide real-time alerts and allow farmers to monitor and control the system more conveniently.
REFERENCES:
- C. Vyas, S. Vyas, P. Gaur, and M. Thakur, An IoT based smart irrigation system using soil moisture and weather prediction, International Journal of Engineering Research & Technology (IJERT), vol. 10, no. 6, pp. 142145, 2021, ISSN: 2278-0181.
- S. Akter, P. R. Mahanta, M. H. Min, M. R. Hasan, R. U. Ahmed, and
M. M. Billah, Developing a smart irrigation system using Arduino, International Journal of Research Studies in Science, Engineering and Technology (IJRSSET), vol. 6, no. 1, pp. 3139, 2018, ISSN: 2349- 476X.
- S. K. Subhani, M. L. Niveditha, K. Y. Krishna, K. Shushma, and G. V. Reddy, Automated rain shed system for crop protection using Arduino, International Journal for Modern Trends in Science and Technology, vol. 11, no. 3, pp. 143148, 2025, ISSN: 2455-3778.
- A. Syed, Smart rain detector using Arduino, SSRN Electronic
Journal, Aug. 18, 2021, SSRN Abstract No. 3918326, posted Oct. 13,
2021.
- A. V. Bossio and M. P. Cadeddu, Rain detection from ground-based radiometric measurements: Validation against rain sensor observations, in Proc. IEEE Int. Geoscience and Remote Sensing Symp. (IGARSS), 2015, pp. 34563459, Doi: 10.1109/IGARSS.2015.7326273.
- A. Bahga and V. Madisetti, Internet of Things: A Hands-On Approach. Hyderabad, India: Universities Press (India) Pvt. Ltd., 2014, ISBN: 978-81-7371-954-7.
- S. K. Vasudevan, A. S. Nagarajan, and R. M. D. Sundaram, Internet of Things, 2nd ed. New Delhi, India: Wiley India Pvt. Ltd., 2020, ISBN: 978-93-88991-01-8.
- P. Chougale, V. Yadav, and A. T. Gaikwad, Firebase overview and usage, International Research Journal of Modernization in Engineering, Technology and Science, vol. 3, no. 12, pp. 11781183, Dec. 2021, E-ISSN: 2582-5208.
- R. M. Rane and S. S. Kadam, A research paper on Firebase authentication, IJSRD International Journal for Scientific Research & Development, vol. 9, no. 5, pp. 5556, 2021, ISSN: 2321-0613.
- M. S. Farooq, S. Riaz, A. Abid, K. Abid, and M. A. Naeem, Smart irrigation system using IoT and cloud computing, in Proc. 2nd Int.
Conf. on Computing, Mathematics and Engineering Technologies (iCoMET), Sukkur, Pakistan, 2019, pp. 17, doi: 10.1109/ICOMET.2019.8673502.
- R. M. Prasad and T. V. S. Kumar, IoT based automated rainwater management system, in Proc. IEEE Int. Conf. on Smart Systems and Inventive Technology (ICSSIT), Tirunelveli, India, 2019, pp. 600604, doi: 10.1109/ICSSIT46314.2019.8987813.
- A. K. Tripathy, A. Mishra, and S. Mohanty, eSIS: An edge-cloud framework for smart irrigation system using crop water requirement optimization, IEEE Internet of Things Journal, vol. 7, no. 5, pp. 4228 4237, May 2020, doi: 10.1109/JIOT.2019.2956164.
