Page 1 of 1

ATO question

Posted: Mon Dec 03, 2012 5:34 pm
by rossbryant1956
I am configuring the new Reef Angel ATO pump I received and had a question. I need my water level to stay at close to 8 inches of water in my sump so built a bracket and have both float valves mounted down. I would like to plug them into ATO low and ATO high and have low turn on Port X and have high turn off Port X. If there was a way to have the safety timer in there in case of error, that'd be great.

Finally, what would be the portal error message I could configure to get a message if the timer fired. Thx in advance.

Re: ATO question

Posted: Tue Dec 04, 2012 8:15 pm
by rimai
Humm...
We can do the timeout for single floats or dual floats pointing down/up, but not both pointing down.
If you want to do both pointing down, we need to do custom code, is it ok?

Re: ATO question

Posted: Wed Dec 05, 2012 5:39 am
by rossbryant1956
yes, custom code is fine. The reason they are both down is an effort to maintain a pretty strict water level. I wanted a single bracket and couldn't figure how to mount them counter-opposed without an approximate 1" depth difference.

Send me the code for up down as well in case I decide to go that way. Thx in advance, Welcome back, BTW. Hope you had a good time on vacation.

ATO question

Posted: Wed Dec 05, 2012 5:44 am
by lnevo
Do you have a baffle in your sump between return chamber and skimmer? Evaporation should only affect the return section an your skimmer compartment should maintain a constant level.

Re: ATO question

Posted: Wed Dec 05, 2012 10:47 am
by rimai
For opposite floats, you can simply use the StandardATO() function.
For both down, try this:

Code: Select all

void CustomATO(byte ATORelay, int ATOTimeout)
{
    // Input:  Relay port and timeout value (max number of seconds that ATO pump is allowed to run)
	unsigned long TempTimeout = ATOTimeout;
	TempTimeout *= 1000;

	/*
	Is the low switch active (meaning we need to top off) and are we not currently topping off
	Then we set the timer to be now and start the topping pump
	*/
    if ( ReefAngel.LowATO.IsActive() && ( !ReefAngel.LowATO.IsTopping()) )
    {
        ReefAngel.LowATO.Timer = millis();
        ReefAngel.LowATO.StartTopping();
        ReefAngel.Relay.On(ATORelay);
    }

    // If the high switch is activated, this is a safeguard to prevent over running of the top off pump
    if ( !ReefAngel.HighATO.IsActive() )
    {
		ReefAngel.LowATO.StopTopping();  // stop the low ato timer
		ReefAngel.Relay.Off(ATORelay);
    }

    /*
    If the current time minus the start time of the ATO pump is greater than the specified timeout value
    AND the ATO pump is currently running:
    We turn on the status LED and shut off the ATO pump
    This prevents the ATO pump from contniously running.
    */
	if ( (millis()-ReefAngel.LowATO.Timer > TempTimeout) && ReefAngel.LowATO.IsTopping() )
	{
		ReefAngel.LED.On();
		ReefAngel.Relay.Off(ATORelay);
	}
}
I just copied it from the StandardATO() function and reversed the high side.
Please test it to make sure it works accordingly.

Re: ATO question

Posted: Wed Dec 05, 2012 11:05 am
by rossbryant1956
Thx, I take it ATORelay is equal to the port the ATO pump is on? Where is ATORelay set. Seems like we'd have to define that as portX somewhere. Thx

Re: ATO question

Posted: Wed Dec 05, 2012 11:21 am
by rimai
Oh, this code would be placed at the end of your code after the last }
Then, in your loop, you can add something like this instead of ReefAngel.StandardATO(Port1);]

Code: Select all

CustomATO( Port1,30 );

Re: ATO question

Posted: Wed Dec 05, 2012 7:21 pm
by rossbryant1956
After looking at this code, I decided I was better off sticking with simple and clean. I went with a simple ATO call of
ReefAngel.StandardATO( Port1,60 );
and just changed my float valves around.

works fine for now. My new questions are as such:

1. What is the 60? A sixty second timeout? Can this be set to longer? Is pressing the ATO clear on the head unit the only want to clear this?

2. Can this ATO command be embedded in another command that only allows it to work during the hours of noon to 10PM?

Thx as always

Re: ATO question

Posted: Wed Dec 05, 2012 7:43 pm
by rimai
1. Yes, simply increase the number up to 32000 seconds. You can clear using Android app, Java Status app, web browser and head unit.
2. Yes.

Code: Select all

if (hour()>12 && hour()<22)
  ReefAngel.StandardATO( Port1,60 );
else
  ReefAngel.Relay.Off( Port1 );