Page 1 of 2

Re: Relay box - ports flickering

Posted: Mon Aug 29, 2016 6:15 am
by Civics14
Hi Roberto,

Ok, this is strange, so I happen to be around all day Sat & Sun and noticed that the relay flickering on and off only happens when the the dimming occurs at higher levels. Meaning it seems like there is like a threshold at when the dimming is occurring causing this issue. At low levels during the ramping up and ramping down, this doesn't happen.

Any ideas?

Re: Relay box - ports flickering

Posted: Mon Aug 29, 2016 8:33 am
by rimai
Good troubleshooting.
What version of dimming module do you have?
You may need to open the case and it will be written on the pcb board.

Re: Relay box - ports flickering

Posted: Mon Aug 29, 2016 6:31 pm
by Civics14
rimai wrote:Good troubleshooting.
What version of dimming module do you have?
You may need to open the case and it will be written on the pcb board.
Version 1.2

Re: Relay box - ports flickering

Posted: Fri Sep 02, 2016 4:24 am
by Civics14
Any input / help Roberto?

Re: Relay box - ports flickering

Posted: Fri Sep 02, 2016 9:27 am
by rimai
Are you using this with the RANet?

Re: Relay box - ports flickering

Posted: Fri Sep 02, 2016 12:09 pm
by Civics14
nope

Re: Relay box - ports flickering

Posted: Fri Sep 02, 2016 6:04 pm
by rimai
Can you post the code you have loaded?
Is it a regular wizard code?

Re: Relay box - ports flickering

Posted: Mon Sep 05, 2016 2:11 pm
by Civics14
rimai wrote:Can you post the code you have loaded?
Is it a regular wizard code?
Strange part is that it hasn't changed.

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 <PAR.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
    ReefAngel.PHMin=560;
    ReefAngel.PHMax=794;
    InternalMemory.DCPumpThreshold_write(15);
    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port4Bit | Port5Bit | Port6Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port2Bit | Port3Bit | Port4Bit | Port5Bit | Port6Bit | Port8Bit;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port2Bit | Port3Bit;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port1Bit | Port2Bit | Port3Bit | Port4Bit | Port7Bit | Port8Bit;
    // Use T3 probe as temperature and overheat functions
    ReefAngel.TempProbe = T2_PROBE;
    ReefAngel.OverheatProbe = T2_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 835 );

    // Feeeding and Water Change mode speed
    ReefAngel.DCPump.FeedingSpeed=16;
    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    ReefAngel.Relay.On( Port2 ); //Dimming Module
    ReefAngel.Relay.On( Port4 ); //Skimmer
    ReefAngel.Relay.On( Port8 ); //Return

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

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

