Hello, I’m Lewis from DIY Machines and today
we will be making a simple device to help watering your pots, baskets, vegetable bed
or greenhouse with an uncomplicated low cost Arduino project.
I’m a keen gardener but watering your plants by hand during dry spells takes some time.
This project frees me from watering, so I can work on my other projects. It’s also great
at taking care of the garden whilst you’re away from home, and the plants benefit from the more regular watering. This projects brought to you by my Patreon
supporters. Please consider supporting me on Patreon, thanks.
It’s powered by a USB port so that you can connect it to various sources of electricity.
Such as an outdoor power socket or USB powered battery with integrated solar recharging.
You can also customise at what time, day or night, your plants are waterer. I currently
have mine watering the hanging baskets twice a day. Once in the morning before sunrise
and then they get topped up again just after lunchtime.
You’ll need a few things to build one of your own. You’ll find links to find the parts on
Amazon down in the description below. You’ll need an Arduino Nano. A small servo. An RTC or Real Time Clock. Some electrical wire . Three M3 X 10 bolts and one M3 nut. A couple of Hoselock compatible female connectors. And a Hoselock compatible inline valve. Some filament for the 3D printed components… and as an optional extra you can use a breadboard
if you don’t want to solder your connections and instead want to use jumper wires. There are three printable parts to this project. The inner and outer case and ‘the coupling’.
I have printed all of my parts using ABS plastic. You could use PLA or PETG but just know that
PLA is the most likely to degrade in outdoor conditions or inside a greenhouse.
Here are the three 3D prints I did as well as the setting that I used.
I’m going to be soldering all of my connections in this video as I will be permanently installing
this into my garden. If you prefer you can use jumpers and a breadboard to make the same
connections as I have with this one. First we can strip the plug of the end of
the servo wire and solder this directly to the nano. There are three wires going the
servo on mine, the red and brown wires are attached to the power and ground so I will
attach these to the Arduino’s 5V and ground connections.
This leaves the orange wire which is our signal wire. This needs to be connected to digital
9 on the Arduino. Now we can turn to the Real Time Clock or
RTC as it is often shortened to. We will be using these four pins. You will need to prepare
four 7cm long lengths of wire for this. As before the ground lead is connected to
ground and VCC to same 5V power supply the servo
was just connected to. The SDA pin connects to A4 on the Arduino and SCL to A5.
Use a USB cable to connect it to your PC and open the Arduino IDE. You’ll find links to
the Arduino IDE and code in the description below.
In the main loop of the code are two IF statements which check the time and then initiate the
watering sequence for a specified amount of time. The conditional check of the IF statements
checks to see if the value of the hours and minutes from the clock match what we have
set here. If they both match then the ‘Open Valve’ function runs, followed by a delay.
This delay (set in thousandths of a second) determine for how long the water is allowed
to flow through the hose to your plants. You can have as many of the statements in
the main loop of the code as you need. Once you have finished programming your watering
schedule we can disconnect it from the computer and complete the assembly.
Use one of the M3 bolts and nut to secure the servo into position like this.
The servo should have come with an assortment of arms that fit to it. We want to fit the
straight armed one. When we turn the circuit off after uploading
the code the servo should have been left in the valve closed position. So when we fit
the arm you want it to be vertical like this. Now rotate it 90 degrees anti-clockwise until
it is horizontal. Slide in the inline valve and fit the coupler we printed onto the servo
arm. the next bit does require quite a bit of force
but you need to rotate the valve like this whilst pulling it away from the servo. It
will take force, but we only need to do this once.
I’m going to use a long USB lead to connect it to my outdoor power socket to power mine.
Let’s connect the Arduino end of the cable now and finish of the enclosure.
I’ve soldered my connections directly to the boards I’m just going to squeeze my electronics
into place inside the enclosure. If yours is on a breadboard you can use the self adhesive
backing to hold it in place not he ledge provided. There are two screws that need to be inserted
to complete the housing. Let’s now take our project to the garden.
I will install the project between my tap and hanging baskets. Earlier I installed this
drip irrigation kit by Hoselock to each of my hanging baskets. There is a link to it
in the description below. Now we attach this to our hosepipe using the
two of the quick fit connectors. And that’s it, my hanging baskets will now
take good care of themselves until early Winter. Don’t forget to subscribe to the channel and
ring that bell icons be notified when we publish our next project.
Until next time, chow for now.