Auto Watering System Open Source under 10$
Print Profile(1)

Description
Boost Me (for free)
Thanks for your support and motivation
Keep your plants happy and healthy – completely automatically! This Arduino-based system monitors soil moisture in real time and waters your plant exactly when it needs it. No more overwatering, no more drying out.
Functions:
- Precise Control: Adjustable target moisture
- Intelligent Logic: Programmable watering duration and soak time (wait time after watering) to avoid waterlogging and obtain accurate readings
- Interval Measurement: Define pauses between measurement cycles to save power and protect the hardware
- Clean Design: Includes a custom-fit housing and watering ring for even water distribution
Watering rings are available in various diameters
Note (please read 😊)
This is not a step-by-step guide, but simply documentation of how I built my system. Maybe it will help you as inspiration – but there are many ways to implement something like this
If you want to replicate this, please do so at your own risk. Especially with electronics, water & co, things can go wrong (short circuits, damage, etc.). So it's better to check twice and only tinker if you know what you're doing
I assume no liability for anything that happens during replication or use
Feel free to modify, improve, or completely change it – that's what it's there for 🙂
Required Accessories / Bill of Materials (BOM)
| Component | Recommendation |
|---|---|
| Microcontroller | Arduino Nano or smaller |
| Sensor | Capacitive Soil Moisture Sensor v2.0 (Corrosion Resistant!) |
| Relay | 5V Relay Module (Low-Level Trigger) |
| Pump | 5V DC Submersible Pump |
| Power | USB-C Connector (2-Pin for Power or 4-Pin for Data/Programming) |
| Hose | Standard 8mm Silicone Hose |
Code for Arduino
// -------- Pins --------
const int soilPin = A0;
const int relayPin = 7;
// -------- Sensor Calibration --------
int airValue = 580; // Value in air (dry)
int waterValue = 256; // Value in water (wet)
// -------- Settings --------
int moistureThreshold = 70; // Percentage value at which watering occurs
unsigned long wateringTime = 5000; // Pump time (ms)
unsigned long waitAfterWatering = 10000; // Wait time after watering
unsigned long measurementInterval = 100000; // Measurement interval
// -------- Variables --------
unsigned long lastMeasurement = 0;
void setup() {
Serial.begin(9600);
pinMode(relayPin, OUTPUT);
digitalWrite(relayPin, HIGH); // Relay OFF
}
void loop() {
unsigned long currentMillis = millis();
if (currentMillis - lastMeasurement >= measurementInterval) {
lastMeasurement = currentMillis;
int sensorValue = analogRead(soilPin);
// Conversion to percent
int moisturePercent = map(sensorValue, airValue, waterValue, 0, 100);
moisturePercent = constrain(moisturePercent, 0, 100);
Serial.print("Sensor Value: ");
Serial.print(sensorValue);
Serial.print(" Moisture: ");
Serial.print(moisturePercent);
Serial.println("%");
// Check if watering is needed
if (moisturePercent < moistureThreshold) {
Serial.println("Too dry -> Watering starts");
waterPlant();
}
else {
Serial.println("Moisture OK");
}
}
}
// -------- Watering Function --------
void waterPlant() {
digitalWrite(relayPin, LOW); // Relay ON
Serial.println("Pump running");
delay(wateringTime);
digitalWrite(relayPin, HIGH); // Relay OFF
Serial.println("Pump off");
Serial.println("Waiting...");
delay(waitAfterWatering);
}
If further instructions or descriptions are desired, simply leave a comment and I will do my best to describe it as thoroughly as possible








License
You may create derivative works based on this object, provided that all such derivative works are published exclusively on the MakerWorld platform and include proper attribution to the original creator. You may not share, upload, host, distribute, or publish this object—or any derivative work of this object—on any other digital platform, marketplace, or distribution channel. Commercial use of this object and any derivative works is strictly prohibited. This includes, but is not limited to, selling, renting, sublicensing, or using the object in any context in which you receive monetary compensation or other financial benefits.
















Comment & Rating (23)