OC
OceanRemote
Low-code IoT platform
← Back to Course

Predicting Irrigation Needs

Predicting Irrigation Needs

💧 Predicting Irrigation Needs - Evapotranspiration & Crop Coefficients

🌾 What You'll Learn in This Lesson:

  • 💧 Calculate exactly how much water your crops need daily
  • 🌡️ Understand Evapotranspiration (ET0) and why it matters
  • 📊 Use Crop Coefficients (Kc) for different growth stages
  • 💻 Build a predictive irrigation model with Arduino/ESP32
  • 💰 Save water by irrigating precisely when and how much needed

📚 What is Evapotranspiration (ET0)?

💡 Definition:

Evapotranspiration (ET) is the sum of evaporation from soil + transpiration from plants. ET0 is the reference evapotranspiration from a standard grass surface - basically, how much water is naturally leaving your field each day!

Water leaves your farm through two processes:

  • 💧 Evaporation: Water evaporating directly from soil surface
  • 🌿 Transpiration: Water moving through plants and evaporating from leaves
Climate Factor Effect on ET0 Irrigation Impact
☀️ High Temperature ↑ Increases ET0 ⬆️ Need more water
💨 Strong Wind ↑ Increases ET0 ⬆️ Need more water
💧 High Humidity ↓ Decreases ET0 ⬇️ Need less water
☁️ Cloud Cover ↓ Decreases ET0 ⬇️ Need less water
🌞 Full Sun ↑ Increases ET0 ⬆️ Need more water

📊 The Basic Formula

Daily Water Need (mm) = ET0 × Kc

Where:

ET0 = Reference evapotranspiration (mm/day) - water lost from grass

Kc = Crop Coefficient (depends on crop type and growth stage)

💡 Real Example:

If ET0 = 5mm (hot, sunny day) and Kc for tomatoes at flowering = 1.2
Daily water need = 5 × 1.2 = 6mm
That's 6 liters per square meter, or 60,000 liters per hectare daily!

🌽 Crop Coefficients (Kc) for Common African Crops

Crop Initial Stage (Kc init) Mid Stage (Kc mid) Late Stage (Kc end) Total Days
🌽 Maize (Corn)0.31.20.6100-120
🍅 Tomatoes0.61.20.990-120
🌶️ Peppers0.61.10.990-110
🥬 Cabbage0.71.10.9580-100
🧅 Onions0.71.10.9120-150
🥕 Carrots0.71.10.970-90
🍆 Eggplant0.61.10.9100-120
🍉 Watermelon0.51.10.880-100
🥔 Potatoes0.51.20.990-110
🍓 Strawberries0.51.00.8120-150
🌾 Rice (paddy)1.11.21.0120-150
🌿 Beans (dry)0.51.10.880-100
🥜 Groundnuts0.51.10.7100-120
🫘 Cowpeas0.41.00.870-90
📦 Sorghum0.41.10.690-110
🌻 Sunflower0.41.10.690-110
🍌 Bananas0.51.21.0300-365
🍊 Citrus0.70.70.7365

📈 Growth Stages Explained

🌱
Initial Stage
Germination to 10% ground cover. Low water needs (Kc = 0.3-0.7).
🌿
Development Stage
Plants growing rapidly, roots developing. Increasing water needs.
🌾
Mid Stage (Peak)
Flowering and fruit setting. HIGHEST water needs (Kc = 1.0-1.2).
🍅
Late Stage
Fruit ripening, crop maturing. Decreasing water needs (Kc = 0.6-0.9).

🌡️ Calculating ET0 - The Hargreaves Method

You can estimate ET0 using temperature data (no complex weather station needed!):

/*
 * ET0 Calculator using Hargreaves Method
 * Only needs min/max temperature and solar radiation
 * 
 * Formula: ET0 = 0.0023 × RA × (Tavg + 17.8) × √(Tmax - Tmin)
 * 
 * Where:
 * - RA = Extraterrestrial radiation (MJ/m²/day)
 * - Tavg = Average daily temperature (°C)
 * - Tmax = Maximum daily temperature (°C)
 * - Tmin = Minimum daily temperature (°C)
 */

