Mains and tank water selector

Hi Everyone

I currently have a 7 zone system with a master valve at the offtake from my mains connection.

I have some rainwater tanks which i’d like to use preferentially when i have water in them.
What i am proposing to do is install an ultrasonic level gauge, and with an Arduino controller switch a low voltage (24v) relay. The Rachio Master valve signal wire would be wired to the common connection on relay. Then i would attached the Master Valve wire to the NC and then add a Pump Start relay connection to the NO.

With some logic on the Arduino, if i have sufficient tank water, the Rachio master valve signal would be sent to the pump start relay (via my Arduino low voltage relay) and then when i run out of tank water it switches over to activate my master valve and use mains.

Couple of questions i have

  1. Does anyone see any issues with the rachio feeding into a low voltage relay to switch between master valve and pump start relay signal?
  2. I am yet to buy a pump. I think i just get a pressure pump and wire in the pump start relay which would only provide power to the pump when the rachio activates it.

any help would be greatly appreciated.



The only pottential issue I see is a possible backflow from main through the pump into your tank (water pumps are not designed to prevent flow in the opposite direction), you may need to add one way valve to prevent that.
I’m less concerned with backflow through the main valve because, ideally, the pressure would go into your zones and the mains pressure would still be greater than the output of the main valve. Still, if you are adding one way valves, it may be a good idea to get one for the mains as well.
Also be careful not to overspeck the pump start relay (don’t use a contactor, nothing that has an inrush current of 12VA or more).
The flow rate from the pump may be considerably different than from the main, but it doesn’t sound like you were planning on additing a flow meter.
If I was in your shooes, I’d try to make due with cheaper float switch, like this (link), to disconnect the power from selection relay, but I’m not sure how well it would handle transition from full to empty (ideally you’d not be wattering when it’s raining and it’s transisitoning the other way). You’d need to make sure that the water is not splashing around in the tank as pump turns off, or add a hardware or software hysteresis to prevent rapid switches between two states.

Thanks for response Gene

Yeah, was planning on installing a check valve on discharge of the pump (and already have one at the mains connection as per local legislation).

I’ve done some testing at think my max irrigation usage is about 25lpm. The pump i have spec’d can do up to 50lpm

This is the pump start relay I am planning to go with. Whats the concern with over-speck?

no flow meter in the system.

Yeah, i have a few other forum posts out there on Arduino forums to get some thoughts on hysteresis etc to avoid any rapid switching. Will spend some time with the level in the tank before I attach the pump to see how it reads.

Be careful, usually legislation dictated devices are vacuum release systems. Even if they may be called backflow preventers, they are designed for the situations whereas vacuum develops in the line and to prevent the water being sucked back through the valve. Having greater pressure on the outlet of the mains would not trigger these safety systems.
Again, with pressure going into your irrigation lines, I don’t think this may be as much of an issue as backflow through the pump into your rain tanks.
Relay you found is good, though overpriced on their site, Here it is for less than half the price at home depot (link). Some people buy contactors which require more power than Rachio can supply, it’s common for them to run into problems and end up in the forums.

Thanks Gene

Im in Australia, and seems the Orbit gets marked up quite a bit for sale here.

Am i right in saying I need a Constant Pressure pump for my installation?

Pump (head) pressure is mostly the function of speed. As long as you have a (simple) single speed pump, you should be getting a constant pressure (with slight deviations based on water depth in the tank).

Sorry, failed to note .au url, disreguard home depot comment. Alternative to an orbit relay, would be any sort of 24vac relay from your pool supply store (or anywhere else you’d search for it). Which relay have you considered as your selection relay, perhaps you can simply get a second one?

Thanks Gene

This is the pump i am looking at getting.

As for the relay, I am happy with a simple arduino relay for my signal switching (low voltage), however happy to spend a bit extra on the pump relay given its working at 240v

Hey, I’ve been thinking about this exact same project for a while now. I already have a tank & pump that I use with my Rachio. That said, I do want to do the ultrasonic sensor thing and add an ESP8266 for tracking water levels and better control.

Originally I just used the master valve control on the Rachio to a pump relay to control the pump. I use a simple float switch installed in the tank to prevent the pump from running dry. When there is not enough water in the tank it cuts power to the power relay from the Rachio master valve.

This worked fine for a while but then it seems the water pressure from the city increased and now even though the pump runs, the tank does not drain- the pump can’t overcome the city water pressure.

So now I have a standard 24V valve as as a “master valve” from the city and the Rachio controls that. However for this to work, I now will need the ESP8266 to switch between the pump and city water since now there are two sources of water that need to be controlled.

Here are some things I’ve learned that may help you:

  1. Backflow preventer on the pump isn’t a bad idea.
  2. You may also really want to consider a 24V valve on the city water. The problem is even with a good 240V pump and a tank on top of the ground, the pump did not always generate enough pressure to overcome the city water pressure. The result is that the majority of water came from the city instead of the tank/pump. This is basically a “master valve” on the Rac
  3. Read the specs on the ultra-sonic sensor… some are and are not water proof. For my needs I’ll need a water proof one due to condensation that will occur in the tank.
  4. For a tank at least, apparently you don’t want the sensor to “see” the entire tank. Instead you’ll want a tube (think 2" PVC pipe) so it only sees a narrow section.
  5. Orbit and others make 240V compatible pump relays designed to operate on the 24VAC used by irrigation valves. That’s definitely the way to go IMHO. Then you only need to worry about switching the 24VAC control signal.

Anyways, dunno what you have planned. It shouldn’t be that hard really if you’re handy with electronics and Arduino or ESP8266/ESP32’s. I just have a lot of projects. :slight_smile:

1 Like

Frankly you can accomplish most of what you wish with two float switches & a single DPDT relay (not counting the pump start relay). These (amazon link) are the float switches I recommend, and here (link) is the relay.

One float switch (run float) should be installed at the minimum water level the pump would run at, below which the city water should be used.
The second switch (start float) should be installed where it would make sence to run the pump, such as the level at which at least 1 minute of run time can be achieved.

The wiriing would look something like this:
Float selector (1)
Note: Not showin on the schematic are commons from the Rachio are also connected to appropriate terminals on the City’s valve & pump’s relay.

From the left you have M signal & commons comming from Rachio.
On the right you have the start & run float switches connected to the relay’s coil.
The second switch of the relay would act as a selector, directing the power to the city’s master valve (in case start float is dry), or pump relay (in case start float was there & as long as run float is still active).

Note that start float is actually in line with the run float, I recommend wiring it this way to avoid a situation whereas run float is faulty & would not allow the relay to properly latch (thus causing endless toggling and potential demage).

Let me know if there are any questions.