This instructable includes solar panels powering water pump, Arduino and all electronics under or about $30. The system waters up to 6 planters.

1. Solar panels 6V 1W - $1.50 each. 8 needed. (ebay)
2. Photo frame from dollar store 11" x 14" - $1. (Dollar Tree/ any dollar store)
3. Arduino - $7. (ebay)
4. Box - $5. (IKEA?)
5. Tube - $2 (Orchard)
6. Galvanized nails - $1 (optional, Home Depot?)
7. Electrical wire salvaged from electronics - free / jumper wires if you have too (optional)
8. 1 channel relay - $1 (ebay)
9. Cheap trash bag or vinyl sheet - (optional)
10. Cylindrical container for pillar - $2 (I finished the Pringles)

Total: ~$30

I have no affiliation with any of the vendors mentioned above. Try to shop around and salvage items safely if you could!

Step 1: Concept

Initially I wanted to create an automatic irrigation system for a balcony garden. An array of solar panels would be enough to power the electronics but the position of the sun changes over time. Ideally, I want the solar panels to face the sun to increase the efficiency of powering the electronics.

The most common use of soil moisture sensor is not reliable as it would corrode over time, hence, I intend to create a 3-phase fail proof system.

1. The Real Time Clock DS3231 for Arduino to turn on the pump at specific time
2. Galvanized nails tolerate corrosion (optional)
3. Cheap trash bags to channel over-watering

I tested out the DS3231 Real Time clock module and it seems to work perfectly fine, not to mention that the relay shuts off if there is no current flowing within its circuit. Over-watering is not a big worry in this case.

Step 2: Solar Panels

This is a DIY version of everything so I am gonna build a solar panel. My most challenging part in this step is to find a cheap case/ frame. I went to various dollar stores and found that Dollar Tree does have a HUGE frame 11"x14" that fits all my panels. The panels do not move vigorously, toughness of the photo frame shouldn't be a big factor in this case. The material of the cover is glass, can withstand heat which is a huge plus!

I separated the panels into 2 groups, 1 for the pump and the other for the Arduino. 6 panels run in series and parallel to provide about 12V 6W of DC power to pump, 2 panels run the same to provide 6V 2W of DC power for the Arduino. Include diodes if you want to.

Solder carefully the terminals to the wires.

Using solar panel tabs is highly recommended, I am using a 18AWG electrical wire because it is readily available for me. solar panel tabs are not that expensive anyways on ebay.

Step 3: Calculating Volume Flow Rate

You do not know how much water flows through the pipe at a given time. What I find at fault at some irrigation system is that over/under-watering occurs without calculating the volume flow rate of the piping system.

I want to use a gallon of water to water all my plants per day. By using a 1/2-gallon water container, insert the pipe with the pump attached and submerged in a tank of water. turn on the pump and start the stopwatch. Stop the stopwatch when the water level reaches 1/2 gallon in the container. Use the time taken for the "switching on" time in the Arduino code.

Step 4: Wiring the Components

(See pictures for details)

Step 5: Coding

Refer to my RTC DS3231 Instructables to see how the timer function works. (Essential, and its really simple!).

Just make sure that the sun intensity is high enough to power your pump, in this case I turn my pump on at 12pm. If you live in an area with a lot of shade, a simple solution is to attach a reflector that is perpendicular to the solar panel.

First you need to "burn" the time. (Refer to my RTC DS3231 Instructables!)

Next, study and upload the code below:

#include <Wire.h>
#include <DS3231.h>
// Init the DS3231 using the hardware interface
DS3231 rtc(SDA, SCL);
// Init a Time-data structure
Time t; int relay = 8; void setup()
pinMode(relay, OUTPUT);
digitalWrite(relay, HIGH);
} void loop(){
t = rtc.getTime(); // Get data from the DS3231 if (t.hour == 12 && t.min == 00) //Setting alarm/timer at every 12pm, {
digitalWrite(relay, LOW);
delay(60000); //default water time set at 60 seconds, change accordingly,
digitalWrite(relay, HIGH);
} else {
digitalWrite(relay, HIGH);
} }

Step 6: Assembly

Cut a small hole in the cylindrical container and channel the pump-relay wires out.

Submerge the pump into the box filled with water, place the solar panel under the sun and test it out!

Step 7: Conclusion and Recommendations


Remember to position the solar panels directly to the late morning/ noon sun. This ensures that the solar panels can power at its highest potential.

Mistakes/ Recommendations

I did a solar tracker to track the sun once the voltage reaches its peak in the late morning. Unfortunately, the servos weren't able to support since the solar panels were too heavy. The panels were a bad 1-2 lbs. The servos I used were Micro SG90.


I would recommend using a bigger servo or adding more servos, if the panels are heavy. Otherwise, use a reflector so to "double" the power of the solar panels during shady days. If the sun position does not change drastically throughout the season, the static position of the solar panels would not matter much.

Use this website to see how the sun position changes in your area.

About This Instructable




Bio: In San Francisco Bay Area. Enjoying good food and making stuff out of the little things I find is what I like to do.
More by paddyding:Better Microwave Popcorn Budget off-grid automatic watering with solar panels Automatic Coin Sorter 
Add instructable to: