Solar Powered Automatic Irrigation System


Agriculture is the back bone for major countries. Because without food, no one can able to live in this world. In olden days, farmers used to farm the land without any technology. He have to come day by day to check the status of moisture present in the soil. during summer seasons, the water present in the soil will suck by the sun. so it is difficult to monitor the status of moisture present in the soil by the farmers. As well as the ground water is becoming less during the continuous extraction of water by the peoples. So saving the crops is the biggest challenge for the farmers. But now, due to the technology advancement, we are going to implement the tech in the field of agriculture. Solar power is a value added idea in this project to get uninterrupted power to pump the water.

In this article, we are going to implement the soil moisture sensor on the soil and read the moisture parameter with the help of arduino and pump the water automatically to the crops if their is any need of water for the crops. The motor pump turn OFF automatically when the threshold reached.

If you have any doubts regards this article, feel free to comment.

Materials required:-

  1. Arduino uno
  2. 16×2 LCD
  3. LCD breakout board
  4. soil moisture sensor
  5. relay
  6. water pump motor
  7. Solar panel
  8. +12/1.3A Battery
  9. battery cap
  10. DC pin
  11. jumper wires

Components which I used in this project:-

Block Diagram:-

This is the block diagram of the entire article. I have used +12v battery supply hybrid-ed with the +18v solar panel.

The input of soil moisture is feeded to the arduino. The level of moisture present in the soil is displayed on the 16×2 alphanumeric LCD.

You can use any types of motor driver to control the motor. In my case, i have used relay. but I strongly recommend to use OPTOCOUPLER based motor driver to control the motor.

Circuit Diagram:-

Basic circuit diagram

Solar – Motor – Relay connections

LCD connections:-

RS – D13

E – D12

D4 – 11

D5 – 10

D6 – 9

D7 – 8

Soil Moisture sensor

This sensor has 4 pins, A0 pin is used to measure the level of moisture present in the soil. I have used that pin.


I have used transistor triggered +5v powered relay unit. You can use any type of relay.

Basic Hardware constructions:-

I have used LCD breakout board to interface the LCD

Jumper wire divided into two to get two +5v ( for sensor and relay) 

Soil moisture sensor interfacing to arduino

Relay pin connected to D7

Power for relay (+5v and GND) taken from arduino

Water pump motor connection

Solar panel connection to battery

DC pin connected to the battery cap

Soil moisture sensor dipped on the soil



(Copy and download the code which i have given. You can change the threshold reading from the sensor using serial monitor if necessary)

#include <LiquidCrystal.h>
LiquidCrystal lcd(13,12,11,10,9,8);
const int analogInPin = A0;
const int motorPin = 7;
int sensorValue = 0;
int outputValue = 0;
void setup()
lcd.begin(16, 2);
lcd.print(” Solar Powered “);
lcd.setCursor(0, 1);
lcd.print(“Irrigation Systm”);


void loop()
sensorValue = analogRead(analogInPin);
outputValue = map(sensorValue, 0, 1023, 0, 100);
Serial.print(“sensor = “);
Serial.print(“\t output = “);
lcd.setCursor(0, 0);
lcd.print(“Moist Lvl:”);
lcd.setCursor(11, 0);
lcd.print(” “);
lcd.setCursor(0, 1);
lcd.print(“Motor ON “);
lcd.print(“Motor OFF”);

Result and observation:-

Title card at the beginning as per the code

Motor will turn ON by turning the relay ON

Pour some water to increase the moisture level. (OR) dip the water pump motor on the water and pump the water in to the soil. Since my water motor pumps the motor fastly, i have wasted a lot of water during the experimentation. so for article, i have poured through the vessel. But you can pump the water through the water pump motor.

Motor will turn OFF automatically when the threshold reached


For more queries, feel free to comment below. Share your experience below as comments.. thank you..

Leave a Reply

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