float calculateET0(float tmax, float tmin, float latitude, int dayOfYear) {
    // Calculate extraterrestrial radiation (RA)
    // Simplified formula - use actual for production
    
    float tavg = (tmax + tmin) / 2.0;
    float tempDiff = sqrt(tmax - tmin);
    
    // RA depends on latitude and day of year
    // For latitude 0° (equator), RA ≈ 35 MJ/m²/day
    float RA = 35.0; // Simplified - use actual calculation in production
    
    float ET0 = 0.0023 * RA * (tavg + 17.8) * tempDiff;
    
    return ET0;
}
    

💧 Converting mm/day to Actual Water Volume

📐 Conversion Formula:

Daily Water (liters) = ET0 × Kc × Area (m²)

Example 1 - Small Garden (100m²):
ET0 = 5mm, Kc (tomatoes mid) = 1.2
Water need = 5 × 1.2 × 100 = 600 liters/day

Example 2 - 1 Hectare Farm (10,000m²):
ET0 = 4mm, Kc (maize mid) = 1.2
Water need = 4 × 1.2 × 10,000 = 48,000 liters/day
That's 4 tanker trucks daily!

💻 Arduino Code: Complete ET0-Based Irrigation Predictor

/*
 * Predictive Irrigation System using ET0 + Kc
 * Calculates daily water requirements based on weather
 * 
 * Components:
 * - DHT22 (temperature, humidity)
 * - Soil moisture sensor (optional verification)
 * - Real-time clock (RTC) for day counting
 */

#include 
#include 
#include 

#define DHTPIN 4
#define DHTTYPE DHT22

DHT dht(DHTPIN, DHTTYPE);
RTC_DS3231 rtc;

// Crop configuration
struct CropData {
    const char* name;
    float kcInit;
    float kcMid;
    float kcEnd;
    int daysInit;    // Days in initial stage
    int daysMid;     // Days in mid stage (after init)
    int daysLate;    // Days in late stage
    int totalDays;
};

// Define your crops
CropData crops[] = {
    {"Tomatoes", 0.6, 1.2, 0.9, 30, 50, 30, 110},
    {"Maize (Corn)", 0.3, 1.2, 0.6, 25, 60, 25, 110},
    {"Peppers", 0.6, 1.1, 0.9, 25, 50, 25, 100},
    {"Beans", 0.5, 1.1, 0.8, 20, 45, 25, 90}
};

int currentCrop = 0; // Index of selected crop
int daysAfterPlanting = 45; // Example: 45 days after planting

// Calculate current Kc based on growth stage
float getCurrentKc(CropData crop, int daysAfterPlanting) {
    if (daysAfterPlanting <= crop.daysInit) {
        return crop.kcInit;
    } else if (daysAfterPlanting <= (crop.daysInit + crop.daysMid)) {
        return crop.kcMid;
    } else if (daysAfterPlanting <= crop.totalDays) {
        return crop.kcLate;
    } else {
        return crop.kcEnd; // Harvest stage
    }
}

// Calculate ET0 using temperature-based method
float calculateET0(float tmax, float tmin, float humidity) {
    // Simplified Priestley-Taylor method
    // For production, use FAO Penman-Monteith
    
    float tavg = (tmax + tmin) / 2.0;
    
    // Simple linear estimate based on temperature
    // ET0 typically ranges 2-8mm/day in Africa
    float baseET = 3.0; // mm/day baseline
    float tempFactor = (tavg - 20) * 0.15;
    
    float ET0 = baseET + tempFactor;
    
    // Adjust for humidity
    if (humidity > 70) {
        ET0 = ET0 * 0.7;  // High humidity reduces evaporation
    } else if (humidity < 40) {
        ET0 = ET0 * 1.3;  // Low humidity increases evaporation
    }
    
    return constrain(ET0, 1.5, 10.0);
}

