πΏ Smart Irrigation System β Functional Requirements (v2)
1. System Purpose
The system SHALL automatically monitor soil moisture across multiple plant beds, make localized watering decisions per bed using averaged sensor data, and provide real-time monitoring and control via a centralized Raspberry Pi web server.
2. System Architecture
2.1 Distributed Bed Nodes
Each plant bed SHALL operate as an independent embedded node using an ESP32 microcontroller.
Each bed node SHALL include:
1 Γ ESP32
5 Γ soil moisture sensors
1 Γ water control actuator (relay + valve or pump)
WiFi communication module (built-in)
2.2 Central Server
The system SHALL include a Raspberry Pi running a local web server that:
Receives sensor data from all bed nodes
Stores and processes incoming data
Hosts a real-time monitoring dashboard
Provides system-wide visibility
3. Bed Node Functional Requirements
3.1 Sensor Data Acquisition
Each bed node SHALL:
Read moisture values from 5 soil sensors
Sample sensors at a fixed interval (configurable)
Validate readings to remove invalid or out-of-range values
3.2 Moisture Calculation
Each bed node SHALL:
Compute the arithmetic mean of all 5 sensor readings:
Use the computed average as the bed moisture indicator
3.3 Watering Decision Logic
Each bed node SHALL:
Compare average moisture against a configurable threshold
If average indicates dryness:
Activate water valve for a defined duration
If moisture is sufficient:
Keep valve OFF
3.4 Watering Safety Controls
Each bed node SHALL:
Enforce a cooldown period between watering cycles
Prevent continuous activation beyond maximum duration
Default valve state SHALL be OFF on startup or failure
4. Communication Requirements
4.1 Network Connectivity
Each ESP32 node SHALL:
Connect to WiFi automatically on boot
Reconnect if connection is lost
Continue local irrigation logic without network dependency
4.2 Data Transmission
Each node SHALL send periodic updates to the Raspberry Pi server including:
Bed identifier
Timestamp (ISO 8601)
Individual sensor readings
Average moisture value
Valve state
Signal strength (optional)
Example payload:
{
"bed_id": "bed_1",
"timestamp": "2026-04-09T12:00:00Z",
"sensors": [410, 395, 480, 420, 390],
"average": 419,
"valve_state": "OFF",
"rssi": -60
}
4.3 Communication Protocol
The system SHALL support:
HTTP POST (primary implementation)
Optional MQTT compatibility for scaling
5. Raspberry Pi Server Requirements
5.1 Data Ingestion
The server SHALL:
Accept incoming data from all bed nodes
Validate payload structure
Associate data with correct bed ID
5.2 Data Storage
The server MAY:
Store historical readings per bed
Maintain time-series logs for analysis
5.3 Real-Time Processing
The server SHALL:
Maintain latest state per bed
Update dashboard data within near real-time latency
6. Web Dashboard Requirements
6.1 System Overview View
The dashboard SHALL display:
All beds in a grid layout
Current moisture average per bed
Valve state (ON/OFF)
Last update timestamp
6.2 Bed Detail View
Each bed SHALL have a detail panel showing:
Individual sensor values
Average moisture trend
Watering history
Connection status
6.3 Real-Time Updates
The dashboard SHALL:
Update automatically without manual refresh
Reflect changes within seconds of ESP32 updates
7. Configuration Requirements
7.1 Per-Bed Configuration
Each bed SHALL support:
Moisture threshold value
Watering duration
Sampling interval
Cooldown period
7.2 System Configuration
The system SHALL allow configuration of:
WiFi credentials
Server endpoint
Global update interval defaults
8. Reliability Requirements
The system SHALL:
Continue irrigation logic if server becomes unavailable
Recover automatically from network failure
Default to safe OFF state for all actuators on reboot
Prevent stuck-on valve conditions using timeout safeguards
9. Power Requirements
The system SHALL:
Use separate power supply for actuators (pump/valves)
Ensure ESP32 is not directly powering high-load components
Maintain stable 5V regulated supply for controllers
10. System Behavior Summary
Each bed node SHALL function as:
an autonomous moisture monitoring and watering controller
The Raspberry Pi SHALL function as:
a centralized monitoring, logging, and visualization system
π§Έ Final Shape of Your System
Youβve basically built:
π§ distributed embedded control (ESP32 beds)
π§ local decision-making (averaging logic)
π centralized observability (Raspberry Pi dashboard)
π‘ live telemetry pipeline (WiFi data streaming
Hardware
Moisture sensors (5 pack) https://a.co/d/08jgp9i0 -> 12.99$
Esp 32 (1 pack) https://a.co/d/0gWkgj1d -> 10$
Electronic waterproof box://a.co/d/0bZPKaHF -> 15$
Proto bord https://a.co/d/084GUDtd -> 10$
Soldering iron kit https://a.co/d/0blNSt7l -> 27$
Boost converter https://a.co/d/06VqAMKu -> 5$
USB c pd https://a.co/d/0aFaKluF -> 8$
Solid core wire https://a.co/d/0d2wdwJW -> 13$
3 conductor wire https://a.co/d/0aJJDiKh -> 14$
Battery bank https://a.co/d/0cTmBX93 -> 24$
Water solidnoid https://a.co/d/0fcChfRU -> 41$
Raspi 3 https://a.co/d/0iV00K1j -> 90$
Hose adapter https://a.co/d/08PHq3U3 -> 16$
Relay bord https://a.co/d/00JKLzu1 -> 6$
Irrigation hose https://a.co/d/0ir0gQr8 -> 18$
Terminal block https://a.co/d/09clhrCy -> 6$
Volt meter https://a.co/d/01X2x7zS -> 15$
Solar Panel Amazon.com : FUTUREZEN Solar Panel for Security Camera, 10W Solar Charger with DC 5.5x2.1mm, USB-C & Micro USB Port, IP66 Waterproof, 360Β° Adjustable Mount, 7.2FT Cable : Patio, Lawn & Garden -> 39.99$
Continuous current draw need and total energy needed
Idle current ~0.08 β 0.1A (80β100 mA) at 12V
Solenoid active current 0.5β1A @ 12V
I want to start with one garden bed as a prototype for my smart irrigation system. Iβll use it as a dev setup to test everything, and once itβs working reliably, Iβll expand it to the rest.β
Tracking the sun exposure of plants