Building a watering can with an arduino and an aquarium pump
The motivation:
At our workplace, there is a room full of smart
people. Everyone has a Master’s degree in mechanical engineering and most of us
are doing a PhD in mechanical engineerning – So on paper we should be pretty smart.
Yet still, our collective brainpower is not able to remember to water the
office plants at least once a week. There could be the easy way out to just set
a fixed date on the smartphone to set off an alarm when to water the plants. As we are hugely talented
in procrastinating, we went for a different approach. Why not use an Arduino and
an aquarium pump to water the plants automatically? Welcome to the utopia of
lazy PhD students!
The hardware
requirements:
The parts list depends on how sophisticated you
want the plant watering system to be. You could just have a DS1307 RTC i2C
module that tells you the time and similar to the advent wreath project you
pick a certain time when the pump has to be activated. The pump itself usually
requires more power than the Arduino can provide internally – You will
therefore need an external power supply and a relai card to handle the higher
current.
This works well for one season – But usually
plants need more water in summer than in winter. A sensor that measures the
humidity of the soil would work around that problem. Therefore I have labelled
the parts list in basic (just the DS1307) and advanced (DS1307 and humidity
sensor):
- Basic:
- Arduino Uno board
- DS1307 RTC i2C module
- Aquarium pump
- Some plastic tubes for the water circuit
- A relais card (we used this one - Make sure it fits to your pump)
- An external power supply (Make sure it fits to your pump)
- Soldering material (wires, soldering gun, soldering tin)
The software requirements:
The basic version needs a similar code than the
advent wreath. You have to check the DS1307 for the time and if it is the right
time, you switch a pin that opens the relais. This is the master-branch in mygit repository.
To make use of the humidity sensor, check out
the other branches of the repository. The main idea is to read the sensor value and
based on this value make the decision whether the plant needs to be watered or
not. The margin values regarding the humidity, when to water or not to water
the plants can be found in the code documentation.
Wiring it up:
In the image below you can see the wiring. The
two switches have to be connected to the interrupt pins of the Arduino board.
The LED, which is wired to pin 6, is simply switched on/off when the pump is
switched on/off. This thing can be quite useful if you do want to test everything
without having to actually power the pump (otherwise you might flood your
office =) ). The DS1307 is wired to the i2C compatible pins of the Arduino
board.
The relay card wiring is specific for the relay
we used. Be sure to check the manual before you wire it up.
The final result:
And there you have it – A fully operable
watering can. The pump is now switched on as soon, as a certain time interval
has passed. This time interval is not static though and depends on the plant
used, it’s surroundings (local climate, weather, …). It would therefore be good
to have some more data to decide when to water the plant. This will be shown in
the next part.


Comments
Post a Comment