Can any expert help with a timing challenge please?

I have a demand-activated pump unit that pumps water from a tank when a tap is turned on. The length of time the tap can be turned on for varies from a few seconds to 20 minutes or so. If the tap is not turned off after 20 mins, all the water in the tank can be used up, and the pump would then run dry causing internal damage. The tank refills slowly, and takes around 40 mins to fill up.

In the “initial state”, power is available to the pump unit. Once the pump senses demand (because the tap has been turned on) it applies power to the pump motor. At this point I need a timer to start, for 20 mins. After 20 mins, the pump motor must turn off, and must remain off for 40 mins so the tank can refill. After these 40 mins, the system must revert to its initial state.

If during the first 20 min period the tap is turned off and so the pump motor stops, then I need the system to return to the initial state.

I can’t access the sensors in the sealed pump unit, but can of course use the current drawn when the pump is on to cause a relay contact to switch. I also can’t easily sense the water level in the tank, hence why I need a timer-based solution.

I looked at the K8015’s “timer with early re-trigger prevention” mode, but this does not fully address the need.

Can any timer expert suggest how to address this challenge, please?

I think it’s a little bit more complicated…
What if you open the tap for 10 minutes, close it and after a minute reopen it for more than 10 minutes?
The timer would be reset but your tank would be half empty and when the tap is reopend the second time it wouldn’t be filled enough to provide water for another +10 minutes. When you use a simple second timer to block the pump for 40 minutes you lose 20 minutes of use because the tank was filled in 20 minutes but you have to wait for the 40 minute timer to have lapsed.

I guess you need a system that keeps track of the pumping and filling cycle with two timers, so you can estimate how much time the tap can be opened when the tank isn’t fully refilled after a previous opening.

Quite a challenge I must say. Another thing, does the tap have a fixed flow rate? If not you have to take into account that it can take longer then 20 minutes to empty the tank.

I see three options:

  • Take the trouble of fitting a level meter in the tank. (this is by far the best option, Velleman has a kit for this)
  • Program your own PIC using timers, but if your tap has a variable flow rate you there will be situations where the pump shuts off before the tank is empty (this could be acceptable)
  • Program your own PIC using two flowmeters, maximise the usage of the tanks volume. Make sure you reset the flowmeters with a timer because they are never accurate enough.

Hi Cantryn,

You are quite right that what I have outlined wouldn’t ensure the pump was fully protected. But given the way that the tap is used, it’s a good enough solution. I am trying to address the use case when the tap is left on accidentally.

I used to be a firmware engineer, but haven’t looked at a PIC for many years now. And while I could fit a level sensor, there are significant challenges connecting it to the pump, and I’d probably have to use a wireless connection. Hence we I am favouring the timer option. I’m looking for a simple solution.

David.