FarmPulse AI - Smart Irrigation and Plant Disease Detection System for Small Farmers

Published Nov 30, 2025
 72 hours to build
 Intermediate

FarmPulse AI is a solar-powered smart irrigation and plant-health monitoring system that uses ESP32-C6, real-time sensors, and AI models to automate watering and detect crop diseases early. It empowers small farmers with affordable, data-driven, and intelligent farming technology.

display image

Components Used

DHT11 Temperature & Humidity Sensor
Monitors room or water temperature to maintain a comfortable environment for the baby.
1
Mini Epoxy Solar Panel 70×70 mm
Solar Panels & Solar Cells Monocrystalline Solar Panel (5V 120mA)
1
18650 Battery Holder
Seeed Studio Accessories 18650 Battery Holder--1 18650
1
DC-DC booster 1.5 - 5V
Power Management IC Development Tools DC-DC boost converter 1.5 - 5V
1
Capacitor 0.1 µF
Ceramic capacitor - 0.1 µF 50V
1
Female Pin Headers
1x40 pins, 2.54mm
1
Male Pin header
1x10 pins, 2.54mm
1
Switch (Rocker SPST)
1
Zero PCB
Zero PCB are used easy to implement electronics circuits
1
ESP32-C6-DEVKITC-1-N8-ND
Main controller with Wi-Fi/BLE for edge computing
1
Description

FarmPulse AI - Smart Irrigation and Plant Disease Detection System for Small Farmers

 

Empowering Farmers With AI Where Technology Rarely Reaches

Across rural farmlands, crops often suffer not from lack of effort but from lack of timely information. Water is wasted because irrigation runs on routine instead of real soil needs. Plant diseases spread silently because farmers notice symptoms only when the damage is already done. And for many small farmers, advanced tools remain out of reach—too costly, too complex, or dependent on stable internet that village fields often lack.

FarmPulse AI bridges this gap with an affordable, solar-powered, intelligence-driven system that helps farmers understand their crops better—without needing technical knowledge or continuous connectivity.

 

What Makes FarmPulse AI Unique?

Instead of relying on manual checks or guesswork, FarmPulse AI brings real-time environmental awareness directly to the field. A small IoT device continuously measures soil moisture, temperature, and humidity, watering crops only when they truly need it. This prevents water waste, reduces input cost, and keeps plants healthier.

Built-in AI takes the system a step further. Using a simple photo of a leaf, the device—or the linked web app—can identify whether a plant is healthy or diseased. If a disease is detected, it names the issue and shows a confidence level, helping farmers take action early and avoid widespread crop loss. All predictions run efficiently on the backend, and alerts reach the farmer instantly via the dashboard or mobile app.

FarmPulse AI is solar-powered, built on ESP32-C6, and designed with low-cost sensors so small farmers can deploy it easily. The device logs data to Firebase whenever internet is available but continues working locally even without connectivity.

 

Why It Matters

Water Conservation: Smart irrigation ensures water flows only when the soil actually needs it.
Early Disease Detection: AI catches plant diseases at the very beginning—before they spread.
Farmer-Friendly: Simple interface, automatic operation, no technical expertise required.
Affordable & Scalable: Designed for small farms, kitchen gardens, and large farmlands alike.
Sustainable: Solar-powered design reduces operational cost and works even in remote fields.

FarmPulse AI transforms farming from reactive to proactive—helping farmers make better decisions, save resources, and protect their crops with confidence.

 

The Big Picture

FarmPulse AI is more than an IoT device; it’s a step toward smarter, climate-resilient agriculture. By combining real-time sensing, automation, and AI-based disease detection, it offers every farmer—big or small—a practical way to improve yield and reduce losses. This project aims to build a future where technology supports farmers silently in the background, ensuring healthier crops, efficient water use, and a more sustainable farming ecosystem.

MyLists | DigiKey - FarmPulse AI

 

  • 1× ESP32-C6-DEVKITC-1-N8
  • 2× Mini Epoxy Solar Panel 70×70 mm
  • 1× TP4056 Battery Charging Module
  • 1× DHT11 sensor
  • 1× Soil Moisture Sensor
  • 1× Relay Module (Single Channel)
  • 1× Submersible Water Pump
  • 2× Lithium-Ion Battery 3.7V 2500mAh 18650
  • 1× 9V Battery
  • 2× 18650 Battery Holder
  • 1× Zero PCB
  • 1× DC-DC Boost Module (1.5V to 5V)
  • 1× Switch (Rocker SPST)
  • 1× Female Pin Header 2.54mm (1×40)
  • 1× Male Pin Header 2.54mm (1×10)
  • 1× Capacitor 100 µF
  • 1× Capacitor 0.1 µF

 

Step 1 — Setting Up (ESP32-C6)

I used the ESP32-C6 microcontroller a small Wi-Fi-enabled chip.
It is the main brain of the system and handles everything:

  • Reads sensor values
  • Sends data online
  • Runs a small ML model for automatic irrigation
  • Controls the water pump

 

Step 2 — Schematic Diagram

This is the schematic diagram of FarmPulse AI system with ESP32-C6 as the main controller unit.

 

Step 3 — Setting up Arduino IDE Environment

Install the following libraries by selecting Sketch -> Include Library ->  Manage Libraries in the Arduino IDE

 

