lights turn off unless in RA wizard

New members questions
Post Reply
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

lights turn off unless in RA wizard

Post by Seagals »

Does anyone know why my lights turn off if the controller is disconnected from the computer? I need to have the usb plugged in to the computer in in the wizard in order for the lights to be on. I have not messed with any codes i just used the wizard right out of the box.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

Can I see the code?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

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


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

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


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

void loop()
{
ReefAngel.StandardLights( Port2,21,0,9,0 );
ReefAngel.StandardLights( Port3,9,0,21,30 );
ReefAngel.WavemakerRandom( Port5,960,1100 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.Relay.DelayedOn( Port7,30 );
ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,25,60,15) );
ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,15,50,15) );
////// Place your custom code below here


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

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

Re: lights turn off unless in RA wizard

Post by rimai »

Just lights turn off?
What else happens when you disconnect from computer?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

I only have the powerheads hooked up but did not notice what happens, i think they were running. I will disconnect again and keep aneye on it.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

What lights are you talking about?
Port 2 and Port 3, right?
So, do you have the powerheads on the lights port and they turn off? Is it what is happening?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

lights are on ports 3 blues & 4 whites
powerheads are on 5 & 6 the powerheads are cycling as set - every 15 mins - the lights are not going on/off every 15 mins.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

That's not what your code says.

Code: Select all

 ReefAngel.StandardLights( Port2,21,0,9,0 );
 ReefAngel.StandardLights( Port3,9,0,21,30 );
This tells me that lights are on port 2 and port 3

Code: Select all

ReefAngel.Relay.On( Port4 );
Port 4 is set to always on.

I'm still confused on which lights you are talking about in the original post.
How do you know that lights went off when you disconnet from the computer?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

I am getting confused myself......the tank goes completely dark - when its on both blues and whites are on.

I have a moonlight on 2 but that does not go on until 9 pm - not on now. I defintetly have blues on 3 and whites on 4 - wavemakers have been cyling
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

I just re ran the wizard and did notice that port 4 was checked for 'always on' and changed that and some other ports that were not as i had previously saved. but that said if port 4 was clicked as always on than why would it shut off completely??



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


// Ports that are always on

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


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

void loop()
{
ReefAngel.StandardLights( Port2,21,0,9,0 );
ReefAngel.StandardLights( Port3,9,0,21,30 );
ReefAngel.StandardLights( Port4,11,0,19,0 );
ReefAngel.Wavemaker( Port5,960 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.Relay.DelayedOn( Port7,30 );
ReefAngel.StandardLights( Port8,9,0,19,0 );
ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,35,60,15) );
ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,15,50,15) );
////// Place your custom code below here


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

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

Re: lights turn off unless in RA wizard

Post by rimai »

Is it still doing the same thing with this code?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

Yes, at about 11am est, I checked and everything was off and the status light on the controller is red.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

Ahhh, that indicates an overheat and that's why your lights are going off.
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

Thats impossible, the tank has a chilller (not connected to controller) that keeps it at 78-79 degrees at all times, also, the temperature probe has stayed at a steady 78 degrees, the overheat i think is set for 85 degrees.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

I'm not saying the tank went on overheat.
There are actually 2 reasons for red status LED lights up. Overheat or ATO timeout.
If the controller thinks there is an overheat, it's why it is shutting down your ports.
It's just doing what you instructed it to do.
Here is the line on your code:

Code: Select all

ReefAngel.OverheatShutoffPorts = Port3Bit | Port4Bit | Port7Bit | Port8Bit;
It could be that the probe spiked and the controller thought just interpreted as a real reading.
Just for troubleshooting purposes.
Change the line above to this:

Code: Select all

ReefAngel.OverheatShutoffPorts = 0;
And let it run to see what happens.
I'd like to see the latest code to add some stuff to show what flag was raised to light up the status led.
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

The revised code is as follows - just to note; this happened yestereday as well, the controller turns off until i plug the usb into the computer,.....why is that happening? does it need to stay lugged into the computer??

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


// Ports that are always on

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


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

