Why does my RA go into feeding mode randomly

Basic / Standard Reef Angel hardware
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Why does my RA go into feeding mode randomly

Post by modulok »

Happened last week one night while sleeping. Around 4am I awoke to the unpleasant sound of my tanks pumps shutting off and overflow water noise.

I updates some code (heater temps and light schedule) yesterday and libraries updated too.

The happened again yesterday around 3am, and it just happened tonight around 1230am, twice. I just killed power to both relays and did full reset.

I'm getting worried sincere it's cooler in the house and heaters are needed now. Water change mode shuts off heaters.

Sent from my Nexus 7 using Tapatalk 4
Last edited by modulok on Sat Nov 30, 2013 9:43 pm, edited 1 time in total.
Image
User avatar
Pny
Posts: 35
Joined: Wed Aug 08, 2012 5:06 am
Location: Sweden

Re: Why does my RA go into water change mode randomly at nig

Post by Pny »

Since the problems started after a code update, I would guess its a software problem... I suggest you go back to the previous code and libraries and see if the problem disappear...
200 liter reef cube + 1000 liter FOWLR
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into water change mode randomly at nig

Post by modulok »

No... It happened before the code update too.

Sent from my Nexus 7 using Tapatalk 4
Last edited by modulok on Fri Nov 15, 2013 10:48 am, edited 1 time in total.
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Why does my RA go into water change mode randomly at nig

Post by lnevo »

Lets see your code...could you be hitting an overheat maybe? Also i would suggest a portal key.
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into water change mode randomly at nig

Post by modulok »

It's definitely not an overheat. I don't shut off my return pump on overheat.

Portal key for blocking someone starting water changes without my knowledge? Thank god I didn't have some type of auto water change setup.

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

// Define Named Relay Ports
#define Flow1           1
#define Flow2           2
#define Flow3           3
#define Return          4
#define Skimmer         5
#define VortechL        6
#define VortechR        7
#define HeaterDisp      8

#define CenterT5        Box1_Port1
#define FrontT5         Box1_Port2
#define BackT5          Box1_Port3
#define MoonLED         Box1_Port4
#define Unused          Box1_Port5
#define Reactor         Box1_Port6
#define Fan             Box1_Port7
#define HeaterSump      Box1_Port8

////// Place global variable code below here
// Custom Main
byte x,y;
char text[10];

////// Place global variable code above here

////// Setup Begin
void setup()
{
    // This must be the first line
    ReefAngel.Init();  //Initialize controller
    
    // Controlled Modes Toggled Ports
    ReefAngel.FeedingModePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port8Bit; //Flow1-3,Return,Skimmer,HeaterDisp
    ReefAngel.FeedingModePortsE[0] = Port2Bit | Port7Bit | Port8Bit; //FrontT5,Fan,HeaterSump
    ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port8Bit; // Flow1-3,Return,Skimmer,HeaterDisp
    ReefAngel.WaterChangePortsE[0] = Port2Bit | Port3Bit | Port6Bit | Port7Bit | Port8Bit; //Front+BackT5,Reactor,Fan,HeaterSump
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = Port1Bit | Port2Bit | Port3Bit; //Center+Front+BackT5
    
    // Water Temperature Settings & Overheat
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    InternalMemory.OverheatTemp_write( 820 );
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port8Bit; //HeaterDisp
    ReefAngel.OverheatShutoffPortsE[0] = Port2Bit | Port3Bit | Port8Bit; //Front+BackT5,HeaterSump

    // Ports that are always on
    ReefAngel.Relay.On( Flow1 );
    ReefAngel.Relay.On( Flow2 );
    ReefAngel.Relay.On( Flow3 );
    ReefAngel.Relay.On( Return );
    ReefAngel.Relay.On( VortechL );
    ReefAngel.Relay.On( VortechR );
    ReefAngel.Relay.On( Reactor );
    // Ports that are always off
    ReefAngel.Relay.Off(Unused);

    ////// Place additional initialization code below here
    
    //5 second timer for power outage detection
    ReefAngel.Timer[1].SetInterval(5);
    
    ////// Place additional initialization code above here
}
////// Setup End

