PDA

View Full Version : Programming My Top Off & Water Changes


cm11599ps
04/26/2011, 01:21 PM
I'm trying to program my auto water change system but I need to disable my ATO system to do so. Here's what I have for my ATO Pump.

Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF
If Time 14:59 to 15:11 Then OFF
If Time 15:12 to 14:58 Then ON


Here's what I have for my New saltwater pump

Fallback OFF
Set OFF
If Time 15:11 to 15:30 Then ON
If Time 15:31 to 15:10 Then OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF



This is what I have for my Drain pump.


Fallback OFF
Set OFF
If Time 15:00 to 15:10 Then ON
If Time 15:11 to 14:59 Then OFF



What I'm looking to do is have my ATO pump make sure the sump is always full. I then want to disable my ATO pump a minute before my drain pump starts so that way the new RO water has a chance to mix into the tank to make the salinity is even.

The drain pump should go for 10 minutes without having the ATO or new salt water pumps active. After 10 minutes the drain pump should stop and then the new saltwater pump should activate until switch 1 is open.

What am I missing here? I just tested it and the drain pump worked fine. After a minute or so of draining either my ATO pump or new SW pump began filling the sump. I'm not sure which one.

swearint
04/26/2011, 02:10 PM
I don't understand what you are trying to do with the Time commands in the ATO outlet. Remember, the Apex executes top to bottom, so later commands have priority. The very last statement will run to ATO for almost 24 hours. In the other outlets you don't need the Time ... OFF commands, as you already have a Set OFF or float condition.

Here is a thread that may be of help:

http://www.reefcentral.com/forums/showthread.php?t=2008586

Todd

cm11599ps
04/26/2011, 02:48 PM
Thanks. I have a separate drain pump in my sump. I want that pump to run for 10 minutes every day at a certain time. While that pump is draining my sump I want my ATO pump to shut off. ( I actually want the ATO pump to shut off a few minutes before hand so I know any freshly added RO water has a chance to mix up in the tank) If I don't shut my ATO pump off then I'm draining SW and adding FW. Not good, so that's why I need the ATO pump to be disabled while the drain pump AND new salt mix pump are running.

