ATO problems

Basic / Standard Reef Angel hardware
Post Reply
b_s_c1
Posts: 16
Joined: Fri Mar 25, 2011 7:00 pm

ATO problems

Post by b_s_c1 »

I am tring to set up my ATO and am having problems. I am toping off straight from my RO and have the RA unit using the two float switches to activate a solenoid. The switches are ran in series one mounted a little higher than the other. From the solenoid valve the tubing then goes to a float valve for added protection.

I set up the RA as a standard low, then ran the switches in series and connected them into the ATO plug next to the PH connection. When the time comes for the ATO to activate it always times out. It does not matter what position the switches are in the result is the same. I checked resistance through the wires from the swiches to make sure they are operating correctly and they are.

Can someone help me out with this problem.

The RA is set to turn the ATO on every 3 hours and let it run for the 255 seconds or until full if the level is low,
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO problems

Post by rimai »

Can you attach your code and maybe a drawing of your ATO setup?
Roberto.
b_s_c1
Posts: 16
Joined: Fri Mar 25, 2011 7:00 pm

Re: ATO problems

Post by b_s_c1 »

rimai wrote:Can you attach your code and maybe a drawing of your ATO setup?

Not really sure what code you need so I will just post it all. As far as the ATO setup I have the two float switches wired in series with one mounted 1/2'' hire than the other. The floats are positioned with the wires up.


Memory

#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <Time.h>
#include <OneWire.h>
#include <Phillips6610LCDInv.h>
#include <avr/pgmspace.h>
#include <ReefAngel_EEPROM.h>


Phillips6610LCDInv e;

void setup()
{
e.lcd_init();
e.lcd_clear(COLOR_WHITE,0,0,132,132);
e.lcd_BacklightOn();

InternalMemory.MHOnHour_write(8);
InternalMemory.MHOnMinute_write(0);
InternalMemory.MHOffHour_write(15);
InternalMemory.MHOffMinute_write(0);
InternalMemory.MHDelay_write(5);
InternalMemory.StdLightsOnHour_write(11);
InternalMemory.StdLightsOnMinute_write(0);
InternalMemory.StdLightsOffHour_write(23);
InternalMemory.StdLightsOffMinute_write(0);
InternalMemory.DP1OnHour_write(20);
InternalMemory.DP1OnMinute_write(0);
InternalMemory.DP2OnHour_write(22);
InternalMemory.DP2OnMinute_write(30);
InternalMemory.DP1Timer_write(10);
InternalMemory.DP2Timer_write(10);
InternalMemory.DP1RepeatInterval_write(60);
InternalMemory.DP2RepeatInterval_write(60);
InternalMemory.ATOTimeout_write(255);
InternalMemory.ATOHighTimeout_write(60);
InternalMemory.ATOHourInterval_write(3);
InternalMemory.ATOHighHourInterval_write(0);
InternalMemory.FeedingTimer_write(900);
InternalMemory.LCDTimer_write(600);
InternalMemory.LEDPWMActinic_write(0);
InternalMemory.LEDPWMDaylight_write(0);
InternalMemory.WM1Timer_write(0);
InternalMemory.WM2Timer_write(0);
InternalMemory.HeaterTempOn_write(780);
InternalMemory.HeaterTempOff_write(791);
InternalMemory.ChillerTempOn_write(810);
InternalMemory.ChillerTempOff_write(785);
InternalMemory.OverheatTemp_write(1500);
InternalMemory.PHMax_write(840);
InternalMemory.PHMin_write(550);
}

