---
title: Create a DIY Arduino-Powered Automatic Plant Waterer in One Weekend
siteUrl: https://logzly.com/inventivehorizons
author: inventivehorizons (Inventive Horizons)
date: 2026-06-27T22:01:13.740850
tags: [arduino, diy, gardening]
url: https://logzly.com/inventivehorizons/create-a-diy-arduino-powered-automatic-plant-waterer-in-one-weekend
---


I used to be a serial plant killer. Not on purpose, of course. I would just get busy, forget to water my poor fern, and watch it turn crispy. That was until I decided to let a tiny computer do the remembering for me.

Welcome back to Inventive Horizons. If you have been following my tinkering journey, you know I love taking a frustrating everyday problem and fixing it with a little bit of wire and code. Today, we are building an automatic plant waterer. It is a perfect weekend project that saves your plants and looks pretty cool on your windowsill.

## What You Need to Get Started

You do not need a massive workshop for this. Here at Inventive Horizons, I always try to keep the parts list cheap and easy to find.

### The Electronics

* Arduino Uno or any basic clone
* Soil moisture sensor
* 5V mini water pump
* Relay module to switch the pump on and off
* Jumper wires
* USB cable and power bank

### The Plumbing and Tools

* Vinyl tubing to fit the pump
* A small water reservoir like a mason jar
* Screwdriver and electrical tape

## Step 1: Wiring the Brain

Let us get the electronics talking to each other. This is usually the part that scares people, but I promise it is just plugging things into the right holes.

First, connect your soil moisture sensor to the Arduino. Plug the VCC pin into 5V, GND into GND, and the analog output pin into A0 on the Arduino. This sensor will act as the fingers of our robot, feeling how dry the dirt is.

Next, wire the relay module. The relay is basically a digital switch. Connect its VCC and GND to the Arduino, and plug the signal pin into digital pin 8.

## Step 2: Setting Up the Pump

Now we bring in the water. The mini pump needs more power than the Arduino can give directly, which is why we used that relay module.

Connect the positive wire of the pump to the normally open terminal on the relay. Connect the other pump wire and the common terminal of the relay to your external 5V power source. Do not power the pump directly from the Arduino board, or you might fry it.

Attach your vinyl tubing to the pump nozzle. Drop the pump into your mason jar reservoir, and run the other end of the tube into your plant pot. Tape the tube to the side of the pot so it does not flop around when the water starts flowing. Sometimes these mini pumps need a little help priming, so make sure the tube is filled with water before the first run.

## Step 3: Writing the Code

Here at Inventive Horizons, I believe code should be simple. We just want the Arduino to check the soil, and if it is dry, turn on the pump for a few seconds.

Open the Arduino IDE on your computer. We will set pin 8 as an output and read the analog value from A0. When the sensor reads a low number, it means the soil is dry.

```cpp
int sensorPin = A0;
int pumpPin = 8;
int moistureLevel;

void setup() {
  pinMode(pumpPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  moistureLevel = analogRead(sensorPin);
  Serial.println(moistureLevel);

  if (moistureLevel < 300) {
    digitalWrite(pumpPin, HIGH);
    delay(3000);
    digitalWrite(pumpPin, LOW);
    delay(60000);
  }
  delay(1000);
}
```

Upload that to your board. The logic is straightforward. If the moisture drops below 300, it turns the pump on for three seconds, then waits a minute before checking again so it does not overwater.

## Step 4: Testing and Tweaking

Before you leave it alone with your favorite plant, test it. Stick the sensor into a cup of dry dirt. The pump should kick on. Then, pour a little water in. The pump should stop.

You might need to adjust that 300 threshold in the code depending on your specific sensor and soil type. Just watch the serial monitor in the Arduino IDE to see what numbers it spits out when the soil is perfectly damp, and update your code.

## Keeping It Running

One thing I learned the hard way while writing for Inventive Horizons is that water and electronics do not mix. Keep your Arduino and relay tucked safely away from spills. I like to mount mine on a small piece of wood above the water jar.

Also, check your reservoir once a week. The pump cannot pull water from an empty jar, and running it dry can burn out the little motor. The cheap soil sensors can also corrode over time, so just wipe them down or replace them every few months.

Building this was a massive win for my indoor garden. My fern is thriving, and I get to travel without worrying. It is amazing what you can build in a single weekend when you break the problem down into small, simple steps. Grab some parts, get your hands dirty, and enjoy your new automated setup.