1. Activity Name:
Automated Plant Watering System Using Arduino
2. Materials Required:
a) Arduino Uno/Nano
b) Soil Moisture Sensor
c) Water Pump (5V or 12V)
d) Relay Module (5V for pump control)
e) Jumper Wires
f) Power Supply (Battery or Adapter)
g) Water Tubing & Reservoir
3. Explanation:
This project is an automated irrigation system that detects soil moisture levels and controls a water pump accordingly. The soil moisture sensor measures the water content in the soil, and if it is dry, the Arduino activates the pump via a relay module to supply water. Once the soil is sufficiently moist, the system turns off the pump to prevent overwatering.
Working Principle:
- The soil moisture sensor detects the soil’s moisture level.
- The sensor sends data to the Arduino, which reads the moisture percentage.
- If the moisture level is below the threshold, the relay is activated, turning ON the water pump to supply water.
- Once the soil reaches the required moisture level, the pump is turned OFF.
4. Connections:
Component |
Arduino Pin |
Other Connections |
Soil Moisture Sensor VCC |
5V |
- |
Soil Moisture Sensor GND |
GND |
- |
Soil Moisture Sensor Signal |
A0 |
- |
Relay Module VCC |
5V |
- |
Relay Module GND |
GND |
- |
Relay IN (Control Pin) |
D7 |
- |
Water Pump + |
Relay NO (Normally Open) |
- |
Water Pump - |
Power Supply GND |
- |
Relay COM |
Power Supply 12V |
- |
5. Arduino Code:
#define sensorPin A0 // Soil moisture sensor input
#define relayPin 7 // Relay control pin
void setup() {
pinMode(sensorPin, INPUT);
pinMode(relayPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int moisture = analogRead(sensorPin); // Read moisture level
moisture = map(moisture, 0, 1023, 100, 0); // Convert to percentage
Serial.print("Soil Moisture: ");
Serial.print(moisture);
Serial.println("%");
if (moisture < 40) { // If soil is dry
digitalWrite(relayPin, LOW); // Turn ON pump
Serial.println("Watering the plant...");
} else {
digitalWrite(relayPin, HIGH); // Turn OFF pump
Serial.println("Soil is wet, pump OFF");
}
delay(2000); // Wait for 2 seconds
}
6. Conclusion:
This automated plant watering system helps maintain optimal soil moisture levels without manual intervention. It is useful for home gardens, greenhouses, and smart farming applications. Students learned sensor integration, relay control, and automation principles, enhancing their knowledge in IoT-based smart agriculture.