void loop()
{
ReefAngel.StandardLights( Port2,21,0,9,0 );
ReefAngel.StandardLights( Port3,9,0,21,30 );
ReefAngel.StandardLights( Port4,11,0,19,0 );
ReefAngel.Wavemaker( Port5,960 );
ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
ReefAngel.Relay.DelayedOn( Port7,30 );
ReefAngel.StandardLights( Port8,9,0,19,0 );
ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,35,60,15) );
ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,15,52,15) );
////// Place your custom code below here


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

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

Re: lights turn off unless in RA wizard

Post by rimai »

Does the entire controller turn off?
As in there is no power to the head unit?
Which cable are you talking about? the USB-TTL cable that you use to upload codes to or the USB power cable?
I'm very confused when you say turns off. Is it the outlet port that turns off or the controller?
Would you be able to make a youtube video??
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

Only the lights turn off - the controller itself can be viewed and the wavemaker pumps work.
not sure
yes the usb ttl cable that i use to upload codes - as soon as i plug it into the computer the lights go on.
when i say it turns off i am referring to the lights on ports 3 and 4 the turn off and red status light goes on when i plug in the usb-ttl plug to the usb port on my computer the lights turn on and the red led light on the controller goes off.
No, no clue on how to do a youtube video- As I mentioned when i purchased this i am not a computer guy. I would be happy to call to explain it better.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

Ah, now I understand very well what happens.
Here is what is happening.
For some reason, the controller is thinking it is on overheat and shut off the ports. We'll get to the root of the problem as why it is thinking it is getting overheat later.
After it shuts the ports off, there are 2 ways to bring them back:
1. go to menu Temps->Overheat Clear
2. reboot the controller
What you are doing is #2. Everytime you plug the usb-ttl cable into the controller, it reboots itself and thus it clears the overheat flag, and turning your lights on again.
Let me get a simple code together for you to troubleshoot this better.
I want to see if we could possible be talking about a probe that is mlafunctioning and causing spikes on the readings. Are you using an probe extension by any chance?
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

Thanks - no probe extensions but i did by an extra probe for room temp, if we want to switch them out, i currently have that room temp on probe 2 .
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: lights turn off unless in RA wizard

Post by rimai »

Here is the code:

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 <ReefAngel.h>

////// Place global variable code below here

int maxtemp=0;

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

    // Ports that are always on

    ////// Place additional initialization code below here
    
    InternalMemory.write(Overheat_Exceed_Flag,0);

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

void loop()
{
    ReefAngel.StandardLights( Port2,21,0,9,0 );
    ReefAngel.StandardLights( Port3,9,0,21,30 );
    ReefAngel.StandardLights( Port4,11,0,19,0 );
    ReefAngel.Wavemaker( Port5,960 );
    ReefAngel.Relay.Set( Port6, !ReefAngel.Relay.Status( Port5 ) );
    ReefAngel.Relay.DelayedOn( Port7,30 );
    ReefAngel.StandardLights( Port8,9,0,19,0 );
    ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,15,35,60,15) );
    ReefAngel.PWM.SetActinic( PWMParabola(9,0,20,0,15,52,15) );
    ////// Place your custom code below here

    ReefAngel.LCD.DrawText(0,255,10,120,InternalMemory.read(Overheat_Exceed_Flag));
    if (ReefAngel.Params.Temp[T1_PROBE]>maxtemp) maxtemp=ReefAngel.Params.Temp[T1_PROBE];
    ReefAngel.LCD.DrawText(0,255,60,120,maxtemp);
    
    ////// Place your custom code above here

    // This should always be the last line
    ReefAngel.ShowInterface();
}
This code will print below the date/time, the max temp registered by the temp probe.
The number on the left is the overheat flag. It will be 0 for no overheat and 1 if there is an overheat.
The number on the right will show the max temp.
Load it up and when/if the lights go off again, let me know what those numbers show.
Roberto.
Seagals
Posts: 126
Joined: Wed Aug 01, 2012 7:06 am

Re: lights turn off unless in RA wizard

Post by Seagals »

check your info email
Post Reply