Rule-Based vs ML Lawn Irrigation Kit with ESP32 + Solenoid Valve
Open this project in the Soldr app → What is Soldr.ai → wiring, code and test steps for exactly these parts
Rule vs ML Lawn Watering Kit: ESP32, Soil Sensors, Valve — an intermediate-level kit.
Rule vs ML Lawn Watering Kit: ESP32, Soil Sensors, Valve
Every part needed, pre-tested for compatibility, with an AI build companion trained on this exact project. Shipped from Bengaluru in 3-7 days.
Kit at a glance
What you build: A rule versus ML lawn watering experiment: three soil sensors across the lawn and a DHT22 feed an ESP32 that opens a solenoid valve, first by threshold rules and then by a small model trained on your lawn's own data, logging both for comparison.
What's in the box
- ESP32 Dev Board
- Soil Moisture Sensor × 3
- DHT22
- 5V Relay Module
- Solenoid Valve
- 12V PSU
- USB Cable
- M-M Wires × 20
Power: 12V supply for the valve included; the ESP32 runs on USB.
Skill level: Intermediate (6-8 hours).
Frequently asked questions
Why three sensors?
Lawns dry unevenly; three spots give a fairer picture.
Can it run sprinklers?
If they're fed through the valve, yes.
You’ll assemble an ESP32-based controller that reads soil moisture and temperature across your lawn, then decides when to water. Instead of a simple on/off switch, this kit lets you experiment with two different approaches: a rule-based threshold system and a basic machine learning model trained on your own sensor data. By comparing both, you see firsthand how algorithms impact water efficiency.
What You'll Build
By the end of this build, you’ll have a working irrigation system with three soil moisture sensors and a DHT22 wired to an ESP32. The solenoid valve opens only when the algorithm determines watering is truly needed—and you’ll have logs showing how a simple threshold rule differs from ML-driven predictions. It’s a fully functional prototype ready for demonstration or further expansion.
What You'll Learn
- Wiring multiple analog and digital sensors to an ESP32 without conflicts.
- Programming rule-based irrigation logic using soil moisture thresholds and temperature.
- Collecting sensor data and training a lightweight ML model to schedule watering.
- Analyzing logged data to compare water usage and decision patterns between both strategies.
Kit Contents
| Component | Quantity |
|---|---|
| ESP32 Dev Board | 1 |
| Soil Moisture Sensor | 3 |
| DHT22 | 1 |
| 5V Relay Module | 1 |
| Solenoid Valve | 1 |
| 12V PSU | 1 |
| USB Cable | 1 |
| M-M Wires | 20 |
Who This Kit Is For
This kit is designed for CBSE students taking computer science or physics electives who need a tangible IoT project. B.Tech ECE and EEE undergraduates working on capstone designs or Smart India Hackathon entries will value the ML comparison as a strong differentiator. It also fits ATL Tinkering Lab modules exploring smart agriculture.
Built and Backed by Compoden
Every Compoden kit ships with an AI build companion trained on this exact project — accessible via a QR code on the box, with WhatsApp and email backup. We've spent 10 years building projects for makers, schools, and institutions across India. If a part fails because of a manufacturing defect, replace it free within 7 days.
What if I get stuck during the build?
Scan the QR code on the box to launch the AI companion, which walks you through wiring, code, and troubleshooting steps. You can also reach our support team on WhatsApp for personalized help.
Do I need prior machine learning experience?
No. The AI companion provides example code and pre-processed data so you can train a simple model without any ML background. You’ll still understand the difference by running both algorithms.
Can I use this kit for a school or college exhibition?
Absolutely. The kit outputs logs comparing rule-based and ML scheduling, which makes a convincing demonstration of smart water management. The physical solenoid valve adds a strong visual element.
What if my solenoid valve does not open during testing?
First check the relay connections as shown in the build guide. Ensure the 12V PSU is connected correctly and that the ESP32 GPIO pin is driving the relay according to the code logic.
Lawn — Soil moisture and temperature on ESP32 decide when to water — compares rule-based vs ML-based scheduling.
What's in this kit
- ESP32 Dev Board
- Soil Moisture Sensor x3
- DHT22
- 5V Relay Module
- Solenoid Valve
- 12V PSU
- USB Cable
- M-M Wires x20
Shipping Information
- Prepaid Orders: ₹45 for orders up to ₹1,999, FREE shipping above ₹1,999
- COD Orders: ₹45 shipping for orders up to ₹1,999, FREE shipping above ₹1,999. COD available.
- Delivery Timeline: Dispatch in 3-7 days, delivery in 2-7 days depending on location
Returns & Warranty
- 7-Day Return: Manufacturing defects only (approval required)
- Warranty: 7 days from delivery
- Non-Returnable: Batteries, consumables, cut wires, clearance items