Design a site like this with
Get started

Smart Irrigation System using IoT.

Description: In this project we are handling Water pump through Soil Moisture Sensor.When Soil is wet pump is OFF and when Soil becomes dry then your water pump is ON and your field is now wet.Here we show very Basic Explanation of Smart Irrigation System or can see our video as well for Better understanding.This could be your very first step to start with Smart Irrigation System project understanding and more.It is assumed that you already have downloaded latest version of Arduino IDE. If not , you can download it from here .Click For Downloading- > Arduino IDE.

Components: Arduino -UNO,Soil Moisture Sensor,Relay Module,Water Pump,Battery(9V).

Pin Diagram: Do the following connection which is shown in the image and also we had provided a chart for a better understanding.

Step 2:Open Arduino.ide and copy paste the below code


/* Welcome to Gnd_to_Vcc */
int sensor_pin =A0; //Soil Sensor input at Analog PIN A0
int output_value;
void setup() // put your setup code here, to run once
Serial.println(“Reading From the Sensor…”);

//put your main code here,to run repeatedly:
void loop()
output_value= analogRead(sensor_pin);
Serial.print(“Moisture :”);
Serial.print(output_value) ;




Step 3:After copy paste. Select right Board that is Arduino-UNO and right com Port which you have plug in and then compile and Upload code to arduino.

Step 4: Dip your Soil Sensor in wet soil first and after that open your Serial Monitor for your output.Along with that just notice your water pump which will be OFF.

Output on Serial Monitor will appear as shown in the Image and it will be negative because we have set output value <0 when output pin which is pin 4 is high.




Step 5: Now remove soil moisture sensor from wet soil and dip it into dry soil and after that open your serial monitor and you will see the readings and it will be opposite of the previous reading.Along with that you will notice that water pump which was off is now ON automatically.

Your Output value will turn to positive when you execute Step 5.



Published by Gnd_To_Vcc

Here to spread my knowledge . Knowledge should always be spread not stored.

4 thoughts on “Smart Irrigation System using IoT.

  1. Pingback: What is IoT?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: