OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Pump anti dry run method
Hello,
I’m assembling a simple irrigation system, composed only by a pump and a valve. I’m not really good on programming, and I could not find any related topics here.
A water pump should not run dry, as it may damage it. I was thinking about adding a flow meter after the valve, that would guarantee that water is flowing, before the pump is activated.
I actually already have a code for the flow meter, that measures the flow, and I think I can adapt it for this use.
The thing that I would like to know, is how to insert this code into the programming of the OSpi.
It should work something like, open valve>measure flow>activate pump. If water flow is interrupted during the process, than OSpi should stop.
Any thoughts on that?
Thanks!
You can probably insert code in the inner loop, and check the flow meter reading. If flow meter reading falls below limit, call the stop_all_stations function to deactivate all valves.
Thanks for the answer ray, but i’m indeed a noob, in these programming things.
Where do I find the inner loop program?
Dan is probably the best person to answer this question, but I can provide a starting point. If you look at OSPi.py, there is a function called:
timing_loop():
I believe that’s the main loop.
p.s. I get lots of requests from users about customizing the software. A lot of the customizations are actually very easy to implement if you have some programming skills. If you are not familiar with programming, I think this provides a good motivation to learn programming 🙂
OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Pump anti dry run method