Building a Solar-Powered Smart Irrigation System That Actually Thinks
Farmers in India's Konkan region lose water, money, and crops to a problem that shouldn't exist in 2025 — irrigation systems that can't tell if it's about to rain. We built SoilStream to fix that.
The Problem With "Smart" Irrigation
Most IoT-based irrigation systems work on a simple rule: if the soil is dry, turn on the pump. It sounds reasonable until you realise the system has no idea a monsoon is two hours away. The pump runs, the rain comes, and you've wasted water — and in water-scarce farming regions, that waste adds up.
The Konkan belt of Maharashtra is monsoon-dependent. Rainfall here is intense but wildly unpredictable — heavy one day, absent the next. Existing systems, whether old-school scheduled irrigation or even modern IoT setups, are built on fixed thresholds and weather averages. They don't adapt to the actual microclimate of a specific farm on a specific day.
We also noticed that crop disease diagnosis was entirely reactive. By the time a farmer visually spotted a pest or fungal infection, meaningful crop damage had already happened. There was no early warning system.
What We Built
SoilStream is made up of four layers that work together as a closed loop.
The Field Hardware
An ESP32-WROOM-32 microcontroller sits at the centre of the hardware. It reads from a capacitive soil moisture sensor and a BME280 — which gives us temperature, humidity, and atmospheric pressure every five seconds. A 5V relay module controls a submersible pump. The whole thing runs off a 6V solar panel, a TP4056 charge controller, and an 18650 Li-ion battery, so it keeps going through the night and on overcast days.
The Rainfall Prediction Model
We built a custom dataset for the Konkan region by combining historical atmospheric data from Meteostat with rainfall records from the Indian Meteorological Department. Then we trained and compared three models — Support Vector Regression (SVR), LightGBM, and a Gated Recurrent Unit (GRU) network — on the task of predicting whether it would rain on a given day.
SVR came out on top, reaching 92.86% accuracy on our primary dataset. More importantly, it had the highest precision of the three — which matters here more than raw accuracy. A false positive (predicting rain when there is none) means the pump stays off when it shouldn't, which is worse than the reverse.
The Crop Identification Model
Different crops need different amounts of water. So the system needs to know what it's irrigating before it can decide how much. We framed this as a multi-class image classification problem and evaluated three CNN architectures — VGG16, ResNet50, and EfficientNetB0 — on a dataset of crop leaf images.
ResNet50 was the clear winner, hitting 99.7% test accuracy. Its residual connections handled the fine-grained texture differences between crop leaves far better than the others. EfficientNetB0 had a bizarre training collapse — despite a 99.76% validation accuracy, its test accuracy was just 16%, which told us something went badly wrong during training rather than at inference. VGG16 was solid and reliable at 95.6%, and remains a reasonable fallback if compute is constrained.
The Decision Engine
Once the system has all three inputs — real-time soil moisture, a rainfall forecast, and the crop type — a rule-based controller decides whether to irrigate. The logic is deliberately conservative: the pump only turns on when all three of the following are true simultaneously.
- 💧Soil moisture is below the crop-specific threshold
- 🌧️Forecasted rainfall probability is below 60%
- 🌿No active crop disease is detected
If rain is coming, the system skips irrigation entirely. If the soil is already wet, same thing. This conservative approach is what makes it actually useful during unpredictable monsoon seasons — it avoids waterlogging without over-relying on a single data source.
The Mobile App
Everything surfaces in a React Native mobile application. Farmers can view live sensor readings, see the current rainfall prediction and pump status, upload crop images for identification, and run pest or disease diagnosis using the Kindwise API. There's also a manual override toggle for when someone wants direct control. All state syncs through Firebase Realtime Database, so the hardware and the app stay in sync without any polling.
Results
Crop Identification
| Model | Accuracy | Val. Accuracy | Weighted F1 | Loss | |
|---|---|---|---|---|---|
| ResNet50 | 99.7% | 96.48% | 0.97 | 0.0139 | Selected |
| VGG16 | 95.6% | 94.04% | 0.95 | 0.2350 | |
| EfficientNetB0 | 16.0% | 99.76% | 0.07 | 7826.8 |
Rainfall Prediction — Coastal Dataset
| Algorithm | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|
| SVR | 92.86% | 0.9257 | 0.8954 | 0.9103 |
| LightGBM | 92.32% | 0.9087 | 0.9007 | 0.9047 |
| GRU | 92.30% | 0.9195 | 0.8873 | 0.9031 |
Rainfall Prediction — Extended Region
| Algorithm | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|
| SVR | 91.47% | 0.9310 | 0.8725 | 0.9008 |
| LightGBM | 91.55% | 0.9232 | 0.8832 | 0.9027 |
| GRU | 91.38% | 0.9166 | 0.8863 | 0.9012 |
When we expanded the dataset to include more inland stations, overall accuracy dipped slightly — which makes sense, since inland microclimates behave differently from coastal ones. LightGBM edged ahead on raw accuracy in that set, but SVR maintained the best precision, which is what we optimised for.
Tech Stack
Publication & Intellectual Property
The research has been accepted at an IEEE conference, and the system has been registered as both a patent and a software copyright with the Government of India.
Accepted at the IEEE 6th International Conference on Intelligent Technologies (CONIT 2026), organised by KLE Institute of Technology, Hubballi. Accepted for presentation and publication in the conference proceedings.
Read More / Get the Code
The full paper, project report, and poster are available below. The source code — ESP32 firmware, Flask backend, React Native app, and Firebase Cloud Functions — is on GitHub.
Research Paper
IEEE CONIT 2026 full submission · Paper ID 960
Project Report
Full dissertation — design, implementation, results, and future scope
Poster
Overview — problem, architecture, results, and SDG alignment
ESP32 firmware · Flask backend · React Native app · Firebase Cloud Functions · ML notebooks