← Back to blog
Student Projects

Smart Irrigation System

About This Project

The Smart Irrigation System automatically waters plants when soil becomes dry. Users can also manually control watering remotely via Bluetooth and a mobile app, checking soil status and activating or deactivating the pump from anywhere.

This project addresses a critical issue in Indian agriculture: inconsistent watering practices that lead to crop failure and farmer hardship. By delivering precise water amounts, it helps optimize crop yields and reduce agricultural losses.

The system uses a custom soil moisture sensor measuring values from 0 to 1023. When moisture drops below 200, the pump activates automatically. The device is powered by solar energy for sustainability. While this prototype uses Arduino Uno, larger farm implementations can utilize Arduino Mega with optocoupler technology.

Components Required

  • Arduino UNO
  • HC-05 Bluetooth Module
  • DF Robot Solar Power Manager
  • 1N4007 High Voltage, High Current Rated Diode
  • 9V Generic Battery
  • Water Pump

Code Of Project

const int motor = 13;
const int soilin = A0;
int sensorValue = 0;
char bt;
const int limit = 200;

void setup() {
  Serial.begin(9600);
  pinMode(motor, OUTPUT);
  pinMode(soilin, INPUT);
}

void loop() {
  sensorValue = analogRead(soilin);
  if (sensorValue < limit) {
    digitalWrite(motor, HIGH);
    delay(1000);
    digitalWrite(motor, LOW);
  }
  while (Serial.available() > 0) {
    bt = Serial.read();
    delay(20);
    if (bt == '2') {
      Serial.println(sensorValue);
    } else if (bt == '1') {
      digitalWrite(motor, HIGH);
    } else if (bt == '0') {
      digitalWrite(motor, LOW);
    }
  }
}
More stories
Book free trial
Buy a kit Become partner Talk to us