I am in the process of setting up some automations in Home Assistant to have my irrigation line turned off if it detects a high flow rate via a flow meter with a hall sensor. I think I have the flow meter side handled but need some feedback on the valve side. I bought a Shelly 2.5 for it’s 2 relays, a 24 VDC power supply, and this 3 Wire AC/DC ball valve.
Here is the Shelly 2.5 DC wiring diagram: Shelly 2.5 DC
After finally getting all the parts and following the DC Wiring diagram for the Shelly it doesn’t seem like my original idea will work using just the Shelly 2.5 in shutter roller mode. Does anyone have any suggestion on making it work with the Shelly 2.5? Is there an alternative DC wiring where I can control the (+) through the valve’s (OPEN) & (CLOSE) wires since it only has one (-) wire? If not the Shelly 2.5 I am open to suggestions for controlling this ball valve with an ESP 8266/32 with a relay board and can use the Shelly 2.5 for a different light project.
Two relays and a esp8266 or esp32 would do this easily. You will probably want to use an interlock so you cannot turn both on at the same time. GPIO Switch — ESPHome
Yup. Interlock was the thing I was looking for with the Shelly roller mode. I have some ATOM Lites that just arrived. One is going to be used for the flowmeter over by the livestock and the other I’ll use for the valve. Off to order some dual relays.
Do be careful with the interlock - the warning is on the page I pointed to.
Warning
These are software interlocks. As such, a software bug (which can always happen) can still activate both switches at the same time. Similarly, at reset time (before any of ESPHome’s code runs) the relay GPIO pins may have pull-ups active, so the relay may be active before ESPHome can manually deactivate them.
So it is highly recommended to use hardware interlocks (like SPDT-type relays) that ensure that two GPIOs are never active at the same time.
Actually quite simple I think. What do you want to be the “fail” condition. IE if the relay for some reason fails. Presumable to close the valve? I’ll draw a circuit and post it later.
The condition would just be that when power is applied to one of the (+) wires of the valve, say OPEN Valve, then the other (+) CLOSE Valve, shouldn’t have power across it. I’ll be using a M5Stack ATOM Lite as the ESP32 device to trigger the relays.
When the relay is NOT activated, the 24v is connected to the close pin on the valve. When the relay IS activated, 24v is connected to the open pin on the valve.
EDIT: Drew a better pic with ground wires and the buck convertor.
(C) are the commons and the (T) are the GPIO triggers. GPIO X pins will trigger the power relay and GPIO Y will trigger the valve opening or closing. This way the valve doesn’t have constant power to it as it’s not necessary. The valve has auto stop once it’s fully open or closed but doesn’t need power to stay open or close, you can even open it 1/4 or 1/2 way if you time it right. It just stops moving once it loses power, which I may or may not use. Maybe when re-opening the valve to prevent water hammer.
So to close the valve I just turn on the power relay, GPIO X. To open the valve I’ll trigger the open valve relay GPIO Y, then trigger the power relay GPIO X, add a delay so it opens completely, then turn off both of the triggers.
Thank you so much again. I’ll post the pictures and YAML once the project is completed to help anyone else that can use this info.
I’m worried about the wear and tear on the valve electronics leaving 24V across it at all time. I don’t have enough experience yet. Relays are cheap but the valves are expensive. Who knows maybe I’ll keep it to one relay. Thank you though again for the help.