# Solar powered mini water pump: how to turn it on/off automatically

I have acquired a mini water pump (5V 1.0A) and several solar panels (each: 5V 200mA). What I try to achieve is to pump water from a container above a vertical hydroponic system and let it flow down back to the container while watering the plants inside. I want to pump the water only for ca. 3-5 minutes each hour during the day. Pumping non-stop during the whole day is not good for plants and unnecessarily wear out the pump. What is the simplest/cheapest way to interrupt the pump most of the time and power it only for 3-5 minutes during the daylight?

• I have several such panels, if one is not enough... May 24 '20 at 21:57
• correct, edited. May 24 '20 at 22:03
• Diy microcontroller timer or buy a pre made one. May 24 '20 at 22:16

You don’t really need multiple solar panels, I would add a small battery, Perhaps lead acid for durability, and a solar charge controller to keep it at the proper charge level. You should be able to get all of this off-the-shelf.

After that, just get an Arduino or a PI zero, and a relay shield or hat, the code to start once an hour run for a few minutes and then put the processor to sleep is relatively straight forward. And, although this is overkill and simpler circuitry could be designed to do this, it would require more experience that what you seem to have, it’s not necessary unless you are designing a sellable product, and it would save you a lot of aggravation later on. Particularly if you feel compelled to modify the behavior in the future.

What you would need if you want to put together a circuit from scratch:

• A solar charge controller. An IC such as this one, its purpose is to optimize power extraction from the solar panel.
• A battery or super capacitor. To store the necessary power to drive the pump and the rest of the circuitry.
• a small switching regulator for the circuitry power.
• A power switch, relay, or transistor to drive the pump. You might want to regulate the voltage to it unless you can directly power it from the battery. You can do this via simple pen and an LC filter, ourjust a simple switching regulator.
• A reasonably stable oscillator. A cheap circuit would just use an RC, a less cheap one a ceramic resonator, but a crystal oscillator takes all the guess work out of it.
• A set of counters and flip flops to put together a state machine with the desired duty cycle of 3mins per hour (a purely analog oscillator with such a duty cycle would be very hard to pull off). This is where I would use a timer counter IC, which are being discontinued.

Such a system would be very hard to modify once put together unless the changes are designed from the beginning.

Or for less hassle and money you can use a simple 8-pin microcontroller (e.g., a PIC or a tinyAVR) with its built-in RC oscillator and program it to generate the duty cycle, the pump PWM, and even a heartbeat LED so you know it’s working, and go to sleep to conserve power. The same thing you would do with an Arduino, harder to program, but with no unnecessary parts and perhaps more satisfying.

• I have already used Arduino for this type of things. So I actually wanted to know what are those more simple circuits in order to decide whether my experience is enough to build them or not. Thanks! May 24 '20 at 22:42
• @user1876484 in more than one occasion I have gone the route of designing that “simpler circuit” and regretted not having just used a microcontroller at the end. I’ll edit the question later to add some suggestions, but a microcontroller is nowadays the cheaper/simpler route (the type of timer IC I would have used for this (CD4541) I have recently found to be obsolete). May 24 '20 at 23:59
• @user1876484 I can envision a solution that uses two ICs (a PIC12HV615 8-pin microcontroller and the above solar charge controller) a couple of transistors and diodes, a couple inductors, a few passives, and a very large capacitor (to store power for the pump). A nifty little project that could teach you a lot, as the PIC would be doing both the high-voltage storage and voltage regulation for the pump. The most expensive part of this would be the PCB. May 26 '20 at 21:51
• An Asian sourced Arduino for a few \$ US is a very flexible and capable solution. You could perform your basic task with a package of hex Schmitt triggers acting as a delay and timer (which is the sort of solution I used to use long before Arduinos existed) - but if you want to change any parameters or add complexity the Arduino wins hands down on flexibility. Jun 1 '20 at 11:26
• @EdgarBrown: you've convinced me and I will go the Arduino NANO + relay route. Could you, please, explain or schematically show how do I connect all the 5 parts: Arduino NANO , relay, solar panel, solar charge controller and the battery? Are you aware of solar charge controller/battery with suitable parameters on Aliexpress? Jun 30 '20 at 7:16

Just usa an arduino with a relay. You just need a simple code like this-

void setup{ pinMode(13, INPUT); } void loop{ digitalWrite(13, HIGH); delay(180000); digitalWrite(13, LOW); delay(3420000); } 

If you're looking for "simpler" than an arduio, you could probably accomplish this with a 555 timer. The accuracy won't be good but I assume the plants won't care if their water comes 2 minutes late on warmer days or however the temperature would mess with it.

To implement with a 555, set it up in the astable pulse configuration with a large capacitor that charges and discharges with your 8% duty cycle and a period of 1 hr. Since you'll probably end up using an electrolytic capacitor which, by it's nature is a little bit leaky, you'll have to adjust the resistor values experimentally to get the timing you want. As you create your design I'd look up how much leakage you should expect and compensate your charge/discharge resistors accordingly. Ultimately you'll need a transistor/FET driver stage to drive your pump motor and don't forget the flyback diode! This should come out to about 4 resistors, a big capacitor, a small capacitor, the 555, transistor/FET and a diode or two depending on your 555 setup.

• Would you mind to add a picture of the circuit and approximate values for all the different parts? This will help me to understand whether I want to try to build it or better stay with Arduino. And yes, precision is not that important in this case. Thanks. May 25 '20 at 7:25
• A frequency of 277uHz is nearly impossible to achieve with such analog circuit. The behavior would be completely unpredictable and controlled by system noise. A problem when the we te is a pump attached. May 25 '20 at 7:34
• As a disclaimer I have never designed a 1hr period circuit with a 555 timer, but if the capacitor were low leakage, say a 1uF polystyrene cap, don't you think this could work? May 25 '20 at 14:14
• All that being said, if you have the Arduino working already, stick with that. It's cheap enough and will cause less frustration than trying to tune the 555 circuit. Also, it gives you the option to add features, for example you could add a photoresistor and resistor voltage divider to an Analog input pin to only pump during the daylight hours. May 25 '20 at 15:36