Automatic Water Change Solved?

josh26757

New member
I have been mentally thinking about this design until tonight I finally got the pump section running and just need to tie in the valve. Lets start with a picture.

SumpDesign.png


Design
So the design is centered around as little room for error as possible. With the design simply flooding the low point in the sump maintained consistent by the RO/DI Top Off, too much will simply change more water and destroy pumps in fresh saltwater container. Not enough and the water simply does not get changed.

The worst possible scenario is the electric goes out in the middle of a water change. This is why a normally closed solenoid is used. If the electric goes out the valve closes and stops the water from draining out of the sump. The program restarts a 24 hour timer thus extending the period between water changes, but removing the risk of opening the valve while the sump has not stabilized after a power outage.

Controller
The circuit board uses an arduino with two analog relays and two modified extension cords to turning the pumps/valve on and off. The circuit is set to follow the following commands every 24 hours: opens the valve, waits x amount of seconds, turns on the pumps, waits x amount of seconds, turns off the pump, waits x amount of seconds, then turns off the valve. If the electric goes out at any point the 24 hour counter starts over and the valves all close automatically due to being normally closed.

There is also a manual button that manually fires the water change function for adding additional water changes.

What is the benefit?
This will allow me to break up water changes to every day or even a couple times a day and increase/decrease based on water quality. This not only makes the tank more stable, it also reduces the maintenance to mixing fresh saltwater once per month depending on reservoir capacity.

Now increasing water changes simply means making more saltwater and changing a couple settings or hitting a manual button a couple times.

Code:
#include "Time.h"
#include "TimeAlarms.h"

#define SECONDS_IN_DAY 86400
#define VALVE 22
#define PUMP 26
#define BUTTON 40

void setup()
{
    pinMode(BUTTON, INPUT);
    pinMode(VALVE, OUTPUT);
    pinMode(PUMP, OUTPUT);
    
    digitalWrite(VALVE, LOW);
    digitalWrite(PUMP, LOW);
    
    //repeat cycle every 60 seconds * 60 minutes * 24 Hours = 24 Hours in seconds
    Alarm.timerRepeat( SECONDS_IN_DAY , WaterChange);
}

int state = 0; 

void  loop(){  
    
    //allow button to force waterchange 
    state = digitalRead(BUTTON);
    
    if( state == HIGH)
    {
      WaterChange();
    }
    
    Alarm.delay(100);
}

void WaterChange(){
         //open valve
         digitalWrite(VALVE, HIGH);
         
         //wait 15 seconds
          Alarm.delay(15000);
          
         //turn on pump
         digitalWrite(PUMP, HIGH);
         
         //allow pump to remain on for 30 seconds
         Alarm.delay(30000);
         
         //turn off pump
         digitalWrite(PUMP, LOW);
        
         //wait 60 seconds to drain
         Alarm.delay(60000);
         
         //close valve
         digitalWrite(VALVE,LOW);
}
 
The only main downfall of these water change systems is if the drain valve gets clogged and stays partly open during a power out or pump maintenance when the sump is filled higher than the drain. Or if the drain line itself becomes clogged you risk flooding the sump.

A couple suggestions.

First install the drain valve with unions and in a place that makes maintenance easy as it should be removed and cleaned periodically just to be safe. Also routing your plumping on the drain line such that you can snake it out if needed should something like a snail or wad of algae gets wedged into it somewhere. The stainless valve will also need serviced periodically to inspect any metal exposed to salt water and replace any components that start to rust as they will rust over time exposed to saltwater. (an all plastic chemical rated valve that has no metal exposed to the water would be prefferable but more expensive for sure)

The other thing I'd consider adding is an emergency high float sensor on the sump just in case things clog to prevent flooding by shutting off the new saltwater pump at a level that would still allow your sump to handle the drain back from your display should you have a power out at the same time the drain line gets clogged. Easy enough to implement with your setup.

One last nice safety would be a low water float in your new saltwater container to prevent system from running dry should you forget to refill it at some point. Life happens and at some point you will.
 
The only main downfall of these water change systems is if the drain valve gets clogged and stays partly open during a power out or pump maintenance when the sump is filled higher than the drain. Or if the drain line itself becomes clogged you risk flooding the sump.

A couple suggestions.

First install the drain valve with unions and in a place that makes maintenance easy as it should be removed and cleaned periodically just to be safe. Also routing your plumping on the drain line such that you can snake it out if needed should something like a snail or wad of algae gets wedged into it somewhere. The stainless valve will also need serviced periodically to inspect any metal exposed to salt water and replace any components that start to rust as they will rust over time exposed to saltwater. (an all plastic chemical rated valve that has no metal exposed to the water would be prefferable but more expensive for sure)

The other thing I'd consider adding is an emergency high float sensor on the sump just in case things clog to prevent flooding by shutting off the new saltwater pump at a level that would still allow your sump to handle the drain back from your display should you have a power out at the same time the drain line gets clogged. Easy enough to implement with your setup.

One last nice safety would be a low water float in your new saltwater container to prevent system from running dry should you forget to refill it at some point. Life happens and at some point you will.

Some great points that definitely need consideration. I put a sponge filter on the bulkhead for the drain to avoid large particles getting into the valve. I may also consider adding a water flow sensor to the setup to test while the valve is suppose to be closed. The overflow problem is not critical as the tank is in a utility room beside a floor drain, but I could also drill a 1" safety drain at the top of the tank to ensure any overflow would be drained out.

Adding a low level sensor would also make the most since even just to alarm and remind me that the container needs refilled.

Thanks for taking your time and responding to my post. :)
 
I'd go for a more open strainer than a sponge filter, those things clog up with detritus really fast, sometimes within weeks. Go for a more open strainer type drain filter, either off the shelf or make one by drilling lots of holes or cutting slots in some pvc. I like the latter DIY'ed version a little better since you can use a larger piece of pipe to make the strainer, less water pressure trying to force stuff thru it and can add a normally above water opening to serve as a short term emergency drain.

The high water float to me seems a better option than the emergency drain as that could just keep running with you never noticing. A float sensor could easily alert you (via your arduino sketch and an LED or buzzer or whatever) that something is not right with the system.

The only other flaw I could see posing a problem now that I think about it and past systems I've read about is that if your ATO sticks open for any reason and keeps topping off, all that water goes down the drain and dilutes your salt water which could lead to a big problem if not caught soon enough. Granted corals can tolerate slow shifts in salinity down to very low levels but long term could cause big problems (particularly when you find the problem and go to raise the salinity back up, it takes much longer for things to acclimate to increasing salinity, speaking from experience here)

What's your ATO setup like, if a limited volume then not as much to worry about, mine however runs direct off the RO/DI and refills itself so would be very bad if it kept on filling (in my case no open drain and a mechanical float on the ATO line to prevent over filling, which wont work in your case.) My auto water change uses a different system and two peristaltic pumps to do the work which is way off topic of your setup.
 
Flow sensor is a pretty good idea on the ATO lines also to monitor for any flow when it should not be running. (the beauty of arduino based controls, ultimate flexibility and minimal cost!)
 
I will chime in here just to let you know make sure I get a good silinoid I had a project similar and my silinoid was over heating and could not maintain all the open and close so buy a good one but other then that cool idea
 
Back
Top