////// Loop Begin
void loop()
{
    // Ports that are Delayed
    ReefAngel.Relay.DelayedOn( Skimmer,2 );
    // Temperature Control
    ReefAngel.StandardHeater( HeaterDisp,770,775 );
    ReefAngel.StandardHeater( HeaterSump,767,772 );
    ReefAngel.StandardFan( Fan,810,814 );
   // T5 Light Schedule
    ReefAngel.StandardLights( CenterT5,9,0,20,0 );
    if (hour()==14 && minute()>=0 && minute()<=59) ReefAngel.Relay.Off(CenterT5);
    ReefAngel.StandardLights( FrontT5,10,0,18,0 ); 
    ReefAngel.StandardLights( BackT5,11,0,19,0 );

////// Place your custom code below here
    
    // RSM MoonLED Schedule
    if (hour()>=6 && hour()<=8) ReefAngel.StandardLights( MoonLED,6,0,8,59 ); //Morning
    else if(hour()>=20 && hour()<=23) ReefAngel.StandardLights( MoonLED,20,0,23,45 ); //Evening
    else if(hour()>=23 || hour()<=4) if (MoonPhase()>=90) ReefAngel.StandardLights( MoonLED,23,46,4,0 ); //Full Moon
    
    // Moonphase LED Schedule
    if (hour()>=21 || hour()<4)
    {
      ReefAngel.PWM.SetActinic(MoonPhase());
      ReefAngel.PWM.SetDaylight(MoonPhase());
    }
    else
    {
      ReefAngel.PWM.SetActinic(0);
      ReefAngel.PWM.SetDaylight(0);
    }
    //T5 Light Off Variable
    //if (hour()==12 && minute()>=30 && minute()<=44) ReefAngel.Relay.Off(CenterT5);
    //if (hour()==12 && minute()>=15 && minute()<=29) ReefAngel.Relay.Off(FrontT5);
    //if (hour()==16 && minute()>=15 && minute()<=29) ReefAngel.Relay.Off(FrontT5); 
    //if (hour()==13 && minute()>=45 && minute()<=59) ReefAngel.Relay.Off(BackT5);
    //if (hour()==16 && minute()>=45 && minute()<=59) ReefAngel.Relay.Off(BackT5);
    
    // Vortech MP40 | Constant | Lagoon | ReefCrest | ShortWave 1=10ms | LongWave 1=1s | NutrientTransport 1=10ms | TidalSwell
    if (ReefAngel.DisplayedMenu!=FEEDING_MODE || ReefAngel.DisplayedMenu!=WATERCHANGE_MODE)
    {
      if (hour()>=16 && hour()<=19)
      {
        ReefAngel.RF.UseMemory=false;
        ReefAngel.RF.SetMode(LongWave,50,30);
      }
        else if (hour()>=20 || hour()<7)
        {
          ReefAngel.RF.UseMemory=false;
          ReefAngel.RF.SetMode(Lagoon,20,0);
        }
        else
        {
          ReefAngel.RF.UseMemory=true;
        }
     }

    // When Return pump is off so is Skimmer
    if (!ReefAngel.Relay.Status(Return)) {
      ReefAngel.Relay.Override(Skimmer,0); 
    }

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

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

void CheckPower() {
  static boolean PowerOutage=false;
  static boolean DelayedPowerOutage=false;
    
    // Power Outage - Leave Single Flow Pump Powered
    if (!ReefAngel.Relay.IsRelayPresent(EXP1_RELAY)) PowerOutage=true; //Expansion Relay 1 has lost power
    if (!PowerOutage)
    { 
      ReefAngel.Timer[1].Start();
    } 
    if (ReefAngel.Timer[1].IsTriggered())
    { 
      DelayedPowerOutage=true;
    }
    if (DelayedPowerOutage)
    {
    ReefAngel.Relay.Off (Flow1);
    ReefAngel.Relay.Off (Flow3);
    ReefAngel.Relay.Off (Return);
    ReefAngel.Relay.Off (Skimmer);
    ReefAngel.Relay.Off (VortechL);
    ReefAngel.Relay.Off (VortechR);
    ReefAngel.Relay.Off (HeaterDisp);
    }
    
    // Power Restored
    if (PowerOutage && ReefAngel.Relay.IsRelayPresent(EXP1_RELAY))
    {
      PowerOutage=false;
      DelayedPowerOutage=false;
      LastStart=now();
    }
}
////// Custom Main Begin
void DrawCustomMain()
{
// Display Date & Time
    ReefAngel.LCD.DrawDate(5, 2);
    ReefAngel.LCD.Clear(COLOR_BLACK, 1, 11, 132, 11);
    pingSerial();

// Display Water Temp Value
    ConvertNumToString(text, ReefAngel.Params.Temp[T1_PROBE], 10);
    ReefAngel.LCD.DrawHugeNumbers(COLOR_CRIMSON, 255, 5, 14, text);
    pingSerial();
// Display pH Text
    ReefAngel.LCD.DrawText(COLOR_INDIGO,255,80,14,"pH");
// Display pH Value
    ConvertNumToString(text, ReefAngel.Params.PH, 100);
    ReefAngel.LCD.DrawLargeText(COLOR_INDIGO, 255, 95, 14, text, Num8x16);
    pingSerial();
// Display Room Temp Text
    ReefAngel.LCD.DrawText(COLOR_ROYALBLUE,255,80,24,"Rm");
// Display Room Temp Value
    ConvertNumToString(text, ReefAngel.Params.Temp[T3_PROBE], 10);
    ReefAngel.LCD.DrawLargeText(COLOR_ROYALBLUE, 255, 95, 24, text, Num8x16);
    pingSerial();
// Vortech Info

//Moon Phase
    ReefAngel.LCD.Clear(DefaultBGColor,5,88,95,95);
    ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,5,88,MoonPhaseLabel());
//Dimmable Moon LEDs
    ReefAngel.LCD.DrawText(COLOR_NAVY,255,5,98, "MoonLEDs:");
    ReefAngel.LCD.Clear(DefaultBGColor,59,98,75,106);
    ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,59,98, ReefAngel.PWM.GetActinicValue());
    ReefAngel.LCD.DrawText(COLOR_CORNFLOWERBLUE,255,75,98, "%");
  // Display Main Relay Box
    byte TempRelay = ReefAngel.Relay.RelayData;
    TempRelay &= ReefAngel.Relay.RelayMaskOff;
    TempRelay |= ReefAngel.Relay.RelayMaskOn;
    ReefAngel.LCD.DrawOutletBox( 2, 107, TempRelay );
    pingSerial();
// Display Expansion Relay Box 1
    TempRelay = ReefAngel.Relay.RelayDataE[0];
    TempRelay &= ReefAngel.Relay.RelayMaskOffE[0];
    TempRelay |= ReefAngel.Relay.RelayMaskOnE[0];
    ReefAngel.LCD.DrawOutletBox( 2, 119, TempRelay );
    pingSerial();
}
////// Custom Main End

////// Custom Graph Begin
void DrawCustomGraph()
{}
///// Custom Graph End
Image
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into water change mode randomly at nig

Post by modulok »

Happened again, but at 8am this morning. When I went all the way over in the RA Android App I did notice the Vortech's were in Feeding mode, so it may not be water change, but feeding mode instead. Any ideas?
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into water change mode randomly at nig

Post by rimai »

Do you have any equipment that is cycling such as wavemakers?
Roberto.
KRavEN
Posts: 104
Joined: Sun Mar 17, 2013 8:21 am

Re: Why does my RA go into water change mode randomly at nig

Post by KRavEN »

I've had an auto-topoff float switch connected to a relay and it kept cycling the relay a bunch when I had my hands in the sump and that caused it to happen to me. The relay causes a surge that could be picked up by the AVR as a button press.
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into water change mode randomly at nig

Post by modulok »

Happened again last night, it was feeding mode, which after 15mins everything went back to normal. Could be happening when I am not around as well.

I am leaving town for a few days and removed the ports for water change mode, I also changed feeding mode just to turn off return & skimmer. I also updated the RA code with the portal key on Sunday, but it didn't help the auto feed mode at 1am.

No cycling equip or ATO switches being used.
Image
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

having the exact same problem. Did you fix this?
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into feeding mode randomly

Post by modulok »

My *fix* was to set the feeding mode ports over to water change.
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Why does my RA go into feeding mode randomly

Post by lnevo »

That's one way to skin a cat...
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into feeding mode randomly

Post by modulok »

Roberto, can we look into this issue? There are a few of us who are having the issue, and for me it's annoying that I have to workaround the problem and lose one of the great features of my RA.

I still have some ports the toggle off during feeding mode, so I can look at the history.
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into feeding mode randomly

Post by rimai »

I'm unable to replicate which makes it very difficult to get to a solution.
What I'm thinking is something in your environment that is causing this.
It could be an equipment connected to your RA or even RF noise, who knows.
Have you tried unplugging equipment to see if the problem stops?
Roberto.
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into feeding mode randomly

Post by modulok »

I will try turning the Vortechs off and unplugging the RF module over the weekend and see if I get any random feeding modes.
Image
goisles1
Posts: 44
Joined: Wed Aug 14, 2013 10:35 am

Re: Why does my RA go into feeding mode randomly

