Hi, I know there are already a few questions on this topic in these forums, but I'm still confused by this topic and the existing answers are, at times, a bit contradictory.
My overall goal is to control the flow rate of a water pump (for home scale drip irrigation) with an Arduino, and I'm not too bothered by the approach needed, providing it's fairly cheap and fairly simple. I'm after a submersible pump which can achieve about an 6-8m head at a slow, but variable rate (not more that 1-2 L/min at 4m is required).
Since a PWM signal is easy to achieve via standard Arduino pin-outs, I am assuming that's a good starting point.
I know there are some motors with PWM controllers built in (they have 3 input wires), but I also believe it's easy enough to do the actual PWM voltage generation external to the pump, and just pass the modulated voltage as the power input (but this seems to be disputed by some people).
Are these "PWM capable pumps" just smoothing the input to a lower voltage (i.e. they're really variable voltage pumps which can handle being given either modulated voltage or variable voltage) ? This would sort of make sense to me.
My most pressing question is how I should choose a pump without fear that it's going to fail to work with PWM (as in Controlling DC Water pump with PWM) ? Is there a standard feature which will tell me if it's supported (since even the "PWM capable" pumps in the page linked above don't all mention it in their details).
Any accurate advice is very much appreciated (please don't respond unless you're certain of your information).
Is "positive displacement" a term I would expect to see in data sheets? I need a way to look at a product data sheet and reliably figure out which can work with varying speed.
For drip irrigation, I would think that the flow rate is determined by the pressure. Typically irrigation systems have a pump, a pressure switch and an expansion tank. The switch turns on below a certain pressure and off above another pressure, allowing the pump to keep the pressure between those two points. The expansion tank gives a place to store water so the pump doesn't short-cycle.
So the key is to replace the pressure sensor. If you put a Hall effect flow sensor on the output you could measure the actual output. When the output drops below the desired output, close the relay and run the pump. When the output rises above the desired output, open the relay and shut off the pump, and let the expansion tank empty.
The ones with brushless motors certainly are not doing that. Such motors have internal electronics that control the shaft rotation rate by precise timing.
For a centrifugal pump like those on the Zhonke Century Technology site linked (and are claimed to be controllable with PWM), the flow rate and head would be a complicated function of shaft rotation rate. And you would probably have a difficult time deciphering the data sheets, even if they are in English.
The average flow rate of centrifugal pumps is almost always controlled by pressure switches and pressure tanks (as mentioned above) or by outlet diversion valves.
Rather than figuring all this out by yourself, take a look at what other people are successfully using for controlled drip irrigation.
I suspect you are conflating three different subjects for your project. A motor speed may be set by PWM. A pump may be turned by a motor that has speed set by PWM. But to control a pump with PWM is a non-sequetor. There is no control of the water volume of a centrifugal pump, which is the most common type you find. It is designed for one fixed speed. To control a pump volume requires a pump type that I have been describing.
Water pumps are typically run on AC power, often 220VAC because of the power needed. Speed control for AC motors is achieved through frequency variation. Output is usually controlled just by turning the pump on and off. Constant pressure can be achieved through the use of a valve that closes to increase the pressure when flow drops. For an example see the Cycle Stop Valve, Basic Operation of a Cycle Stop Valve – Cycle Stop Valves, Inc
Interesting. Thanks for explaining more.
It seems I am conflating pump shaft rotation speed and flow rate control a bit then.
However, since my idea was also to use soil moisture sensors for feedback, and have software that learns what speed to use for watering phases, perhaps knowing the precise flow rate isn't as important, and speed control might suffice.
Since this is a "balcony scale" project (up to a dozen large pots) and not irrigation of crops, I'm trying to avoid going all in on an "industrial solution". Using diversion valves or solenoids was in my mind though, so I can investigate that.
Do you have any links for what other people a doing here (I tend to only find either mains pressure systems or companies selling simplistic timer systems for pumps),
That's also a possibility. Controllable valves (rather than on/off solenoids) seem a bit expensive for my idea though.
I'm almost wondering now if having a simple pump to fill a raised header tank to provide constant pressure, and using solenoids to control where the water goes might work well.
With a sensor in the soil, there's going to be a delay between when you apply water and when the sensor reacts. If you just water until the sensor reacts you'll probably over-water.
Your control loop should look like this:
Read sensor
If the soil is dry:
** Turn on the pump
** Delay
** Turn off the pump
Delay
Repeat
Time1 and time2 you have to determine by trial and error, turning the pump on and off is just writing high and low to a digital pin which is connected to a relay.
That's where I started my thinking (and I actually have a setup something like that) but it has multiple drawbacks I want to fix.
Those pumps literally cannot pump high enough for a hanging basket. They typically claim 3m head, but once the drip pipes are on, the extra pressure requirement means you get basically nothing out at 2m above the water barrel.
If you use this sort of pump, you need one for each plant pot (or at least one for each pot of a different height). This is because with a multi-out system, almost all the water ends up at the one that's got the lowest output and even if some gets to the higher outputs, it's very unbalanced, so you either over-water the lower plants or under-water the higher ones. Right now my system massively over-waters some of the pots I have in order to get water to everything.
My idea was to:
Buy a single, higher pressure pump (e.g. 8m head).
Buy N solenoids I can wire up.
Buy N capacitive water sensors.
Rig it all to an Arduino so basically one set of pipes is active at a time, and I can control output by using sensor reading to ensure soil moisture is as desired.
Ultimately I'd like to make a DIY kit where people can start with 1 pump/Arduino/sensor and just add more "zones" as they need (+1 solenoid/sensor and some cheap piping), with the software knowing about each zone and learning how much time is needed for each based on its sensor(s). Then the incremental cost of adding a zone is tiny, rather than being a new pump, power supply etc. (e.g. with 10 zones you'd start to have a real issue with powering 5-10 pumps).
And if the solenoids are "normally closed" you're only powering one at a time, so you don't need to multiply power supplies everywhere.
I'd just use a little bit of machine learning to predict the moisture rates and learn how long to water for (as a software person, this is the easy bit for me). I'd also have a water level sensor in the barrel and could accurately estimate when it need filling, or limit watering everywhere to extend the watering time (e.g. if you go away).
Which is why I explicitly said "capacitive". Those suck far far less. Also, with machine learning you don't need fully calibrated sensors as the system will adjust for that (like it will adjust for soil drainage differences etc.). The machine learning part will allow for less precise pumps and sensors to still be effective.
So go through your zones one by one and go through the process in post #16 for each zone. Whenever you open a solenoid, also turn on the pump. This is maybe 50 lines of code.