Introduction to ControlLogix Sump Pump Controller
In this case, I’ve built a discrete ControlLogix Sump Pump Controller. In other words, there is no level sensor. Simply put, there is a float switch which controls the sump pump. If you have the ability to detect a sump level, then this post might be more useful.
Basically, there is a problem with this type of control. If water enters the sump quickly, the pump will continuously cycle on and off. This adds more wear to the pump. Additionally, we might want the pump to run for a certain time after the switch is reset to ensure the sump is empty.
I wrote this logic with these things in mind. I wanted a delay between cycles. A big challenge, however, is that we don’t know how fast the water will rise, because there is no level sensor. Instead, I am assuming that after a big rain, the water will come in slowly at first. After the pump runs, I’m measuring the time it takes for the float switch to make again. We use that value to set the delay for the pump.
This logic seems to work very well in my case, but use at your own risk, and only with a backup pump. Take all necessary precautions in the event of any type of failure. Your values for the timer presets will surely be different.
Off Delay Logic
This logic is simple. When the switch makes, we generate a pump run request. When the switch breaks, we hold this request for a certain amount of time. In this case, that time is 250ms to ensure the we pump the sump as low as possible. We don’t want this number to be so large, though, that the pump keeps running with no water in the sump.
On Delay Logic
To keep the pump from over-cycling, I will add an ON-Delay (TON) timer to the logic. We don’t want this on-delay timer to wait so long that we have a flood condition. However, it does need to be long enough to minimize the pump cycles. Later in the logic, we’ll adjust this timer if water is coming in quickly.
As you can see, there are two outputs that we need to energize the pump. Since I have a backup pump, I don’t worry about a single relay failing open. I worry about a stuck relay condition. This condition will keep the pump running if a contact welds. The two outputs provided some redundancy to ensure the pump shuts off. Notice the preset starts out at 5 minutes, or 600000 milliseconds. If the pump times out and goes out of service, the pump will stop running.
Sump Pump Timeout
The pump’s motor will generate heat. After a total of 5 minutes of run time, we have a cool off period of 2 minutes. Also, if the switch is stuck, this will provide a small amount of “backflush” Hopefully, this would jog the pump enough to free a stuck switch. Again, we depend on the backup pump if our primary pump becomes incapacitated.
Modifying the Presets for the ControlLogix Sump Pump Controller
If the water starts to come into the sump faster, we need to lower the preset. Our Sump Pump Check timer will detect how soon our switch is made after the pump shuts off. If the pump shuts off, and the switch is made again sooner than the pump’s main on-delay preset, then we lower the preset of the main on-delay timer. First, we’ll load the main on-delay’s preset into the timer that checks how fast the water is rising. When the pump shuts off, we’ll see if the switch can remain off at least for the amount of time that we delayed turning the pump on.
If not, then we move the accumulated value of the check timer into the main on-delay timer. If the float switch makes immediately, though, we will move a minimum setpoint into the pump’s main on-delay timer.
Increasing the Preset
Finally, if the switch can remain off for a total of 5 minutes, then we will reset the preset of the main on-delay timer to 5 minutes.
Notifications to Alexa
I’ve added a couple rungs of logic that will also send notifications to Alexa through Node-Red. This rung sets a bit that Node-Red is monitoring. If SumpPumpNotify goes true, then node-red sends an announcement message to Alexa that the preset changed.
Likewise, if we load the minimum preset, we know the pump is running frequently. Alexa will notify me to keep an eye on the basement.
For other information, visit the ControlLogix Category Page!
— Ricky Bryce