After 10 minutes the drain pump should shut off and then my new salt water pump should turn on and fill up my sump until switch 1 is open. My ATO should be turned off the entire time. Once switch 1 is open (I'm guessing an hour after beginning to drain [50 minutes after the new salt mix pump starts] to be safe), the ATO pump should turn back on.

Does that make sense?


So here's my ATO pump code again.

Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF
If Time 14:59 to 15:11 Then OFF
If Time 15:12 to 14:58 Then ON

So the above code would turn the ATO pump on for almost 24 hours and it would be inactive from 14:59-15:11? Is that correct?


Then what would be the correct code for the new salt mix pump? I currently have...
Fallback OFF
Set OFF
If Time 15:11 to 15:30 Then ON
If Time 15:31 to 15:10 Then OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF

What would happen with this code?


As for my OFF statements and using the times, does that act as another form of backup?

swearint
04/26/2011, 04:09 PM
I think this will do what you want a bit more simply:

[Drain_Pump]
Set OFF
If Time 15:00 to 15:09 Then ON

[NSW_Pump]
If Outlet Drain_Pump = ON Then ON
If Switch1 OPEN Then OFF
Defer 9:59 Then ON

[ATO]
Fallback OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF
If Outlet Drain_Pump = ON Then OFF
If Outlet NSW_Pump = ON Then OFF


[Drain_Pump] kicks off the cycle at 15:00 and runs for 10 minutes. It looks like 9 minutes, but the Time command works in increments of 1 minute, so the statement is not false until 15:10:00. [NSW_Pump] will attempt to turn ON when [Drain_Pump] starts but the Defer delays it by 9:59 minutes. I left one second of overlap to make sure it starts before [Drain_Pump] turns OFF.

[ATO] under normal circumstances turns ON/OFF as needed by the sump level. However, if either [Drain_Pump] or [NSW_Pump] are ON, then [ATO] is OFF. Once the sump refills, [NSW_Pump] turns OFF and everything returns to normal operation.

With this approach, you have a single trigger that activates everything else. And you don't have to carefully time the other steps. If you really need [ATO] to shut OFF ahead of [Drain_Pump], then a virtual outlet will be needed to act as the trigger.

Todd

cm11599ps
04/26/2011, 07:18 PM
Awesome! That makes much more sense to me then what I was trying to do.

My only concern for disabling the ATO a few minutes before the drain pump activated was to make sure all the fresh RO water got thoroughly mixed in the tank. I'm sure under most circumstances it will be fine. I do have the conductivity probe to let me know if things get out of whack though.

swearint
04/27/2011, 08:22 AM
Please test this thoroughly before relying on it. I noticed that I left out Fallback conditions for the two pumps.

Todd

cm11599ps
04/27/2011, 10:59 AM
Thanks. I did notice that and put them in last night. The big test cones today at 5!

cm11599ps
04/27/2011, 02:31 PM
T minus 29 minutes and counting......

cm11599ps
04/27/2011, 03:17 PM
Nope, didn't work as planned. The drain pump was fine and turned on and off at the correct times. When the drain pump stopped then the Top off pump came on. It appears that the new salt water pump never activated. Here's the outlet report for that timespan.


- <record>
<date>04/27/2011 17:00:00</date>
<name>DrainPump</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:00:00</date>
<name>SmpLeakSense</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:00:44</date>
<name>Powerhead1-2</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:04:07</date>
<name>Powerhead1-2</name>
<value>OFF</value>
</record>
- <record>
<date>04/27/2011 17:04:49</date>
<name>SumpLowFloat</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:05:00</date>
<name>SmpLeakSense</name>
<value>OFF</value>
</record>
- <record>
<date>04/27/2011 17:05:22</date>
<name>Powerhead1-2</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:08:45</date>
<name>Powerhead1-2</name>
<value>OFF</value>
</record>
- <record>
<date>04/27/2011 17:10:00</date>
<name>DrainPump</name>
<value>OFF</value>
</record>
- <record>
<date>04/27/2011 17:10:00</date>
<name>Powerhead1-2</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:10:00</date>
<name>TOPump</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:10:00</date>
<name>SmpLeakSense</name>
<value>ON</value>
</record>
- <record>
<date>04/27/2011 17:11:17</date>
<name>TOPump</name>
<value>OFF</value>

cm11599ps
04/27/2011, 03:18 PM
New salt water pump

Fallback OFF
Set OFF
If Outlet DrainPump = ON Then ON
If Switch1 OPEN Then OFF
Defer 009:59 Then ON



Top Off Pump
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF
If Outlet DrainPump = ON Then OFF
If Outlet NSWPump = ON Then OFF


Drain Pump
Fallback OFF
Set OFF
If Time 17:00 to 17:09 Then ON

cm11599ps
04/28/2011, 01:38 PM
OK, I changed things around a little bit and will test again in 24 minutes at 4PM est.


Drain Pump
Fallback OFF
Set OFF
If Time 14:00 to 14:09 Then ON


Top Off Pump
Fallback OFF
Set OFF
If Switch1 CLOSED Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF
If Outlet DrainPump = ON Then OFF
If Outlet NSWPump = ON Then OFF



New Salt Water Pump
Fallback OFF
Set OFF
If Time 14:10 to 14:25 Then ON
If Switch1 OPEN Then OFF
If Switch2 OPEN Then OFF

jlylec
04/28/2011, 01:38 PM
I can't help you with the programming as I just got an Apex and am trying to figure it out myself, but I have a question. I'm planning on this exact same logic to automate small daily water changes. Are you shutting off the return pump during this? I was thinking the following (in practice, not code yet!)

1. under normal operation ATO pump is turned on at 1:00 until float switch is tripped.
2. return pump turns off at 1:03
3. drain pump is turned on at 1:04 and runs until the low level float switch that would normally insure the ATO pump is not turned on is tripped.
4. FSW pump is turned on until a high level float switch, set at where the normal water level when the return pump is off, is tripped.
5. Return pump is turned back on and ATO pump is set back to normal operation.

So this would require me to have 3 float valves. One low one to turn off all pumps when tripped. One at the normal operating level for the ATO pump to work to. And one at the high level where the water sits when the return pump is off.

Does this sound like it would work?

cm11599ps
04/28/2011, 01:43 PM
I can't help you with the programming as I just got an Apex and am trying to figure it out myself, but I have a question. I'm planning on this exact same logic to automate small daily water changes. Are you shutting off the return pump during this? I was thinking the following (in practice, not code yet!)

1. under normal operation ATO pump is turned on at 1:00 until float switch is tripped.
2. return pump turns off at 1:03
3. drain pump is turned on at 1:04 and runs until the low level float switch that would normally insure the ATO pump is not turned on is tripped.
4. FSW pump is turned on until a high level float switch, set at where the normal water level when the return pump is off, is tripped.
5. Return pump is turned back on and ATO pump is set back to normal operation.

So this would require me to have 3 float valves. One low one to turn off all pumps when tripped. One at the normal operating level for the ATO pump to work to. And one at the high level where the water sits when the return pump is off.

Does this sound like it would work?


I'm not going to answer because you don't want advice from another newbie.:) I'll just give you my setup.


