Need Solenoid / Pumping advice


I am working on an automated gardening project using the arduino, and I have a few questions about valves and pumps. I have a water basin that I will need to drain periodically via the arduino, and I am trying to land on the best pump and valve combo to do that. I have heard people suggest solenoids for tasks like this but I am not sure if it is appropriate. The water basin will have liquid added to it for a minute about every 10 minutes. Currently I am using a 400 GPH pump, so I will need to drain around 6 and 2/3 gallons every ten minutes. I would like to drain the basin as quickly as possible. I'm thinking the solenoid is not needed because I don't want to store any water in the basin, just drain it as quickly as possible. Also, I think that using a gravity feed to drain the basin will not work as the liquid needs to return to another basin at a higher elevation. The best idea I can think of would be some sort of water level sensor, that when turned on signals a small pump to remove the water. I think this would have the added benefit of protecting the pump from running dry, which might be a concern when trying to drain a tank? I'm looking for advice on the feasibility of my method, or whether I should look in a different direction. Also, I would like some advice on what kind of pump would be ideal for my application?


I agree that you probably don't need a solenoid valve.
A pump can be found at a garden shop.
Those pumps block the water if they are not switched on I think. Or perhaps you have to buy one that will do that.
You could control the pump with a solid state relay (search for SSR-25DA) or a normal relay.

I don't know how to detect if the pump is running dry. With a mass flow meter ? there must be better ways.

so I will need to drain around 6 and 2/3 gallons every ten minutes.
The best idea I can think of would be some sort of water level sensor,

You'll want a 40-50 GPH pump to get the water out; 40 GPH will just cut it for your specs ((40 gph / 60 min) x 10 min = 6.667), so you might want to go on the higher end of the scale; this will all of course depend on how high you need to lift the water, which you didn't note. Pumps are rated not just in how many gallons per hour they can deliver, but also how that varies with height. For instance (and this took a bit to find, for some reason!) - here is a pump (PES-80-PW) from the manufacturer of the original Little Giant pumps (LG Outdoor is a subsidiary or brand of Franklin Electric, who makes all kinds of industrial/commercial/residential water handling products -

Note that they show the product specification (just like electronics); it says that this pump can deliver 80 gallons per hour, but only at a head height of 1 foot; at three feet, that is de-rated to 15 gallons per hour. Note the link that reads "curve":

This graph shows all of the pumps in the PES series from Little Giant and how they rate on lift vs gallons-per-hour. You will want to select a pump based on that kind of information; personally, I would stick with Little Giant products, as they are known for their quality - plus they have obvious specs available (a good manufacturer will publish or make available this kind of information - so don't go cheapo with a poorly made knock-off).

Only you know your lift needs - so I can't help you further with a recommendation on the pump, but I am sure Little Giant has something you can use, and it probably won't be that expensive if your lift needs aren't great.

As far as the sensor is concerned, I think that a water level sensor would be best - a simple sensor could be made or purchased that has a float valve mounted to the shaft of a potentiometer (in fact, really similar to the sensor on a automobile fuel pump sender unit); think of something like a float mounted to a rigid arm (you've probably seen automatic valves like this used for swamp coolers) which then is mounted to rotate a potentiometer. You could probably easily homebrew something like this (all it would take would be a piece of stainless steel wire, some kind of float on the end, and mounting it to the shaft of a potentiometer - just keep the body of the pot away from the water as much as possible); it might also be possible to purchase such a thing. Then monitor the value of the pot using an analog input on the Arduino as normal to sense water level changes.

If you need more accuracy - here's an article on how to build a capacitive sensor (this article shows how to do it with a BASIC Stamp - but it should be easy to convert that to an Arduino):

Once you have your measuring solution selected and/or built - you just need to control the pump (turn it on and off); if you think you have the skills to do so, building the controller as suggested using a solid-state or regular relay is certainly possible; alternatively, you can pick up and use a device called a "PowerTail" or any number of various solid-state relay or standard relay controllers; just make sure the specs of the controller will work for your pump (for most all of the small garden pumps, it should be OK). Also, make sure whatever solution you decide to use, to mount it in some kind of weatherproof box to keep rain and water out of it.

Most diaphragm pumps can safely run dry.

Will your pump be below or above the water level in the basin you are emptying? If it's above the level it will need to be a self-priming pump.

If the pump is below the water level in the basin a small impeller type bilge pump for a boat might work well - though they are not designed for pumping to a high head. They can also run dry.

Is there a risk of junk in the water (such as leaves) which might jam some pumps, or their valves. If you need to deal with junk in the water you might get some ideas by Googling Whale Gulper pumps - though I'm not assuming they are what you need.


This may be a silly suggestion, but could you position the basin over a second/larger basin, and just punch small holes in your basin until it drains at the desired rate?

I'm doing a similar project, so I can tell you what's working (and not) for me. I'm using a completely 12v DC system (solar powered with a deep cycle battery) to power a hoophouse. This part is running a water pump to move water from an outside reservoir to a higher 5-gallon tank that provides a little pressure for a drip-irrigation system.

I'm using a Little Giant PP-12s pump for this, 300gph, garden hose fittings, impeller, draws 7 amps. I'm running the pump with one of the common Sainsmart 4-port relays - 5v signal voltage from the Arduino, switching up to 10amps. This part works fine.

On the upper tank, I have a float-based water level sensor in the lid. If the water level drops below the bottom of the float, the sensor closes its contact, and every minute the Arduino is watching for the increased voltage. If the voltage is high, it runs the pump for ten seconds, does other work if needed, then delays for a minute or so and repeats. This part mostly works. I'm pretty confident I can get this whole thing working.

For the outer tank, I'm currently assuming it has enough water. However, I'll soon be adding another water level sensor. This one will also use a float, but will be horizontally mounted. If the water level is high enough, the float will be straight. If the water level is below the float base, the float will drop. That's close to what you're talking about with your basins.

Some problems I've run into will help you. First, the impeller pumps can't be run dry. I damaged one of the arms of our impeller when it ran with the reservoir dry. And that pump moves more water than you need. I'd recommend a diaphragm pump for you.

Second, I'm using an analog in to detect the signal from my water level sensors, and running into constant problems with floating voltages when the sensor is off. I'm still doing testing to see if I should switch to a digital in or use the pullup resistor or add a pull-down resistor to help with this.

One other thought is that Adafruit has a pretty cheap flow sensor that you might be interested in. Also, the float sensors can usually be reversed. So I have the one in my upper tank pointing down, to detect a rising water level. You can also put them under the tank/basin, pointing up, to detect the water level. Without knowing what your basins look like, it's hard to know if that would help.

A toilet cistern float valve, turned upside down and adapted to operate a microswitch when the water level drops below a certain level. They have a screw to adjust when that happens. If your pump doesn't draw too much current, you could used the microswitch to disconnect it without using an arduino pin.