Automated Plant Watering System

87K50460

Intro: Automated Plant Watering System

House Plant Babysitter
Going away from a while? Need something to babysit your house plants?
This box will automatically deliver an adjustable volume of water to four plants (or less) every day, or once every "x" day (up to seven days). A micro controller handles the time tracking and 120AC switching (via a relay). The relay powers a fountain pump which functions as the water delivery system.

STEP 1: Materials

You'll need these basics to build this setup.
Fountain Pump (pick on that can deliver water upward to match your box)

  • Nylon tubing...................................................... $12.00
  • Light Bulbs (the right ones for plants)............... $2 x2
  • Light fixture ........................................................$1.60 x2
  • Micro controller...................................................$4 (buy the 3rd party Arduino)
  • Relay PCB ........................................................$3.50
  • LCD screen .......................................................$8.00
  • Wire......................................................................free
  • Tub to hold water ................................................$1
  • Maple plywood..................................................... $12

The total cost of this build is around $80 when you add all the misc stuff.

STEP 2: Build a Box!

You can make just about any box to house this system. Im actually borrowing this box design from another 'secret' project I'm working on. But it will do just fine to make the system "all-in-one".

I am not going into detail how to make this box as you can find great tutorials on Instructables for boxes. I will say I am using straight slats to hold the two 'shelf' layers. No brackets here.

Since we are making a water pump system, it might be beneficial to protect said wood from the water. I put about 4 coats of Polycrylic to make this wood "water tolerable". The box was cut on a laser cutter at work and glued together.

STEP 3: Electrical System

The arduino will keep track of time as well as the day of the month. When the alarm is triggered, the Arduino will power a relay. This relay will complete the 120V circuit for a water pump. The pump will deliver water to the plant! It's simple enough, but each sub step has some complexity.
Disclaimer: This will not satisfy any NEC requirement for 120v AC circuit next to wet environments. Build at your own risk.

The photos show the connections for the Arduino, LCD and the control panel. Depending on the Relay board you buy and how many safety violations you want to avoid your 120AC wiring might look different. I haven't shown any as this my way to say, you shouldn't do this unless you're confident in your abilities.
To summarize: 120V comes into the Relay, and when the Relay closes, that 120 gets passed to the outlet, powering the pump. The outlet is a single gang, but it is important to note I removed the tabs that tie both electrical sockets together. Now the outlets can be independently wired. One always on, the other switchable via relay.
My setup uses two relays to switch the 120AC on/off. Instead of passing the Neutral wire through the to outlet and only switching the L (hot) line, I am actually switching both the N and L 120 lines in separate relays. Double the redundancy for reasons that involve lack of foresight: I clipped the power cord in half (instead of just one wire) without thinking, so here we are.

STEP 4: Mount Electrical

The outlet and relay board get mounted to the side of our box. Tip: If the water reservoir fails and leaks into our box , it would be best to mount any lines carrying 120AC above the "flood zone". Next we wire the arduino.

STEP 5: Arduino

The control panel is wired up and dropped into our box. The LCD screen also gets bolted in and wired. Both of these are wired to the Arduino.

STEP 6: Code

A simple time keeping program that also tracks the day lies at the heart of our Arduino. I wrote some basic push counters that allow you to set the Hour and Minute locally for both the time and the alarm time. The day tracking is arbitrary and starts at day one and will count up to whatever day depending on the month is being tracked.

Building flexibility into the system means a few features. This code has the ability to:

  1. manually override pump
  2. control duration of when pump is active (control volume of water delivered)
  3. control how many times per week plants are watered

The more interesting section of this code is how control how many times per week plants are watered. In other words, how do we make the water on every "x" day operation as simple as possible?

IF Day of the Month Mod Water Every X Day = 0 , Then water plant!

Modulo is the key. Take the days of the month, and divide [modulo] them by x (Water on "x" day). If the remainder is zero then activate the relay [pump]. That's it. This chart shows the modulo=0 for all possible days of the month (1-31) and the divisor (1-7). Way easier than to make a look up table for every day of the week, and then a command to make that repeat week after week. Thanks Discrete Mathematics course for making me do all those logic proofs and the modulo finally comes in handy.

STEP 7: Hydraulics System

Place the pump in the reservoir (tub) and feed the outlet tubes into a T. You can "T" [split] off into however many splits need for your number of plants. I am going with four because it's a beautiful number.

STEP 8: Artificial Sunshine for Plants

Putting plants into a "box" might not be the best thing for them, so we need to give them artificial sunlight. I am going to use some compact fluorescent bulbs. I would advise picking the right bulbs that give your plant the proper [UV] light it needs. I am using a spare vacuum cord to wire to some household light fixtures. These fixtures get mounted to the top of my box and the bulbs drop down through the grate holding the nylon tubes.
Yes, we have water right next to 120V. Again, do not try this at home or any location.

STEP 9: Connect Power, Add Water

The arduino and lights are plugged into one outlet. This outed is wired to be always on. The pump is plugged into the other outlet which is controlled by the relay [arduino].

STEP 10: Chip Clip for Plants

To go the extra mile, I 3D printed some simple clips that route and clamp the water hose to the plant's pot. Simple and moderately effective.

STEP 11: Set It and Forget It!


(Not Ronco affiliated or endorsed). The video demonstrates the features and functions of this machine best. If the video doesn't start at 4:57, that where you should start.

Video Link

44 Comments

I have a question do i have to buy your codes to make my project in a different way but at the same time the codes dont work it keeps saying errors and need to fix this and fix that and the time dont eant to work......so please,,, i have veen trying to connect you at YouTube for months..!!!
Every time i fix it something else is wrong whats up that and i had to download download this like 5 time and j cant get it right.
I had the same problem. Fixed it changing the time.h library to:
#include<TimeLib.h>
Hey,
I was looking for some inspiration for my school project and I couldn't find a good way to make an irrigation system for my smart greenhouse, but because of you I found a good way to fix it. Your instructable helped a lot. Keep on the great work.
Röle PCB board ?
Fabulous! This is a great project with an excellent work for the automated water pump system. Brilliant!
Why they never answer are questions..??
how did you connect the outlet to the cord? im confused on how exactly you did that
I can't get the library and circuit diagram. Plzzzzzzzz help me .
Hello sir....I am Soumen. I want to make this project. But if you give me the circuit diagram of this project, that is very helpful to me.
What specific relay did you use? Thanks!
hello
very nice work
may i ask what type and value potenciometer are using ?
and the relay do not trigger on setup time but working with overide button
any idea to solve this ?
Sir i have some questions, pls check it.

Hi, I'm nearly done with this (I'm doing this as end-project for school). But I have still one problem: When I want to set the time to water the plant, It doesn't send a signal to the relay. Looked for any problems in my circuit, no problem here. Looked in the code for any problem makers, also found nothing here. Thanks for helping in reverse! (Sorry for bad English)

try to switch the relay wires '_'

Same problem, tried everything -_-

bonjour

j'aimerai s'il vous plait avoir votre code arduino et votre projet en pdf s'il vous plait ,pourriez vous aussi si ce n'ait pas trop vous demander me donner un coup de pousse si je vous demande quelque info ,je débute avec arduino, d'avance merci , je vous laisse mon email / hohm.michel@free.fr

More Comments