I only have 2 float switches in my sump. The lower one is the main one. Once the water level drops about an inch in my sump then the float switch drops which triggers my top off pump. Then my sump refills an inch until the float switch is in the top most position. I have a second float switch about 2 inches higher then that float switch. That one is just a backup n case the lower one fails.

Everything else in the tank runs during this process. The only thing that doesn't turn on is my ATO pump during draining and filling with new salt water. I have RO tubing connected to my ATO, drain and new salt water pumps so the flow rate is slow. I've timed that it takes about 10 minutes to drain about a gallon from my sump. Draining a gallon from my sump only drops the water level in there by about an inch so I see no reason to turn anything else off. I actually like having everything on during the process so that way everything gets mixed up pretty quickly.

jlylec
04/28/2011, 01:48 PM
I'm not going to answer because you don't want advice from another newbie.:)


I only have 2 float switches in my sump. The lower one is the main one. Once the water level drops about an inch in my sump then the float switch drops which triggers my top off pump. Then my sump refills an inch until the float switch is in the top most position. I have a second float switch about 2 inches higher then that float switch. That one is just a backup n case the lower one fails.

fair enough! And your float switch idea sounds simpler than mine so I think I'll try that. I guess you're not turning off your return pump then? If I don't turn off my return pump I think I'll only be able to change like 5g at a time. If I turn it off I can probably change like 15g. I figured you were turning it off since you said you would run the drain pump for 10min. What kind of pump are you running and how big is the return section of your sump?

cm11599ps
04/28/2011, 02:04 PM
I'm using mag 9's with 1/4" RO tubing directly connected to it. That why it takes so long to drain. It takes about 10 minutes to drain a gallon. I'll be changing about a gallon per day in my 77 gallon total setup.

My drain pump just started at 4 and the sump is slowly draining. My ato and new salt mix pumps haven't started yet which should be a good sign. Once the drain pump stops the new salt mix pump should start and refill up to the lower float switch. I programmed the new salt mix to last a few minutes longer than my drain pump just in case the new salt mix pump flows a little slower than my drain.

It's not just the return area that draining, the water level in the skimmer section drops too. The entire area probably has about 10 gallons of water total.

cm11599ps
04/28/2011, 02:35 PM
BINGO!

The water changed happened EXACTLY as I planned using my updated code.

1) My sump was already at the proper level thanks to my float switch.

2) The drain pump came on at exactly 4 and turned off after 10 minutes at 4:09:59 Neither my ATO pump nor my new salt mix pump was activated, despite the fact that the float switch was activated.

3) As soon as my drain pump stopped the new salt mix activated. Even though it's timed to be on for 15 minutes it still shut off after only 7 minutes thanks to my float switch. I'll have to adjust that 15 minute time down to 9 minutes or so. It was quicker to refill the tank because it's a shorter run and a larger pump.


