Page 1 of 1

ATO wont turn off

Posted: Mon Mar 12, 2012 6:02 pm
by dmglakewood
I'm having an issue right now where my ATO wont turn off until the max timer is hit.

I have my ATO reservoir filled to the top and I have my sump at the perfect level. I then take the flow valve out of the sump and the ATO turns on I then place the float valve back in the sump and the ATO will run for 60 seconds (my max timeout) and then turn off. No matter what I do it seems to ignore the other float valve. Here is the code I'm using...

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 <ReefAngel.h>

void setup(){
    ReefAngel.Init();

    ReefAngel.FeedingModePorts = Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit;
    ReefAngel.WaterChangePorts = Port3Bit | Port4Bit;
    ReefAngel.OverheatShutoffPorts = Port1Bit;

    //Always on
    ReefAngel.Relay.On(Port2);
    ReefAngel.Relay.On(Port3);
    ReefAngel.Relay.On(Port8);
    
    ReefAngel.Timer[1].SetInterval(random(15,60));
    ReefAngel.Timer[1].Start();
    ReefAngel.Relay.On(Port5);
}

void loop(){
    ReefAngel.Portal("dmglakewood");
    ReefAngel.StandardHeater(Port1);
    ReefAngel.StandardATO(Port4, 60);
    ReefAngel.Relay.DelayedOn(Port7, 720); //Sump Lights
    ReefAngel.ShowInterface();

    //Random powerhead turn on
    if(ReefAngel.Timer[1].IsTriggered()){
      ReefAngel.Timer[1].SetInterval(random(15,60));
      ReefAngel.Timer[1].Start();
      ReefAngel.Relay.Toggle(Port5);
      ReefAngel.Relay.Toggle(Port6);
    }
}

Re: ATO wont turn off

Posted: Mon Mar 12, 2012 6:10 pm
by dmglakewood
I might have figured it out...looking at the docs again it says this (which I think should be bolded)

"This function is assuming you have mounted the low level float switch pointing down and the high level float switch pointing up."

I had them both pointing down

Re: ATO wont turn off

Posted: Mon Mar 12, 2012 6:43 pm
by dmglakewood
For those who care I didn't like the default ATO function so I wrote my own

If the sump level drops too low it activates the ATO which fills up the sump until it reaches the perfect level or the top off reservoir runs out of water. With this method both float valves should be pointing up the lowATO should be in the sump and the HighATO should be in the top off reservoir.

Code: Select all

void loop(){    
    //ATO Sump too low
    if(!ReefAngel.LowATO.IsActive() && ReefAngel.HighATO.IsActive()){
      //Water in sump too low, let's pump some in
      ReefAngel.Relay.On(Port4);  
    }
    
    //ATO Sump good level
    if(ReefAngel.LowATO.IsActive() || !ReefAngel.HighATO.IsActive()){
      //Water in sump too low, let's pump some in
      ReefAngel.Relay.Off(Port4);  
    }
}

Re: ATO wont turn off

Posted: Tue Mar 13, 2012 1:58 pm
by binder
That's the spirit of this controller. If you need to tweak something to work the way you want, you most certainly can. :)

Re: ATO wont turn off

Posted: Tue Mar 13, 2012 5:24 pm
by dmglakewood
binder wrote:That's the spirit of this controller. If you need to tweak something to work the way you want, you most certainly can. :)
That's actually the main reason for me buying this controller. I'm more of a hands on kind of person and I like the ability to tweak every aspect of the controller.

Being a full time programmer helps too :lol: