Analog signal for LED drivers
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
Just a quick update on my previous post. Roberto has been testing a mod he came up with for the relay box (and pwm expansion module) to change the signal type from PWM to analog. He says this is a permanent change and I'll never be able to get a PWM signal from them again. However, given that my LED drivers are all analog anyway, I was willing to take that risk.
Sending mine back to him for mods and I'll report my results when I get them back. Should be a week or two til I get them, so don't worry if it looks like I forgot... I won't!
Sending mine back to him for mods and I'll report my results when I get them back. Should be a week or two til I get them, so don't worry if it looks like I forgot... I won't!
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
Well, Roberto sent me an email stating that I didn't need to return it. Luckily I saw the email before the UPS guy picked it up.
I'm waiting for further instructions so sorry to hog up the thread with misleading info. I guess just ignore the last post or two until I hear back from him.
I'm waiting for further instructions so sorry to hog up the thread with misleading info. I guess just ignore the last post or two until I hear back from him.
Re: Analog signal for LED drivers
Any word on a solution.TanksNStuff wrote:Well, Roberto sent me an email stating that I didn't need to return it. Luckily I saw the email before the UPS guy picked it up.
I'm waiting for further instructions so sorry to hog up the thread with misleading info. I guess just ignore the last post or two until I hear back from him.
Re: Analog signal for LED drivers
The PWM-to Analog lead wire works on D type meanwell as others have used them, but for some reason it wasn't working with the Apollo fixtures.
I came up with a work around until my next batch of relay boxes come in.
Two versions of relay boxes will be offered now: One with Analog and one with PWM output signal.
This way, anyone can choose which signal they want to have and will be compatible with all analog signal drivers.
I came up with a work around until my next batch of relay boxes come in.
Two versions of relay boxes will be offered now: One with Analog and one with PWM output signal.
This way, anyone can choose which signal they want to have and will be compatible with all analog signal drivers.
Roberto.
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
Yes, aside from what Roberto posted for future cases... he agreed to modify one of his PWM expansion modules to use analog signals instead, and will ship that to me for testing on my Apollo fixtures. When all is working, he wants me to ship back my original PWM module.miked wrote:Any word on a solution.TanksNStuff wrote:Well, Roberto sent me an email stating that I didn't need to return it. Luckily I saw the email before the UPS guy picked it up.
I'm waiting for further instructions so sorry to hog up the thread with misleading info. I guess just ignore the last post or two until I hear back from him.
Roberto has been extremely helpful in figuring out a solution for this, and communication has been awesome along the way. Just wanted to add that to the info here.
I'll definitely post back once I get everything working.
Re: Analog signal for LED drivers
Hi Roberto,
I received the modified relay box today. Thanks for getting it out so quickly. I've taken a stab at the code for the expansion relay. Relays 1 and 2 on the expansion box are my blue lights, 3 and 4 are my white lights, and 5 and 6 are my moon lights. I'm going to set the time and slope for the blue and white leds with the android app. The moonlights aren't dimmable so I just want to put them on for a short time at the end of the day. Does this code look correct?
I still have to work out the web banner and menus but am trying to get the basic functions down first. Thanks again for the help.
I received the modified relay box today. Thanks for getting it out so quickly. I've taken a stab at the code for the expansion relay. Relays 1 and 2 on the expansion box are my blue lights, 3 and 4 are my white lights, and 5 and 6 are my moon lights. I'm going to set the time and slope for the blue and white leds with the android app. The moonlights aren't dimmable so I just want to put them on for a short time at the end of the day. Does this code look correct?
Code: Select all
// Ports that are always on
ReefAngel.Relay.On(Port1);
ReefAngel.Relay.On(Port3);
ReefAngel.Relay.On(Port4);
ReefAngel.Relay.On(Port7);
ReefAngel.Relay.On(Box1_Port7);
ReefAngel.Relay.On(Box1_Port8);
}
void loop()
{
// Specific functions
ReefAngel.StandardHeater(Port2);
ReefAngel.StandardLights(Port5); //Fuge light set to come on when DT lights are off
if (bitRead(ReefAngel.Relay.RelayData,2)) ReefAngel.Relay.Off(Port5); else ReefAngel.Relay.On(Port5);
ReefAngel.SingleATOLow(Port6);
if (ReefAngel.HighATO.IsActive()) ReefAngel.Relay.Off(Port6);
ReefAngel.StandardLights(Box1_Port1); //Blue LEDs Right
ReefAngel.StandardLights(Box1_Port2); //Blue LEDs Left
ReefAngel.StandardLights(Box1_Port3); //White LEDs Right
ReefAngel.StandardLights(Box1_Port4); //White LEDs Left
ReefAngel.PWM.SetActinic(PWMSlope(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read(),InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read(),InternalMemory.PWMSlopeStartA_read(),InternalMemory.PWMSlopeEndA_read(),InternalMemory.PWMSlopeDurationA_read(),ReefAngel.PWM.GetActinicValue())); ReefAngel.PWM.SetDaylight(PWMSlope(InternalMemory.StdLightsOnHour_read(),InternalMemory.StdLightsOnMinute_read(),InternalMemory.StdLightsOffHour_read(),InternalMemory.StdLightsOffMinute_read(),InternalMemory.PWMSlopeStartD_read(),InternalMemory.PWMSlopeEndD_read(),InternalMemory.PWMSlopeDurationD_read(),ReefAngel.PWM.GetDaylightValue()));
ReefAngel.StandardLights(Box1_Port5,21,30,22,30); //moonlight right on from 2130 to 2230
ReefAngel.StandardLights(Box1_Port6,21,30,22,30); //moonlight left on from 2130 to 2230
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
You may want to hold off George. I didn't realize that the new libraries are out. I'm going to install them tonight along with the new version of ragen and see if there are other options.
Re: Analog signal for LED drivers
The PWMSlope function is shortened for you. We do the same thing that you are doing with those lines except it's just in an easier-to-read function. RAGen will add that for you if you want.Mike S wrote:You may want to hold off George. I didn't realize that the new libraries are out. I'm going to install them tonight along with the new version of ragen and see if there are other options.
This line could be shortened inside the code:
Code: Select all
if (bitRead(ReefAngel.Relay.RelayData,2)) ReefAngel.Relay.Off(Port5); else ReefAngel.Relay.On(Port5);
Code: Select all
ReefAngel.Relay.Set(Port5, bitRead(ReefAngel.Relay.RelayData,2));
Note: You don't have to change any of the things I mentioned. I was just pointing them out as a reference.
The Web Banner is phased out. You use Portal(username) instead. Then you just put your labels inside the Portal on the Portal section of this site. Much simpler to use now.
Menus are still the same. I've almost got an update to make creating a menu simpler but haven't finished it yet. Just to give you a little "teaser" for the menu tab. It's not completed. I've still gotta add a few things and put in some of the standard functions for you to choose from to use, but here's a sneak peak.
Not sure when this will be released, but that's what is being worked on.
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
I've been using the new version of RAGen and its pretty slick. Couple of newbie questions:
If this is going to turn my fuge light on when my main lights are off and my main lights are plugged into ports 1, 2, 3, and 4 on the 2nd relay do I replace the "2" with a "Box1_Port1" at the end of that code?
I have a relay with the normal PWM ports and a 2nd relay that was modified to send analog signals through the old PWM ports for my LED drivers. Does the PWM slope function just send signals through both or do I have to direct it somehow to send it to the 2nd relay with the analog outputs?
Is this really it to the new PWM slope code or do I need to call out the parameters within the () like the old code?
Thanks again for the help.
Code: Select all
ReefAngel.Relay.Set(Port5, bitRead(ReefAngel.Relay.RelayData,2)); //Turn fuge light on when main lights are off
I have a relay with the normal PWM ports and a 2nd relay that was modified to send analog signals through the old PWM ports for my LED drivers. Does the PWM slope function just send signals through both or do I have to direct it somehow to send it to the 2nd relay with the analog outputs?
Code: Select all
ReefAngel.PWM.ActinicPWMSlope();
ReefAngel.PWM.DaylightPWMSlope();
Thanks again for the help.
Re: Analog signal for LED drivers
I created a new function to make it easier 
Try using:
The signal will only work on the main relay box. The ports on the expansion box gets disabled.
So, what you want to do is make sure to use the analog box as your main box.
Yeah, that's all you need for new PWM slope.
You can set all the parameters with internal memory and off you go
At the moment, only Android can do it, but we can bug John to get him to update iPhone too

Try using:
Code: Select all
ReefAngel.MoonLights(Box1_Port1);
So, what you want to do is make sure to use the analog box as your main box.
Yeah, that's all you need for new PWM slope.
You can set all the parameters with internal memory and off you go

At the moment, only Android can do it, but we can bug John to get him to update iPhone too

Roberto.
Re: Analog signal for LED drivers
Thanks Roberto,
If I'm going to run my normal moonlights off of two of the ports do I need to have this in my loop
along with this
I'm guessing no and the moonlight function takes care of this.
If I'm going to run my normal moonlights off of two of the ports do I need to have this in my loop
Code: Select all
ReefAngel.StandardLights(Port5); //Right Moonlights
ReefAngel.StandardLights(Port6); //Left Moonlights
Code: Select all
ReefAngel.MoonLights(Port5); //Right Moonlight
ReefAngel.MoonLights(Port6); //Left Moonlight
Re: Analog signal for LED drivers
Use the second.
The first is for your main lights schedule.
The 2nd will just take the same schedule and use it in reverse cycle.
The first is for your main lights schedule.
The 2nd will just take the same schedule and use it in reverse cycle.
Roberto.
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am
Re: Analog signal for LED drivers
I might be getting ahead of myself since you didn't get to finish it yet, but can I utilize this stuff when I use the modified PWM module (for analog) that you'll be sending me to control my blues/whites channels?rimai wrote:I created a new function to make it easier
Try using:The signal will only work on the main relay box. The ports on the expansion box gets disabled.Code: Select all
ReefAngel.MoonLights(Box1_Port1);
So, what you want to do is make sure to use the analog box as your main box.
Yeah, that's all you need for new PWM slope.
You can set all the parameters with internal memory and off you go
At the moment, only Android can do it, but we can bug John to get him to update iPhone too
My plan is to have all of my LED power plugs controlled by my expansion relay box (ports 1-2 will be blues, 3-4 are whites, 5-6 are moonlights.) The moonlights are NOT dimmable (on/off only, based on power to the outlet port). The blues/whites outlet ports will get controlled by the standard lights? And the dimming of them controlled by the PWM slope memory values (which I'll be able to adjust via the android app)?
So, given that info above, my code would have these (?):
ReefAngel.MoonLights(Box1_Port5);
ReefAngel.MoonLights(Box1_Port6);
I guess what I'm asking is, what are the parameters for the ReefAngel.MoonLights function? And will it work if I use them on the expansion relay box instead of the main relay? I'm just not sure if that moonlights function is controlling power or if it's controlling dimming/intensity.
Also, if that won't work on the expansion box, would it work if I used that entire box as main box instead of expansion?
Sorry for all the questions... but this is the sort of stuff I'm not grasping entirely yet.
-
- Posts: 188
- Joined: Fri Dec 30, 2011 6:57 am