Problem with ATO timeout or Overheat

Share you PDE file with our community
Post Reply
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem with ATO timeout or Overheat

Post by rimai »

The default probe for overheat is T2.
What are you measuring with T2?
Roberto.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

Temp 2 is my room probe...would I have to switch it so Temp 2 is in the display tank?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem with ATO timeout or Overheat

Post by rimai »

Let's check for spikes on T1.

Code: Select all

// Autogenerated file by RAGen (v1.2.1.158), (02/18/2012 23:31)
// RA_021812_2331.ino
//This is the latest; 02/20/2012 wavemaker timer added
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
 #define VersionMenu
 #define wifi
 #define SIMPLE_MENU
 #define CUSTOM_MAIN
 #define COLORS_PDE
 #define FONT_8x8
 #define FONT_8x16
 
 */


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <ReefAngel.h>

byte wmport=Port5;
boolean wmdelay=false;

int MaxT1=0;
void DrawCircle(int a, int b, int r, byte color)
//void ReefAngel_NokiaLCD::PutPixel(byte color, byte x, byte y)
{
  int f = 1 - r;  
  int ddF_x = 1;  
  int ddF_y = -2 * r;  
  int x = 0;  
  int y = r;

  ReefAngel.LCD.PutPixel(color, a, b+r);  
  ReefAngel.LCD.PutPixel(color ,a, b-r);  
  ReefAngel.LCD.PutPixel(color, a+r, b);  
  ReefAngel.LCD.PutPixel(color, a-r, b);
  while (x<y) 
  {    
    if (f >= 0) 
    {      
      y--;
      ddF_y += 2;      
      f += ddF_y;    
    }    
    x++;    
    ddF_x += 2;    
    f += ddF_x;

    ReefAngel.LCD.PutPixel(color, a + x, b + y);
    ReefAngel.LCD.PutPixel(color, a - x, b + y);
    ReefAngel.LCD.PutPixel(color, a + x, b - y);
    ReefAngel.LCD.PutPixel(color, a - x, b - y);
    ReefAngel.LCD.PutPixel(color, a + y, b + x);
    ReefAngel.LCD.PutPixel(color, a - y, b + x);
    ReefAngel.LCD.PutPixel(color, a + y, b - x);
    ReefAngel.LCD.PutPixel(color, a - y, b - x);
  }
}
void FillCircle(int a, int b, int r, byte color) 
{  
  int f = 1 - r;  
  int ddF_x = 1;  
  int ddF_y = -2 * r;  
  int x = 0;  
  int y = r;  
  for (int i=b-r; i<=b+r; i++) 
  {    
    ReefAngel.LCD.PutPixel(color, a, i);  
  }  
  while (x<y) 
  {    
    if (f >= 0) 
    {      
      y--;      
      ddF_y += 2;      
      f += ddF_y;    
    }    
    x++;    
    ddF_x += 2;    
    f += ddF_x;      
    for (int i=b-y; i<=b+y; i++) 
    {      
      ReefAngel.LCD.PutPixel(color, a+x, i);      
      ReefAngel.LCD.PutPixel(color, a-x, i);    
    }     
    for (int i=b-x; i<=b+x; i++) 
    {      
      ReefAngel.LCD.PutPixel(color,a+y, i);     
      ReefAngel.LCD.PutPixel(color,a-y, i);    
    }      
  }
}
//circle matched outletbox
//circle matched outletbox
void DrawCircleBox (byte x, byte y, byte RelayData)
{
  byte a = 0;
  byte b = 0;
  byte c = 0;
  for (a=0,c=1;a<2;a++,c--)
  {
    // 0 & 1
    DrawCircle ((a*10)+x,y,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle((a*10)+x,y,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle((a*10)+x,y,3,OutletOffBGColor);
    }
  }
  for (a=2,c=3;a<4;a++,c--)
  {
    // 2 & 3
    b=(a-2)*10;
    DrawCircle (b+x,y+10,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+10,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+10,3,OutletOffBGColor);
    }
  }
  for (a=4,c=5;a<6;a++,c--)
  {
    // 4 & 5
    b=(a-4)*10;
    DrawCircle (b+x,y+20,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+20,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+20,3,OutletOffBGColor);
    }
  }
  for (a=6,c=7;a<8;a++,c--)
  {
    // 6 & 7
    b=(a-6)*10;
    DrawCircle (b+x,y+30,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+30,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+30,3,OutletOffBGColor);
    }
  }
}

