zaterdag 5 februari 2011

Electronic watering can



 To get the necesarry carbon dioxide to oxygen conversion Deddies lab is accommodated with a young Ficus Lyrata. To not interrupt its attempt to become the biggest Ficus on earth it needs a weekly dosis of water. That combined with the lab's motto that everything deserves a microcontroller gave inspiration for a little project on a rainy sunday: An automated electronic watering can!

 No, it is not an R2D2 alike robot holding a watering can. Basically it is a 10 liter reservoir filled with water and a little pump that waters the plant once a week.

 
 To count the days and make the device extremely low on power consumption it uses a simple (mechanical) wall outlet timer that turns on the electronics once a day for only 15 minutes.* In this 15 minutes the day counter is incremented and on the 7th day the pump starts pumping up the water. That is unless their is enough water in the tank (guarded by mr. Duck) and some other preconditions have been met. If mr. Duck notices the water level is getting low, he pulls the rope indicating that no pumping is allowed anymore unless the tank is filled again.

* I could have used a more modern timer that will only turn on the watering can once a week. But as it was still a sunday I made it a kind of scrapheap challenge and used parts I had lying around instead of buying a new timer the next day.


An Atmega8 is used running on its own internal 1 MHz clock. A pushbutton is available to set the day that is most convenient for watering. Besides the timer mode their is also the possibility to give the plant an extra shot of water with the single shot pushbutton. This button is also useful when adjusting the voltage regulator that determines how long the pumps needs to be turned on. The single shot mode can test the amount of water that is pumped up. With the Aux In feature a external trigger signal can start the pump. That is unless the Timer Mode is disabled with the jumper. There is also an additional Aux Out that turns high when the pump is activated. 
Especially the Aux In and Out features can become useful when this watering can is part of a larger home automated system. Maybe we get plenty of 'rainy sunday afternoons' for Deddies lab to roll out this home automation plan.

When the hole thing was put together and ran the first tests I realized that an important feature was missing. Although mr. Duck indicates the water level is getting low and pumping is not allowed anymore there is still no (auditive/visual) signal to the outside world that the tank needs refilling. So, mr. Duck guards the pump but not the plant. So an addition to the electronics will be needed to fix this.


My Ficus Lyrata needs approximately half a liter per week. With a water reservoir that can contain 10 liters and has a minimum water level of 2 I have to fill the tank every 4 months. Not bad with the water tap at the other side of the house.

Schematics can be found below and C source code for Codevision AVR can also be downloaded.