ATO switch status

Basic / Standard Reef Angel hardware
Post Reply
ldangelo
Posts: 15
Joined: Thu Jun 14, 2012 12:42 pm

ATO switch status

Post by ldangelo »

I've looked throgh a lot of posts.
can you tell me when you say "Active" is that relay contacts closed or open?
Also where can I find a listing of all of the functions and the variables associated with them?
ie reefangel.anything(?,?.?)
is there a list of all of the functions
thanks
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO switch status

Post by rimai »

Active means closed contact.
http://forum.reefangel.com/viewtopic.php?f=7&t=240

For functions, lnevo exported a doxygen from the libraries:
http://forum.reefangel.com/viewtopic.php?f=15&t=1704
Roberto.
ldangelo
Posts: 15
Joined: Thu Jun 14, 2012 12:42 pm

Re: ATO switch status

Post by ldangelo »

Thanks Roberto,
I've successfully set up a single ATO using the atolow function.
I have another switch currently plugged into ATO high and would like to use this switch to be an alarm indicating the first switch has failed. If this switch activates I want it to send an alarm and shut down the ato relay.
Can I do this in software or should I just wire the ATO switches in series so if the second switch opens (water level too high) it will shut down the relay?
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO switch status

Post by rimai »

Which port are you using for ATO?
Can you post how you coded your ATO low?
Roberto.
ldangelo
Posts: 15
Joined: Thu Jun 14, 2012 12:42 pm

Re: ATO switch status

Post by ldangelo »

I'm not home now, at the office so I can't post the code.
I just used a one liner. I think it was single.atolow (port 1) or something like that.

It works fine. water level in my biocube 29 sump is held at level of the first float.
The second float currently plugged into ATO high isn't being used for anything.

Using the single float works great because the the hysteresis on the float switch keeps the water level constant to around +- 1/2 inch. I custom made a bracket to hold both switches and custom made a series redundant solenoid system from parts I found on e-bay. the solenoid coils are 120 VAC and it's plugged into relay port 1. I have it connected directly to my RO system
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO switch status

Post by rimai »

Ok, so you need to replace that line with this:

Code: Select all

if( ReefAngel.HighATO.IsActive())
  ReefAngel.SingleATOLow (Port1);
else
  ReefAngel.Relay.Off(Port1);
Roberto.
ldangelo
Posts: 15
Joined: Thu Jun 14, 2012 12:42 pm

Re: ATO switch status

Post by ldangelo »

Thanks Roberto that worked great.
Please check my code and see if it looks ok to you.

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 <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 <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
    // Ports toggled in Feeding Mode
    //ReefAngel.FeedingModePorts = Port5Bit | Port6Bit | Port7Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;


    // Ports that are always on
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port8 );

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

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

void loop()
{
      ReefAngel.ActinicLights( Port3 );
      ReefAngel.DayLights( Port4 );
      ReefAngel.Wavemaker1( Port5 );
      ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
    ReefAngel.StandardHeater( Port7 );
    ReefAngel.PWM.SetDaylight( MoonPhase() );
    ReefAngel.PWM.SetActinic( MoonPhase() );
    ////// Place your custom code below here
 if ( (hour() >= 20) || (hour() <= 6) ) // from 8p - 6a
 {
  ReefAngel.Relay.Off(Port6);
  ReefAngel.Relay.Off(Port5);
 }
else
{
  ReefAngel.WavemakerRandom(Port5,240,480); 
  // Turn Port5 on/off random cycles that lasts from 240 to 480 secs
} 
  ReefAngel.Relay.Set(Port6,!ReefAngel.Relay.Status(Port5));
  // Turn Port6 on/off on opposite cycle as Port 5
  // Port 5 and 6 are synchronized.
  // They work in opposing motion of each other at random times.
  // Adding the ATO function single switch
  if( ReefAngel.HighATO.IsActive())
{  
  ReefAngel.SingleATOLow (Port1);
}
else
 {
  ReefAngel.Relay.Off(Port1);
 }
  ////// Place your custom code above here
  ReefAngel.Portal("ldangelo");
   
  // This should always be the last line
  ReefAngel.ShowInterface();
}

Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO switch status

Post by rimai »

Looks good :)
Roberto.
Post Reply