Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Home Automation & Smart Devices

Smart Irrigation System: Automated Garden Watering India

Smart Irrigation System: Automated Garden Watering India

March 11, 2026 /Posted byJayesh Jain / 0

Building a smart irrigation system for automated garden watering saves water and maintains healthy plants in Indian gardens — whether you have a terrace garden, balcony plants, kitchen garden, or ground-level flower beds. Using ESP8266/ESP32 with soil moisture sensors and solenoid valves, you can create an automated watering system that only waters when soil is dry, can be scheduled, and works with Home Assistant for remote monitoring. This guide is specifically designed for Indian gardening conditions.

Table of Contents

  • Why Smart Irrigation for India
  • Components and Cost in India
  • Soil Moisture Sensor Setup
  • Solenoid Valve Control
  • ESP8266 Irrigation Controller Code
  • Time-Based and Sensor-Based Scheduling
  • Weather-Aware Watering
  • Frequently Asked Questions

Why Smart Irrigation for India

India’s diverse climate makes smart irrigation particularly valuable:

  • Water scarcity: Many Indian cities face regular water shortage, especially in summer. Smart irrigation reduces water usage by 30–50% versus manual watering.
  • Extreme heat: Indian summers (May–June) can exceed 45°C — plants need precise watering to avoid heat stress and overwatering
  • Monsoon: During June–September, most plants need no irrigation — smart systems detect rain and skip watering
  • Power cuts: Watering systems must handle power cuts gracefully — solenoid valves should default to closed on power loss
  • Urban farming: India’s growing terrace and kitchen garden movement needs efficient water management

Components and Cost in India

  • ESP8266 NodeMCU or D1 Mini: ₹150–₂50
  • Capacitive soil moisture sensor (×2–4): ₹80–₁50 each. Better than resistive type (don’t corrode in Indian soil).
  • 12V solenoid valve (1/2 inch, N/C type): ₹300–₅00 each zone
  • 5V relay module (2 or 4 channel): ₹50–₁00
  • 12V 1A power adapter: ₹200–₃50 (for valves)
  • RTC module (DS3231): ₹80–₁50 (for scheduling without internet)
  • Waterproof project box: ₹150–₃00 (IP65 for outdoor use)
  • 3/4 inch garden drip hose: ₹20–₃0/metre from local hardware stores

Total cost: ₹2000–₄000 for a 2-zone irrigation system with soil sensing.

Recommended: Waveshare Moisture Sensor — Quality soil moisture sensor for Indian garden irrigation projects with reliable readings across different soil types.

Soil Moisture Sensor Setup

// Capacitive vs Resistive Soil Moisture Sensors in India:
// Resistive: Copper electrodes corrode in Indian soil (acidic) within months
// Capacitive: Measures dielectric constant, no corrosion, lasts years

// Capacitive sensor (most Indian market sensors):
// VCC → 3.3V or 5V (check datasheet - most are 3.3–5V)
// GND → GND
// AOUT → NodeMCU A0 (only 1 ADC on ESP8266)

// For multiple soil sensors on ESP8266:
// Use digital output (above/below threshold) instead of analog
// Or use a multiplexer (CD4051, ₹10–₂0) to connect multiple to single ADC

// Calibration values (adjust for your Indian soil type):
// Red soil: dry ~3000, wet ~1500 (out of 4095)
// Black soil: dry ~2800, wet ~1200  
// Sandy soil: dry ~3200, wet ~1800

// Recommended: Measure your specific soil when dry and fully watered
// Note: Indian laterite soil behaves differently from loam

const int DRY_VALUE = 3000;   // ADC reading for dry soil (calibrate this!)
const int WET_VALUE = 1200;   // ADC reading for saturated soil

int readMoisturePercent() {
    int rawValue = analogRead(A0);
    // Constrain and map to 0-100%
    rawValue = constrain(rawValue, WET_VALUE, DRY_VALUE);
    return map(rawValue, DRY_VALUE, WET_VALUE, 0, 100);
}

Solenoid Valve Control

// Solenoid valve wiring:
// NC (Normally Closed) valve stays CLOSED when no power (power cut safe!)
//
// 12V Power → Relay COM
// Relay NO  → Valve positive
// Valve negative → 12V Power negative
// ESP8266 D1 (GPIO5) → Relay IN

#define ZONE1_VALVE D1  // GPIO5
#define ZONE2_VALVE D2  // GPIO4

