Keeps resetting relays every 15 or so minutes?

Do you have a question on how to do something.
Ask in here.
Post Reply
estanoche
Posts: 46
Joined: Thu Mar 01, 2012 8:17 pm
Location: Spokane, WA

Keeps resetting relays every 15 or so minutes?

Post by estanoche »

I recently re-loaded my INO file with current library files, and now it seems like my RA keeps resetting every 15 minutes or so.... if I override a relay state using the client or my phone app it will "reset" after a period of time... The whole unit seems to be resetting too as it is cycling my MH too, and putting it into the delay to fire state.

Help???

Here's my code

/* The following features are enabled for this File: 
#define DisplayImages
#define DateTimeSetup
#define VersionMenu
#define wifi
#define RelayExp
#define InstalledRelayExpansionModules 1
#define SIMPLE_MENU
#define CUSTOM_MAIN
*/

#include <Salinity.h>
#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 <RF.h>
#include <IO.h>
#include <ORP.h>
#include <AI.h>
#include <PH.h>
#include <WaterLevel.h>
#include <ReefAngel.h>

void DrawCustomMain()
{
  // the graph is drawn/updated when we exit the main menu &
  // when the parameters are saved
  ReefAngel.LCD.DrawDate(6, 122);
  pingSerial();
#if defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params,
  ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue());
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
  ReefAngel.LCD.DrawMonitor(15, 60, ReefAngel.Params);
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
  pingSerial();
  byte TempRelay = ReefAngel.Relay.RelayData;
  TempRelay &= ReefAngel.Relay.RelayMaskOff;
  TempRelay |= ReefAngel.Relay.RelayMaskOn;
  ReefAngel.LCD.DrawOutletBox(12, 92, TempRelay);
  pingSerial();
  TempRelay = ReefAngel.Relay.RelayDataE[0];
  TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
  TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
  ReefAngel.LCD.DrawOutletBox(12, 104, TempRelay);
}

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

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

    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit;
    ReefAngel.LightsOnPorts = Port1Bit | Port2Bit | Port3Bit;
    ReefAngel.FeedingModePortsE[0] = Port6Bit | Port7Bit;
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit;
    ReefAngel.WaterChangePortsE[0] = Port2Bit | Port5Bit | Port6Bit | Port7Bit;
    ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat

    // Ports that are always on
    ReefAngel.Relay.On(Port6); //CO2 solenoid
    ReefAngel.Relay.On(Port2); //broken port, stuck on
    ReefAngel.Relay.On(Box1_Port3); //CA reactor PH monitor
    ReefAngel.Relay.On(Box1_Port4); //CA reactor recirculation pump
    ReefAngel.Relay.On(Box1_Port5); //Feed pump for media reactor
    ReefAngel.Relay.On(Box1_Port6); //Return
    ReefAngel.Relay.On(Box1_Port7); //Skimmer
    ReefAngel.Relay.On(Box1_Port8); //broken port, stuck on
}

void loop()
{
    // Specific functions
    ReefAngel.MHLights(Port1,17,30,01,00,15); //MH light schedule, on at 530PM, off at 1:00AM
    ReefAngel.StandardLights(Box1_Port2,17,30,01,00); //broken port, stuck on, T5 Main, on at 530PM off at 1:00AM
    ReefAngel.StandardLights(Port3,17,00,01,30); //T5 actinic, on at 5:00PM off at 01:30AM
    ReefAngel.StandardLights(Port4,13,00,17,30); //LED night, on at 1:00PM, off at 530PM
    ReefAngel.StandardLights(Port5,02,00,12,00); //Sump LED, on at 2AM, off at 12PM
    ReefAngel.StandardHeater(Port7,750,754); //Heater, on at 75, off at 76
    ReefAngel.StandardFan(Port8,770,774); //Exhaust Fan, on at 77.4, off at 77
    ReefAngel.DosingPumpRepeat(Box1_Port1,00,30,60); //Dosing pump #1 - KALK, every half hour for 30 seconds
    ReefAngel.Portal("estanoche", "password");
    ReefAngel.ShowInterface();
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Keeps resetting relays every 15 or so minutes?

Post by rimai »

I don't see anything wrong with the code.
Can you check the cables?
Roberto.
estanoche
Posts: 46
Joined: Thu Mar 01, 2012 8:17 pm
Location: Spokane, WA

Re: Keeps resetting relays every 15 or so minutes?

Post by estanoche »

plugs seem secure... ill test each of my plugs on a separate circuit and see if I can narrow it down... I do have an icecap ballast that feeds back and fries relays (ugh, which is why there are "broken ports")... maybe its surging farther up the line than I thought
Post Reply