void DrawCustomMain()
{

  ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 75, 119, 75);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 59, 119, 59);
  pingSerial();


  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 8, 15, "Main Tank:");
  char text[7];
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, DefaultBGColor, 18, 30, text);
  ConvertNumToString(text, MaxT1, 10);
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_DARKORCHID, DefaultBGColor, 18, 38, text);
  pingSerial(); 
  ReefAngel.LCD.DrawText(COLOR_RED, COLOR_WHITE,8,48,"Frag:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], COLOR_RED, 40, 48, 10);

  ReefAngel.LCD.DrawText(COLOR_DARKORCHID, COLOR_WHITE,70,48,"Room:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], T2TempColor, 100, 48, 10);

  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 88, 15, "pH:");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);

  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 88, 30, text);
  pingSerial();


  // Display arrows for Wavemaker
  ReefAngel.LCD.DrawText(DPColor,DefaultBGColor, 5, 64,"WAVE FLOW:");
  if (bitRead(ReefAngel.Relay.RelayData,Port5-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"----->"); //port 5 on
  else if (bitRead(ReefAngel.Relay.RelayData,Port6-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"<-----");  //port 6 on
  else ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64," 00000 "); //port5 and port 6 off, wavemaker delay
  //show the timer for wavemaker
  int t=ReefAngel.Timer[1].Trigger-now();
  if (t>=0)
    ReefAngel.LCD.Clear(255,105,64,135,74);
  ReefAngel.LCD.DrawText(APColor, COLOR_KHAKI,110,64,t);
  pingSerial();

  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,79,"Actinic");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,89,"FragLt");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,99,"WM RT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,109,"Fan");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,79,"ATO");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,89,"DayLts");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,99,"WM LFT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,109,"Heater");
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  DrawCircleBox (60,81,TempRelay);
  //ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

void DrawCustomGraph()
{
  //   ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
  ReefAngel.Init();  //Initialize controller
  ReefAngel.TempProbe = T1_PROBE;
  //ReefAngel.OverheatProbe = T1_PROBE;

  ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
  ReefAngel.WaterChangePorts = Port5Bit | Port6Bit;
  ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit;
  ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;
  randomSeed(analogRead(0));
  ReefAngel.Timer[1].SetInterval(random(30,45));
  ReefAngel.Timer[1].Start(); 
  ReefAngel.Relay.On(Port5);

}

void loop()
{
  if (ReefAngel.Params.Temp[T1_PROBE]>MaxT1) MaxT1=ReefAngel.Params.Temp[T1_PROBE];
  // Specific functions
  ReefAngel.StandardATO(Port1);
  ReefAngel.StandardLights(Port2);
  ReefAngel.MHLights(Port3);
  ReefAngel.MHLights(Port4);
  //ReefAngel.Wavemaker1(Port5);
  //ReefAngel.Wavemaker2(Port6);
  ReefAngel.StandardHeater(Port7);
  ReefAngel.StandardFan(Port8);

  //wavemaker timers and slow down at night
  if ( ReefAngel.Timer[1].IsTriggered() )
  {
    if ((hour() >= 21) || (hour() <= 8)) //from 9p-8a  
    {
      if (wmdelay)
      {
        ReefAngel.Timer[1].SetInterval(60);  // wm night delay
        ReefAngel.Timer[1].Start();
        ReefAngel.Relay.Off(Port5);
        ReefAngel.Relay.Off(Port6);
        if (wmport==Port5) wmport=Port6; 
        else wmport=Port5;
        wmdelay=false;
      }
      else
      {
        ReefAngel.Timer[1].SetInterval(20);  // short wave
        ReefAngel.Timer[1].Start();
        ReefAngel.Relay.On(wmport);
        wmdelay=true;
      }
    }
    else
    {
      //8a-9p normal wave settings
      ReefAngel.Timer[1].SetInterval(random(35,50));
      ReefAngel.Timer[1].Start();
      ReefAngel.Relay.Toggle(Port5);
      if bitRead(ReefAngel.Relay.RelayData,Port5-1) ReefAngel.Relay.Off(Port6); 
      else ReefAngel.Relay.On(Port6);
    }
  }
  ReefAngel.Portal("psyrob");
  ReefAngel.ShowInterface();
}

