PDA

View Full Version : Automated Fresh/SALT and water changes


insomniac2k2
05/09/2011, 02:12 PM
OK, i swear this is my last one for a few weeks. I havent even received my aqualifters for my FW and SW water change setup, but i just couldnt leave this one alone!

I got to thinking. If i already have Salt and Fresh water resevoirs, why would i not want to control my salinity!? My final probe is now to be ordered (yuck. this is the expensive one).

Description:

@ 15:15 to 15:45 daily, I kick off a water change cycle via aqualifter pump. 1.75g estimated.
@ 15:46 to 16:56 An auto topoff allow [ATO_ALLOW] window opens up. It checks [ATO_DECIDE] which checks conductivity at the time. [ATO_DECIDE] sets itself either on or off, based on high or low reading.It also sets itself on or off based on whatever extra criteria you choose after that. Mine is pretty basic at the moment.

Fresh salt water IN [FSW_IN] is turned ON if [ATO_ALLOW] is OFF. Otherwise off

Fresh Water IN [FW] is turned ON if [ATO_ALLOW] is ON. Otherwise off

Both fresh and salt water IN pumps are set to only use the time window (mine is based off my evaporation rate + water change replenish),and use 2 sensors in the sump, in case of failure. The water change will not initiate if either switch 3 or 4 is triggered. Those are low indicators in the resevoirs.

In theory, after your initial equalization of saltwater levels, salinity can never really go too far off the reservation. Even if you are getting bad conductivity reading for a while, you would be able to catch it in time if you are doing ANY form of aquarium maintenance.

You should be able to use this to even out any low or high readings as well, without manual intervention. DISCLAIMER: I do not have a conductivity probe yet. I will need to learn what the correct reading is when i get it. Im sure that someone in here that does have that probe should know though.

I have 2 switches left now. what do do.......:beer:


[ATO_ALLOW]
Set OFF
If Time 15:46 to 16:56 Then ON {extra time in ATO_ALLOW window to compensate for evaporation rate and FSW_OUT}
If Outlet ATO_Decide = OFF Then ON
If Outlet ATO_Decide = ON Then OFF
If Outlet RTN-SKIMMER = OFF Then OFF


[ATO_DECIDE]
If cond < 40 then on {saltwater reading low}
If Cond = 40 then on {default to Fresh water if neutral reading}
if cond > 40 then off {saltwater reading high}


[FW]
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Outlet ATO_ALLOW = OFF Then ON
If Outlet ATO_ALLOW = ON Then OFF
If Outlet RTN-SKIMMER = OFF Then OFF
If Outlet FSW_IN = ON Then OFF
If Switch1 OPEN Then OFF {switch1 is first sump switch}
If Switch2 OPEN Then OFF {switch2 is first sump switch}
If Switch3 CLOSED Then OFF {switch3 is Fresh Water resevoir empty indicator}


[FSW_IN]
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Outlet ATO_ALLOW = OFF Then ON
If Outlet ATO_ALLOW = ON Then OFF
If Outlet RTN-SKIMMER = OFF Then OFF
If Outlet FW = ON Then OFF
If Switch1 OPEN Then OFF {switch1 is first sump switch}
If Switch2 OPEN Then OFF {switch2 is first sump switch}
If Switch4 CLOSED Then OFF {switch4 is Fresh salt water resevoir empty indicator}

[FSW_OUT]
Fallback OFF
Set OFF
If Time 15:15 to 15:45 Then ON
If Outlet RTN-SKIMMER = OFF Then OFF
If Switch3 CLOSED Then OFF
If Switch4 CLOSED Then OFF


What do you think? Todd, did I miss anything? :spin2:

I will have to work on some numbers to estimate what would happen if i pulled 1.75 gallons of saltwater out and replenished it with up to 2.5 gallons of fresh. I imagine that i will need to space the conductivity reading out a bit to compensate. A slightly hot salt mix would do for some next day compensation as well, but not sure if that would be necessary.

swearint
05/09/2011, 03:24 PM
I don't use a conductivity probe, but from what I have read they are not accurate enough to control ATO/SW. It is primarily intended to provide trend info and perhaps an emergency alarm when things get really out of range.

Sorry, I really can't follow your code. There are redundancies, and circular conditions. You have multiple conditions initiating an outlet. For example, [FW] has Switch1 and [ATO_ALLOW] attempting to turn it ON. In general, you want to define the most common behavior first and then add 'overrides'. Remember that later code has higher priority.

You also have a logic error in [FW] and [FSW_IN]. Switch1 is attempting to turn both ON, but if [FSW_IN] is ON, [FW] should be OFF?

Both [FW] and [FSW_IN] appear to have the same control conditions, so I don't see how you keep them from running at the same time. And yet if either is ON the other should be OFF.

In short, this won't work. Start simple and get the basic functionality working first. It also helps to write out the steps in plain English first, without trying to use any real code.

Todd

