Relay 8 switching on and off for a split second

Basic / Standard Reef Angel hardware
Post Reply
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Relay 8 switching on and off for a split second

Post by Ridwaan »

Hi..

I am currently using port 8 to power my skimmer. I am using the single ATO function for top ups...
I am using the high ato float switch to turn off my skimmer if ther sump water level rises.

The problem I am experiencing is that port 8 relay which my skimmer is connected to, switched on and off for a split second ever few seconds.
Sometimes even port 6 which is fo rmy ato pump switched on and off quickly...not sure whats happening

Below is my code...hope someone can point out where the problem is or is it a faulty relay box?

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>

////// 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.SetTemperatureUnit( Celsius );  // set to Celsius Temperature

    ReefAngel.AddStandardMenu();  // Add Standard Menu

    ReefAngel.Use2014Screen();  // Let's use 2014 Screen 
    ReefAngel.AddPHExpansion();  // pH Expansion Module
    ReefAngel.AddWaterLevelExpansion();  // Water Level Expansion Module
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port6Bit | Port7Bit | Port8Bit;
 
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port7Bit | Port8Bit;

    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = Port1Bit;

    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit;
    
    // Use T1 probe as temperature and overheat functions
    ReefAngel.TempProbe = T1_PROBE;
    ReefAngel.OverheatProbe = T1_PROBE;
    // Set the Overheat temperature setting
    InternalMemory.OverheatTemp_write( 280 );

    // Feeeding and Water Change mode speed

    ReefAngel.DCPump.WaterChangeSpeed=0;


    // Ports that are always on
    
    

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

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

