Instructables

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.
 
Remove these adsRemove these ads by Signing Up

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
2B.jpg
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
3B.jpg
3C.jpg
3D.jpg
3E.jpg
3F.jpg
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
4B.jpg
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
5B.jpg
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
6B.jpg
6C.jpg
6D.jpg
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
7B.jpg
7C.jpg
Zip tie the water pump securely into the case.

Step 8: Cut the cord

Picture of Cut the cord
8B.jpg
Cut the pump's power cord about 6" from the pump's body.

Step 9: Start the PCB

Picture of Start the PCB
9A.jpg
9B.jpg
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
11B.jpg
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
12B.jpg
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
13B.jpg
13C.jpg
Attach the circuit board to the project box using 1/4" spacers, nuts and bolts.

Step 14: Wire nut

Picture of Wire nut
14B.jpg
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
15B.jpg
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
16B.jpg
16C.jpg
16D.jpg
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

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
18B.jpg
18C.jpg
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
20B.jpg
Fasten the Arduino to the base of the project enclosure with nuts and bolts.

Step 21: 9V clip

Picture of 9V clip
21B.jpg
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
22B.jpg
22C.jpg
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
24B.jpg
24C.jpg
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
25B.jpg
Drill a 3/8" hole in the top of the water container's lid.

Step 26: Tubing

Picture of Tubing
26B.jpg
Cut the tubing in half.

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

Step 27: Probes

Picture of Probes
27B.jpg
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
30B.jpg
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.
1-40 of 121Next »

Hello!

Awesome project! I have a question, where did you find the data you needed to program the moisture sensor. I was trying to figure out how to identify the necessary moisture for different plants but haven't an online resource with that data.

Thanks!

mde flotte1 month ago

Hi,

Great stuff!

I have a little question, there is any reason to use non-submersible pump? Can I use submersible pump?

kampsjp312 months ago

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.

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.

Hi!

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

Thanks a lot!

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.

100_1485.JPG100_1486.JPG

has anyone actually made one of these? the wiring instructions are so convoluted that i cant imagine anyone has actually had luck with constructing this...

can someone post a schematic or wiring diagram? the directions arent very clear as far as what pins are connected to what wires and i want to double check...

Akin Yildiz2 months ago

you can easily add a sleek plant arm to the pot, so it has light..! please check out my designs, i'm in the process of combining the two technologies...

http://www.instructables.com/id/USB-powered-LED-pl...

IMAG0348.jpgF09OVZOHU842FQX.jpg

2 questions: 1) is this design adaptable to maintain more than one plant (potentially 3 or 4 at a time with 3 or 4 separate pumps, so the pumps all go to the same set of circuitry?) and 2) is it possible to add a rechargeable solar assembly to power everything?

dmoonen3 months ago

I can't seem to find the code?

cheshirecorn3 months ago

Thats exceptional...

Can you use a bigger reservoir for the water.
Axorr4 months ago

Step ten says;
"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."

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.

tommycai4 months ago

so 5v goes to the plant analog in comes from the other probe.

Where is the ground at? Kinda confusing?

Is this correct; I found no schematic found

redwire to arduino 5v and then soldered and to plant

black wire to a1 (analog in) and ground and to resistor side of relay.

digital 12 pin to one side of relay coil on micro relay

tiongson5 months ago

can i use bigger water pump

nodoubtman6 months ago

Hi! I'm wondering, watering plant once a week?... do you feed the plant when it's dry all the time?

thank you!
marC:)

tiongson6 months ago

what is this??? is this an ordinary screw or a sensor???????? plz answer

FD5SRJDH461WXGI.MEDIUM.jpg
tiongson6 months ago

is the probe is the sensor

Polymorph6 months ago

I'm having a hard time finding the schematic or wiring diagram.

I think a driver transistor would be a good idea, as most relays require more than the maximum 40mA the microcontroller is rated at. I'm also not seeing a snubber diode across the relay, without it your Arduino is being damaged every time the relay is shut off.

regaltaxlaw7 months ago
I got all the parts today. Can't wait to start tomorrow! Thank you for the instructable!!!
AchillesPDX2 years ago
Anyone know how long an Arduino will run off a 9V battery? Seems to me you could throw an AC>DC adapter in the box too and power the Arduino off of it so you have one less thing to forget :)
A 9 volt battery wont charge an arduino with added sensors on it for very long... a week maybe?
majenko Eirinn7 months ago
You're havin' a laugh, aren't you? Not including any sensors or anything an Uno draws around 50mA. Your typical PP3 battery is only about 575mAh. That equates to a total runtime of no more than about 11.3 hours!!!

