Introduction: Smart Irrigation System
Materials used in this project are :
1) Arduino uno R3
2) Relay
3) DC motor pump
4) Soil Moisture sensor & Controller
5) Battery
Step 1: We Connect the Relay to Arduino UNO
Connections :
ARDUINO TO RELAY
5V - VCC
GND - GND
PIN 13 - IN1
Step 2: We Connect Soil Moisture Sensor to Arduino UNO
Connections:
ARDUINO TO SOIL MOISTURE SENSOR
5v - VCC
GND - GND
PIN 8 - AO(Analog Output)
Step 3: We Connect DC Water Pump to RELAY
Connections :
DC Water Pump To Relay
(we just cut the negative wire of pump and connected to NORMALLY OPEN PORT & COMMON PORT of RELAY)
Step 4: CIRCUIT DIAGRAM of This Project
Step 5: ARDUINO CODING
int Relay = 13;
int sensor = 8;
int val;
void setup() {
pinMode(13,OUTPUT);
pinMode(8,INPUT);
}
void loop() {
val = digitalRead(8);
if(val == HIGH )
{
digitalWrite(13,LOW);
}
else
{
digitalWrite(13,HIGH);
}
delay(400);
}