Relay Box Issues
Posted: Mon Mar 03, 2014 10:22 am
This is a continuation of a question I posted in a larger thread:
http://forum.reefangel.com/viewtopic.ph ... 8&start=90
I want to start fresh to hopefully solve this problem.
Here are questions and responses that pertain to the issue so far:
Here is the latest code (it includes relay #1 being used temporarily in place of #6 but I didn't turn relay #6 off because I assume I'll be doing more testing).
Any new thoughts, Roberto or anyone else? Thanks in advance.
http://forum.reefangel.com/viewtopic.ph ... 8&start=90
I want to start fresh to hopefully solve this problem.
Here are questions and responses that pertain to the issue so far:
howaboutme wrote:Can I have some help on what may be going on w/ my setup?
Outlet #6 (used for a ph) in the relay box is suppose to turn off during both water change and feeding modes and has been working correctly but all of a sudden, today, it did not turn off for either. I'm not sure when it went astray but today was the first time I've noticed. I think it worked just a few days ago (at least in feeding mode).
I re generated the code w/ the wizard just now to make sure it was correct and it did not fix it. Is my relax faulty or is something wrong w/ the code? I am using internal memory but the code looks correct as it has the correct ports for both water change and feeding.
Code is: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.AddStandardMenu(); // Add Standard Menu // Ports toggled in Feeding Mode ReefAngel.FeedingModePorts = Port5Bit | Port6Bit; // Ports toggled in Water Change Mode ReefAngel.WaterChangePorts = Port2Bit | Port5Bit | Port6Bit | Port7Bit; // Ports toggled when Lights On / Off menu entry selected ReefAngel.LightsOnPorts = Port3Bit | Port4Bit; // Ports turned off when Overheat temperature exceeded ReefAngel.OverheatShutoffPorts = Port7Bit; // Use T1 probe as temperature and overheat functions ReefAngel.TempProbe = T1_PROBE; ReefAngel.OverheatProbe = T1_PROBE; // Ports that are always on ReefAngel.Relay.On( Port2 ); ReefAngel.Relay.On( Port5 ); ReefAngel.Relay.On( Port6 ); ////// Place additional initialization code below here ////// Place additional initialization code above here } void loop() { ReefAngel.DayLights( Port3 ); ReefAngel.ActinicLights( Port4 ); ReefAngel.StandardHeater( Port7 ); ////// Place your custom code below here ////// Place your custom code above here // This should always be the last line ReefAngel.ShowInterface(); }
rimai wrote:Use the controllertester code in the examples folder to test each port.
howaboutme wrote:Hmm..interesting thing happened. I tested it this morning and that port worked for both the w/c and the feeding modes. Has anyone heard of situations like this? I have done no manipulation to the controller.rimai wrote:Use the controllertester code in the examples folder to test each port.
I will try the controllertester code when I get a chance to make sure. Thank you.
howaboutme wrote:roberto..this is in regard to the post about relay #6 not shutting off during feed/wc mode..i did the controllertest code..flipped through it but wasn't sure what to look for. the outlet was on when i flipped to #6. is that what you're testing? thanks.rimai wrote:Use the controllertester code in the examples folder to test each port.
rimai wrote:You can scroll through each port turning it on and off by moving the joystick. Look at the screen to see which port is turned on.
howaboutme wrote:Yeah, I did that and everything seems to be okay for the test. #6 just won't turn off even though the code is correct. This is the 2nd time this happened. First time, the problem solved itself somehow w/o me doing anything.
rimai wrote:Are you sure you are not overriding the relay port?
I have done some additional testing. I placed the powerhead that was on #6 to an unused relay and everything worked fine for water change and feeding modes. I also used the android app to manually turn off #6, it did not work (it worked for #5, for example). It looks like #6 does not recognize any overrides.howaboutme wrote:No, I am not sure. But I don't think so. I do nothing to the controller before I hit either the feeding or wc mode. I even re-uploaded the code last night to the controller and #6 still didn't recognize the mode. I am thinking tonight I will try to move the ph that's on #6 to an open outlet to test again.rimai wrote:Are you sure you are not overriding the relay port?
How would I override the relay port? Since I am new I cannot rule that out inadvertently.
Here is the latest code (it includes relay #1 being used temporarily in place of #6 but I didn't turn relay #6 off because I assume I'll be doing more testing).
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
// Ports toggled in Feeding Mode
ReefAngel.FeedingModePorts = Port1Bit | Port5Bit | Port6Bit;
// Ports toggled in Water Change Mode
ReefAngel.WaterChangePorts = Port1Bit | Port2Bit | Port5Bit | Port6Bit | Port7Bit;
// Ports toggled when Lights On / Off menu entry selected
ReefAngel.LightsOnPorts = Port3Bit | Port4Bit;
// Ports turned off when Overheat temperature exceeded
ReefAngel.OverheatShutoffPorts = Port7Bit;
// Use T1 probe as temperature and overheat functions
ReefAngel.TempProbe = T1_PROBE;
ReefAngel.OverheatProbe = T1_PROBE;
// Ports that are always on
ReefAngel.Relay.On( Port1 );
ReefAngel.Relay.On( Port2 );
ReefAngel.Relay.On( Port5 );
ReefAngel.Relay.On( Port6 );
////// Place additional initialization code below here
////// Place additional initialization code above here
}
void loop()
{
ReefAngel.DayLights( Port3 );
ReefAngel.ActinicLights( Port4 );
ReefAngel.StandardHeater( Port7 );
////// Place your custom code below here
////// Place your custom code above here
// This should always be the last line
ReefAngel.Portal( "howaboutme" );
ReefAngel.ShowInterface();
}