void openValve(int zone, int seconds) {
    int pin = (zone == 1) ? ZONE1_VALVE : ZONE2_VALVE;
    
    digitalWrite(pin, HIGH);  // Open valve (energise relay)
    Serial.printf("Zone %d: Watering started for %d seconds
", zone, seconds);
    
    delay(seconds * 1000L);  // Water for specified duration
    
    digitalWrite(pin, LOW);   // Close valve
    Serial.printf("Zone %d: Watering complete
", zone);
}

void emergencyStopAll() {
    digitalWrite(ZONE1_VALVE, LOW);
    digitalWrite(ZONE2_VALVE, LOW);
    Serial.println("Emergency stop: all valves closed");
}

ESP8266 Irrigation Controller Code

#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <NTPClient.h>
#include <WiFiUDP.h>

// MQTT and NTP setup
WiFiClient espClient;
PubSubClient mqtt(espClient);
WiFiUDP ntpUDP;
NTPClient timeClient(ntpUDP, "pool.ntp.org", 19800);  // IST = UTC+5:30 = 19800s

// Configuration
const int MOISTURE_THRESHOLD = 30;  // Water if below 30% moisture
const int WATERING_DURATION = 120;  // Water for 2 minutes per zone

// Irrigation state
struct Zone {
    int sensorPin;
    int valvePin;
    int moisture;
    bool isWatering;
    unsigned long waterStartTime;
};

Zone zones[2] = {
    {A0, D1, 0, false, 0},  // Zone 1: Terrace garden
    {A0, D2, 0, false, 0},  // Zone 2: Balcony plants (share ADC with mux)
};

void checkAndWater() {
    for (int i = 0; i < 2; i++) {
        zones[i].moisture = readMoisturePercent();
        
        Serial.printf("Zone %d moisture: %d%%
", i+1, zones[i].moisture);
        
        // Water if dry and not already watering
        if (zones[i].moisture = 11 && hour  1800000) {  // 30 minutes
        checkAndWater();
        lastCheck = millis();
    }
}
Recommended: 5V/12V Soil Moisture Sensor Relay Control Module — All-in-one soil moisture sensing and relay control for simple Indian garden irrigation automation.

Time-Based and Sensor-Based Scheduling

Effective Indian garden watering strategy:

  • Best watering times in India: Early morning (5–8 AM) — less evaporation, cooler temperatures. Evening (6–8 PM) — also acceptable but risks fungal issues.
  • Avoid: 11 AM – 4 PM (peak heat), night watering (fungal disease risk in humid Indian climate)
  • Monsoon handling: Check for rain using NTP time + weather API or a physical rain sensor (₹50–₈0)

Weather-Aware Watering

// Skip watering if rain expected (uses OpenWeatherMap API, free tier)
#include <ArduinoJson.h>

bool isRainExpected() {
    WiFiClient client;
    if (client.connect("api.openweathermap.org", 80)) {
        client.print("GET /data/2.5/forecast?q=Bengaluru,IN&appid=YOUR_API_KEY HTTP/1.1
");
        client.print("Host: api.openweathermap.org
");
        client.print("Connection: close

");
        
        String response = "";
        while (client.available()) response += client.readString();
        
        // Parse JSON to check for rain in next 6 hours
        StaticJsonDocument<2048> doc;
        deserializeJson(doc, response.substring(response.indexOf("{")));
        
        // Check weather description
        String weather = doc["list"][0]["weather"][0]["main"].as<String>();
        return (weather == "Rain" || weather == "Drizzle");
    }
    return false;  // Default: don't skip if can't reach API
}

Frequently Asked Questions

What soil moisture level should trigger irrigation in India?

Optimal soil moisture varies by plant type: vegetables (50–70%), flowers (40–60%), succulents (20–30%), fruit trees (30–50%). For a general Indian kitchen garden with mixed plants, 35–40% moisture is a good watering trigger. Adjust based on plant response and season.

How many zones can one ESP8266 control?

One ESP8266 can typically control 4–8 zones with a multi-channel relay module. For multiple soil sensors, use an analog multiplexer (CD4051 for 8 channels). Beyond 8 zones, use ESP32 (more GPIO pins) or daisy-chain multiple ESP8266 nodes communicating via MQTT.

What pipe size is recommended for Indian terrace gardens?

For terrace gardens in India: 3/4 inch main supply from overhead tank, branching to 1/2 inch zones, then 4mm micro-drip tubing to individual pots/beds. Gravity-fed systems (from overhead tank to terrace below) typically have 0.3–1 bar pressure — adequate for drip emitters and micro-sprinklers.

Can this system handle Indian 24-hour power cuts during summer?

Use NC (Normally Closed) solenoid valves — they stay closed during power cuts (water off). Add a small 12V sealed lead-acid battery and charger circuit for 4–8 hours of backup operation. The ESP8266 in deep sleep between checks draws only 20μA — batteries last days even without mains.

How do I prevent overwatering during Indian monsoon season?

Three approaches: 1) Physical rain sensor (tipping bucket or rain gauge) that disables irrigation during rain. 2) Weather API integration to check precipitation forecast and skip scheduled runs. 3) Soil moisture sensor — if soil is already wet from rain, the moisture threshold won’t be crossed and irrigation won’t trigger. Method 3 (sensor-based) is most reliable.

Shop Home Automation at Zbotic →

Tags: automated garden watering, ESP8266 irrigation, IoT farming India, smart irrigation India, soil moisture sensor
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
SD Card Interface with SPI: Ar...
blog sd card interface with spi arduino esp32 and stm32 guide 599114
blog solar water pump system submersible motor and controller india 599118
Solar Water Pump System: Subme...

Related posts

Svg%3E
Read more

MQTT for Home Automation: ESP32 + Mosquitto + Home Assistant

April 1, 2026 0
MQTT is the backbone protocol of professional home automation systems. If you are building a smart home with multiple ESP32... Continue reading
Svg%3E
Read more

Curtain and Blind Automation: Stepper Motor Controller

April 1, 2026 0
Curtain automation is one of the most satisfying smart home upgrades you can build. Imagine your curtains opening automatically at... Continue reading
Svg%3E
Read more

Smart Doorbell with Camera: ESP32-CAM Video Intercom

April 1, 2026 0
A smart doorbell with a camera lets you see who is at your door from your phone, even when you... Continue reading
Svg%3E
Read more

Blynk IoT Platform: Control Arduino and ESP32 from Mobile

April 1, 2026 0
The Blynk IoT platform is the fastest way to control your Arduino and ESP32 projects from your mobile phone. Instead... Continue reading
Svg%3E
Read more

PIR Sensor Automatic Light: Save Electricity with Motion Detection

April 1, 2026 0
PIR sensor automatic lights are the simplest and most effective way to save electricity in Indian homes. By automatically turning... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now