Page 1 of 1

ATO timeout? Red LED

Posted: Thu Apr 04, 2013 2:58 pm
by duck
I am getting an ATO time out on the controller. My topoff is connected to the RODI via a 12v solenoid/valve. I am using the dual ato with the low as the trigger to fill and the high as a backup. Where is this timeout coming from? here is the code.

Code: Select all

#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <LED.h>
#include <RA_TempSensor.h>
#include <Relay.h>
#include <RA_PWM.h>
#include <Timer.h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

////// Place global variable code below here
//Return              1
//Blue LED and Fans   2
//White LED           3
//Alk                 4
//Powerhead           5
//Heater              6
#define ATO           7
//Skimmer             8

////// Place global variable code above here


void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    ReefAngel.AddStandardMenu();  // Add Standard Menu

    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port7Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port7Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port5Bit | Port6Bit | Port7Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 830 );


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );
    ReefAngel.Relay.On( Port8 );

    ////// Place additional initialization code below here
    
    ////// Place additional initialization code above here
}

void loop()
{
    ReefAngel.StandardLights( Port2,10,0,22,0 );
    ReefAngel.StandardLights( Port3,10,0,22,0 );
    ReefAngel.StandardHeater( Port6,760,770 );
    ReefAngel.PWM.SetDaylight( PWMParabola(12,0,19,0,0,30,0) );
    ReefAngel.PWM.SetActinic( PWMParabola(10,0,22,0,0,30,0) );
    ////// Place your custom code below here
    
    //Alk Dosing Pump 1 Minute Every 25 Minutes
    if (now()%1500<60) ReefAngel.Relay.On(Port4); else ReefAngel.Relay.Off(Port4);
  
    //Powerhead On Every 4 Hours With 30 Min Pause
    if (now()%1800<12600) ReefAngel.Relay.On(Port5); else ReefAngel.Relay.Off(Port5);
     
    //Heater Control on at 76.0F and off at 76.8F
    ReefAngel.StandardHeater(Port6,760,768);
  
    //ATO Low Activation with High Safety (Port 7)
    if (ReefAngel.HighATO.IsActive()) ReefAngel.SingleATOLow(ATO);
      else ReefAngel.Relay.Off(ATO);

    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}

Re: ATO timeout? Red LED

Posted: Thu Apr 04, 2013 6:30 pm
by rimai
Try replacing this:

Code: Select all

    if (ReefAngel.HighATO.IsActive()) ReefAngel.SingleATOLow(ATO);
      else ReefAngel.Relay.Off(ATO);
With this:

Code: Select all

  if (ReefAngel.HighATO.IsActive()) ReefAngel.SingleATO(true,ATO,60,0);
  else ReefAngel.Relay.Off(ATO);
Change the 60 to whatever timeout in seconds you need.

Re: ATO timeout? Red LED

Posted: Thu Apr 04, 2013 7:24 pm
by duck
hrmm I set it at 800 secinds and its still timing out? I clear the timeout and it comes back.

Re: ATO timeout? Red LED

Posted: Thu Apr 04, 2013 7:43 pm
by rimai
Does it take 800s to timeout?

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 1:44 pm
by duck
no, it shuts off the relay after its done filling usually within 140 seconds, and then when the 800 second timeout amount is up it throws the red led.

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 1:54 pm
by rimai
Are you sure you got the correct floats in the right position?

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 3:22 pm
by duck
its been working perfect for a year, I added leds to my tank and had to upload code to make the changes. I had to format a machine that crashed and reinstalled the reefangel setup and modified my wizard generated sketch with some lines from my old code. Now im having issues?

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 4:19 pm
by rimai
That's what I mean.
Are you sure you were using low ATO port?
Use just this function instead:

Code: Select all

ReefAngel.SingleATO(true,ATO,60,0);
Does the ATO pump turn on/off when you move the float?

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 6:19 pm
by duck
ok commented everything else out and inserted just

Code: Select all

ReefAngel.SingleATO(true,ATO,60,0);
the float goes low and clicks the relay/solenoid. when it gets to the proper level, it shuts back off. no timeouts and its been over an hour.. I would like to utilize the other ATO as a backup in case the first one gets stuck on. That is what I had at first I believe.

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 7:24 pm
by rimai
Is the other float above (outside of water) the one you are using to turn on/off the relay?

Re: ATO timeout? Red LED

Posted: Sat Apr 06, 2013 8:48 pm
by duck
it actually triggers about 1/8 an inch higher than the other float. so yes its "above" the other float.

Re: ATO timeout? Red LED

Posted: Sun Apr 07, 2013 7:59 am
by rimai
I'm not sure how it is being tripped and causing the timeout then :(