Page 1 of 1
Run ATO for set duration
Posted: Wed May 22, 2013 3:13 pm
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
Re: Run ATO for set duration
Posted: Wed May 22, 2013 4:05 pm
by rimai
Someone just asked this
Let's see if we can combine both threads....
http://forum.reefangel.com/viewtopic.ph ... lay#p26308
Re: Run ATO for set duration
Posted: Wed May 22, 2013 4:43 pm
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
Re: Run ATO for set duration
Posted: Wed May 22, 2013 5:21 pm
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();
}
Re: Run ATO for set duration
Posted: Wed May 22, 2013 6:35 pm
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?
Run ATO for set duration
Posted: Wed May 22, 2013 6:49 pm
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...
Posted: Wed May 22, 2013 6:52 pm
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
Re: Run ATO for set duration
Posted: Thu May 23, 2013 9:28 am
by OsiViper
Thanks Roberto, that code worked great