Page 1 of 1

ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 1:19 pm
by tentacles
So the last week or so I've noticed my RA always has the ATO timeout set, so I clear the timeout and reset the RA, but it doesn't turn on the ATO relay. (Relay 1 doesn't go green, pump doesn't come on). I plugged the ATO pump into a power bar and fill the tank that way but what's wrong with my RA? Is it the head unit or the relay box?

I also have to reset the clock time once a week or so, as it loses or gains about 3-5 mins / day. Last night the lights went off at 6 PM or so, about 5 hours early, the clock showed 12:26 PM, which is before the lights come on. The lights had been on earlier. Resetting the unit fixed it.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 6:59 pm
by rimai
Can you post your code?
How do you have your float switches mounted?

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 8:01 pm
by tentacles
I have three float switches in series, the primary that holds the normal water level, a secondary as failsafe and the third is to switch off the pump when the bucket gets too low.

Everything had been working normally for a long time, haven't changed the code or anything for a few months as I adjust the LED PWM in the menu and I adjust my dosing by changing the supplement concentration. It's always kept bad time, and occasionally done the strange time flip / lights out sort of thing before, though that's mostly just annoying. Sometimes when it kicked on a relay the lights would get brighter for a second or two.

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 <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

// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = 0;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = 3,4;
// 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;
// Set the Overheat temperature setting
InternalMemory.OverheatTemp_write( 1400 );


// Ports that are always on

////// Place additional initialization code below here
ReefAngel.AddDateTimeMenu();


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

void loop()
{
ReefAngel.SingleATO( false,Port1,500,2 ); //300s timeout every 2 hours
ReefAngel.DosingPumpRepeat( Port2,10,120,1); //fdose 1ml every 2 hours
ReefAngel.StandardLights( Port3,12,10,22,40 );
ReefAngel.StandardLights( Port4,13,0,22,0 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.Set(Port6,now()%43200<21600);
ReefAngel.DosingPumpRepeat( Port7,60,120,1 ); //dose 1ml every 2 hours
ReefAngel.StandardLights( Port8,12,10,22,40 );
// ReefAngel.WavemakerRandom( Port5,60,120 );
ReefAngel.PWM.SetDaylight( PWMSlope(13,0,22,05,11,InternalMemory.LEDPWMDaylight_read(),InternalMemory.LEDPWMDaylight_read(),11) );
ReefAngel.PWM.SetActinic( PWMSlope(12,10,22,45,11,InternalMemory.LEDPWMActinic_read(),InternalMemory.LEDPWMActinic_read(),11) ); ////// Place your custom code below heref


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

// This should always be the last line
ReefAngel.ShowInterface();
}

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 8:06 pm
by rimai
I'm taking that the floats are plugged into the high ato port.
Did you check the floats?

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 8:46 pm
by tentacles
Float switches work as normal, when the water is low and the bucket has water (4/5 gallons atm) the switches are all closed, and they open when I test them. The switches are plugged into the port to the middle of the RA unit.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 9:35 pm
by rimai
Did you test the ATO ports?? Use the ControllerTester code.
File->Sketchbook->Example Codes->ControllerTester
Your code only allows the ATO to run once in a 2 hours period. Even if it runs only for a second (quick water movement), it would still have to wait a full 2 hours to run again.
Maybe you ought to try removing that 2 hour restriction.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun Apr 28, 2013 10:16 pm
by tentacles
Nah the 2 hour restriction isn't the problem; I just didn't want the thing cycling every time I put my hand in the tank or took a bit of water out to thaw some frozen food or something. The sump is only a 10g; the whole system right now is only ~20 gallons. The float would literally cycle on after taking out a tablespoon of water! And then cycle about 10 more times over the next minute or so, and that was with a 1 GPH pump. I now use a MJ1000 pumping through airline tubing for topoff, it suits my needs perfectly and it's quiet enough.

From what I can tell, the controller is detecting the signal from the floats, but it isn't cycling on relay 1. So it hits the 500 second timeout and throws up the error light.

I will try the controller test code tomorrow after work, it's a bit late right now.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Mon Apr 29, 2013 5:46 am
by cosmith71
Bad relay? Does it work on another relay?

Take a look at this pic from aquahub.com. They use a small bottle with holes in it to help even out waves, etc. so your topoff doesn't cycle so much.


Image

--Colin

Edit: Clarify a little.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Mon Apr 29, 2013 9:36 pm
by tentacles
OK so I was able to load the controller test software, and everything worked as it should. I had trouble reprogramming it, got some errors and eventually got it to program but it didn't finish clean. The ATO works again now, but I am concerned that maybe not everything got loaded?

"avrdude: stk500_loadaddr(): (a) protocol error, expect=0x14, resp=0x55
avrdude: Send: t [74] . [00] . [80] F [46] [20]
avrdude: Recv:

avrdude: stk500_paged_load(): (a) protocol error, expect=0x14, resp=0x74
avrdude: Send: V [56] [20] . [00] . [00] . [00] [20]
avrdude: Recv:
avrdude: stk500_cmd(): programmer is out of sync
"

I've had this sort of problem before, but previously was able to solve it by doing things like rebooting my laptop, unplugging the dimming leads and ATO plugs and temp sensor leads and resetting the unit before programming. After several attempts I'm giving up for the night...

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun May 05, 2013 10:37 am
by tentacles
OK, so it's been ~ 1 week, and today I noticed the lights were not on at 12:28pm, so I checked the RA and the displayed time was 11:44 am.. A few minutes a week I can live with but 45 minutes is really throwing off my schedule. Is there something I can do that will help? If my board is bad, can I pay for an advance replacement (maybe with a Plus upgrade too?)?

This unit has always had some time drift but this is a bit silly. I definitely set the time when I reprogrammed the unit, so it's only been since last monday that it's drifted.

Re: ATO timeout always set, doesn't turn on ATO relay

Posted: Sun May 05, 2013 11:05 am
by rimai
Yeah, if it is drifting like that, you will need to send it for repair. PM me for RMA number.