An intelligent, low-power microcontroller-based system that optimizes plant irrigation by predicting rainfall using machine learning.
This project combines sensor data collection and a neural network model to make smart irrigation decisions. The system predicts rainfall based on environmental factors (temperature, pressure, humidity) and uses soil moisture readings to decide whether watering is necessary. Historical data is logged and made accessible online via Wi-Fi.
- Predicts daily rainfall using a lightweight neural network
- Automatically waters plants based on rainfall prediction and soil moisture
- Low power consumption with STM32 microcontroller
- Historical data available online via ThingSpeak
| Component | Model | Power (Low/Max) | Cost (€) |
|---|---|---|---|
| Microcontroller | STM32L073RZT6 | 0.29 µA / 93 µA/MHz | 13.12 |
| Temp/Humidity Sensor | DHT22 | 100 µA / 2.5 mA | 8.45 |
| Pressure Sensor | BMP180 | 0.1 µA / 5 µA | 4.90 |
| Soil Moisture Sensor | Capacitive | 6 µA / 8 mA | 3.95 |
| Wi-Fi Module | ESP8266 | 15 µA / 70 mA | 5.90 |
| Estimated total | — | — | 36.32 |
- Python – model development
- TensorFlow Lite + X-Cube-AI – neural network deployment on STM32
- ThingSpeak – cloud dashboard
- C (STM32) – firmware for sensors, logic, and control
- Inputs: Temperature, pressure, humidity
- Output: Rain prediction (next day)
- Model: Simple neural network, trained offline and converted to TensorFlow Lite
- Evaluation: Lightweight model prioritized over high accuracy due to embedded constraints
- Operates mainly in low-power mode (~0.2 mA avg)
- Estimated battery life: 400+ days on 10,000 mAh battery
- Sensor sampling: hourly; daily averages used for predictions
Sensor data and irrigation logs are published to ThingSpeak via Wi-Fi (ESP8266).
Promotes sustainable water use and energy efficiency through data-driven irrigation decisions. The system is scalable, low-cost, and suitable for future smart agriculture projects.