Hi. First project using Raspberry Pi.
So I wish to allow a water container to reach almost empty, before being refilled to top (I don’t want to maintain the tank at the high level).
I have the water supplied via a solenoid valve which is controlled via a float switch in the solenoid 12v circuit so when the water rises to almost full it cuts off the supply (This is the switch A). I can easily connect a relay to the solenoid 12v supply also.
I have set up a float switch to the pi as a generic digital input that provides a high/low value which is correctly recording on the Cayenne interface - which can therefore be used to detect the water level having fallen to “almost empty” (I’ll call this the switch B).
I can see how a Trigger can be used to open the relay based on B being low - but assume that as soon as B is high the relay would shut off - meaning the tank would start full, fall to near empty and then be maintained at “near empty”.
I would like to trigger the relay IF B reads low (which will always mean both A and B are low) and the valve to remain open until both A and B are high.
Can someone explain how I can make this happen please?
Many thanks in advance.
CH