rhealv
Published © GPL3+

Plant watering system (without relay)

Have your plants water themselves when the soil moisture is low!

BeginnerFull instructions provided19
Plant watering system (without relay)

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Plastic Vinyl tubing
×1
SparkFun Soil Moisture Sensor (with Screw Terminals)
SparkFun Soil Moisture Sensor (with Screw Terminals)
×1
SUBMERSIBLE HORIZONTAL PUMP
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

plant_watering_system_schematic_AKnLRUM18X.png

Code

Plant watering system

Arduino
int moisture_sensor = A0; // moisture sensor connected to analog pin A0
int moisture_level ;

void setup() {
   pinMode(4,OUTPUT);
   Serial.begin(9600);
   Serial.println("Getting sensor reading");
   delay(2000);
}

void loop() {
   moisture_level= analogRead(moisture_sensor);
   moisture_level = map(moisture_level,550,10,0,100);
   Serial.print("Moisture level : ");
   Serial.print(moisture_level);
   Serial.println("%");
   if(moisture_level<10){   // if moisture level is less than 10%
      digitalWrite(4,HIGH); // turn on pump
     }
     else{
      digitalWrite(4,LOW); // else no need to pump water
     }
   delay(10 `00); 
}

Credits

rhealv

rhealv

0 projects • 0 followers

Comments

Add projectSign up / Login