Roberto.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

Aye. Aye Captain...uploaded, will monitor for spikes... ;)
Image
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

Well, checked the controller right now...the code you added reported a high temperature of over 2300 degrees!! is that like the surface of the sun?!

What does this mean? is the probe failing?
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem with ATO timeout or Overheat

Post by rimai »

Either that or something is interfering with the readings.
Was the red status LED lit after this reading?
I've seen MH ballast do that in the past and that's why I asked if you had Icecaps. There is a model of 400W Icecaps that generates some nasty noise.
I thought that Curt had something on the libraries to filter out junk if the noise ever interfered with the probe readings.
I'll take a look at the libraries again.
Roberto.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

The red status LED light was off when I found this reading....I have T5s, not MHs, and I have two Accustart ballasts driving the 4X54 watt bulbs...I think the reading was obtained after the lights were already out, but I am not sure.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem with ATO timeout or Overheat

Post by rimai »

I've made a change on the libraries to take care of the out of range readings.
Let's have Curt take a look at it too :)
Roberto.
binder
Posts: 2871
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
Contact:

Re: Problem with ATO timeout or Overheat

Post by binder »

I do have something in the libraries to handle the additional fluctuations. It's enabled by default but people can disable it by adding the "DirectTempSensor" define (this reads the values without any buffering/filtering). I'll take a look at the additional changes later this weekend.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

Well, its been almost a month without this happening, but it is starting again...I am getting overheat timeouts during the middle of the day and i know that there is no overheating going on...
I have not uploaded the libraries since the date of the code, March 22...
Is updating the libraries going to do the trick?

here is the code....

Code: Select all

// Autogenerated file by RAGen (v1.2.1.158), (02/18/2012 23:31)
// RA_021812_2331.ino
//This is the latest; 03/22/2012 wavemaker timer added
//roberto's code to test for temp spikes
// This version designed for v0.9.0 or later

/* The following features are enabled for this File: 
#define VersionMenu
#define wifi
#define SIMPLE_MENU
#define CUSTOM_MAIN
#define COLORS_PDE
#define FONT_8x8
#define FONT_8x16

*/


#include <ReefAngel_Features.h>
#include <RA_Colors.h>
#include <RA_CustomColors.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 <ReefAngel.h>

byte wmport=Port5;
boolean wmdelay=false;

int MaxT1=0;
void DrawCircle(int a, int b, int r, byte color)
//void ReefAngel_NokiaLCD::PutPixel(byte color, byte x, byte y)
{
  int f = 1 - r;  
  int ddF_x = 1;  
  int ddF_y = -2 * r;  
  int x = 0;  
  int y = r;

  ReefAngel.LCD.PutPixel(color, a, b+r);  
  ReefAngel.LCD.PutPixel(color ,a, b-r);  
  ReefAngel.LCD.PutPixel(color, a+r, b);  
  ReefAngel.LCD.PutPixel(color, a-r, b);
  while (x<y) 
  {    
    if (f >= 0) 
    {      
      y--;
      ddF_y += 2;      
      f += ddF_y;    
    }    
    x++;    
    ddF_x += 2;    
    f += ddF_x;

    ReefAngel.LCD.PutPixel(color, a + x, b + y);
    ReefAngel.LCD.PutPixel(color, a - x, b + y);
    ReefAngel.LCD.PutPixel(color, a + x, b - y);
    ReefAngel.LCD.PutPixel(color, a - x, b - y);
    ReefAngel.LCD.PutPixel(color, a + y, b + x);
    ReefAngel.LCD.PutPixel(color, a - y, b + x);
    ReefAngel.LCD.PutPixel(color, a + y, b - x);
    ReefAngel.LCD.PutPixel(color, a - y, b - x);
  }
}
void FillCircle(int a, int b, int r, byte color) 
{  
  int f = 1 - r;  
  int ddF_x = 1;  
  int ddF_y = -2 * r;  
  int x = 0;  
  int y = r;  
  for (int i=b-r; i<=b+r; i++) 
  {    
    ReefAngel.LCD.PutPixel(color, a, i);  
  }  
  while (x<y) 
  {    
    if (f >= 0) 
    {      
      y--;      
      ddF_y += 2;      
      f += ddF_y;    
    }    
    x++;    
    ddF_x += 2;    
    f += ddF_x;      
    for (int i=b-y; i<=b+y; i++) 
    {      
      ReefAngel.LCD.PutPixel(color, a+x, i);      
      ReefAngel.LCD.PutPixel(color, a-x, i);    
    }     
    for (int i=b-x; i<=b+x; i++) 
    {      
      ReefAngel.LCD.PutPixel(color,a+y, i);     
      ReefAngel.LCD.PutPixel(color,a-y, i);    
    }      
  }
}
//circle matched outletbox
//circle matched outletbox
void DrawCircleBox (byte x, byte y, byte RelayData)
{
  byte a = 0;
  byte b = 0;
  byte c = 0;
  for (a=0,c=1;a<2;a++,c--)
  {
    // 0 & 1
    DrawCircle ((a*10)+x,y,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle((a*10)+x,y,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle((a*10)+x,y,3,OutletOffBGColor);
    }
  }
  for (a=2,c=3;a<4;a++,c--)
  {
    // 2 & 3
    b=(a-2)*10;
    DrawCircle (b+x,y+10,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+10,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+10,3,OutletOffBGColor);
    }
  }
  for (a=4,c=5;a<6;a++,c--)
  {
    // 4 & 5
    b=(a-4)*10;
    DrawCircle (b+x,y+20,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+20,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+20,3,OutletOffBGColor);
    }
  }
  for (a=6,c=7;a<8;a++,c--)
  {
    // 6 & 7
    b=(a-6)*10;
    DrawCircle (b+x,y+30,5,COLOR_BLACK);
    if ((RelayData&(1<<c))==1<<c) 
    {
      FillCircle(b+x,y+30,3,OutletOnBGColor);
    }
    else 
    {
      FillCircle(b+x,y+30,3,OutletOffBGColor);
    }
  }
}

void DrawCustomMain()
{

  ReefAngel.LCD.DrawDate(6, 120);
  ReefAngel.LCD.DrawLargeText(COLOR_DARKTURQUOISE, COLOR_WHITE, 4, 4 , "ROB'S REEF ANGEL");
  ReefAngel.LCD.Clear(COLOR_MAROON, 1, 13, 132, 13);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 75, 119, 75);
  ReefAngel.LCD.Clear(COLOR_MAROON, 10, 59, 119, 59);
  pingSerial();


  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, COLOR_WHITE, 8, 15, "Big Tank");
  char text[7];
  ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_GOLDENROD, DefaultBGColor, 18, 30, text);
  ConvertNumToString(text, MaxT1, 10);
  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_DARKORCHID, DefaultBGColor, 18, 38, text);
  pingSerial(); 
  ReefAngel.LCD.DrawText(COLOR_RED, COLOR_WHITE,8,48,"Frag:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T3_PROBE], COLOR_RED, 40, 48, 10);

  ReefAngel.LCD.DrawText(COLOR_DARKORCHID, COLOR_WHITE,70,48,"Room:");
  ReefAngel.LCD.DrawSingleMonitor(ReefAngel.Params.Temp[T2_PROBE], T2TempColor, 100, 48, 10);

  pingSerial();
  ReefAngel.LCD.DrawLargeText(COLOR_MEDIUMSEAGREEN, COLOR_WHITE, 92, 15, "pH");
  ConvertNumToString(text, ReefAngel.Params.PH, 100);

  ReefAngel.LCD.DrawLargeText(PHColor, DefaultBGColor, 88, 30, text);
  pingSerial();


  // Display arrows for Wavemaker
  ReefAngel.LCD.DrawText(DPColor,DefaultBGColor, 5, 64,"WAVE FLOW:");
  if (bitRead(ReefAngel.Relay.RelayData,Port5-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"----->"); //port 5 on
  else if (bitRead(ReefAngel.Relay.RelayData,Port6-1)==1) ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64,"<-----");  //port 6 on
  else ReefAngel.LCD.DrawText(APColor,DefaultBGColor, 67, 64," 00000 "); //port5 and port 6 off, wavemaker delay
  //show the timer for wavemaker
  int t=ReefAngel.Timer[1].Trigger-now();
  if (t>=0)
    ReefAngel.LCD.Clear(255,105,64,135,74);
  ReefAngel.LCD.DrawText(APColor, COLOR_KHAKI,110,64,t);
  pingSerial();

  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,79,"Actinic");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,89,"FragLt");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,99,"WM RT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,10,109,"Fan");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,79,"ATO");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,89,"DayLts");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,99,"WM LFT");
  ReefAngel.LCD.DrawText(COLOR_MEDIUMSEAGREEN,DefaultBGColor,80,109,"Heater");
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  DrawCircleBox (60,81,TempRelay);
  //ReefAngel.LCD.DrawOutletBox(12, 93, TempRelay);
}

