Introduction: Battery-powered Irrigation for Balcony Plants

In the past, my balcony plants would not survive a 3-week summer holiday. We have no electricity and no water tap on the balcony, and thus I came up with a pumped battery-powered irrigation system. I built this 2 year ago and nowadays, on return home, I find huge bushes of basil, parsley and rocket instead of miserable crispy brown dead plans. It is used during the rest of the year as well to provide minimal irrigation in case I forget to water them. So it’s time to share the project!

Water is pumped from a container with a small 12V pump through flexible tubes to drippers in all plant pots. The pump is controlled by a DIY programmable timer, based on the ATTINY13 microcontroller. The plants will be watered every tot days for tot minutes. You can also set the total number of irrigations and when to start. To keep things simple and robust, there is no measurement of temperature, rainfall or soil humidity, and there is a one-button, one-LED interface for setting up the irrigation program.

The pump runs on 8 rechargeable NiMH AA batteries, which have enough capacity to pump hundreds of liters of water before needing a recharge. The microcontroller has also been programmed to go into deep sleep between irrigations, and runs for many months.

The irrigation program can be set at start-up, or the program from last time is reused: the parameters are stored in the non-volatile EEPROM memory of the microcontroller.

The total cost is in the 10-20EUR range, depending on whether you count the cost of the batteries and/or the water container.

Step 1: Supplies and Tools


  • A 20-liter water container
  • 12V Mini Submersible brushless pump (350mA, Hmax 300cm, 240l/h)
  • 10m Flexible PVC tube 8mm outer diameter, 5mm inner diameter.
  • 20 Garden sprinklers inner diameter 4mm/ outer diameter 7mm
  • 20 T-shaped water hose connectors inner diameter 4mm/ outer diameter 7mm
  • 50cm of duct tape
  • Waterproof project box ~10x10x8cm
  • 2 battery holders for 4xAA batteries
  • ATTINY13A microcontroller + 8-pin chip socket
  • TIP120 NPN Darlington power transistor
  • Push-button
  • 3x3cm protoboard
  • 3-way switch
  • A 5mm LED
  • A 1muF capacitor
  • 2 1kOhm resistors
  • A 1N4007 diode
  • A pair of male/female JST connectors

I got some items online, some a the local hardware store


  • An Arduino to program the ATINY13
  • Soldering iron
  • Rotary tool for drilling holes in the project box

Step 2: The Irrigation System

It is possible to distribute water to ~20 pots from a single pump, even when they are placed at different heights. The important thing is that the water level is below the exit level of the sprinklers, otherwise the water will flow also with the pump off. I split the tube early with a T-piece, one to feed the upper pots and one to feed the lower pots. At every pot there is another T-piece with a little tube going into the pot, finished off by a sprinkler. These sprinklers can be regulated such that all plants get the right amount of water. The line is ended by the sprinkler of the last pot.

The pump needs to be fixed to the bottom of the tank. I used duct tape which will stick if the surface is clean and dry. To make sure that all the water gets pumped out and the pump doesn't run dry, it's even better to attach a short piece of tube to the inlet of the pump and tape it also to the bottom.

The total tube length is about 10 meters, with 21 T-pieces and 20 sprinklers.

Step 3: The Control Box

The electronic circuit is consists of an 8-pin microcontroller, a TIP120 darlington power transistor with a 1kOhm current-limiting resistor, a push-button with anti-rebounce 1muF capacitor and a LED with a 1kOhm current-limiting resistor. A 1N4007 or similar diode

protects the circuit from inductive voltage spikes when the motor is switched off. Finally, a three-way switch allows three modes: OFF/ON/TIMER

The schematic is attached. Note that there are 2 holders with 4 AA batteries each. The ATTINY is powered by 4x1.5=6V and the motor by 8x1,5=12V. It can all be mounted on a small prototype-PCB. The switches and LED should be mounted in holes in the box and another small hole is needed for the wires leading to the motor.

Step 4: The Code

I used an Arduino to upload the attached sketch to the ATTINY13.

The method is described in many places, for example in this instructable.

At startup it will allow to change the four timing parameters. The settings are stored in the EEPROM, so they will be remembered in case the timer is switched off. The watchdog timer is set to its maximum value, corresponding to 8s and the controller is put to sleep. Every 8 seconds the processor wakes up, checks whether the pump should be on, gives a tiny flash to the LED and goes back to sleep.

Step 5: Usage

At switch-on, the LED will light up briefly as a sign of life.

Then with the push button, the first parameter (period in days) can be set. Push once to get a flush every day, or twice for every second day. Now wait ~ five seconds and there will be feedback: the LED will flash the same number of times that you gave as input, followed by a longer flash. If you don't push at all, the parameter will remain unchanged.

After the longer flash, the second parameter can be set: the number of minutes for the pump to be on, and again after a few seconds the LED will give short flashes corresponding to the value of this parameter, followed by a longer flash.

The third parameter is to specify how many times the pump should go, and the fourth when to start (1=immediately, 2 is at the second period, 3 at the 3rd etc.)

If the fourth parameter is one, the pump will start immediately and it is a good moment to monitor if all the sprinklers work well.

Battery Powered Contest

Participated in the
Battery Powered Contest