The only downside I can see so far is the fact that my temperature dropped about a degree. That's because the new salt mix is in the unheated garage and the new salt mix temperature is 15 degrees lower than my tank. The pump dumps into the skimmer section, right above the skimmer pump actually. The temp probe is sitting right there as well.

At 4:10 the probe read 81.3 and that was at the time the drain pump stopped. At 4:20 the temp was 80.3 and this was 3 minutes after the new salt mix pump stopped. At 4:30 it was back to 81.2

cm11599ps
05/01/2011, 06:59 AM
A few days later and all is still well. These have been the easiest water changes I have ever done! lol

loai
05/02/2011, 03:07 PM
i have small question...

i can see all the thread's its talking about daily program, can we program by weekly times?

aquamanic
05/02/2011, 03:16 PM
There's a 'day of week' command that you could leverage to only activate the code on say, Saturday. Essentially you would turn the outlet OFF on all the other days. You would add that to the NSW and DRAIN outlets

swearint
05/03/2011, 09:07 AM
A few days later and all is still well. These have been the easiest water changes I have ever done! lol

Glad you got it working. Sorry I could not respond sooner, I was in the middle of the mess here in N. Alabama. Still without power at the house, but things have been steadily coming back online. Anyway, I suspect the issue in the original code is the Defer 9:59. The Apex is accurate to a second, and this may have cut it too close. You could try Defer 9:55 or such.

Todd

cm11599ps
05/03/2011, 07:51 PM
Glad you got it working. Sorry I could not respond sooner, I was in the middle of the mess here in N. Alabama. Still without power at the house, but things have been steadily coming back online. Anyway, I suspect the issue in the original code is the Defer 9:59. The Apex is accurate to a second, and this may have cut it too close. You could try Defer 9:55 or such.

Todd


Not a problem, thank you so much for your help! I hope all is well down there. We got hit with the same storm but is was largely west of here so we got spared.


This setup has been going great for almost a week now. It really doesn't get any easier then this. I went to pickup some corals from a local guy last week and he was in the middle of a water manual water change. Yuck.

I was wondering if there's a way to use a feed cycle to do a second water change when needed. After I introduced some livestock last week I notice I have a trace reading of ammonia so I've been doing extra changes. The only problem is that I need to manually turn on the drain pump and monitor it and make sure the ATO is off. Then I need to turn the new salt mix pump on and monitor it till it reaches a certain level. Then when it gets there turn the ATO back on.

Is there a way to make this on a FeedB option so that I don't have to babysit?

scsuboy18
05/03/2011, 08:40 PM
+1 on the manual water changes... YUCK!!! the buckets, the messes, the mixing, and spending a half a day doing it.

swearint
05/04/2011, 07:08 AM
Is there a way to make this on a FeedB option so that I don't have to babysit?
Yes, but it would require using the original approach where the NSW pump is not time based. Simply add 'If FeedB 000 Then ON' to the Drain pump outlet at the end.

Todd

Ricardo_Jorge
05/04/2011, 08:42 PM
Hey guys, i would like some advise for my ATO and Water Changes systems. I'm wondering to use this code:

Outlets:
PUMP OUT
PUMP IN
PUMP ATO

Switches:
Switch Low
Switch High

--ATO SYSTEM--
[PUMP_ATO_OUTLET]
Fallback OFF
If time 00:00 to 06:00 then ON
If switch high open then OFF


--WATER CHANGES SYSTEM--
[PUMP OUT_OUTLET]
Fallback OFF
If time 12:00 to 12:04 then ON
If switch low closed then OFF

[PUMP IN_OUTLET]
Fallback OFF
If time 12:05 to 12:09 then ON
If switch high open then OFF


So the ATO will occur just between 00:00 and 06:00AM
WC will occur between 12:00AM and 12:09AM

How does it sounds?

I also have a doubt on ATO SYSTEM
If the switch high becomes open at 4AM (i.e) the pump will be OFF or ON until 6AM?


Tks a lot!

cm11599ps
05/11/2011, 07:46 PM
Just wanted to bump this for Ricardo. It's been 2 weeks and my auto water cahnge system has been AWESOME!

