Page 1 of 1

Relays only work when overheated

Posted: Sat Jan 19, 2013 3:07 pm
by M@!
I can't figure this out. None of my relays are working unless I overheat the unit. As soon as I overheat the relays work. Anything wrong with my code?

Code: Select all

#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 <ReefAngel.h>

void setup()
{
  ReefAngel.Init(); // Initialize Controller
  ReefAngel.AddStandardMenu();
  ReefAngel.AddDateTimeMenu();  
  ReefAngel.FeedingModePorts = Port5Bit | Port6Bit; // Turn off Ports 5 and 6 when Feeding Mode is activated
  ReefAngel.WaterChangePorts = Port1Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit; // Turn off Ports 1, 5, 6, 7 and 8 when Water Change Mode is activated
  ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit | Port7Bit; // Turn off Ports 3, 4 and 7 when overheat occurs
  ReefAngel.LightsOnPorts = Port3Bit | Port4Bit; // Turn on/off Ports 3 and 4 when Light On/Off menu option is selected
  ReefAngel.OverheatProbe = T1_PROBE; // Use Temperature probe 1 to check for overheat
  ReefAngel.Relay.On(Port2); // Always on
  ReefAngel.Relay.On(Port5); // Always on
  ReefAngel.Relay.On(Port6); // Always on
  ReefAngel.Relay.On(Port7); // Always on
  ReefAngel.Relay.On(Port8); // Always on
}

void loop()
{
  ReefAngel.LCD.DrawLargeText(COLOR_STEELBLUE,COLOR_WHITE,28,121,"Reef Angel"); // Display Reef Angel banner
  ReefAngel.StandardLights(Port3,30); // Actinic Lights
  ReefAngel.StandardLights(Port4,0); // Daylight Lights
  ReefAngel.StandardHeater(Port1); // Heater
  ReefAngel.ShowInterface(); // Display everything on the LCD screen
}





Re: Relays only work when overheated

Posted: Sat Jan 19, 2013 5:25 pm
by rimai
Humm..
Never heard of such thing :(
Can you try the ControllerTester code??
File->Sketchbook->Example Codes->ControllerTester

Re: Relays only work when overheated

Posted: Sat Jan 19, 2013 6:25 pm
by M@!
I did the controller tester and everything worked. The pre-load code works fine. As soon as I made a few changes to the pre-load code it stopped working.

On the controller the relay lights are green but no power. I grab the temp sensor and overheat it, overheat relays turn off and the rest turn on. Also, once the temp relay turns off(still in overheat status) all the other relays again turn off. It's really strange.