f112
Published

Automatic Plant Watering Device

It is arduino based project which will water when required automatically by sensing soil moisture level.

BeginnerProtip791
Automatic Plant Watering Device

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
DFRobot HL-69 Hygrometer Soil Moisture Sensor
×1
Solenoid Valve, 2 Way
Solenoid Valve, 2 Way
×1
LED (generic)
LED (generic)
×1
Wire, Hook Up
Wire, Hook Up
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Darlington High Power Transistor
Darlington High Power Transistor
×1
Resistor 1k ohm
Resistor 1k ohm
×1
1N4001 Diode
×1
Breadboard (generic)
Breadboard (generic)
×1
12V Adapter
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Solder Wire, Lead Free
Solder Wire, Lead Free
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Story

Read more

Schematics

20211229_233037_i9rCLgbiTe.jpg

Code

Automatic Plant Watering Device

Arduino
Const int moisture AO = 0;
int AO = 0;
int tmp = 0;
int solenoidPin = 4;
int LED = 13;

void setup()
{

Serial.begin(9600);
Serial.println("Soil moisture sensor ");
pinMode(moisture AO, INPUT);
pinMode(solenoidPin, OUTPUT);
pinMode(LED, OUTPUT);

}

void loop()

{
  tmp = analogRead(moisture AO);
  if(tmp! = AO){
    AO = tmp;
  Serial.Print("A= ");
  Serial.Println(AO);
}

if (analogRead(0)>900){
  digitalWrite(solenoidPin, HIGH);
  digitalWrite(LED, HIGH);
}
else{
  digitalWrite(solenoidPin, LOW );
  digitalWrite(LED, LOW);
}

}

Credits

f112

f112

1 project • 0 followers

Comments