void loop()
{
    ReefAngel.StandardHeater( Port1,780,785 );
    ReefAngel.StandardLights( Port3,14,00,21,30 ); // T5
    ReefAngel.StandardLights( Port7,0,30,10,30 ); // Fuge Lamp
    ReefAngel.StandardLights( Port6,15,15,20,45 ); //RW20
    ReefAngel.DCPump.ExpansionChannel[0] = None;
    ReefAngel.DCPump.ExpansionChannel[1] = None;
    ReefAngel.DCPump.ExpansionChannel[2] = None;
    ReefAngel.DCPump.ExpansionChannel[3] = None;
    ReefAngel.DCPump.ExpansionChannel[4] = None;
    ReefAngel.DCPump.ExpansionChannel[5] = None;
    ////// Place your custom code below here
    
    ////// Light Schedule Below
          //Set Channel 0 LED RED
          if (PWMSlope(13,15,22,45,5,85,120,5)<=6) 
          {
            ReefAngel.PWM.SetChannel( 0, 0);
            ReefAngel.PWM.SetChannel( 3, 0);
          }
          else
          {
            ReefAngel.PWM.SetChannel( 0, PWMSlope(13,15,22,45,5,85,120,5) );
            ReefAngel.PWM.SetChannel( 3, PWMSlope(13,15,22,45,5,85,120,5) );
          }
          
          //Set Channel 1 LED WHITE
          if (PWMSlope(13,30,22,30,5,80,120,5)<=6)
          {
            ReefAngel.PWM.SetChannel( 1, 0);
            ReefAngel.PWM.SetChannel( 4, 0);
          }
          else
          {
            ReefAngel.PWM.SetChannel( 1, PWMSlope(13,30,22,30,5,80,120,5) );
            ReefAngel.PWM.SetChannel( 4, PWMSlope(13,30,22,30,5,80,120,5) );
          }
          
          //Set Channel 2 LED BLUE
          if (PWMSlope(13,0,23,0,5,100,120,5)<=6)
          {
            ReefAngel.PWM.SetChannel( 2,0);
            ReefAngel.PWM.SetChannel( 5,0);
          }
          else
          {
            ReefAngel.PWM.SetChannel( 2, PWMSlope(13,0,23,0,5,100,120,5) );
            ReefAngel.PWM.SetChannel( 5, PWMSlope(13,0,23,0,5,100,120,5) );
          }
   ////// End of Light Schedule
      
  //Setting Jebao Pump Wave Patterns

 if (InternalMemory.DCPumpMode_read()==11) //if custom mode on portal
 {
   ReefAngel.DCPump.UseMemory = false;
  if (hour()>=12 && hour()<13 ) // Morning mode between 12pm and 2pm
  {
    ReefAngel.DCPump.SetMode( TidalSwell,80,25 );
  }
     else if (hour()>=13 && hour()<16) // Day mode between 2pm and 4pm
  {
    ReefAngel.DCPump.SetMode( ShortPulse,80,25 );  
  }
     else if (hour()>=16 && hour()<20) // Day mode between 4pm and 8pm
  {
    ReefAngel.DCPump.SetMode( ShortPulse,100,25 );  
  }
     else if (hour()>=20 && hour()<21) // Evening mode between 8pm and 9pm
  {
    ReefAngel.DCPump.SetMode( ShortPulse,80,25 );
  }
     else if (hour()>=21 && hour()<23) //Calming beween 9pm and 11pm
  {
    ReefAngel.DCPump.SetMode( Lagoon,75,20 );  
  }
     else
  {
    ReefAngel.DCPump.SetMode( Lagoon,40,20 );  // Night Mode between 11pm and l2pm
  }  
 }
 else ReefAngel.DCPump.UseMemory = true; //if it's not on custom, use portal program

    ReefAngel.DCPump.DaylightChannel = Sync;
    ReefAngel.DCPump.ActinicChannel = Sync; //use None when inactivated
    
    ////// Place your custom code above here

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


Re: Relay box - ports flickering

Posted: Mon Sep 05, 2016 6:37 pm
by rimai
Are you using a hub?
Is the dimming expansion the only expansion module?

Re: Relay box - ports flickering

Posted: Tue Sep 06, 2016 1:02 pm
by Civics14
rimai wrote:Are you using a hub?
Is the dimming expansion the only expansion module?
No hub, just the dimming expansion as the only expansion module

Re: Relay box - ports flickering

Posted: Thu Sep 08, 2016 8:47 am
by Civics14
any ideas roberto?

Re: Relay box - ports flickering

Posted: Fri Sep 09, 2016 5:20 pm
by rimai
Not sure what it is. Did anything change?

Re: Relay box - ports flickering

Posted: Sun Nov 27, 2016 7:14 am
by Civics14
Hi Roberto, I found out what's triggering this. Does the RA dimming module get affected by T5's with electronic ballast? The dimming module is controlling analog drivers for my LEDs.

Re: Relay box - ports flickering

Posted: Sun Nov 27, 2016 11:34 am
by rimai
I could. You should keep cable away from any ballasts. The USB ones especially.

Re: Relay box - ports flickering

Posted: Fri Mar 17, 2017 11:07 pm
by dapg8gt
Old bump for my issue.. My expansion hub causes my extra relay box to flicker as well.. The relays will click every few mins to every few hours but constant. It's as far as I can tell not triggered by anything equipment wise . Took me a bit to find out what was going on but it's Def the expansion hub. I don't notice anything with the other add ons other than I would sometimes get reading of 0 in the levels on Reeftronics randomly.

Box is inside a sealed part of my stand away from the sump chamber so Def don't think water damage.. Any troubleshooting tips? What to look for visually inside the expansion? should I try all new usb cables?

As of now I'm not running any of my expansions other than the relay box..

Re: Relay box - ports flickering

Posted: Sat Mar 18, 2017 9:55 am
by rimai
Are you using the original short USB cables?

Re: Relay box - ports flickering

Posted: Mon Apr 09, 2018 2:09 am
by dlplunkett44
dapg8gt, did you get this figured out? This is the exact issue I am having - random flickering on different relays every few seconds to hours. I can't imagine there is water damage where I have it mounted.

Re: Relay box - ports flickering

Posted: Mon Apr 09, 2018 6:51 am
by Piper
I frequently run into this issue as well. Do you have a standard outlet box or the RANet outlet box? Are you using the expansion hub? Here's a few things to try when the flickering starts up again:

* Try re-seating all of your USB cables and try rearranging the cables in the expansion hub if you have one.
* Try unplugging your modules one by one and see if you can isolate the offending module.
* Even as far as eliminating the expansion hub.
* Try unplugging your hardware (pumps/lights) one by one and see if you can find anything there causing the problem.
* Make sure you don't have USB cables running in parallel with power cables.
* Make sure you're using the original USB cables as well. If not, make sure the cables you're using are as short as possible and have a Ferrite magnet choke on them.
* This one is a long shot but do you have more than one version of the Arduino IDE installed?

I've found that I also have to reboot my RA after making some of the changes listed above to get it to stop the flickering. Let me know what you find out. I'm still having the problem even after going through all of the steps above and would like to know what works or doesn't work for you. I'm pretty sure I've narrowed my problem down to the RA head unit itself at this point.

~Charlie

Re: Relay box - ports flickering

Posted: Mon Apr 09, 2018 7:00 am
by Piper
Couple more questions for you: How many relay boxes are you running? If more than one, is the flickering isolated to one box? If so, which one?

Re: Relay box - ports flickering

Posted: Mon Apr 09, 2018 4:35 pm
by dlplunkett44
So I tried reseating and moving around all of the USB cables. I'm using only the USB cables that came with the system. I currently have an expansion hub with two relay expansion modules, one of the old boxier ones and one newer flatter one. I recently added the newer one but the issues were happening before I added it. I also have a 16 channel dimming expansion. I have not been able to isolate the offending piece yet as I need all of them plugged in to operate my tank. I'm trying to spend more time watching the controller to see if I can see which ones are switching randomly.
I do not have the USB cables running parallel with any power cables but they do cross over. I ordered some ferrite beads but I haven't received them yet.
I'm not sure if it's the same issue or not but I'm also having an issue with random sockets staying on or not turning on when they should, luckly this hasn't happened with the ATO yet, although it scares me thinking about it.

Re: Relay box - ports flickering

Posted: Mon Apr 09, 2018 7:14 pm
by Piper
dlplunkett44 wrote: one of the old boxier ones and one newer flatter one. I recently added the newer one but the issues were happening before I added it.
So outlets on both boxes are flickering for you?

dlplunkett44 wrote:I'm not sure if it's the same issue or not but I'm also having an issue with random sockets staying on or not turning on when they should, luckly this hasn't happened with the ATO yet, although it scares me thinking about it.
Yeah, I get that too. I’m concerned about dosing pumps getting stuck on also.

Keep trying to narrow down the module or tank hardware that might be causing the problem.

Re: Relay box - ports flickering

Posted: Tue Apr 10, 2018 2:04 am
by dlplunkett44
I'm not sure if it is the new one as well or not. I still have not figured out which ports/box.

Re: Relay box - ports flickering

Posted: Mon Apr 16, 2018 5:35 am
by dlplunkett44
So I'm not sure if the flickering is happening to both expansion relay boxes or just one. It doesn't seem to be happening to the main relay (although I'm not 100% sure).

The issue with some relays staying on or not coming on has been happening with the old style relay box - I haven't seen it happen yet with the new style box. When I'm having the issue where a relay should be on but isn’t and I go into the Android app, it shows the relay as off. I can then turn it on using the app, but it shows the icon next to the relay port designating it as under manual control. If I unplug the head unit for a second and plug it back in, everything goes on or off to where it should be.

Thinking that it could be interference from AC lines, I added additional ferrite beads to all USB and serial cables (all have 2 – 3 now, including the built in ones). I added these yesterday evening. This morning I go down and look at my tank and the dimming is messed up on one of the lights – it looks like it dimmed down partially, but then stayed at that level all night instead of dimming to 0. Again, I unplugged the head unit for a second and plugged it back in and this fixed it.

I’m wondering if it is something to do with the expansion hub? Like I said, I don’t think it’s happening to the main relay box, but I am having issues with all of my expansions (2 relay boxes and a 16 channel PWM dimming expansion).

What else can I do to stop this? I have re-uploaded my code several times, I have added ferrite beads to the power, USB-IN and all USB-OUT cables for the expansion hub.

Re: Relay box - ports flickering

Posted: Mon Apr 16, 2018 6:45 am
by Piper
I'm leaning towards A/C power line interference. If I adjust my cables the problem goes away for a while. I haven't gone as far as re-routing my cables yet because it requires me to drill holes in my stand and I'm too lazy to do that at the moment.

Try re-routing your VGA cable and see if that helps at all. Also make sure you don't have have any USB cables running parallel with power cables. If they have to cross at all they should be perpendicular.

Re: Relay box - ports flickering

Posted: Mon Apr 16, 2018 7:19 am
by dlplunkett44
I don't have any data cables running parallel with AC lines but they are near them and they do cross over perpendicular. I will work on re-routing cabling to isolate them as much as possible and report back in the coming days. Is there anything I can do to shield the AC cables? metal conduit?

Re: Relay box - ports flickering

Posted: Wed Apr 18, 2018 5:11 am
by dlplunkett44
So I have re-routed many of the A/C cables to behind the board that all of the Reef Angel stuff is mounted to. I am still having this issue, so my next course of action to buy some 1/2" or 3/4" metal electrical conduit to place all of the data cables into. I will have the conduit end as close to where the USB cables connect as possible (hopefully an inch max exposed). I will probably do this this weekend and report back here if it solves it or not. If it is EMI, this really should fix it completely.

Re: Relay box - ports flickering

Posted: Wed Apr 18, 2018 1:28 pm
by Piper
dlplunkett44 wrote:I will probably do this this weekend and report back here if it solves it or not. If it is EMI, this really should fix it completely.
Let me know what you come up with. I never thought about running conduit. It will be interesting to know if this actually solves the problem.

~Charlie

Re: Relay box - ports flickering

Posted: Mon Apr 30, 2018 9:30 am
by riggeek
Any luck with the Conduit?

My biggest power consumer is the mag 12 return pump. I have seen a buss lock when it was plugged back in from a sock filter change.

Re: Relay box - ports flickering

Posted: Mon May 14, 2018 6:13 am
by dlplunkett44
I haven't been able to try the conduit yet. It sounded like a perfect solution to eliminate any EMI that may be getting to the USB and DC power cables. The difficulty is that the cables need to snake a lot to connect everything and rigid EMI pipes do not easily do this.

My alternative plan (before giving up on RA and moving to another platform - probably GHL):

Currently I have the RA hardware attached to a PVC sheet that is attached to the inside of my stand. There is a decently sized area behind the PVC sheet that allows me to hide excess wires. This however means that there are live AC wires just on the other side of where the RA hardware is mounted.
My plan is four fold:
1. Attch a steel plate on top of the PVC sheet and mount the RA hardware to this. This will stop any EMI from passing through the back side of the RA hardware.
2. Reduce the size of all AC cables if possible and coil up the ones that I can't into as small an area as possible.
3. I found some copper tape that has a conductive adhesive. It is often used for EMI protection. I'm going to wrap all DC and USB cables with this.
4. I will finally take an aquarium grounding probe and cut off the titanium probe. I will then tie this to each copper taped cable and to the steel plate to provide an easy path to ground for everything.

If there is anything else that anyone can think of that would be relatively inexpensive and relatively easy to implement, please add here. I'll be doing this this coming weekend.

Thanks!

Re: Relay box - ports flickering

Posted: Thu May 17, 2018 4:26 am
by dlplunkett44
So I have made some progress with figuring out what is going on.

So far I have worked on replacing all AC and USB cables with shorter cables. I have also tried to separate them as much as possible. This has reduced the amount of flickering although I am still experiencing it some.

Another issue that I have been having is that sometimes the relays on my newest box do not respond when they should. They will either stay on when they should have shut off or stay off when they should have turned on. I think this is an issue with the relay box itself. It is one of the new style boxes. I've always noticed that the USB cable going into it has been very loose. I tried replacing the cable but it was also loose. Upon closer inspection I saw that the plastic housing was preventing the USB cable from fully seating. I opened the box so that I could make the hole in the housing larger. This allowed it to fully seat however it was still very loose and a slight bump would remove the cable. So finally I made a sight bend in the USB port and this allowed the cable to be firmly seated. I did this last night and thought this would fix the problems with this relay box, but I woke up this morning and none of the relays on the box were on (1-4 should have been). Has this been seen before? Can I get a replacement box?

Thanks.