ATO Timeout--pump still running!
Posted: Sun Dec 04, 2016 7:55 am
I just discovered that my ATO pump runs even when the controller is in ATO timeout!
I had some trouble with my water level meter (was leaking air) so the readings were not accurate. This caused the ATO to run non-stop, and I found out that the pump wouldn't turn off even when in timeout! I fixed the water level meter, but am still baffled by the problem with the pump running non-stop. Any advice?
Ted
P.S. Some details about my code:
I am running custom code for the following:
1. Float switch in skimmer reservoir set to shut off skimmer if the reservoir fills up.
2. RO solenoid set to run RO to fill ATO reservoir on a set schedule,.Also for the solenoid to open for one hour when I turn on the port from the RA app.
3. Turn on sump light during water change.
My Code:
#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 <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port6Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Box1_Port5 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardFan( Port1,786,790 );
ReefAngel.StandardHeater( Port2,780,785 );
ReefAngel.StandardLights( Port3,21,0,7,0 );
ReefAngel.StandardHeater( Port6,775,780 );
ReefAngel.WaterLevelATO( Port7,3600,10,100 );
ReefAngel.Relay.DelayedOn( Port8,10 );
ReefAngel.StandardLights( Box1_Port1,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port2,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port3,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port4,8,0,21,0 );
ReefAngel.PWM.SetChannel( 0, PWMSlope(8,0,21,0,10,60,65,10) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(8,0,21,0,9,40,65,9) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(8,0,21,0,8,60,65,8) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(8,0,21,0,6,40,65,6) );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( Else,70,8 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
if(ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.Override(Port8,0);
ReefAngel.Relay.On(Port8);
}
int repeat=2880; // in minutes
int runtime=3600; // in seconds
static time_t t;
// Manual mode
if (ReefAngel.Relay.isMaskOn(Box1_Port5)) {
ReefAngel.Relay.Auto(Box1_Port5);
t=now();
}
if (now()-t < runtime) {
ReefAngel.Relay.On(Box1_Port5);
} else {
ReefAngel.DosingPumpRepeat(Box1_Port5,0,repeat,runtime);
}
if (hour()==7 && minute()==0 && second()==0) while(1);
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) ReefAngel.Relay.On(Port3);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "paperdesk" );
ReefAngel.ShowInterface();
}
I had some trouble with my water level meter (was leaking air) so the readings were not accurate. This caused the ATO to run non-stop, and I found out that the pump wouldn't turn off even when in timeout! I fixed the water level meter, but am still baffled by the problem with the pump running non-stop. Any advice?
Ted
P.S. Some details about my code:
I am running custom code for the following:
1. Float switch in skimmer reservoir set to shut off skimmer if the reservoir fills up.
2. RO solenoid set to run RO to fill ATO reservoir on a set schedule,.Also for the solenoid to open for one hour when I turn on the port from the RA app.
3. Turn on sump light during water change.
My Code:
#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 <Salinity.h>
#include <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <Humidity.h>
#include <DCPump.h>
#include <PAR.h>
#include <ReefAngel.h>
////// Place global variable code below here
////// Place global variable code above here
void setup()
{
// This must be the first line
ReefAngel.Init(); //Initialize controller
ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddSalinityExpansion(); // Salinity Expansion Module
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
ReefAngel.FeedingModePortsE[0] = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port4Bit | Port6Bit | Port7Bit | Port8Bit;
ReefAngel.WaterChangePortsE[0] = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 0;
ReefAngel.LightsOnPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port6Bit;
ReefAngel.OverheatShutoffPortsE[0] = Port1Bit | Port2Bit | Port3Bit | Port4Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 800 );
// Feeeding and Water Change mode speed
ReefAngel.DCPump.FeedingSpeed=0;
ReefAngel.DCPump.WaterChangeSpeed=0;
// Ports that are always on
ReefAngel.Relay.On( Port4 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Box1_Port5 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.StandardFan( Port1,786,790 );
ReefAngel.StandardHeater( Port2,780,785 );
ReefAngel.StandardLights( Port3,21,0,7,0 );
ReefAngel.StandardHeater( Port6,775,780 );
ReefAngel.WaterLevelATO( Port7,3600,10,100 );
ReefAngel.Relay.DelayedOn( Port8,10 );
ReefAngel.StandardLights( Box1_Port1,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port2,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port3,8,0,21,0 );
ReefAngel.StandardLights( Box1_Port4,8,0,21,0 );
ReefAngel.PWM.SetChannel( 0, PWMSlope(8,0,21,0,10,60,65,10) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(8,0,21,0,9,40,65,9) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(8,0,21,0,8,60,65,8) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(8,0,21,0,6,40,65,6) );
ReefAngel.DCPump.UseMemory = false;
ReefAngel.DCPump.SetMode( Else,70,8 );
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = AntiSync;
ReefAngel.DCPump.ExpansionChannel[0] = None;
ReefAngel.DCPump.ExpansionChannel[1] = None;
ReefAngel.DCPump.ExpansionChannel[2] = None;
ReefAngel.DCPump.ExpansionChannel[3] = None;
ReefAngel.DCPump.ExpansionChannel[4] = None;
ReefAngel.DCPump.ExpansionChannel[5] = None;
////// Place your custom code below here
if(ReefAngel.HighATO.IsActive())
{
ReefAngel.Relay.Override(Port8,0);
ReefAngel.Relay.On(Port8);
}
int repeat=2880; // in minutes
int runtime=3600; // in seconds
static time_t t;
// Manual mode
if (ReefAngel.Relay.isMaskOn(Box1_Port5)) {
ReefAngel.Relay.Auto(Box1_Port5);
t=now();
}
if (now()-t < runtime) {
ReefAngel.Relay.On(Box1_Port5);
} else {
ReefAngel.DosingPumpRepeat(Box1_Port5,0,repeat,runtime);
}
if (hour()==7 && minute()==0 && second()==0) while(1);
if (ReefAngel.DisplayedMenu==WATERCHANGE_MODE) ReefAngel.Relay.On(Port3);
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "paperdesk" );
ReefAngel.ShowInterface();
}