Add these URLs by selecting File -> Preferences -> Additional Boards Manager URLs

http://arduino.esp8266.com/stable/package_esp8266com_index.json, https://dl.espressif.com/dl/package_esp32_index.json, https://raw.githubusercontent.com/espressif/arduino-esp32/package_esp32_index.json

 

Select the board as ESP32C6 Dev Module 

 

Copy this code in Arduino IDE and replace the placeholders with your WiFi and Firebase credentials.

#include <WiFi.h>
#include <Firebase_ESP_Client.h>
#include "DHTesp.h"

// ---- WiFi ----
#define WIFI_SSID "enter your wifi ssid"
#define WIFI_PASSWORD "enter your wifi password"

// ---- Firebase ----
#define DB_URL "enter your firebase database url"
#define DB_SECRET "enter your firebase secret key"

FirebaseData fbdo;
FirebaseAuth auth;
FirebaseConfig config;

// ---- Pins ----
#define DHTPIN 4
#define SOIL_PIN 0
#define RELAY_PIN 20

DHTesp dht;
unsigned long lastRead = 0;

// ---- Soil Calibration ----
int dryValue = 3300;
int wetValue = 1500;
int soilMoistureThreshold = 65;

void setup() {
  // ===== NO SERIAL DEBUG — SAVES FLASH =====
  // Serial.begin(115200);

  pinMode(SOIL_PIN, INPUT);
  pinMode(RELAY_PIN, OUTPUT);
  digitalWrite(RELAY_PIN, LOW);
  dht.setup(DHTPIN, DHTesp::DHT11);

  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) delay(200);

  // Firebase setup
  config.database_url = DB_URL;
  config.signer.tokens.legacy_token = DB_SECRET;

  Firebase.begin(&config, &auth);
  Firebase.reconnectWiFi(true);

  // 🚩 SUPER-LOW MEMORY MODE
  fbdo.setResponseSize(256);
  fbdo.setBSSLBufferSize(1024, 256);
}

void loop() {
  if (millis() - lastRead > 3000) {
    lastRead = millis();

    TempAndHumidity t = dht.getTempAndHumidity();
    float temperature = t.temperature;
    float humidity = t.humidity;

    int raw = analogRead(SOIL_PIN);
    int moisture = map(raw, dryValue, wetValue, 0, 100);
    moisture = constrain(moisture, 0, 100);

    bool pump = (moisture < soilMoistureThreshold);
    digitalWrite(RELAY_PIN, pump ? HIGH : LOW);

    // ---- LIGHTEST Firebase upload version ----
    Firebase.RTDB.setInt(&fbdo, "/FarmPulse/soil", moisture);
    Firebase.RTDB.setInt(&fbdo, "/FarmPulse/adc", raw);
    Firebase.RTDB.setFloat(&fbdo, "/FarmPulse/temp", temperature);
    Firebase.RTDB.setFloat(&fbdo, "/FarmPulse/hum", humidity);
    Firebase.RTDB.setBool(&fbdo, "/FarmPulse/pump", pump);
  }
}

 

Step 4 — Powering ESP32-C6 and Sensors with Solar Energy

This system is mainly powered by solar energy. Two Solar panels (connected in series) provides ~ 5 - 7V during peak hours (more sun light intensity)  and ~ 3.5 - 4.5V during normal hours. They are used to charge the 2x li-ion batteries (connected in parallel ~ 3.7V) using TP4056 charging module. The typical output of this charging module is 3.7 - 4.2 V, since esp32 requires a stable 5V input, a DC-DC booster 1.5V to 5V is used to provide boosted and regulated 5V. The submersible 12V DC water pump is powered by a separate 9V battery.

  • 2x 5V Mini solar panel to convert light energy into power
  • TP4056 charging module
  • 18650 battery li-ion batteries
  • DC-DC Booster 1.5V to 5V

This keeps the system running day and night using sunlight and rechargeable li-ion batteries.

Voltage reading from solar panels measured during normal hours is shown below:

 

Step 5 — Hardware Setup 

The components are connected together as per the circuit diagram shown in step 2. First I tested the circuits part by part using a breadboard and jumper wires. After testing, I completely assembled all components in a zero PCB board and manually soldered them by hand.

Front view of FarmPulse AI PCB:

 

Back view of FarmPulse AI PCB:

 

Complete Hardware Setup:

 

Step 5 — Firebase Realtime Database

I used Firebase Realtime Database to store the sensors values which is pushed from ESP32-C6 using WiFi

 

Step 6 — Adding Plant Disease Detection (Cloud AI)

To help identify plant diseases early, I used Grok API  to analyze the plant disease, where farmers can upload leaf photos in the web app.
A cloud-based AI model checks the uploaded leaf image and tells:

  • the type of Crop
  • Whether the plant is healthy
  • If diseased → the name of the disease, probable cause, description, treatment solution and
  • Confidence percentage

This helps farmers take action sooner.

 

Step 6 — FarmPulse AI web app for smart irrigation and disease prediction

 

  • FarmPulse AI login page

 

  • Live Dashboard to update sensors data continuously

 

  • Water Pump status and control

 

  • Disease prediction using Groq API call

 

  • Scan History 

Farmers can view everything from a mobile dashboard.

 

Demo Video

Codes

Downloads

farmpulse_ai_circuit_image Download
Comments
Ad