void loop()
{
    ReefAngel.StandardLights( Port1,6,45,19,15 );
    ReefAngel.StandardLights( Port2,11,45,17,30 );
    ReefAngel.StandardHeater( Port3,240,255 );
    ReefAngel.StandardHeater( Port4,240,255 );
    ReefAngel.StandardFan( Port5,260,265 );
    ReefAngel.CO2Control( Port7,650,660 );
        
    ////// Place your custom code below here
static unsigned long atoTimer;

if (ReefAngel.DisplayedMenu==FEEDING_MODE) atoTimer=now();

if (now()-atoTimer < 300) { //300 second delay (five minutes) 
  ReefAngel.Relay.Off(Port6);
 
} else {
  ReefAngel.SingleATO( true,Port6,20,0 );
}

   

if (hour()>=7 && hour()<10)
{
    ReefAngel.PWM.SetDaylight( LongPulseMode(0,80,5,true) ); // Ramp from 0% to 80% with 5 second duration in antisync mode
    ReefAngel.PWM.SetActinic( LongPulseMode(0,80,5,false) );
}

if (hour()>=10 && hour()<17)
{
    ReefAngel.PWM.SetDaylight( ElseMode(80,20,true) ); // ReefCrest at 80% +/- 20% on antisync mode
    ReefAngel.PWM.SetActinic( ElseMode(80,20,false) );
}
else if (hour()>=17 && hour()<20)
{
     ReefAngel.PWM.SetDaylight( LongPulseMode(0,80,10,true) ); // Ramp from 0% to 80% with 10 second duration in antisync mode
     ReefAngel.PWM.SetActinic( LongPulseMode(0,80,10,false) ); 
}    
    else if (hour()>=20 || hour()<7)
{
    ReefAngel.PWM.SetDaylight( ElseMode(30,10,true) ); // ReefCrest at 80% +/- 20% on antisync mode
    ReefAngel.PWM.SetActinic( ElseMode(30,10,false) );
}
    if(ReefAngel.HighATO.IsActive())
    {
        ReefAngel.Relay.Off(Port8);
    }
    else
    {
        ReefAngel.Relay.On(Port8);
    }
  
  if( ReefAngel.DisplayedMenu==FEEDING_MODE )
 {
   ReefAngel.PWM.SetActinic(0);
   ReefAngel.PWM.SetDaylight(0);
}
    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

I'm taking the high float is suspended since you are using it for emergency shut off, right?
Does that happen if you unplug the float switches from the head unit too?
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Hi...
Yes you are right...it is suspended with wires downward and yes it is used as emergency shut off to shutoff the skimmer if sump water level rises because i have insump skimmer so its to preven the skimmer from overflowing.
When i unplug the float switch from the head unit, this does not happen...
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Now another issue...
I noticed that the switching on and off is also happening with my ato pump port...(port6)
i am very afraid because i have my kalk stirrer connected to the ato...
Dont k ow why all of this is happening?

If i look on the little screen on the ci troller and scroll to where it shows me what is on and off...when the switching happens, i see the ports 6 turn green and red for a split second na dport 8 turns red and back to green...if that would help?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

That's weird.
You mentioned it doesn't happen without the float switch, right?
So, when you disconnect the High float, does it still trigger this flicker on the ato pump and vice versa?
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

What ive done is ,i removed the code that uses high ato switch to switch off skimmer. This has stopped port 8 from flickering on and off but defeats the purpose because i need it to work.dont want to experience a skimmer overflow..lol

The ato pump on port 6 is still flickering every 2 to 5 minutes or so...

Im not sure what to belive as my mind is baffled at this point.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Relay 8 switching on and off for a split second

Post by lnevo »

Sounds like the switches may be bad
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

My whole reef angel system is inly around 7 months old max....
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Relay 8 switching on and off for a split second

Post by lnevo »

There could also be stray voltage affecting them. I would unplug the switches and see if the relays still do the flipping. I had a bad temp extension cable causing some wierd voltage in the tank and it was causing the switches to flicker as well. So it could be almost anything causing it. But first, I'd check the switches. If it turns out to be stray voltage and you can't pin point the cause, you could always go for the water level module. But let's do it methodically. Let's unplug the switches, leave your code as-is and see what happens.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Cool...i will do so and get back to you
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Woke up this morning to a kalk overdose...tank crashed...
Port 6 didnt switch off...
Ato pump dumped 2 cups of kalk into the tank...
Does the reefangel relay box carry a guarantee since mines is not more than 7 months old...need to contact the south african supplier...
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

It is most likely the float switch. That's what we were trying to verify.
Was the float switch showing closed?
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Float switch was in the up position as im using the single ato function but topup pump was still pumping water into the tank...
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

Not physically.
I meant on the controller screen.
Did you try using the controllertester code to verify they are working properly?
Look under Example codes.
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Tried to check the above...
Another problem arised..
now when i try to press click the joystick to access the menu..it doesnt go the menu...i can however go left and right. When i click it down it doesnt do anything...
is my reef angel slowly dying?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

The joystick wouldn't affect the relay ports, but the ATO ports would. It can be replaced if it needs be.
Did the ATO ports/float switches work properly?
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

So i should take the test code and upload it to controller and then how do i check if its working?
Do i connect it to the tank?
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Relay 8 switching on and off for a split second

Post by lnevo »

You need to see if the relays are still doign what they were doing before and / or see if the float switches are working as expected. This will eliminate any issues with your code.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

I manually tested the float seitched and the work as expected...
One thing ive noticed is that this hapoens only when elsemode for my dc pumps is active....
Im not sure if they are related in some way.
Also i noticed the flickering only happening during the day and not at night...
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Only problems i have now is that port 8 which powers the skimmer is flickering...it flickers more often when my dc pumps are in elsemode on a higher speed.

One thing i remember is that i had problems when i put the shutoff code for port 8 on the top of the custom code section..i read in the forum that it should be last in the custom code section..im not sure if this is why it is flickering...
On the controller where it shows which ports are on or off...i see port 8 going off and on when it flickers.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Relay 8 switching on and off for a split second

Post by lnevo »

Did it do that with the test code? Can you post your code again?
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Ok after lots of testing and changing code...
It only happens when i plug in the high ato topoff switch...
So im guessing its the float switch causing this...
What i cant understand is that the float switch works when i manually lift it up..it shuts off the skimmer..but it also is causing the flicker of port 8..
Once i unplug the high ato float switch then there is no flickering
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Relay 8 switching on and off for a split second

Post by rimai »

Is it only the high float port that causes it?
You mentioned before that low port was doing something too. Does it mean that if high float is removed, everything work fine?
Are you positively sure that there is no water damage?
Even a single drop in the wrong place can be bad :(
Roberto.
Ridwaan
Posts: 32
Joined: Thu Apr 03, 2014 11:37 pm

Re: Relay 8 switching on and off for a split second

Post by Ridwaan »

Yes only high ato doing it..
the moment i read your comment above i opened the controller and u are right..i have found some moisture inside the controller...so this is causing all my headaches...

So should i get another board or is there a way to fix it?
Post Reply