+91-7834999925       contact@tacthub.in

Smart Irrigation System

This project aims to develop a solution which waters the plant automatically whenever needed.

Hardware Required

 

Arduino Uno

Soil Moisture Sensor

Relay

Jumper Wires

LED

 

Software Required

 

Arduino IDE


Connections

 

 

  • Connect the two pins from the Sensor to the two pins on the Amplifier circuit of sensor using female to female wires.
  • Connect the Vcc from the Amplifier to the 5V pin on the Arduino .
  • Connect the Gnd pin from the Amplifier to the Gnd pin on the Arduino.
  • Now connect the Analog Data Pin to the A0 pin on the Arduino.

int SoilValue= 0 ;

const int LED = 13

int Sisoil= 0 ;

int S1=800; // upper limit of moisture

int S2=500; // Lower limit of mositure

void setup() {

Serial.begin(9600);

pinMode(LED, OUTPUT);

pinMode(Soil, INPUT);

}

void loop() {

Serial.print("soil value = ");

Serial.println(ReadSoil());

Sisoil= WetDry();

if(Sisoil==1){

(1);

}else {

LEDf(0);

}

delay(1000);

}

int ReadSoil(){

SoilValue =analogRead(Soil);

delay(100);

return  SoilValue;

}

int WetDry(){

if ( SoilValue  > S1) {

digitalWrite(LED, HIGH);

return 1;

} else  if ( SoilValue  < S2){

digitalWrite(LED, LOW);

return 0;

}

}

int LEDf(int act){

if(act==1){

digitalWrite(LED, HIGH);

return 1;

}else{

digitalWrite(LED, LOW);

return 0;

}









   
 
 
 








  

 









 





 
   
   
    
 
   
   
 
 
 
 




 
   
 
 
 
 
 
  }

Price: 7000 INR

Buy Now