void loop()
{
// display the values
char buf[128];
sprintf(buf, "MH %2d:%02d-%2d:%02d,%d", InternalMemory.MHOnHour_read(), InternalMemory.MHOnMinute_read(),
InternalMemory.MHOffHour_read(), InternalMemory.MHOffMinute_read(),
InternalMemory.MHDelay_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
sprintf(buf, "Std %2d:%02d-%2d:%02d", InternalMemory.StdLightsOnHour_read(), InternalMemory.StdLightsOnMinute_read(),
InternalMemory.StdLightsOffHour_read(), InternalMemory.StdLightsOffMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
sprintf(buf, "LED A: %d%% D: %d%%", InternalMemory.LEDPWMActinic_read(), InternalMemory.LEDPWMDaylight_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);
sprintf(buf, "WM1: %ds", InternalMemory.WM1Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*4, buf);
sprintf(buf, "WM2: %ds", InternalMemory.WM2Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
sprintf(buf, "F: %ds", InternalMemory.FeedingTimer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
sprintf(buf, "S: %ds", InternalMemory.LCDTimer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
sprintf(buf, "H On: %d -> %d", InternalMemory.HeaterTempOn_read(), InternalMemory.HeaterTempOff_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*9, buf);
sprintf(buf, "C On: %d -> %d", InternalMemory.ChillerTempOn_read(), InternalMemory.ChillerTempOff_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*10, buf);
sprintf(buf, "PH %d - %d", InternalMemory.PHMax_read(), InternalMemory.PHMin_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*11, buf);

delay(10000);
e.lcd_clear(COLOR_WHITE,0,0,132,132);

sprintf(buf, "OH: %dF", InternalMemory.OverheatTemp_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW, buf);
sprintf(buf, "ATO L: %ds (%dh)", InternalMemory.ATOTimeout_read(), InternalMemory.ATOHourInterval_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*2, buf);
sprintf(buf, "ATO H: %ds (%dh)", InternalMemory.ATOHighTimeout_read(), InternalMemory.ATOHighHourInterval_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*3, buf);

sprintf(buf, "DP1: %2d:%02d", InternalMemory.DP1OnHour_read(), InternalMemory.DP1OnMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*5, buf);
sprintf(buf, " %ds", InternalMemory.DP1Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*6, buf);
sprintf(buf, "DP2: %2d:%02d", InternalMemory.DP2OnHour_read(), InternalMemory.DP2OnMinute_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*7, buf);
sprintf(buf, " %ds", InternalMemory.DP2Timer_read());
e.lcd_draw_text(COLOR_BLACK, COLOR_WHITE, MENU_START_COL, MENU_START_ROW*8, buf);

delay(10000);
e.lcd_clear(COLOR_WHITE,0,0,132,132);
}



RA


#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define ATOSetup
#define DirectTempSensor
#define DisplayLEDPWM
#define SingleATOSetup
#define StandardLightSetup
*/


#include <ReefAngel_Features.h>
#include <ReefAngel_Globals.h>
#include <ReefAngel_Wifi.h>
#include <Wire.h>
#include <OneWire.h>
#include <Time.h>
#include <DS1307RTC.h>
#include <ReefAngel_EEPROM.h>
#include <ReefAngel_NokiaLCD.h>
#include <ReefAngel_ATO.h>
#include <ReefAngel_Joystick.h>
#include <ReefAngel_LED.h>
#include <ReefAngel_TempSensor.h>
#include <ReefAngel_Relay.h>
#include <ReefAngel_PWM.h>
#include <ReefAngel_Timer.h>
#include <ReefAngel_Memory.h>
#include <ReefAngel.h>


void setup()
{
ReefAngel.Init(); //Initialize controller

// Have PWM on from 12pm to 12am, with gradual 60 minute ramp up and down starting at the given times
// From 12pm to 1pm, actinic and 1pm to 2pm daylightthe PWM will slowly ramp from 20% to 100%
// From 9 pm to 10pm, daylight and 10 to 11 actinic the PWM will slowly ramp from 100% to 20%
ReefAngel.PWM.SetActinic(PWMSlope(12,0,22,0,15,100,60,ReefAngel.PWM.GetActinicValue()));
ReefAngel.PWM.SetDaylight(PWMSlope(13,0,21,0,15,100,60,ReefAngel.PWM.GetDaylightValue()));

ReefAngel.FeedingModePorts = B10000000;
ReefAngel.WaterChangePorts = B10000000;
ReefAngel.OverheatShutoffPorts = B00000001;
ReefAngel.LightsOnPorts = B00000100;

// Ports that are always on
ReefAngel.Relay.On(Port5);
ReefAngel.Relay.On(Port6);
ReefAngel.Relay.On(Port7);
ReefAngel.Relay.On(Port8);
}

void loop()
{
ReefAngel.ShowInterface();

// Specific functions
ReefAngel.StandardHeater(Port1);
ReefAngel.StandardFan(Port2);
ReefAngel.StandardLights(Port3);
ReefAngel.SingleATOLow(Port4);
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: ATO problems

Post by rimai »

1. The ATO Low port is the one away from the pH connector
2. I'm pretty sure Curt developed SingleATOLow function for work every x hours for a maximum of y seconds, so in your case, it would work every 3 hours for a maximum of 255 seconds. Anything after that will generate an alert.
I did not test with float switches, but just as a test comparison, right after the code was loaded, Port4 was on and to simulate that the float switch was activating, I just shorted the two pins on the ATO Low input with my car keys within the 255 seconds window and it turned the Port4 off.

Maybe you had a wrong idea of how the function was working and that's maybe why you were having difficulties getting it to work.
Roberto.
Post Reply