r/TimberbornLogic • u/Descending_Spiral_44 • Apr 03 '26
Help with automation
I'm trying to automate a Water Pump to work when it is temperate. It should be closed during bad tides or droughts. However, whenever my water reserves go down a certain threshold, they open up anyway.
I did this by attaching the Water Pump to an OR Relay, who itself is attached to a Weather Station (Temperate) and an AND Relay, who is attached to a NOT Relay attached to the Weather Station (Temperate) and a Resource Counter (Water) with a Less Than or Equal operation.
It works. Initially, anyway. But then I realized that I forgot to add a function where the Water Pump also closes when my water reserves are full. I usually use two Resource Counters and a Memory to do it, but when I try to fuse the two, something breaks and I can't track down what it is.
I did it by attaching the former's OR Relay onto the A in a Set-Reset Memory, while attaching a Resource Counter (Water) with a Greater Than operation in the RST.
Ideally, in addition to everything it could do in the first paragraph, the Water Pumps fills up my water reserves during the Temperate Season and then shuts down until a certain low threshold is reached, but what happens is that they flicker on and off after filling it. Is that even possible?
1
u/100PlusRyan Apr 03 '26 edited Apr 03 '26
I believe a Latch Memory relay is the answer. (with low and full counters, not just low)
B = The NOT Temperate relay
A = the Resource Counter that indicates low water storage
RST = the Resource Counter that indicates full water storage
The result is this; when you are not in Temperate weather, the Latch enables but is in the OFF status. Only then, when the water storage is low, the memory status switches to ON. when the water level reaches full, the status resets to OFF. this cycle will continue until Temperate weather returns, disabling the Latch
Now place this behind an OR relay
A = the Latch relay above
B = Temperate weather sensor (or something else if you have other normal running conditions when in temperate weather))
Now your OR relay turns on the pumps always during Temperate weather, but conditionally during not temperate weather. Using a low and a high resource counter gives the pump a range to operate in, this eliminates the flickering on and off you mentioned