I'm doing a big upgrade to my RODI setup. Im adding three additional solenoids. The main solenoid (RODIswitch) is existing and used as a on/off switch.
There is a leak sensor labeled "GarageLK" and will work as a master shut off. Each of my storage containers have a high and low optical sensor - SALT_H, SALT_L, ATO_H, ATO_L.
The goal is to have my RODI auto flush every hour while filling. Auto flush when the RODI system turns on and a flush when filling is complete.
Auto fill the fresh water top off container whenever its low with no input. I will like to use a virtual outlet to manually control the salt reservoir being filled. When I start the Salt being filled I wish for the system to go through the same flushing cycle as the fresh system - start, finish, and hourly. Ill only ever fill the salt or the fresh tanks. There is the chance both may trigger a low sensor around the same time but the salt VO will manually turned on when Im ready.
Here's my tentative code. I'm 100% making this is simple and foolproof as possible. The code does need to be robust even if that's at the cost of complexity or more VO to ensure it runs as designed.
This is the main solenoid It shall shut off IMMEDIATELY if "RO_Shutdown" turns On Otherwise it will be on as long as we are filling the Fresh or salt systems
This is the flush solenoid. It needs to be on whenever the 3 flush VOs are on "Initial_FlushVO", "Final_FlushVO", "Hourly_FlushVO". When the flush solenoid is on "Salt_Fill" and "Fresh_Fill" solenoids need to be off. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
This is the ato holding tank. The "Fresh_Fill" solenoid needs to be off when RO membrane is being flushed and on if we are filling the fresh ato tank. It shouldn't turn on if we are filling the Salt tank. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
This is the Salt holding tank. It can take 12+ hours to fill. The "Salt_Fill" solenoid needs to be off when RO membrane is being flushed and on if we are filling the Salt tank. It shouldn't turn on if we are filling the ATO tank. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
This VO is to look at a leak sensor "GarageLK" and IMMEDIATELY turn off all 4 solenoids in the Mixing station. I deferred the On state for 5 seconds to prevent any false alarms. It will turn off the entire mixing station for 10 days or until I manually reset.
This VO is to Flush the RO membrane by turning on for the FIRST ten min when the RODIswitch solenoid gets triggered on. I think I have an issue here where it will go into a 20 min on off cycle. I only want this to trigger once when the RO system turns on.
This VO is to Flush the RO membrane by turning on for the LAST ten min. I figured by triggering this flush when the High fill limits are reach is the best way to ensure we are at the end of the filling session. I only want this to trigger once when the RO system (salt tank or the fresh tank) is full and once complete the whole system should shut down and all solenoid are to close.
This VO is to Flush the RO membrane by turning on every hour for 1 min.
This VO is the trigger to kick off filling the ato Fresh tank. Its on when the low optical sensor is triggered and turns off 10 min and 5 sec after the high sensor is triggered. This is to allow the final 10 min flush to occur.
*I will manually turn on the VO when I’m ready to fill the Salt reservoir. It turns off 10 min and 5 sec after the high sensor is triggered. This is to allow the final 10 min flush to occur.
There is a leak sensor labeled "GarageLK" and will work as a master shut off. Each of my storage containers have a high and low optical sensor - SALT_H, SALT_L, ATO_H, ATO_L.
The goal is to have my RODI auto flush every hour while filling. Auto flush when the RODI system turns on and a flush when filling is complete.
Auto fill the fresh water top off container whenever its low with no input. I will like to use a virtual outlet to manually control the salt reservoir being filled. When I start the Salt being filled I wish for the system to go through the same flushing cycle as the fresh system - start, finish, and hourly. Ill only ever fill the salt or the fresh tanks. There is the chance both may trigger a low sensor around the same time but the salt VO will manually turned on when Im ready.
Here's my tentative code. I'm 100% making this is simple and foolproof as possible. The code does need to be robust even if that's at the cost of complexity or more VO to ensure it runs as designed.
This is the main solenoid It shall shut off IMMEDIATELY if "RO_Shutdown" turns On Otherwise it will be on as long as we are filling the Fresh or salt systems
Code:
"RODIswitch"
Fallback OFF
Set OFF
If Outlet FreshVO_Fill On Then On
If Outlet SALT_Fill On Then On
If Outlet RO_Shutdown On then OFF
This is the flush solenoid. It needs to be on whenever the 3 flush VOs are on "Initial_FlushVO", "Final_FlushVO", "Hourly_FlushVO". When the flush solenoid is on "Salt_Fill" and "Fresh_Fill" solenoids need to be off. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
Code:
"ROFlush"
Fallback OFF
If Outlet RO_Shutdown On then OFF
If Outlet Initial_FlushVO On then ON
If Outlet Initial_FlushVO OFF then OFF
If Outlet Final_FlushVO On then ON
If Outlet Final_FlushVO OFF then OFF
If Outlet Hourly_FlushVO On then ON
If Outlet Hourly_FlushVO OFF then OFF
This is the ato holding tank. The "Fresh_Fill" solenoid needs to be off when RO membrane is being flushed and on if we are filling the fresh ato tank. It shouldn't turn on if we are filling the Salt tank. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
Code:
"Fresh_Fill"
Fallback OFF
If Outlet RO_Shutdown On then OFF
If Outlet Initial_FlushVO On then OFF
If Outlet Final_FlushVO On then OFF
If Outlet Hourly_FlushVO On then OFF
If Outlet FreshVO_Fill On then On
This is the Salt holding tank. It can take 12+ hours to fill. The "Salt_Fill" solenoid needs to be off when RO membrane is being flushed and on if we are filling the Salt tank. It shouldn't turn on if we are filling the ATO tank. It shall shut off IMMEDIATELY if "RO_Shutdown" turns On
Code:
"Salt_Fill"
Fallback OFF
If Outlet RO_Shutdown On then OFF
If Outlet Initial_FlushVO On then OFF
If Outlet Final_FlushVO On then OFF
If Outlet Hourly_FlushVO On then OFF
This VO is to look at a leak sensor "GarageLK" and IMMEDIATELY turn off all 4 solenoids in the Mixing station. I deferred the On state for 5 seconds to prevent any false alarms. It will turn off the entire mixing station for 10 days or until I manually reset.
Code:
VO - "RO_Shutdown"
Fallback OFF
Set OFF
If GarageLK Closed then On
Defer 00:05 Then On
Min Time 14400:00 Then Off
This VO is to Flush the RO membrane by turning on for the FIRST ten min when the RODIswitch solenoid gets triggered on. I think I have an issue here where it will go into a 20 min on off cycle. I only want this to trigger once when the RO system turns on.
Code:
VO - "Initial_FlushVO"
Fallback OFF
Set OFF
If RODIswitch ON Then ON
Min Time 10:00 Then On
When ON > 10:01 Then OFF
This VO is to Flush the RO membrane by turning on for the LAST ten min. I figured by triggering this flush when the High fill limits are reach is the best way to ensure we are at the end of the filling session. I only want this to trigger once when the RO system (salt tank or the fresh tank) is full and once complete the whole system should shut down and all solenoid are to close.
Code:
VO - "Final_FlushVO"
Fallback OFF
Set OFF
If ATO_H Closed Then On
If SALT_H Closed Then On
Min Time 10:00 Then On
When ON > 10:01 Then OFF
This VO is to Flush the RO membrane by turning on every hour for 1 min.
Code:
VO - "Hourly_FlushVO"
Fallback OFF
Set OFF
If RODIswitch On then ON
Min Time 1:00 Then On
When ON > 1:01 Then OFF
Defer 59:00 Then ON
This VO is the trigger to kick off filling the ato Fresh tank. Its on when the low optical sensor is triggered and turns off 10 min and 5 sec after the high sensor is triggered. This is to allow the final 10 min flush to occur.
Code:
VO - "FreshVO_Fill"
Fallback OFF
Set OFF
If ATO_L Open Then ON
If ATO_H Closed Then OFF
Defer 10:05 Then OFF
*I will manually turn on the VO when I’m ready to fill the Salt reservoir. It turns off 10 min and 5 sec after the high sensor is triggered. This is to allow the final 10 min flush to occur.
Code:
VO - "SALT_Fill"
If SALT_H Closed Then OFF
Defer 10:05 Then OFF