delay() does NOT help reduce the battery drain. For that you would have to manually put the Arduino into sleep mode. Doing that, and waking once per hour to sample the soil you could maybe get a week's worth of use out of it if you are really really lucky.

On another note, I'd most definitely use a 12V pump, NOT a mains pump in this situation. Wiring up the mains like that is a recipe for disaster, and even death. 12V pumps are easy to get hold of, and the 12V supply for the pump could also run the Arduino and relay. Hell, you could even scrap the clunky relay and use a MOSFET instead then. Much neater.
Eirinn majenko7 months ago
I said a week, you said a week - i also meant under optimum conditions ;) Just add a mains adapter and it should be fine. However adding sleep would still be good, saves electricity :)
9V batteries are not that long lasting. I would go with 6x AA or AAA NiMH batteries plus a solar charger on top ;-)
small solar charger?
It's possible that a number of small water pumps that hace ac IN actually have their own ac-dc converter internally that powers a dc motor. You can probably tap that to power the arduino, and add the relay a little bit further on that line, so you're also only switching the lower voltage DC.
genius4hire8 months ago
It is good practice to ad a liquid fertilizer to your water. I get it from my local hydroponic farm. the A and B solution is also available in stores, but so much more expensive. Then I check the A and B solution watered down for nutrient strength depending on what you are growing. Good solutions always come in two bottles as otherwise the solution crystals will combine and not work. Only dissolved in water it is ok to mix them together. There are some fabulous nutrient strength meters available with LED readout.
I use something like this http://www.onestopgrowshop.co.uk/blog/2013/08/control-of-nutrient-strength-levels-in-hydroponics/
You get a way with PH meters.
And nutrient strength tables are also online.
The probes I assume are stainless steel.
I like this project and will try to get a pump that is small and for low voltage as I do not like to mess with Electricity and water. Above 80 Volts it is just too dangerous. Use a transformer in between. 12 or 24 Volt and a suitable pump. I live in Australia where we have different plugs and 240 Volt AC anyway.
genius4hire8 months ago
It is good practice to ad a liquid fertilizer to your water. I get it from my local hydroponic farm. the A and B solution is also available in stores, but so much more expensive. Then I check the A and B solution watered down for nutrient strength depending on what you are growing. Good solutions always come in two bottles as otherwise the solution crystals will combine and not work. Only dissolved in water it is ok to mix them together. There are some fabulous nutrient strength meters available with LED readout.
I use something like this http://www.onestopgrowshop.co.uk/blog/2013/08/control-of-nutrient-strength-levels-in-hydroponics/
You get a way with PH meters.
And nutrient strength tables are also online.
The probes I assume are stainless steel.
I like this project and will try to get a pump that is small and for low voltage as I do not like to mess with Electricity and water. Above 80 Volts it is just too dangerous. Use a transformer in between. 12 or 24 Volt and a suitable pump. I live in Australia where we have different plugs and 240 Volt AC anyway.
EET198210 months ago
Finished mine. Found the fault. User error :D. Also changed mine to cycle every 5 seconds. Thanks again. Pretty awesome!
EET198210 months ago
I got all the parts today. Can't wait to start tomorrow! Thank you for the instructable!!!
Ninjaco1 year ago
Hey,
I've got a question for you, How well does this work? Am I able to set the amount of water (ML) it will pump to my plant every day?? And how do I do that? Am I able fo adjust something in your code to change that or what?

peace!
Roshy10 Ninjaco11 months ago
You can adjust the delay time from 10000 to something different, this is a time measurement in milliseconds so it is currently watering for 10 seconds, It will take some quick measurements to find out the time you need, but it should be easy enough.
My Diet Area11 months ago
Please help I want to make this as a science fair project and need more information.
jkarimi1 year ago
could you use a MOSFET instead of the relay? In general, I don't see what the practical difference between the two is.
dls020101 year ago
I have a question about your moisture measurements: How did you normalize the readings? I've heard that soil moisture content readings from capacitance probes (the nail method) is affected by temperature and salinity.
gmendez31 year ago
Nice project, and the instructable is so clean! Thanks!!
marshath1 year ago
How is the witing connection done on the pc board?
And where does the pump get current frm? From the mains?
pcha1 year ago
Where is the soil sensor, or are the terminal ring the sensors. Please help I want to make this as a science fair project and need more information.
1-40 of 121Next »