swearint
05/12/2011, 07:51 AM
So the ATO will occur just between 00:00 and 06:00AM
WC will occur between 12:00AM and 12:09AM

How does it sounds?

I also have a doubt on ATO SYSTEM
If the switch high becomes open at 4AM (i.e) the pump will be OFF or ON until 6AM?


Tks a lot!

Looks good, just be aware that you are limited to 12 characters when naming outlets. Also, the Time command is accurate to 1 minute, so your actual run time based on the code will be from 12:00 to 12:10 (5 minutes OUT and 5 Minutes IN). When (switch high) is CLOSED, the ATO will be OFF regardless of the time. Later commands have priority over earlier commands.

Todd

Ricardo_Jorge
05/12/2011, 09:28 AM
Ok Todd
tks a lot!

cm11599ps
06/12/2011, 03:11 PM
Yes, but it would require using the original approach where the NSW pump is not time based. Simply add 'If FeedB 000 Then ON' to the Drain pump outlet at the end.

Todd

Everything has been working for the past few weeks with my setup. At 4pm everyday my drain pump activates and drains about a gallon from the sump in 10 minutes. When that is over the New salt mix pump activates and fills the sump up to the proper float switch. It takes about 15 minutes for the entire thing to complete.

There are times when I would also like to do a water change by simply using a feed cycle. What would I have to add? I've been scratching my head doing this because my float switches weren't working. Turns out a wire came loose from a BB. :debi:

Here's what I need and would like to add to FeedB

1) Turn ATO off for FeedB
2) Activate Drain Pump for 10 minutes for FeedB
3) Activate New Salt Pump after drain pump ends and refill until switch 1 is open durinf FeedB.

swearint
06/14/2011, 12:21 PM
It is not a simple matter to just add a Feed cycle trigger since the steps are independent. In other words, each step happens at a designated time, rather than based off of the previous step. The code would have to be re-worked. There was a previous post awhile back where I provided some code to do what you want, so you might try a search on my user name and 'water change' or such.

Todd

scsuboy18
06/14/2011, 04:53 PM
Not sure if this is the one but I know Todd created a code for a waterchange scenario that I will be implementing in about 3 weeks (during the move in July)...However this is using push buttons instead of the feed--however, either way you have to push a button.

http://www.reefcentral.com/forums/showthread.php?t=2010536

cm11599ps
06/14/2011, 05:04 PM
It is not a simple matter to just add a Feed cycle trigger since the steps are independent. In other words, each step happens at a designated time, rather than based off of the previous step. The code would have to be re-worked. There was a previous post awhile back where I provided some code to do what you want, so you might try a search on my user name and 'water change' or such.

Todd

Why?

I can't say something like

ATO
If FeedB Then Off

Drain
If FeedB XXX Then Off

New salt
If FeedB defer xxx Then off
If switch sumpfull open the off

??

swearint
06/15/2011, 07:26 AM
Why?

I can't say something like

ATO
If FeedB Then Off

Drain
If FeedB XXX Then Off

New salt
If FeedB defer xxx Then off
If switch sumpfull open the off

??
No, that code (ignoring the syntax errors) just turns everything OFF. The code that you have been using relies on events occuring at specific times. In order to use the Feed cycle (which can be started at any time), the code would have to be changed so that each step is started by a common event. It can be done, but it is significantly different.

I found it, here is the thread I was thinking of, although it was not for a water change: http://www.reefcentral.com/forums/showpost.php?p=18598016&postcount=7

Notice that there is a virtual outlet that is the 'trigger', then each step is based off of that with suitable delays.

Todd

jlylec
07/06/2011, 09:05 PM
Just wanted to bump this for Ricardo. It's been 2 weeks and my auto water cahnge system has been AWESOME!

Did you ever get your code worked out for adding a Feed cycle water change? I followed your advice and went with one switch for normal level operation that the ATO uses and one low level switch for shutting off the drain pump during the water change operation. Would you mind reposting the exact code you're using now so I can copy it? Thanks man!