// Calculate daily water need in liters for your area
float calculateDailyWaterNeeds(float ET0, float Kc, float areaSqMeters) {
    float waterMM = ET0 * Kc; // mm of water needed
    float waterLiters = waterMM * areaSqMeters; // 1mm over 1m² = 1 liter
    return waterLiters;
}

// Get growth stage name
String getGrowthStage(CropData crop, int daysAfterPlanting) {
    if (daysAfterPlanting <= crop.daysInit) {
        return "Initial (Germination)";
    } else if (daysAfterPlanting <= (crop.daysInit + crop.daysMid)) {
        return "Mid (Flowering/Fruiting)";
    } else {
        return "Late (Ripening/Harvest)";
    }
}

void setup() {
    Serial.begin(115200);
    dht.begin();
    
    if (!rtc.begin()) {
        Serial.println("Couldn't find RTC!");
    }
    
    Serial.println("========================================");
    Serial.println("💧 PREDICTIVE IRRIGATION SYSTEM v1.0");
    Serial.println("   ET0 + Crop Coefficient Method");
    Serial.println("========================================\n");
}

void loop() {
    // Read temperature and humidity
    float temp = dht.readTemperature();
    float humidity = dht.readHumidity();
    
    // Get crop data
    CropData crop = crops[currentCrop];
    float Kc = getCurrentKc(crop, daysAfterPlanting);
    String stage = getGrowthStage(crop, daysAfterPlanting);
    
    // Calculate ET0
    float ET0 = calculateET0(temp, temp - 5, humidity);
    
    // Calculate water needs for different area sizes
    float gardenWater = calculateDailyWaterNeeds(ET0, Kc, 100);      // 100m² garden
    float halfHectare = calculateDailyWaterNeeds(ET0, Kc, 5000);     // 0.5 hectare
    float oneHectare = calculateDailyWaterNeeds(ET0, Kc, 10000);     // 1 hectare
    
    // Display report
    Serial.println("╔══════════════════════════════════════════════════════════════╗");
    Serial.println("║           📊 DAILY IRRIGATION PREDICTION REPORT              ║");
    Serial.println("╚══════════════════════════════════════════════════════════════╝");
    Serial.println("");
    
    Serial.println("🌡️ WEATHER CONDITIONS:");
    Serial.printf("   Temperature: %.1f°C\n", temp);
    Serial.printf("   Humidity: %.1f%%\n", humidity);
    Serial.printf("   Calculated ET0: %.1f mm/day\n", ET0);
    Serial.println("");
    
    Serial.println("🌾 CROP INFORMATION:");
    Serial.printf("   Crop: %s\n", crop.name);
    Serial.printf("   Days after planting: %d\n", daysAfterPlanting);
    Serial.printf("   Growth stage: %s\n", stage.c_str());
    Serial.printf("   Current Kc: %.2f\n", Kc);
    Serial.printf("   Kc range: %.1f → %.1f → %.1f\n", crop.kcInit, crop.kcMid, crop.kcEnd);
    Serial.println("");
    
    Serial.println("💧 DAILY WATER REQUIREMENTS:");
    Serial.printf("   🏡 Garden (100m²):  %.0f liters (%.0f jerry cans)\n", gardenWater, gardenWater / 20);
    Serial.printf("   🌾 Half hectare:    %.0f liters (%.0f tanker trucks)\n", halfHectare, halfHectare / 10000);
    Serial.printf("   🚜 1 Hectare:       %.0f liters (%.0f tanker trucks)\n", oneHectare, oneHectare / 10000);
    Serial.println("");
    
    Serial.println("🎯 IRRIGATION RECOMMENDATION:");
    if (ET0 > 6) {
        Serial.println("   🔥 High water demand - Irrigate early morning (5-7 AM)");
        Serial.println("   💡 Consider mulching to reduce evaporation");
    } else if (ET0 > 4) {
        Serial.println("   💧 Moderate water demand - Normal irrigation schedule");
    } else {
        Serial.println("   ✅ Low water demand - Reduce irrigation frequency");
    }
    
    Serial.println("");
    Serial.println("══════════════════════════════════════════════════════════════\n");
    
    delay(3600000); // Update every hour
}
    