insomniac2k2
05/09/2011, 03:51 PM
Whoops. I copy pasted the lines, but forgot to reverse them. This should look much better:

[ATO_ALLOW]
Set OFF
If Time 15:46 to 16:56 Then ON {extra time in ATO_ALLOW window to compensate for evaporation rate and FSW_OUT}
If Outlet ATO_Decide = OFF Then ON
If Outlet ATO_Decide = ON Then OFF


[ATO_DECIDE]
If cond < 40 then on {saltwater reading low}
If Cond = 40 then on {default to Fresh water if neutral reading}
if cond > 40 then off {saltwater reading high}


[FW]
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Outlet ATO_ALLOW = ON Then ON
If Outlet RTN-SKIMMER = OFF Then OFF
If Outlet FSW_IN = ON Then OFF
If Switch1 OPEN Then OFF {switch1 is first sump switch}
If Switch2 OPEN Then OFF {switch2 is second sump switch}
If Switch3 CLOSED Then OFF {switch3 is Fresh Water resevoir empty indicator}
If Outlet ATO_ALLOW = OFF Then OFF


[FSW_IN]
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Outlet ATO_ALLOW = OFF Then ON
If Outlet RTN-SKIMMER = OFF Then OFF
If Outlet FW = ON Then OFF
If Switch1 OPEN Then OFF {switch1 is first sump switch}
If Switch2 OPEN Then OFF {switch2 is second sump switch}
If Switch4 CLOSED Then OFF {switch4 is Fresh salt water resevoir empty indicator}
If Outlet ATO_ALLOW = ON Then OFF

[FSW_OUT]
Fallback OFF
Set OFF
If Time 15:15 to 15:45 Then ON
If Outlet RTN-SKIMMER = OFF Then OFF
If Switch3 CLOSED Then OFF
If Switch4 CLOSED Then OFF

kenargo
05/10/2011, 03:42 PM
IMO; I am very concerned at the use of floats to manage a water exchange; I use and have had the best luck with dosing pumps but if you want to go this route I would suggest some minor changes.

1) Turn off ALL pumps in the area of the floats; you want very calm water so that the floats don't bobble
2) Cond is a measure to protect; using it to control absolute is problemmatic since salinity is affected by temerature so you can get into troble relying on cond too much
3) You need to start with a known reference; that is to say you must have things in such a state that the operation is repeatable. To reach this point you must have the 1st part of the operation to be replace evaporated water; this sets the start
3a) Now empty to a low float
3b) Last add new salt back to the level of step 3

Cond should be used to override the operation; that is to say if the tank isn't in expected range then don't perform the exchange. Trust me, you really want you to be involved at this point. Cond could be high/low because of temp, air bubbles on the probe, etc so best to use it as an override than a control (IMO).

Hope this helps!

insomniac2k2
05/10/2011, 04:18 PM
IMO; I am very concerned at the use of floats to manage a water exchange; I use and have had the best luck with dosing pumps but if you want to go this route I would suggest some minor changes.

1) Turn off ALL pumps in the area of the floats; you want very calm water so that the floats don't bobble - Makes sense. If i give this a try, i will definitely do this.2) Cond is a measure to protect; using it to control absolute is problemmatic since salinity is affected by temerature so you can get into trouble relying on cond too much - I suppose i could do some checks on temp as well. This would prove problematic (as stated)3) You need to start with a known reference; that is to say you must have things in such a state that the operation is repeatable. To reach this point you must have the 1st part of the operation to be replace evaporated water; this sets the start - I had my original code written this way with just water changes. I actually changed it this way, so that after a the water removal, it would check conductivity levels and then choose to refill with salt or fresh, depending on if cond was low or high. Essentially forming a minor correction to be later read. I definitely have not done the math on how much of a correction that would make. I mainly did it this way as food for thought. If i could not get good stable corrections, i would definitely roll back.
3a) Now empty to a low float - I was a little concerned about emptying to a low float. I guess that if my tank is always topped to the same exact level, that would make perfect sense though. I was trying to compensate for unknown levels and drain rates. I guess ill just empty for say 45m or till float say's its empty, etc
3b) Last add new salt back to the level of step 3

Cond should be used to override the operation; that is to say if the tank isn't in expected range then don't perform the exchange. Trust me, you really want you to be involved at this point. Cond could be high/low because of temp, air bubbles on the probe, etc so best to use it as an override than a control (IMO). Definitely the safe bet. No argument there! Im just trying to figure out how to thread the needle a little bit on this one

Hope this helps!

comments in red. thanks a lot for your feedback!

Everything else aside, im getting the impression that cond is definitely too unreliable. That sucks, considering the price of the module/probe. IF i could get better temperature/variable adjusted results, I definitely believe that i could make this happen.

I dont mind checking salinity every few days. I just didnt want to have to manually adjust the levels. Even know it seems like a risk, I may just give it a try (with suggested adjustments, etc) and watch my levels daily. More for the sake of doing it, than needing it.