Lighting Issues

New members questions
Post Reply
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Lighting Issues

Post by cgonser »

I have everything set up using the wizzard and everything seems to be working as advertised minus my lighting. I run DIY LEDs with meanwell drivers and they are definately on, but they should be off at this time.... I want my day time lights on 0700-2100, while my actenic lighting are ran off of port 8 and should be on 0600-2200. Here is the code, please let me know if you can see an issue and why my lights are still on!

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 <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 = Port4Bit;
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = Port1Bit | Port3Bit;
    // 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;


    // Ports that are always on
    ReefAngel.Relay.On( Port4 );
    ReefAngel.Relay.On( Port5 );
    ReefAngel.Relay.On( Port6 );
    ReefAngel.Relay.On( Port7 );

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

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

void loop()
{
    ReefAngel.SingleATOLow( Port1 );
    ReefAngel.MoonLights( Port2 );
    ReefAngel.StandardHeater( Port3 );
    ReefAngel.ActinicLights( Port8 );
    ReefAngel.PWM.DaylightPWMParabola();
    ////// Place your custom code below here
    

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

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

rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lighting Issues

Post by rimai »

Which port is daylight?
I don't see code for your daylights port and I don't see code for your Actinic dimming channel.
Roberto.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

I run one power strip off of port 8. Through that strip I have my actinic lights plugged in. That port should come on at 6 am which turns the actinic on. Also plugged into that strip is the power for the meanwell drivers. I want the drivers to be dimming through the dimming channel from 7am to 9 pm. The actinics are an either on or off light so no dimming control required.

The way things are going now, everying plugged into port 8 come on at 6am and turn off at 10pm with no dimming at all.

Please help!
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lighting Issues

Post by rimai »

Can you post your latest code?
Roberto.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

I haven't changed it since last post.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lighting Issues

Post by rimai »

Try adding this to your code:

Code: Select all

    ReefAngel.PWM.ActinicPWMParabola(60);    
Roberto.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

Where exactly? What will this do?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Lighting Issues

Post by rimai »

In the loop section.
but I just realized that code won't do it...
You need to use this:

Code: Select all

ReefAngel.PWM.SetActinic(7,0,21,0,15,100,60,0);
It starts the slope at 7am and ends at 9pm.
Goes from 15% to 100% within 60s.
Returns 0 when not within the slope period.
You can change to whatever your settings are.
Roberto.
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

Sorry for being a pain... I am not running any atinics on a slope. I just need them on from 6am to 10pm on port 8. They are an all on or off type of fixture, not a meanwell ran light. On that same port, since the power should kick on to it at 6 am, giving power to the meanwells also plugged into that port...I want them to start ramping on a slope from 7am to 9pm from 15% to 55%. Since the slope should end at 9pm, and port 8 should still have power until 10 pm, at 9 the dimming lights (Daylight) should kick off but the atinics should still be on for one more hour.

My understanding of the meanwell drivers is that the power plug can be on at all times and the lights will only kick on once the controller tells them to.

Let me know if any of this makes sense! Thank you for all your help, trying to get this all functioning correctly before I leave town for a week on Friday!
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Lighting Issues

Post by lnevo »

The set actinic and set daylight functions control the two pwm or analog ports that your dimming leads should be connected to. Your actual actinic lights from what i read is on the power strip. The function that roberto gave you is for the dimmable drivers..
User avatar
DrewPalmer04
Posts: 818
Joined: Tue May 29, 2012 2:12 pm
Location: Christopher, IL

Re: Lighting Issues

Post by DrewPalmer04 »

Don't waste you RA outlets on meanwell D or P drivers. Power them 24/7 from a standard home outlet. Then dim them with the RA actinic and daylight ports.
Out for now...but not over.

VISIT: Ethernet Module/Wifi Alternative
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Lighting Issues

Post by lnevo »

Hes got them on a power strip with his actinics. Not really wasting a port :)
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

Glad you understand my set up. So, since the outlet comes on at 6am, which it does...how do I make the Daylight port come on at 7am to 9pm? I am still trying to figure out my exact % that I want them at, but for now 15-55 seems safe.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Lighting Issues

Post by lnevo »

Where are the dimming wires going from your meanwell drivers to the relay box? They should be plugged into the actinic or daylight pwm port. Are they both hooked to one?
cgonser
Posts: 45
Joined: Mon Feb 25, 2013 3:54 pm
Location: Savannah, GA

Re: Lighting Issues

Post by cgonser »

I am running whites and blues on the same driver. They are plugged into the daylight port.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Lighting Issues

Post by lnevo »

So change Actinic to Daylight in the function roberto gave. Try that and see first we can change the parameters later if its working

And i would actually put the function for both ports as a troubleshooting step to make sure you got the right port...
Post Reply