Skip to content

A smart, low-power irrigation system that predicts rain using a neural network and automates watering based on sensor data. Built with STM32, C, Python, TensorFlow Lite, Developed as an academic prototype for embedded AI and IoT applications.

Notifications You must be signed in to change notification settings

matteorigat/Progetto-Sistemi-Operativi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌱 Smart Irrigation System with Rain Prediction

An intelligent, low-power microcontroller-based system that optimizes plant irrigation by predicting rainfall using machine learning.


📌 Overview

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.


🧠 Features

  • 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

🔧 Hardware Components

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

⚙️ Software Stack

  • Python – model development
  • TensorFlow Lite + X-Cube-AI – neural network deployment on STM32
  • ThingSpeak – cloud dashboard
  • C (STM32) – firmware for sensors, logic, and control

🧪 Machine Learning

  • 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

🔋 Power Management

  • 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

🌐 Online Dashboard

Sensor data and irrigation logs are published to ThingSpeak via Wi-Fi (ESP8266).


🌿 Impact

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.

About

A smart, low-power irrigation system that predicts rain using a neural network and automates watering based on sensor data. Built with STM32, C, Python, TensorFlow Lite, Developed as an academic prototype for embedded AI and IoT applications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages