top of page
Diagram 1.jpg
Arduino Plant Watering System

★ᴀʀᴅᴜɪɴᴏ ᴘʟᴀɴᴛ ᴡᴀᴛᴇʀɪɴɢ ꜱʏꜱᴛᴇᴍ

Description

Soil moisture is basically the content of water present in the soil.

The soil moisture sensor consists of two conducting plates which function as a probe. This sensor is used to measure the volumetric content of water.. It can measure the moisture content in the soil based on the change in resistance between these two conducting plates.

It uses capacitance to measure the dielectric constant of the soil.

Dielectric constant can be called as the ability of soil to transmit electricity.

When there is more water, the soil will conduct more electricity which means that there will be less resistance.

Therefore, the moisture level will be higher..

Similarly dry soil conducts less electricity.

When there will be less water, then the soil will conduct less electricity which means that there will be more resistance.

Therefore, the moisture level will be lower..

COMPONENTS AND SUPPLIES
Example.....jpg
Schematic
Download Button Ui 1.png
Diagram 1.jpg
Code 1
Download Button Ui 1.png
CODE Window 1.png

const int ledPin = 9;   

const int sensorPin = A0;  

 

void setup() {

     

  Serial.begin(9600);   

  pinMode(ledPin, OUTPUT);        

  pinMode(sensorPin, INPUT); 

 } 

 

void loop() { 

   

 int sensorStatus = analogRead(sensorPin);    

   if (sensorStatus <=300) 

 {     

  digitalWrite(ledPin, LOW);

 }   

   else 

 {     

  digitalWrite(ledPin, HIGH);             

 } 

Code 2
Download Button Ui 1.png
CODE Window 1.png


int led_pin1 =13; 
int led_pin2 =12; 
int sensor_pin =8; 

void setup() { 
  pinMode(led_pin1, OUTPUT);   
  pinMode(led_pin2, OUTPUT);  
  pinMode(sensor_pin, INPUT); 

void loop() {   
    
  if
   (digitalRead(sensor_pin) == HIGH) 

    digitalWrite(led_pin1, HIGH);  
    digitalWrite(led_pin2, LOW); delay(2000); 

  else 

    digitalWrite(led_pin1, LOW); 
    digitalWrite(led_pin2, HIGH); delay(2000);
   } 
}

Serial Monitor Print Code
Download Button Ui 1.png
CODE Window 1.png


int sensor_pin = A0; 
int output_value ; 

   void setup() { 
    
     Serial.begin(9600); Serial.println("Reading From the Sensor ..."); 
     delay(2000); 
   } 
   void loop() { 
  output_value= analogRead(sensor_pin);
  output_value = map(output_value,550,0,0,100);
     
  Serial.print("Mositure : "); 
  Serial.print(output_value); 
  Serial.println("%"); 
delay(1000); 
}

bottom of page