Introduction: Self-Watering Plant

Picture of Self-Watering Plant

Plants liven up any space by adding a sense of airiness and life. That is - of course - when you don't forget to water them, and they shrivel up and die. I am very bad at remembering to water plants. That is why I built this self-watering plant to do it for me. Using a soil sensor, and an Arduino-controlled water pump, I have created a system that will never forget to do it. Instead of remembering to water my plants when the soil goes dry, I only have to remember to once and a while refill the water reservoir. In this way, I have decreased my obligation to these plants and put it off to a much later date. Perhaps further iterations of this device can be connected to a rain barrel so that I won't even have to worry about refilling my reservoir, and the entire system can be fully automated.

Step 1: Go Get Stuff

Picture of Go Get Stuff

You will need:

(x1) 8" x 6" x 3" project enclosure (Radioshack #270-1809)
(x1) Multipurpose PC Board (Radioshack #276-150)
(x1) 5VDC SPDT micro relay (Radioshack #275-240)
(x1) 9V battery connector (Radioshack #270-324)
(x1) 9V battery holder (Radioshack #270-326)
(x1) 9V battery (Radioshack #23-853)
(x1) SPST micromini toggle switch (Radioshack #275-624)
(x1) 10K resistor (Radioshack #271-1126)
(x1) Size M coaxial DC power plug (Radioshack #274-1569)
(x1) Red and black 22AWG wire (Radioshack #278-1221)
(x1) 12AWG black wire (Radioshack #278-556)
(x1) Non-submersible electric water pump (via Amazon)
(x1) Water storage container with lid
(x2) 8-32 x 2.5" nuts and bolts
(x8) 4-40 x 1" nuts and bolts
(x1) 4-40 x 3/8" nut and bolt
(x4) 1/4" spacers
(x1) Wire nut
(x2) 3' - 5' plastic tubing
(x1) #8 Terminal Ring
(x1) House plant to water

Step 2: Trim the Pump

Picture of Trim the Pump

Trim away any unnecessary plastic mounting brackets from the front of the pump that may prevent it from being flush with the case (nozzles and corresponding hardware not included).

Step 3: Drill or Cut

Picture of Drill or Cut

Line up the water pump with the base of one of the 6" x 3" sides of the case.

Drill or cut a hole large enough to fit the nozzles through.

Step 4: Mark

Picture of Mark

Position the water pump, Arduino, 9V battery holder, and circuit board in the bottom of the case.

Make marks in each of their mounting holes.

The pump will probably not have a mounting hole, so just make a mark on each side such that it can easily be zip tied down.

Step 5: Drill

Picture of Drill

Drill all of the holes that you have just marked with a 1/8" drill bit.

You may need to widen the zip tie holes to 3/16".

Step 6: Drill More Holes

Picture of Drill More Holes

On the 6" x 3" side of the case that has yet to be drilled, drill two centered 1/4" holes about 1-1/2" apart.

Step 7: Fasten

Picture of Fasten

Zip tie the water pump securely into the case.

Step 8: Cut the Cord

Picture of Cut the Cord

Cut the pump's power cord about 6" from the pump's body.

Step 9: Start the PCB

Picture of Start the PCB

Solder the 5V relay to the board.

Solder a 10K resistor to one of the relay's coil pins.

Step 10: Attach Wires

Picture of Attach Wires

Attach an 18" section of 12 AWG wire to the free pin of the 10K resistor. Solder a 6" section of black 22 AWG wire to this joint.

Attach an 18" section of 12 AWG wire to an unused part of the PCB. Solder a 6" section of red 22 AWG wire to this joint.

Step 11: Split the Wires

Picture of Split the Wires

Pass the cut power cord into the box through the 1/4" hole closest to the water pump.

Split the power cord such that each conductor is its own separate insulated strand for about 6".

Repeat this process for the cord going into the water pump.

They need to be separated because each cable is being wired to a different spot.

Step 12: Wire the Power

Picture of Wire the Power

Connect one of the strands from the water pump to the normally-open pin on the relay.

Connect one of the strands from the power cord to the common pin on the relay.

In this way, when the relay is powered up, AC power will be connected.

Step 13: Attach

Picture of Attach

Attach the circuit board to the project box using 1/4" spacers, nuts and bolts.

Step 14: Wire Nut

Picture of Wire Nut

Attach the two free power cables from the pump and power cord together using a wire nut.

Step 15: Prep the Cords

Picture of Prep the Cords

Kink the power cable on the inside of the box and cinch it in place with a zip tie to prevent it from being pulled back through.

Tie a knot in the two 12 AWG wires such that when they are passed through the remaining 1/4" hole there would only be tension on the knot (and not the circuit board) when you tug on them.

Step 16: Prepare the Probes

Picture of Prepare the Probes

Strip the end of each 12 AWG wire and clamp a terminal ring to the end.

Pass a bolt through each and fasten them in place firmly with the corresponding nuts.

Step 17: Wire the Power

Picture of Wire the Power

Solder the red wire from the 9V battery connector to one terminal of the SPST switch. Solder a 5" red wire to the other terminal of the SPST switch.

Unscrew the cover from the M-type plug and slide the cover onto the end of the remaining red and black wires.

Solder the black wire to the outer ground connection on the plug. Solder the red wire to the inner power connection.

Screw the cover back on.

Step 18: Install the Switch

Picture of Install the Switch

Drill a 1/4" hole in the 8" x 6" hole opposite the water pump.

Mount the switch into the hole using the mounting hardware.

Step 19: Program

Picture of Program
Plug in your Arduino and upload the following code:

Keep in mind that you may need to adjust the trigger threshold for your particular plant setup.

Step 20: Install

Picture of Install

Fasten the Arduino to the base of the project enclosure with nuts and bolts.

Step 21: 9V Clip

Picture of 9V Clip

Attach the 9V battery holder securely to the bottom of the project enclosure with a 4-40 x 3/8" nut and bolt.

Step 22: Plug It In

Picture of Plug It In

Plug in the battery, and secure the battery in the battery holder.

If the Arduino lights up when you plugged in the battery, toggle the switch on the outside of the case to turn it off.

Step 23: Wire It Up

Picture of Wire It Up

Now is time to plug everything into the Arduino.

Plug the black wire from the circuit board to the ground socket on the Arduino.

Plug the red wire from the relay coil into digital pin 12 socket on the Arduino.

Plug the red wire connected to the 10K resistor to analog pin 1 socket.

Plug the red wire connected to the soil probe into the +5V socket.

Step 24: Case Closed

Picture of Case Closed

Put the lid on top of the project enclosure and use the hardware that came with it to fasten it shut.

Step 25: Drill

Picture of Drill

Drill a 3/8" hole in the top of the water container's lid.

Step 26: Tubing

Picture of Tubing

Cut the tubing in half.

Plug a tube into each of the pump's connector valves.

Step 27: Probes

Picture of Probes

Insert the probes into your plant's soil about an inch apart.

Step 28: Place Tube

Picture of Place Tube

Place the tube from the output of the water pump onto the top of the plant's soil bed.

Step 29: Insert Tube

Picture of Insert Tube

Fill your water container and insert the tube into the hole that you have previously drilled in the top.

Step 30: Turn It On

Picture of Turn It On

Flick the switch to turn it on.

You should never have to water your plant again.

Now you just need to remember to refill the water reservoir.


PatrickM282 (author)2017-07-24

May i ask? What voltage or wattage of Non-submersible electric water pump will i use? Is it okay to use a submersible water pump instead of non-submersible water pump? THANKYOU! I am hoping for someone to answer :)

blantonma (author)2017-03-27

how much money is it for me to buy a self watering plant

zikria4 (author)2017-03-19

how much money for i make this self watering plant

RocketPenguin (author)2017-02-26

Could you include a schematic for the electronics layout?

zocker22 made it! (author)2016-12-30

Nice instruction. Thanks!

I used a bigger water container and also added a "sensor" to check when the water in the tank is empty and a little buzzer to notify me, if I need to refil :-)

Instead of the selfmade "screw-moisture-sensure" I used a cheap semi-professional version ...

sqeifa (author)zocker222017-01-27

hi, can u teach me how to do this? did you just follow the instruction and the coding?

Gravity_B (author)2017-01-19

Can we use Arduino to program a chip so we don't have to leave Arduino in the box? Thanks

kampsjp31 (author)2014-05-10

wired up and everything but doesn't seem to work. Just flashes number on the serial from very high to very low rapidly. Also Relay doesn't seem to work even when i wire it up differently and force it to work, I can hear the internal switch clicking but the pump just stays on. I made sure non of my wires or solders are crossed.

kampsjp31 (author)kampsjp312014-05-11

Hello All,

Completed this project. I have a complete working project running off solar power (which is pretty awesome, just connects the usb from the Arduino to the usb port of a Goal Zero nomad 7).

My previous relay in me last comment was faulty so I got a new one. Please note that as far as I know, the above will not control the relay as it would appear. Instead of what he has above, I connected the 5v to one pin of the relay coil, and the other pin to the Arduino. I then have a wire from that 5v across the pc board and out to one of my sensors. The other sensor is hooked up totally separately from the relay with a gourd the pc board, a 10k resistor to a wire that connects to A0 (on the Arduino) and a wire to the other sensor that that junction.

hopefully this helps to those who are not having success. I am not comfortable making a circuit diagram to show what I did as I have no idea my self how to read them. I can send pics, or explain better how I did things to anyone who asks.

PedroS168 (author)kampsjp312016-11-23

could you please can send me understanding pictures to my mail

Hey, would you mind sending me pictures of how you did this a.k.a. the PCP board and where the wires go to. I would really like to do this project, but the pictures and instructions aren't very well detailed. If you could email it to that would be great. Thanks for the help!

AirIf (author)kampsjp312014-08-31

thanks 4 de tip, it worked just like you said..

juanse493 (author)kampsjp312014-05-13


Would you post a pic of your setup? I'm a newbie here and couldn't make it work :(

Thanks a lot!

kampsjp31 (author)juanse4932014-05-13

not sure how to annotate pictures, the green wire from the relay goes out to any digital pin (mine goes to pin 2), the red wire on the top part of the relay goes to 5v. the red wire across is soldered to one of the sensor wires.

The black wire goes out to ground on the arduino, the 10k resistor goes over and is connected to a green wire (show) that connects to one of the analog inputs (mine goes to A0) and underneath is soldered to the other sensor wire.

The red wire on the bottom of the relay goes out to one of the parts of the pump wire as he illustrates above, the other wire goes into the single pin of the relay (which is on the ver right of the picture)

let me know if you need me to clarify anything. I know nothing about circuits or anything, just did some googling and playing around on a bread board to figure this all out.

jbernardino1 (author)2016-08-28

I'm excited to finish this project however a little uncertain The other two red wires are soldered. I've been through the steps if you times and see where it requires is soldered to one of the sensor leads and a black 22 gauge wire is soldered to the 10 K resistor. I am completely new to these types of projects and since I am messing with electricity I want to be absolutely certain I don't mess up. I'm assuming one red wire is connected to the unused coil pin and another to the other end of the 10 K resistor where it's soldered to soldered to the relay. On an earlier step a ground was soldered to the open end of the 10k resister.

evilcat (author)2016-08-05

i can't understand how to solder the relay to the pump and how to connect all to arduino.Please help me i'm completlely a newbie with Arduino.I hope someone helps me.Thanks

SoA3 (author)2016-07-24

can i get the image for the connection?

arick_003 (author)2016-07-17


I tried understanding how the the connections should be from the given description... please correct me if I've got it wrong...I am a bit confused with GND and A1 joint were we also connect the probe ...

proxyrat (author)2016-04-29

Nice solution! I'll try to make it with arduino nano and different electric pump. What about soil moisture sensor? Is this solution reliable?
I also find similar watering solution

AnnaleeH (author)2016-02-14

How would you connect this to wifi and a mobile app? Is this possible?

Joel Thomson (author)2016-02-01

Non-submersible electric water pump.

Joel Thomson (author)2016-02-01

Non-submersible electric water pump.

Joel Thomson (author)2016-02-01

is it compulsory to ad Non-submersible electric water pump to it?

acomua (author)2015-10-02

Hi Randy, my flower has asked me to do it automatic watering, but his boss ran into a problem when trying to check the code gives error. Help my master how to fix it. When he was not at home for a long time, I have very bad without water.

That's what he can not, how to fix it)))?

Arduino: 1.6.5 (Windows 8.1), Board: "Arduino Uno"

The sketch name had to be modified. Sketch names can only consist

of ASCII characters and numbers (but cannot start with a number).

They should also be less than 64 characters long.

sketch_oct02b_:18: error: expected unqualified-id before numeric constant

sketch_oct02b_:25: error: expected ',' or ';' before 'void'

expected unqualified-id before numeric constant

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

mzbas (author)acomua2016-01-05

add a ';' at the end of this line

int dryValue = 700 it should look like this

int dryValue = 700;

RezaM16 (author)2015-12-23

Hello sir. I downloaded the code but it gave erorr in A1;

kamhagh (author)2015-11-05

You can connect the resevator to an electric tap! Also i see no reason to use an arduino uno! Just save tons of money and space and just use an bare atmega328p

GuilleGrb (author)2015-10-29

Oh thats very nice dude, can u send me the pdf to my e-mail please? I wish make it for my school project it seems very awesome.

e-mail: (

Constantine_G (author)2015-08-11

can u plz mail me the source code?

Yonatan24 (author)Constantine_G2015-10-21

I think it is in step 19

bager (author)2015-10-13

that can be processed in a house right because we dont have a yard

MarianaC4 (author)2015-07-16

someone has a video toturial?

prebbz (author)2015-04-24

these arduino codes are not working for me is there any tips so I can figure out this problem

NickStag (author)2015-02-24

I have only one question, how often do you need to change the 9V battery? My bet is that it will last around 2 days...

engrjer (author)2015-02-08

Can someone please help me with the wiring diagram between the relays, probes and the arduino. Quite confusing. Thanks in advance!

Manuel Tafoya (author)2014-10-09

Hi, this is a good project. I would like to do, so I was wondering if you can share the code for the arduino? would be great if you could do it.

thanks in advance

The code for the arduino is given in Step 19: Program

Hello River_alexander

Thanks for all! =)

river_alexander (author)2015-01-29

Would a submersible pump work as well as a non-submersible pump?

fconde1 (author)2015-01-11

Can 1 arduino control multiple pumps for independent vases?

MuBoks Stuff (author)fconde12015-01-22

I would all so be cool if you could make it so the water in an dish at the bottom of the plant got ran though back to the water container through an tight to clean out any solid mass

Sure, But you may need to run them off separate power supplies. So you may need to use transistors or relays.

cart562 (author)2015-01-11

I would love one or several of theses....but the fact that I am too lazy to water my plants means that something like this is far out of my grasp....

loumonster (author)2014-12-15

Thanks for instructable Randy!

Because I had one of those moments when you get to home depot and realize that the word tubing is not descriptive enough, haha, I wanted to add that the tube size for the specific pump in this instructable is 5/16" OD x 3/16" ID. I couldn't find the compatible tube size needed on the pumps packaging or instructions either, but luckily you had a close up shot of the tube where I could see the size.

Axorr (author)2014-03-15

Step ten says;
an 18" section of 12 AWG wire to the free pin of the 10K resistor.
Solder a 6" section of black 22 AWG wire to this joint.

Attach an 18" section of 12 AWG wire to an unused part of the PCB. Solder a 6" section of red 22 AWG wire to this joint."

However, the pictures show two additional wires coming off the PCB. You can see them again in images from steps 12,13, 15, and 22. Step 23 talks about where the OTHER end of those wire go (connecting to the Arduino), but I am wondering where they connect exactly on the PCB. I seem to be missing the step where it mention when and where those wires are connected.

river_alexander (author)Axorr2014-12-05

Did you ever figure out what wires went where? I would really like to do this project, but I can't get it to work.

prebbz (author)2014-12-05

sorry could you send me the schematic and program details as well thank you very much it would come in handy

prebbz (author)2014-12-05

hi, could you send me info as I want to do this as my final project.

arjiecarolino (author)2014-10-27

hi sir, thank you for the info. can you send me on my email the full information and the program because the above info is quiet complex for me. I want to propose this to my professor for our thesis project. This is my email

Thank you sir..

phenrique5 (author)2014-10-20

I can use a air pump instead?

About This Instructable




Bio: My name is Randy and I founded the Instructables Design Studio. I'm also the author of the books 'Simple Bots,' and '62 Projects to ... More »
More by randofo:Large Motor ProjectsRemove a Wheelchair Motor BrakeBuild a Robot
Add instructable to: