ATOLow Delay

Basic / Standard Reef Angel hardware

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Mon Jun 28, 2021 11:30 am
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

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Mon Jul 05, 2021 9:40 am
Anyone? Not possible?
User avatar
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Jul 07, 2021 3:40 pm
clw143 wrote:Anyone? Not possible?
almost anything is 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
User avatar
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Wed Jul 07, 2021 3:42 pm
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

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Sat Jul 17, 2021 2:30 pm
binder wrote:
clw143 wrote:Anyone? Not possible?
almost anything is 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.

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Thu Sep 02, 2021 5:30 pm
I have yet to quite figure this out. Any more input would be appreciated.

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Thu Jun 09, 2022 12:56 pm
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 );   

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Fri Jun 10, 2022 12:24 pm
clw143 wrote:
Code: Select all
  if (ReefAngel.LowATO.IsActive()) LastATO=millis();


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.

How do I correct?

Posts: 118
Joined: Fri Jun 21, 2013 8:20 pm
Location: Louisiana
PostPosted: Wed Feb 22, 2023 4:15 pm
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

Return to Standard

Who is online

Users browsing this forum: No registered users and 4 guests

cron