Sometimes we are so busy in our work or in our day-to-day life that we forget to water our plants on time. Or in the summertime when the plants need additional water to sustain themselves in the high-temperature region like New Delhi.
This is a simple project that one can assemble and implement within a few minutes.
To make this project you will need some modules which are readily available in the market.
Arduino UNO x 1
Moisture Sensor x 1
A 5V relay x 1
5V water pump x 1
A short length of plastic or rubber tube x 1 – 1.5m
Rechargeable Power Bank x 1
#define sense A0
#define relay 9
void setup() {
// put your setup code here, to run once:
pinMode(sense, INPUT);
pinMode(relay, OUTPUT);
Serial.begin(9600);
}
int val;
void loop() {
// put your main code here, to run repeatedly:
val = analogRead(sense);
Serial.println(val);
if (val < 600) /* adjust this value to control how much soil must be moist */
{
digitalWrite(relay, HIGH);
}
else
{
digitalWrite(relay, LOW);
}
delay(400);
}
Leave a Reply