Built to order

Smart Irrigation System Project with Soil Moisture Sensing and Weather-Based Scheduling

This project builds a smart irrigation system that waters plants only when the soil needs it: an ESP32 reads a capacitive soil-moisture probe in each of 4 zones and opens a valve when moisture falls below that zone's threshold. Before every scheduled cycle, a weather feed checks the rain probability and skips watering when rain is likely. A cloud dashboard shows live moisture, valve state and irrigation history, while thresholds, schedules and manual overrides keep working even if Wi-Fi drops. Suitable for B.E./B.Tech final-year projects in Electronics, Electrical and IoT.

Chat on WhatsApp — get a quotation

IoT & Embedded ESP32DHT22 temperature · humidity sensorArduino IDE · ESP32 coreHTML · CSS · JavaScriptMQTT · PubSubClientOpenWeatherMap APICapacitive soil-moisture probe v1.2Hybrid
Smart Irrigation System Project with Soil Moisture Sensing and Weather-Based Scheduling — project thumbnail preview
More project photos (3)

The problem

Most small farms, gardens and campus lawns are still watered on fixed timers or by hand — an hour at dawn regardless of yesterday's rain. Timer watering soaks wet soil and starves plants on hot days, while manual watering depends on someone judging soil moisture by eye. The result is rotted roots from over-watering, uneven growth, and water bills far higher than the plants ever needed. A smart irrigation system fixes the scheduling, not just the plumbing: capacitive probes measure how wet each zone truly is, an ESP32 controller compares each reading against that zone's threshold, and a weather feed checks the rain probability before any scheduled cycle runs. If the soil is already moist, or rain is likely, the valves stay shut. When the soil is genuinely dry and no rain is coming, the controller opens the right solenoid valve for just long enough — cutting waste while holding each zone inside its ideal moisture band.

SYSTEM FLOW

5 components 4 connections

Live flow
Drag to explore
100%
sensorSoil-moisture probes

Capacitive probes in each zone measure soil wetness as an analog voltage.

How it works

Sense, decide, water, report. Each zone's capacitive probe is a coplanar capacitor printed on a PCB: wetter soil raises the dielectric constant between the electrodes, so the probe's analog voltage falls as moisture rises. The ESP32 digitises this with its 12-bit ADC into a 0–4095 count, and a one-point dry/wet calibration maps counts to a moisture percentage for each probe. Every 2 minutes the ESP32 publishes each zone's moisture, temperature, humidity and valve states over MQTT. The watering decision fuses two inputs: local moisture versus the zone's threshold, and the OpenWeatherMap 3-hour rain probability. If the soil is below threshold and rain probability is under 60%, the controller energises the zone's relay and the 12 V solenoid valve opens for the scheduled duration; if rain is likely, the cycle is skipped and logged. Threshold, schedule and manual commands travel back over MQTT — and if Wi-Fi drops, the controller keeps watering from its EEPROM schedule.

  1. The capacitive probe in each zone converts soil moisture to an analog voltage; the ESP32 reads it on its 12-bit ADC (0–4095 counts).
  2. A one-point dry/wet calibration maps each probe's counts to a moisture percentage, since every probe reads slightly differently.
  3. The DHT22 measures air temperature and humidity alongside the moisture readings.
  4. Every 2 minutes the ESP32 publishes all readings and valve states to the cloud broker over MQTT.
  5. The firmware fetches the 3-hour rain probability and compares it against the 60% skip threshold.
  6. If a zone is below its threshold and rain is unlikely, the relay energises and the 12 V solenoid valve opens for the scheduled duration.
  7. The dashboard plots the 24-hour moisture curve, shows valve states live, and keeps an event log of every auto and manual cycle.
  8. Thresholds, schedules and manual overrides sent from the dashboard travel back over MQTT; during a Wi-Fi outage the controller falls back to its EEPROM schedule.

Tech stack:

  • ESP32 DevKit (dual-core, Wi-Fi)
  • Arduino IDE with ESP32 core
  • Capacitive soil-moisture probe v1.2
  • DHT22 temperature · humidity sensor
  • MQTT via PubSubClient library
  • 12 V solenoid valve with 4-channel relay
  • OpenWeatherMap 3-hour forecast API
  • HTML · CSS · JavaScript cloud dashboard
Parameter Value
Zones 4 (one per relay channel)
Controller ESP32 DevKit, dual-core with Wi-Fi
Moisture input 0–3.3 V analog, 12-bit ADC (0–4095 counts)
Calibration range Approximately 2,100 counts (air) to 1,100 counts (saturated soil) — expected, calibrate per probe
Temperature accuracy ±0.5 °C (DHT22 datasheet)
Humidity accuracy ±2 % RH typical (DHT22 datasheet)
Solenoid valve 12 V DC, approximately 0.5 A each
Rain-skip threshold 60 % rain probability in 3 h (configurable)
Telemetry interval Every 2 min over MQTT (configurable)
Schedule storage ESP32 EEPROM, survives power loss
Power 5 V USB for the controller; separate 12 V 2 A adapter for the valves

Project features