Post by goisles1 »

I've had the same problem and I think I know the cause for mine... If I let my filter sock go too long, i get much more turbulance in my sump. This causes the the RA to go into Feeding mode.

It was happening recently and once I swapped out my sock for a clean one, it stopped. Also, I find if I'm moving things around in the sump it triggers it as well.. Example.. Last night I organized my wiring in the sump and knocked into the return line a few times.. RA went into Feeding mode twice.

Of course this only explains what causes it.. not WHY it actually occurs
Image
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

I still haven't fixed this issue, but it has reduced in frequency since I replaced my RA board. Which accessories do you guys have?

I suspect it maybe either the expansion hub and or the relay expansion module that is causing the issue.
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into feeding mode randomly

Post by modulok »

I've had the RF Exp unplugged since Monday, and as I look at the portal relay activity chart, I don't see any abnormal equip off during a feeding mode that wasn't true. I will plug it back in and see if I get the issue again.

I have the following equip:
Relay Exp
Exp Hub
RF Exp
2x Vortechs
Image
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

I was just about to post this. I unplugged my RF module and the random feeding modes have stopped. Anyone else can confirm this?

Roberto, do you know what could be causing this?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into feeding mode randomly

Post by rimai »

There may be other RF interference that is being pick up then.
Roberto.
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

Do you mean between the RF unit and the head unit? Since, there are a number of users that are affected by this particular issue it seems unlikely that we all are affected the same way. How is it that the RF module is turning on feeding mode on the head unit? Is there a way we can figure out what could be causing the interference?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into feeding mode randomly

Post by rimai »

I'm not so sure what is causing that.
I cannot replicate the issue, so I can only assume that the issue is local to your environment.
Roberto.
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

Well my argument was that it isn't just local to my environment since a few of the members here are having the same problem. Nevertheless, I can understand why this particular issue is difficult to replicate. My confusion is how the RF module is even switching the head unit into feeding mode. I originally suspected if it was the RF module interfering with the Wi-Fi module some how, but uplugging the wi-fi module did not stop the random feeding modes. I'm curious to know if it's the RF signal that's generated or usb noise from the module .
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into feeding mode randomly

Post by rimai »

We have quite a few RF modules out there that do not present a behavior like that.
It looks to me that is something that you guys have in common that we still have not found out what it is.
I also do not know why the feeding mode is triggered.
Does the vortech also enter feeding mode? Does it show a blinking white button?
Roberto.
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

Yes it's a true feeding mode, not just turning on the feeding mode relays, with a timer and everything. I can even turn off the feeding mode with the portal/android app. The vortech pump goes into feeding mode.

I am using an vortech MP40 ES wireless. I haven't really encountered the problem in the past, it started happening about a couple of months ago after I updated the library and code on the reef angel.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Why does my RA go into feeding mode randomly

Post by rimai »

Did it happen right after the update?
Have you tried downgrading the libraries?
Did you happen to download and install a new RA installer from the website?
I'm wondering if it is related to the twi.c....
Let's try this:
Download the attached twi.c and overwrite the one you have in your computer.
The file is located here: C:\Program Files (x86)\Reef Angel Controller\libraries\Wire\utility\twi.c
Upload code to your controller again.
Attachments
twi.c
(15.98 KiB) Downloaded 403 times
Roberto.
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

Can't say it happened right after, but at least it started happening around the same time I updated the code. I was having issues with the VGA cables, causing the relays to not turn on reliably. I had tried updating the libraries reflashing the head unit to no avail, but was able to fix the issue by replacing the cables.

I will try that change and report back to you in a couple of days with the RF module plugged in again. Before unplugging the module, it was randomly going into feeding mode about 3-4 times a day.
modulok
Posts: 163
Joined: Wed Oct 24, 2012 8:37 am

Re: Why does my RA go into feeding mode randomly

Post by modulok »

I don't understand how the RF module can initiate a feeding mode.

The only other RF I have in the area is a Roku controller. Could that be interfering with the module?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Why does my RA go into feeding mode randomly

Post by lnevo »

RF signals are everywhere...cordless phones, any electronic device, garage door openers...its everywhere
javisaman
Posts: 66
Joined: Thu Jun 30, 2011 7:27 am

Re: Why does my RA go into feeding mode randomly

Post by javisaman »

I'm using OSX Mavericks and I don't see the Wire directory in the same directory as the other libraries (ReefAngel, ReefAngel_Features, etc). Am I looking at the right place?

update: actually doing a search I can't even find the twi.c file
Post Reply