TinkeringLab
EXPERIMENT-5
EX-5: Automatic Plant Watering System using Arduino UNO.
Aim: To Design and implementation of an Automatic Plant Watering System using Arduino Uno, soil
moisture sensor, relay, DC motor (pump), power supply, and LEDs in Tinker cad.
Objective:
To automatically water the plants whenever the soil moisture level goes below a threshold using Arduino
and to indicate system status with LEDs.
Apparatus:
S.No Apparatus Range/Rating Quantity
1 ArduinoUno Board - 1
2 Soil Moisture Sensor - 1
3 Relay Module 5V 1
4 DC Motor - 1
(5V for Arduino,
5 Power Supply 12V for motor 1
pump)
6 LEDs (Red, Green) - 2
7 Resistors 100Ω 2
8 JumperWires - As per required
Theory:
The soil moisture sensor detects water content in the soil. It gives an analog signal corresponding to moisture
level. If moisture is low, Arduino triggers the relay, turning ON the DC motor pump to water the plant, and
Red LED glows. If moisture is sufficient, the motor remains OFF and Green LED glows.
Soil Moisture Sensor:
Soil moisture sensors measure the volumetric water content in soil.
Since the direct gravimetric measurement of free soil moisture
requires removing, drying, and weighing of a sample, soil moisture
sensors measure the volumetric water content indirectly by using some
other property of the soil, such as electrical resistance, dielectric
constant, or interaction with neutrons, as a proxy for the moisture
content.
1
TinkeringLab
Components Function:
Arduino Uno:
Acts as the brain of the system. It processes the input from the ultrasonic sensor and controls the output
devices (motor and buzzer) based on logic.
DC Motor:
Represents a pump that turns ON to fill the tank when the water level is low.
Working Principle:
The system works on feedback control:
Sensor → Arduino → Relay → Motor Pump.
Whenever the soil becomes dry, the pump is activated automatically.
Connections:
Soil Moisture Sensor:
Pin on Sensor Connects to Arduino
VCC 5V
GND GND
Signal A0
Relay board:
Relay Pin Connects to Arduino
Terminal-8 Pin 7 (Arduino)
Terminal-12 +ve Power supply
Terminal-6 DC motor- +ve terminal
Terminal-5 Ground
LED’s:
LED’s Pin Arduino Pin
RED Pin 8
GREEN Pin 9
2
TinkeringLab
Connection diagram:
Blocks setup:
3
TinkeringLab
Program:
int soil_sensor = 0;
void setup()
{
pinMode(A0, INPUT);
Serial.begin(9600);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
}
void loop()
{
soil_sensor = analogRead(A0);
Serial.println(soil_sensor);
if (soil_sensor < 500) {
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
} else {
digitalWrite(7, LOW);
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
}
delay(10); // Delay a little bit to improve simulation performance
}
Observations:
Soil Condition Sensor Value (A0) Motor Status LED Status
Dry Soil < 500 ON Red ON
Wet Soil > 500 OFF Green ON
Applications:
Home gardens and indoor plants
Agricultural fields with drip irrigation
4
TinkeringLab
Greenhouse automation
Smart farming
RESULT: The Automatic Plant Watering System successfully waters the plant whenever soil moisture falls below
the threshold and indicates the soil condition using LEDs performed in TinkerCAD.
Viva Questions:
1. What is the role of the soil moisture sensor?
2. Why do we use a relay in this project?
3. What is the function of the Arduino Uno?
4. Can we replace the DC motor with a solenoid valve?
5. What are the advantages of automating irrigation?
6. What happens if we increase the moisture threshold value?