The four capabilities that carry this build are per-zone soil-moisture control, weather-based skip, the live cloud dashboard, and offline-safe scheduling. Each of the four zones keeps its own moisture threshold — the vegetable bed can sit at 35% while the lawn runs drier at 30% — because a tomato bed and a lawn never want the same water. The weather-based skip checks the live rain probability before every scheduled cycle and stands the valves down when rain is likely; this is where most of the water saving comes from, since timers otherwise water into storms. The cloud dashboard plots live moisture curves, valve state, temperature and humidity from anywhere, and sends threshold, schedule and manual-override commands back over MQTT. And the system stays sensible when the network does not: schedules live in the ESP32's EEPROM, so watering continues on the last-known plan through a Wi-Fi outage instead of dying silently.

  • [Per-zone soil-moisture control] Four independent zones, each with its own capacitive probe and configurable threshold (20–60%), so different plants get different watering bands.
  • [Weather-based irrigation skip] Before every scheduled cycle the firmware checks the 3-hour rain probability and skips the cycle when it exceeds 60% — the single biggest source of water saving.
  • [Cloud dashboard with live telemetry] Moisture, temperature, humidity and valve state stream to the dashboard over MQTT; the 24-hour moisture chart makes irrigation decisions visible.
  • [Schedules stored on the controller] Morning/evening start times and durations are saved in ESP32 EEPROM, so a power cut never erases the plan and watering continues without Wi-Fi.
  • [Manual override from anywhere] Valves can be opened or closed from the dashboard, and a physical push button on the controller starts a manual cycle for testing.
  • [DHT22 climate sensing] Temperature (±0.5 °C, datasheet) and humidity (±2 % RH typical, datasheet) are logged alongside moisture, so heat-wave stress is visible in the data.
  • [Dry-run protection] If a zone's moisture does not rise during a watering window, the firmware closes the valve and flags a possible empty tank or blocked line.

What is included

  • Assembled ESP32 controller with 4 capacitive probes, DHT22, 4-channel relay and 12 V solenoid valves
  • Firmware with MQTT telemetry, weather skip, EEPROM schedules and dry-run protection
  • Cloud dashboard (live charts, schedule editor, event log, manual overrides)
  • One-point dry/wet calibration procedure per probe
  • Project report PDF (background, sensing theory, methodology, results format)
  • PPT presentation for final review
  • Viva Q&A preparation document (ADC, capacitive sensing, MQTT, weather-API logic)

Limitations & prerequisites

  • The weather skip needs internet; without it, watering follows the moisture thresholds and EEPROM schedule only.
  • Soil-moisture probes need the one-point dry/wet calibration — uncalibrated readings are only approximately comparable across probes.
  • Capacitive probes drift over seasons as soil compacts and salts build up; recalibrate every few months of continuous use.
  • A 60% rain-probability threshold is a starting point; local micro-climates may need it tuned after the first month of logs.
  • Valves need a separate 12 V adapter — the single most common student-build failure is trying to run solenoids from the controller's USB supply.
  • The prototype suits garden beds and pots; a full farm field needs larger valves and pipework beyond this build.
  • MQTT broker and weather-API credentials must be configured; the setup guide walks through both.

Frequently Asked Questions

Which controller is used and why?

The ESP32 DevKit. It has built-in Wi-Fi for the MQTT link, a 12-bit ADC for the moisture probes, and enough GPIO for 4 relays plus the DHT22 — so one board handles sensing, decisions and cloud reporting without extra modules.

How does the weather-based skip actually work?

Before each scheduled cycle, the firmware reads the OpenWeatherMap 3-hour rain probability for the site's location and compares it against the 60% threshold. If the probability is at or above 60%, the cycle is skipped and logged as weather-skipped; below that, watering runs normally on schedule.

Does the system keep working without Wi-Fi?

Yes, with limits. Moisture-threshold watering and the EEPROM-stored schedules run fully offline, since the decision logic lives on the ESP32 itself. What stops is the cloud dashboard and the weather feed — live graphs, remote overrides and weather-skip resume automatically when Wi-Fi returns.

What power supply does it need?

Two supplies: a 5 V USB adapter for the ESP32 and a separate 12 V 2 A adapter for the solenoid valves, switched through the relay module. The valves must never share the controller's USB supply — they draw about 0.5 A each and will brown-out the board.

Can more zones or different sensors be added?

Yes. Extra relay channels and probes scale the same firmware pattern, and the dashboard's zone grid is built for it. Resistive moisture probes can substitute for the capacitive ones, but they corrode within a season — the build keeps capacitive probes as the default.

Is this project suitable for a final-year project?

Yes — for Electronics, Electrical and IoT programs. It demonstrates analog sensing with ADC calibration, relay-driven actuation, MQTT cloud communication, a weather-API decision layer, and a working dashboard — a complete sense-decide-actuate loop with real hardware to defend in the viva.

Components & software requirements
  • ESP32 DevKit (dual-core, Wi-Fi)
  • Arduino IDE with ESP32 core
  • Capacitive soil-moisture probe v1.2
  • DHT22 temperature · humidity sensor
  • MQTT via PubSubClient library
  • 12 V solenoid valve with 4-channel relay
  • OpenWeatherMap 3-hour forecast API
  • HTML · CSS · JavaScript cloud dashboard
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download free synopsis (PDF)

Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.

Get a quotation