Emergency shutoff when water rises

Do you have a question on how to do something.
Ask in here.
Post Reply
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Emergency shutoff when water rises

Post by Decatur5717 »

Emergency shutoff when water rises
I’m looking for a bit of code that will turn my return pump off (port1) if…… float switch (connected to ATO high) triggers. Then, if for whatever reason port1 shuts off also turn off port3

Earlier today I was working on the tank and turned off the return pump, without realizing it the water dropped enough to cause the circulation pumps (port3 and their sole purpose is to stir up the surface so I don’t get so much stagnant water) to spit water all inside the hood shorting out one of the lights. Needless to say I’ve adjusted it so it will not happen again but still, if my return pump cuts off I need to cut those ports as well. If the float switch activates then I’m about a half inch from disaster

Any ideas?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Emergency shutoff when water rises

Post by lnevo »

if (ReefAngel.ATOHigh.IsActive()) ReefAngel.Relay.Override(Port1,0);


if (!ReefAngel.Relay.Status(Port1)) ReefAngel.Relay.Override(Port3,0);
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Re: Emergency shutoff when water rises

Post by Decatur5717 »

And that'd look like this correct?

#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 <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.AddStandardMenu(); // Add Standard Menu

ReefAngel.Use2014Screen(); // Let's use 2014 Screen
ReefAngel.AddWaterLevelExpansion(); // Water Level Expansion Module
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = 0;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port2Bit | Port4Bit | Port6Bit | Port8Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port2Bit | Port4Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 815 );


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

////// Place additional initialization code below here


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

void loop()
{
ReefAngel.StandardLights( Port2,8,0,20,30 );
ReefAngel.StandardLights( Port4,7,30,20,0 );
ReefAngel.StandardHeater( Port5,790,795 );
ReefAngel.StandardLights( Port6,7,0,2,0 );
ReefAngel.StandardLights( Port7,11,0,6,0 );
ReefAngel.StandardLights( Port8,2,0,21,0 );
////// Place your custom code below here

if (ReefAngel.ATOHigh.IsActive()) ReefAngel.Relay.Override(Port1,0);


if (!ReefAngel.Relay.Status(Port1)) ReefAngel.Relay.Override(Port3,0);

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

// This should always be the last line
ReefAngel.ShowInterface();
}
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Re: Emergency shutoff when water rises

Post by Decatur5717 »

hmmm doesn't like that??

"Class reefangelclass" has no member named "atohigh"
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Emergency shutoff when water rises

Post by rimai »

Try HighATO instead of ATOHigh
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Emergency shutoff when water rises

Post by lnevo »

Sorry :)
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Re: Emergency shutoff when water rises

Post by Decatur5717 »

Do I need to remove this?

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


And changing it to highato got me passed the checks
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Emergency shutoff when water rises

Post by rimai »

You still need that
Roberto.
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Re: Emergency shutoff when water rises

Post by Decatur5717 »

lol that worked in reverse
Decatur5717
Posts: 9
Joined: Sat Apr 26, 2014 2:28 pm

Re: Emergency shutoff when water rises

Post by Decatur5717 »

second test and it's working as expected, Excellent! Thanks buddy

Not sure why it cut off the first time
Post Reply