📱 Simplified ET0 by Climate Zone (No Sensors Needed!)

Climate Zone Typical ET0 (mm/day) Example Locations Irrigation Adjustment
🌧️ Humid/Coastal 3-4 mm/day Mombasa, Dar es Salaam, Lagos ⬇️ Reduce water by 30%
🌤️ Sub-humid 4-5 mm/day Nairobi, Kampala, Addis Ababa ✅ Standard calculation
☀️ Semi-arid 5-7 mm/day Kigali, Lilongwe, Lusaka ⬆️ Increase water by 25%
🏜️ Arid/Desert 7-10 mm/day Cairo, Khartoum, Nouakchott ⬆️ Increase water by 50-75%
📖 Case Study - Kenyan Maize Farm Using ET0 Prediction:

A 5-hectare maize farm in Nakuru, Kenya implemented ET0-based irrigation:

  • 📊 Before: Irrigated 2 hours daily regardless of weather (24mm/day)
  • 🔬 Method: Calculated ET0 = 4.5mm, Kc maize peak = 1.2 → Need = 5.4mm/day
  • 💧 Saved: 18.6mm/day excess watering → 93,000 liters/hectare DAILY saved!
  • 💰 Annual savings: $2,800 on water + electricity
  • 🌽 Yield impact: 15% increase (reduced over-watering)

"We were over-watering by 300% without realizing it. ET0 calculation showed us exactly how much water our maize actually needs." - Farm Manager, Nakuru, Kenya

💡 Pro Tips for Using ET0:
  • 📍 Track daily: ET0 changes with weather. Check daily, not weekly.
  • 📍 Rain adjustment: If rain ≥ calculated need, skip irrigation completely.
  • 📍 Soil check: Use soil moisture sensor to verify your ET0 calculation.
  • 📍 Mobile apps: Apps like "ET Calculator" can give you daily ET0 for your location.
  • 📍 Start simple: Use estimated ET0 (3-4mm for humid, 5-7mm for dry areas).
🎉 Congratulations!

You now understand how to predict irrigation needs scientifically!

  • ✅ Understand Evapotranspiration (ET0) and why it matters
  • ✅ Use Crop Coefficients (Kc) for different growth stages
  • ✅ Calculate daily water needs in mm and liters
  • ✅ Build predictive Arduino irrigation system
  • ✅ Save 30-50% water by irrigating precisely what crops need

Next step: Combine ET0 prediction with soil moisture sensors for ultimate precision!

📋 Quick Reference - ET0 × Kc Lookup Table:
┌─────────────────────────────────────────────────────────────────────────────┐
│                    DAILY WATER NEED (mm) = ET0 × Kc                          │
├──────────────┬──────────┬──────────┬──────────┬──────────┬─────────────────┤
│     ET0      │   Kc 0.5  │  Kc 0.7  │  Kc 0.9  │  Kc 1.1  │  Kc 1.2         │
├──────────────┼──────────┼──────────┼──────────┼──────────┼─────────────────┤
│ 3 mm (cool)  │   1.5    │   2.1    │   2.7    │   3.3    │   3.6           │
│ 4 mm (mild)  │   2.0    │   2.8    │   3.6    │   4.4    │   4.8           │
│ 5 mm (warm)  │   2.5    │   3.5    │   4.5    │   5.5    │   6.0           │
│ 6 mm (hot)   │   3.0    │   4.2    │   5.4    │   6.6    │   7.2           │
│ 7 mm (very hot)│ 3.5    │   4.9    │   6.3    │   7.7    │   8.4           │
│ 8 mm (extreme)│ 4.0    │   5.6    │   7.2    │   8.8    │   9.6           │
└──────────────┴──────────┴──────────┴──────────┴──────────┴─────────────────┘

💡 To convert mm to liters: mm × area(m²) = liters needed daily
💡 Key Takeaways:
  • Apply these concepts directly to your farm or project.
  • Take notes on important details for the quiz.
  • Use the button below to track your progress.