Automated Plant Watering System
Introduction
An automated plant watering system is an efficient way to ensure your plants receive the right amount of water, even when you're not around. In this project, we'll create a simple yet effective automated plant watering system using Arduino. This system will monitor the moisture level of the soil and water the plant when the soil becomes too dry.
Components Required
- Arduino Uno
- Soil Moisture Sensor
- Relay Module
- Submersible water pump
- Jumper wires
- 12V Power Adapter
- Water container
Circuit Diagram
Connect the components as shown in the following circuit diagram:
Instructions
Connect the Soil Moisture Sensor:
- Connect the VCC pin to the 5V pin on the Arduino.
- Connect the GND pin to the GND pin on the Arduino.
- Connect the A0 pin to the A0 pin on the Arduino.
Connect the Relay Module:
- Connect the VCC pin to the 5V pin on the Arduino.
- Connect the GND pin to the GND pin on the Arduino.
- Connect the IN pin to digital pin 7 on the Arduino.
Connect the Submersible Water Pump:
- Connect the positive (+) wire to one of the relay terminals.
- Connect the negative (-) wire to the GND pin on the Arduino.
Power the System:
- Connect the 12V power adapter to power the water pump.
Place the Soil Moisture Sensor:
- Insert the probe of the soil moisture sensor into the soil of your plant.
Upload the Code to Arduino:
- Use the following code:
cppconst int moistureSensorPin = A0;
const int pumpRelayPin = 7;
int moistureThreshold = 500; // Set your desired moisture threshold
void setup() {
pinMode(moistureSensorPin, INPUT);
pinMode(pumpRelayPin, OUTPUT);
}
void loop() {
int moistureLevel = analogRead(moistureSensorPin);
if (moistureLevel > moistureThreshold) {
digitalWrite(pumpRelayPin, HIGH); // Turn on the water pump
delay(5000); // Water for 5 seconds, you can adjust this time as needed
digitalWrite(pumpRelayPin, LOW); // Turn off the water pump
}
delay(1000); // Check moisture level every second
}
- Adjust the Moisture Threshold:
- Set the
moistureThreshold
variable to your desired value. The lower the value, the drier the soil needs to be for the system to water the plant. You may need to adjust this value depending on the type of plant and its water requirements.
- Set the
Conclusion
You've successfully created an automated plant watering system using Arduino! With this system in place, your plants will receive the right amount of water, ensuring their health and vitality, even when you're away. Happy gardening!