I am looking for a way to put a delay on the standard ATO low switch. My DC pump causes a little turbulence in that chamber.
If ATO is low for longer than x then turn on the standard ATO port.
Thanks
ATOLow Delay
Re: ATOLow Delay
Anyone? Not possible?
Re: ATOLow Delay
almost anything is possible.clw143 wrote:Anyone? Not possible?
are you just using the ato low switch? like once it gets triggered you want a delay of x seconds before the outlet turns on. then you want it to run until when? until it is not triggered?
Sent from my Pixel 2 using Tapatalk
Re: ATOLow Delay
you can also look at the libraries and specifically look at the metalhalide function(s). they implement a delay before turning on to limit the power draw at startup.
something like that can be implemented, only you will have to use the function call for the ato low switch.
Sent from my Pixel 2 using Tapatalk
something like that can be implemented, only you will have to use the function call for the ato low switch.
Sent from my Pixel 2 using Tapatalk
Re: ATOLow Delay
binder wrote:almost anything is possible.clw143 wrote:Anyone? Not possible?
are you just using the ato low switch? like once it gets triggered you want a delay of x seconds before the outlet turns on. then you want it to run until when? until it is not triggered?
Sent from my Pixel 2 using Tapatalk
I'm using the standard low and high. I just want the low active for x (maybe 5 seconds) before triggering the ato pump port and run until the high switch is active.
So just like normal but with some deadband on the low switch.
Re: ATOLow Delay
I have yet to quite figure this out. Any more input would be appreciated.
Re: ATOLow Delay
It's been a while since I started this, low priority. I made a stab and came up with this, but I can't seem to make it work. Any help would be appreciated.
Code: Select all
unsigned long LastATO;
if (ReefAngel.LowATO.IsActive()) LastATO=millis();
if (ReefAngel.HighATO.IsActive() || ReefAngel.isATOTimeOut()) LastATO=0;
if (millis() - LastATO < 60000) ReefAngel.Relay.Off( Port8 );
else ReefAngel.StandardATO( Port8 );
Re: ATOLow Delay
I used some custom variables to see what is going on. It looks to me like LastATO is constantly updating with current millis value while LowATO.IsActive, meaning millis - LastATO is always 0.clw143 wrote:Code: Select all
if (ReefAngel.LowATO.IsActive()) LastATO=millis();
How do I correct?
Re: ATOLow Delay
Below is the code I came up with for this. I have been scratching my head as to why but the issue with it is that it only works the fist time. Every subsequent time upon the low level switch goes true, my ATO timeout will immediately come on. Any one have any insight on this?
Code: Select all
// ******************* Debounced ATO code. Only run ATO if LowATO is true for more than 10 sec. *******************
if (ReefAngel.HighATO.IsActive() || ReefAngel.isATOTimeOut()) {
topoff = false;
SnapShot = 0;
ReefAngel.Relay.Off( Port8 ); //ATO Pump Off
}
else if (!ReefAngel.HighATO.IsActive() && !ReefAngel.LowATO.IsActive()) topoff = false;
else if (ReefAngel.LowATO.IsActive()) topoff = true;
if ((topoff == true) && (last_topoff == false)) SnapShot = millis(); // check if this is the first time that lasttopoff and topoff are different and store snapshot of time
last_topoff = topoff; // update topoff
if (topoff && (millis() - SnapShot >= 10000)) { //run ATO normally if ATOLOW is true for more than 10 seconds
ReefAngel.StandardATO( Port8 ); //ATO Normal ON