Run ATO for set duration

Do you have a question on how to do something.
Ask in here.
Post Reply
OsiViper
Posts: 20
Joined: Sat May 11, 2013 10:36 pm

Run ATO for set duration

Post by OsiViper »

Right now I have a single float ATO set up which is working well but I don't like the idea of the ATO coming on putting a little bit of water in just until the float hits and then shutting it off.

Is there a way for it to turn the pump on as normal when the water level is low, but to have it have a 30 second delay turning the pump off after the water has triggered the float switch to stop pumping
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Run ATO for set duration

Post by rimai »

Someone just asked this :)
Let's see if we can combine both threads....
http://forum.reefangel.com/viewtopic.ph ... lay#p26308
Roberto.
OsiViper
Posts: 20
Joined: Sat May 11, 2013 10:36 pm

Re: Run ATO for set duration

Post by OsiViper »

I don't want it to wait 30 seconds to turn on, I want it to run for 30 seconds after the float-switch re-engages. That way it fills for a bit more and it doesnt keep just filling tiny amounts
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Run ATO for set duration

Post by rimai »

Try something like this then:

Code: Select all

#include <Salinity.h>
#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 <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

unsigned long lastATOmillis=millis();

void setup()
{
  ReefAngel.Init();  
}

void loop()
{
  if (ReefAngel.LowATO.IsActive()) lastATOmillis=millis();
  ReefAngel.Relay.Set(Port1,millis()-lastATOmillis<5000);
  ReefAngel.SingleATO(true,Port1,6,0);
  
  ReefAngel.ShowInterface();
}
Roberto.
OsiViper
Posts: 20
Joined: Sat May 11, 2013 10:36 pm

Re: Run ATO for set duration

Post by OsiViper »

I do have a question with this
ReefAngel.SingleATO(true,Port1,60,0);

I'm not sure what the values are exactly, what is the 1st boolean for, the 2nd one is obviously the relay port, the 3rd is timeout i'm guessing, what is the 4th value for?
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Run ATO for set duration

Post by lnevo »

1st specified if high or low float switch port. True is for low, false is for high.

The third is the timeout.

The last is for "hour interval" but not really sure how its used...
binder
Posts: 2865
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Post by binder »

OsiViper wrote:I do have a question with this
ReefAngel.SingleATO(true,Port1,60,0);

I'm not sure what the values are exactly, what is the 1st boolean for, the 2nd one is obviously the relay port, the 3rd is timeout i'm guessing, what is the 4th value for?
the first value says if we are using the low or high port. true means low port, false means high port.
third is the timeout.
fourth is the hour interval.
see this for an explanation about the interval: http://forum.reefangel.com/viewtopic.php?f=7&t=240
OsiViper
Posts: 20
Joined: Sat May 11, 2013 10:36 pm

Re: Run ATO for set duration

Post by OsiViper »

Thanks Roberto, that code worked great
Post Reply