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!
#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();
}
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.
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.
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!
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..
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.
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.
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?