void DrawCustomGraph()
{
  //   ReefAngel.LCD.DrawGraph(5, 5);
}


void setup()
{
  ReefAngel.Init();  //Initialize controller
  ReefAngel.TempProbe = T1_PROBE;
  //ReefAngel.OverheatProbe = T1_PROBE;

  ReefAngel.FeedingModePorts = Port5Bit | Port6Bit;
  ReefAngel.WaterChangePorts = Port5Bit | Port6Bit;
  ReefAngel.OverheatShutoffPorts = Port2Bit | Port3Bit | Port4Bit;
  ReefAngel.LightsOnPorts = Port2Bit | Port3Bit | Port4Bit;
  randomSeed(analogRead(0));
  ReefAngel.Timer[1].SetInterval(random(30,45));
  ReefAngel.Timer[1].Start(); 
  ReefAngel.Relay.On(Port5);

}

void loop()
{
  if (ReefAngel.Params.Temp[T1_PROBE]>MaxT1) MaxT1=ReefAngel.Params.Temp[T1_PROBE];
  // Specific functions
  ReefAngel.StandardATO(Port1);
  ReefAngel.StandardLights(Port2);
  ReefAngel.MHLights(Port3);
  ReefAngel.MHLights(Port4);
  //ReefAngel.Wavemaker1(Port5);
  //ReefAngel.Wavemaker2(Port6);
  ReefAngel.StandardHeater(Port7);
  ReefAngel.StandardFan(Port8);

  //wavemaker timers and slow down at night
  if ( ReefAngel.Timer[1].IsTriggered() )
  {
    if ((hour() >= 21) || (hour() <= 8)) //from 9p-8a  
    {
      if (wmdelay)
      {
        ReefAngel.Timer[1].SetInterval(60);  // wm night delay
        ReefAngel.Timer[1].Start();
        ReefAngel.Relay.Off(Port5);
        ReefAngel.Relay.Off(Port6);
        if (wmport==Port5) wmport=Port6; 
        else wmport=Port5;
        wmdelay=false;
      }
      else
      {
        ReefAngel.Timer[1].SetInterval(20);  // short wave
        ReefAngel.Timer[1].Start();
        ReefAngel.Relay.On(wmport);
        wmdelay=true;
      }
    }
    else
    {
      //8a-9p normal wave settings
      ReefAngel.Timer[1].SetInterval(random(35,50));
      ReefAngel.Timer[1].Start();
      ReefAngel.Relay.Toggle(Port5);
      if bitRead(ReefAngel.Relay.RelayData,Port5-1) ReefAngel.Relay.Off(Port6); 
      else ReefAngel.Relay.On(Port6);
    }
  }
  ReefAngel.Portal("psyrob");
  ReefAngel.ShowInterface();
}
 
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Problem with ATO timeout or Overheat

Post by rimai »

I've made a change on the libraries not too long ago. Can you try updating it and let me know if you still have this issues?
Roberto.
psyrob
Posts: 247
Joined: Thu Sep 01, 2011 8:44 pm

Re: Problem with ATO timeout or Overheat

Post by psyrob »

OK, updated libraries on Friday, as of now (monday morning), no Overheat alarms...and the "max temp" code you sent me is still on, it is reporting the real max temp, like 81 or whatever, not the "spike" temps of 2900 degrees, so it seems problem is solved for now...thanks
Image
Post Reply