Page 1 of 1

ATO High and Black Screen

Posted: Mon Jan 16, 2012 11:05 am
by dhave
I've problem since two week with RA.

I'm monitoring two level woth two probe.

The first probe show the sump water level and contro refill pump (60 sec time out).
The second probe show the re-fill tank water level and the refill pump (timeout disable).

When the ATO High (second probe) turn on, some time the controller show black screen, but keep working. I've to turn it off and start it again.

Thi is the program i'm using now:

Code: Select all

/ Autogenerated file by RAGen (v1.1.0.126), (01/15/2012 16:39)
// Memory_011512_1639.pde
//
// This file sets the default values to the Internal 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(13);
    InternalMemory.MHOnMinute_write(30);
    InternalMemory.MHOffHour_write(21);
    InternalMemory.MHOffMinute_write(30);
    InternalMemory.MHDelay_write(00);
    InternalMemory.StdLightsOnHour_write(13);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(22);
    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(60);
    InternalMemory.ATOHighTimeout_write(60);
    InternalMemory.ATOHourInterval_write(0);
    InternalMemory.ATOHighHourInterval_write(0);
    InternalMemory.FeedingTimer_write(900);
    InternalMemory.LCDTimer_write(600);
    InternalMemory.LEDPWMActinic_write(100);
    InternalMemory.LEDPWMDaylight_write(100);
    InternalMemory.WM1Timer_write(200);
    InternalMemory.WM2Timer_write(354);
    InternalMemory.HeaterTempOn_write(245);
    InternalMemory.HeaterTempOff_write(255);
    InternalMemory.ChillerTempOn_write(265);
    InternalMemory.ChillerTempOff_write(275);
    InternalMemory.OverheatTemp_write(1750);
    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);
}

Re: ATO High and Black Screen

Posted: Mon Jan 16, 2012 11:48 am
by rimai
I don't think this is it.
This is an internal memory file

Re: ATO High and Black Screen

Posted: Mon Jan 16, 2012 2:39 pm
by dhave
rimai wrote:I don't think this is it.
This is an internal memory file
Where i find it?

Re: ATO High and Black Screen

Posted: Mon Jan 16, 2012 8:42 pm
by rimai
It should be the code you uploaded to the controller.
Did you generate from RAGen?
If so, it starts with RA_

Re: ATO High and Black Screen

Posted: Wed Jan 18, 2012 2:56 am
by dhave
Ok. Here it is:

Code: Select all

// Autogenerated file by RAGen (v1.1.0.126), (01/15/2012 16:34)
// RA_011512_1634.pde
//
// This version designed for v0.8.5 Beta 17 or later

/* The following features are enabled for this PDE File: 
#define DisplayImages
#define DateTimeSetup
#define ATOSetup
#define MetalHalideSetup
#define DirectTempSensor
#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
    ReefAngel.SetTemperatureUnit(1);  // set to Celsius Temperature

    ReefAngel.FeedingModePorts = B00000000;
    ReefAngel.WaterChangePorts = B00000000;
    ReefAngel.OverheatShutoffPorts = B00000000;
    ReefAngel.LightsOnPorts = B00000000;

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

void loop()
{
    // Specific functions
    ReefAngel.StandardLights(Port1);
    ReefAngel.SingleATOLow(Port2);
    ReefAngel.StandardLights(Port3);
    ReefAngel.SingleATOHigh(Port4);
    ReefAngel.MHLights(Port5);
    ReefAngel.StandardFan(Port6);
    ReefAngel.StandardHeater(Port8);

	ReefAngel.ShowInterface();
}

Re: ATO High and Black Screen

Posted: Wed Jan 18, 2012 10:00 am
by rimai
Try enabling WDT when you generate the PDE.
On RAGen, make sure that WDT is checked on the features tab.

Re: ATO High and Black Screen

Posted: Wed Jan 18, 2012 2:59 pm
by dhave
rimai wrote:Try enabling WDT when you generate the PDE.
On RAGen, make sure that WDT is checked on the features tab.
It is not checked, the "watch dog". You think is it the problem?

Now the RA is on black screen and still working with light on in night time... :x

Re: ATO High and Black Screen

Posted: Wed Jan 18, 2012 5:03 pm
by rimai
Yes, make sure it is checked, generate the code again and upload to RA.

Re: ATO High and Black Screen

Posted: Mon Feb 06, 2012 5:31 am
by dhave
watchdog enable, second ATO sensor removed.
Still have blak screen every 2-3 days... the RA controller stop working...at midnight white light are still on... i have to suht down ad restart... then everything start working again.

At today i have removed heating and cooling (this "crash" cause the heater to increase/decrease temperature over limits.
If i will remove also the light...well... there will been nothing on the RA...

Re: ATO High and Black Screen

Posted: Mon Feb 06, 2012 9:10 am
by rimai
I think you have wrong paths on your RAGen which is not turning the WDT on.
Please correct the paths according to this post:
http://forum.reefangel.com/viewtopic.php?p=5291#p5291