RA hanging or heater relay clicking

Basic / Standard Reef Angel hardware
Post Reply
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

RA hanging or heater relay clicking

Post by Endaar »

I'm new to RA. I received mine last week and have been working to get it up and running.
I have a couple different issues.
I have the RF expansion, water lever expansion, salinity expansion, and WiFi.
I have been successful getting WiFi working, my 2 Vortech 40mp to sync and change modes. Water lever expansion works and turns on and off ATO pump. Salinity is up and calibrated. So I have all the expansion working.

Now here is where my problems come in. I am using the wizard to make the file and not really doing anything other than adding the line of code for the water lever expansion. I'm just trying to make sure everything work before I start complicating things by adding custom code.
When I have the RF code installed and the system is up and running for an hour or so the system hangs. The green LED is on steady, the red LED flashes 3 times. After the 3 flashes the back light comes on the LCD for a second or two, then the red LED flashes 3 times again. And this continues to repeat until I unplug the power and re-apply it.
I have tried using internal and external memory and both have the same out come.

Problem #2 - I removed the RF expansion from the wizard and built a new file with out it to see if I could get the rest of the system up and running. I have the 2 dosing pumps (I want to add a 3rd) working correctly and it looks like the ATO is functioning correctly.
I'm running a 500W Finnex Titanium heater and it is on port 3 on the relay box. Everything works great until the RA turns on the heater at that point the relay clicks continuously until I remove power from the system.

Any ideas?

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 <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
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = 0;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port5Bit | Port6Bit | Port7Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit;
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T2_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 820 );


    // Ports that are always on
    ReefAngel.Relay.On( Port1 );
    ReefAngel.Relay.On( Port2 );
    ReefAngel.Relay.On( Port4 );

    ////// Place additional initialization code below here
    

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

void loop()
{
    ReefAngel.StandardHeater( Port3,778,772 );
    ReefAngel.WaterLevelATO(Port5,30,81,83);
    ReefAngel.DosingPumpRepeat( Port6,0,120,1 );
    ReefAngel.DosingPumpRepeat( Port7,45,60,1 );
    ////// Place your custom code below here
    

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

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

void DrawCustomMain()
{
    int x,y;
    char text[10];
    // Parameters
#if defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params,
    ReefAngel.PWM.GetDaylightValue(), ReefAngel.PWM.GetActinicValue() );
#else // defined DisplayLEDPWM && ! defined RemoveAllLights
    ReefAngel.LCD.DrawMonitor( 15, 14, ReefAngel.Params );
#endif // defined DisplayLEDPWM && ! defined RemoveAllLights
    pingSerial();

    // Salinity
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,15,54, "SAL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKKHAKI,DefaultBGColor,39,54, ReefAngel.Params.Salinity );
    pingSerial();

    // Water Level
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,75,75, "WL:" );
    ReefAngel.LCD.DrawText( COLOR_DARKGOLDENROD,DefaultBGColor,99,75, ReefAngel.WaterLevel.GetLevel() );
    pingSerial();

    // Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 12, 95, TempRelay );
    pingSerial();

    // Date and Time
    ReefAngel.LCD.DrawDate( 6, 122 );
    pingSerial();
}

void DrawCustomGraph()
{
}
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA hanging or heater relay clicking

Post by rimai »

What happens if you make port3 always on?
Does it also do the same thing?
Roberto.
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

I changed it to always on and commented out the StandardHeater line and it seems to work fine. I plugged in the heater and it heated and I plugged a lamp in for a few minutes and it work without issue.
Ant
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA hanging or heater relay clicking

Post by rimai »

Ah, sorry I missed it at first.
The function uses port, on, off
So try this:

Code: Select all

ReefAngel.StandardHeater( Port3,772,778 );
Roberto.
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

That seemed to fix the heater issue. The line of code that is was using was generated by the wizard. I just ran the wizard again to double check it and it has it ReefAngel.StandardHeater( Port3,778,772 );
You may want to take a look at that.
Thank you for the help with that one.

Any idea on my first issue when the RF expansion is being used?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA hanging or heater relay clicking

Post by rimai »

Are you sure you didn't read the settings wrong?
I just tried and worked.
Turn on at 77.2 and off at 77.8
Does that only happen when you have the RF module connected?
Roberto.
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

My bad.... You are right I had it backwards in the wizard.
Thanks Roberto
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

Roberto,
I'm still seeing the RA flashing the red LEDs 3 times while alternating the backlight on the LCD after the system has been running for awhile. The only difference is the RA comes back on and continues working after it goes through the flashing LED/backlight sequence 3 times. I'm still running the code above with the change you suggested for the heater, which is working correctly now.
Any idea on what would be causing the behavior above?
Ant
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA hanging or heater relay clicking

Post by rimai »

That's usually cause by noise coming from some something that is being picked up by the expansion bus.
Do you have any cables running close to halide or ballasts?
Also, check if the usb cables are properly attached.
Roberto.
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

Roberto,
I haven't loaded the RF expansion back into the system and I'm still seeing the system reset occasionally. It flashes the sequence 1 time and reset system. I don't have any thing near the relay box except for the expansion modules.
I'm including a couple pictures the before is when I walked into the house and looked at the LCD and the backlight was on and they screen was messed up. The after is what the screen normally looks like after I removed and replaced power.
Attachments
AfterReset.jpeg
AfterReset.jpeg (58.48 KiB) Viewed 5434 times
BeforeReset.jpeg
BeforeReset.jpeg (51.82 KiB) Viewed 5434 times
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: RA hanging or heater relay clicking

Post by rimai »

Are you able to toggle the ports when the screen is like that?
Like, if you push the joystick twice, does it enter feeding mode?
Roberto.
Endaar
Posts: 28
Joined: Tue Apr 02, 2013 9:56 pm

Re: RA hanging or heater relay clicking

Post by Endaar »

I didn't try that. I will if it does it again.
Post Reply