Page 1 of 2
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 2:02 pm
by rimai
newtoke wrote:
I respect your thoughts on this Steve, but as I understand what PWM is and as referenced in the following post from Roberto...
http://forum.reefangel.com/viewtopic.php?f=2&t=2980
I don't think this is correct. A PWM determines the value between the width of each pulse, it still pulses at 10 volts right?
Correct.
PWM will output a 0-10V PWM signal and will change the width of the pulse.
The new dimming expansion modules can outpout 0-5V PWM signals.
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 2:12 pm
by newtoke
rimai wrote:newtoke wrote:
I respect your thoughts on this Steve, but as I understand what PWM is and as referenced in the following post from Roberto...
http://forum.reefangel.com/viewtopic.php?f=2&t=2980
I don't think this is correct. A PWM determines the value between the width of each pulse, it still pulses at 10 volts right?
Correct.
PWM will output a 0-10V PWM signal and will change the width of the pulse.
The new dimming expansion modules can outpout 0-5V PWM signals.
Thanks Roberto... So there is no way to get the PWM signal out of the relay box to be 5 vdc?
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 2:17 pm
by rimai
Technically there is, but it will require you to open the box and solder some jumper bridges with wires to short out the gain of the op amp that boosts the signal.
Another way is to use your ATO port. They output 0-5V PWM.
Something like this:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,2.55*80); // set Low ATO port to 80%
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 2:44 pm
by Sacohen
newtoke wrote:Sacohen wrote:The PWM control signal going from the RA dimming ports to PWM in on the LDD would be 50% of the full 10v (or 5v).
Here is code for a PWM slope going from 0-50% for the daylight and actinic channels.
Times are 9am to 8pm.
Code: Select all
ReefAngel.PWM.SetDaylight( PWMSlope(9,0,20,0,0,50,60,0) );
ReefAngel.PWM.SetActinic( PWMSlope(9,0,20,0,0,50,60,0) );
I respect your thoughts on this Steve, but as I understand what PWM is and as referenced in the following post from Roberto...
http://forum.reefangel.com/viewtopic.php?f=2&t=2980
I don't think this is correct. A PWM determines the value between the width of each pulse, it still pulses at 10 volts right?
Sorry you are correct. I was thinking backwards. My brain is a little foggy right now, I've been up all night the past 2 nights working on a freelance video editing job.
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 3:39 pm
by newtoke
rimai wrote:Technically there is, but it will require you to open the box and solder some jumper bridges with wires to short out the gain of the op amp that boosts the signal.
Another way is to use your ATO port. They output 0-5V PWM.
Something like this:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,2.55*80); // set Low ATO port to 80%
When I set the pin mode, do I just set it in Setup and the analogWrite in the loop? Also I assume the RA libraries won't freak out over the ATO been used as a output instead of input correct?
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 5:15 pm
by rimai
No, you need to have it on loop too.
People have used this for Jebao pumps, but nobody has never tested with LEDs.
Re: Stuggling with the LDD Drivers
Posted: Sun May 11, 2014 6:12 pm
by newtoke
Is it true that only one ATO port can send out PWM?
Also what configuration have folks had success with?
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 8:04 am
by rimai
On the standard RA, only one, but on the RA+, you can use both.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 9:54 am
by newtoke
Sigh... it didn't seem to work. I put those two lines you mentioned before the "interface" method. This is what I did:
Code: Select all
//ATO PWM output
pinMode(lowATOPin, OUTPUT);
pinMode(highATOPin, OUTPUT);
analogWrite(lowATOPin, ReefAngel.PWM.GetActinicValue() * 2.55);
analogWrite(highATOPin, ReefAngel.PWM.GetDaylightValue() * 2.55);
// This should always be the last line
ReefAngel.Portal();
ReefAngel.ShowInterface();
I am ordering new drivers in case I fried them. Any other ideas? I'd really love to find a testing device that can generate a PWM signal and a device that can test a PWM signal, but I have yet to find any.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 10:03 am
by Sacohen
What size LDD do you need.
I think I have 2 1000mA that I'm not using.
Sent from my HTC One VX using Tapatalk
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 10:16 am
by newtoke
I already ordered two 1000ma Steve... Thanks for the offer. I ordered the PWM Expansion Module, because it appears that is the only way people are having success... I would though hope that Roberto will add the ability to modify the voltage out of the relay pack PWM outputs in the future.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 10:23 am
by Sacohen
No Problem. Good luck with them.
I have 4 that I need to get motivated to set up.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 11:49 am
by newtoke
newtoke wrote:Sigh... it didn't seem to work. I put those two lines you mentioned before the "interface" method. This is what I did:
Code: Select all
//ATO PWM output
pinMode(lowATOPin, OUTPUT);
pinMode(highATOPin, OUTPUT);
analogWrite(lowATOPin, ReefAngel.PWM.GetActinicValue() * 2.55);
analogWrite(highATOPin, ReefAngel.PWM.GetDaylightValue() * 2.55);
// This should always be the last line
ReefAngel.Portal();
ReefAngel.ShowInterface();
I am ordering new drivers in case I fried them. Any other ideas? I'd really love to find a testing device that can generate a PWM signal and a device that can test a PWM signal, but I have yet to find any.
Roberto any thoughts on this code?
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 11:54 am
by rimai
Code looks fine.
Sent from my SM-G900P using Tapatalk
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 1:16 pm
by newtoke
Doesn't work... Only thing that happens is that the lights go out. Hopefully the dimmer module I just purchased will solve this?
Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 1:30 pm
by blert
newtoke wrote:Sigh... it didn't seem to work. ...
The LDD drivers and the controlling device MUST share a common ground. You can't just send them a signal and have them work, they need to be properly hooked up electrically.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 1:45 pm
by newtoke
I know the ground from the RA ATO port was connected to the -Vout on the power supply. I was trying to use Roberto's suggestion of having using the ATO as a PWM 5vdc signal using the code shown in earlier in this thread, but the lights would just stay dark.
Re: Stuggling with the LDD Drivers
Posted: Mon May 12, 2014 2:07 pm
by rimai
Do you get any voltage when you measure the ago ports?
Sent from my SM-G900P using Tapatalk
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 1:00 pm
by newtoke
I went ahead and purchased the Dimmer module. I opened it up and put in the 5 vdc jumpers. I wired ther LDD white wire to the dimmer and the negative or ground of the DImmer module to the negative VOut on the power supply and the lights don't turn on at all.
If I disconnect the white wire from the dimmer module then I get 100% full on from my lights
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 1:16 pm
by rimai
Did you change your code to use the dimming expansion module?
Can we see it?
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 1:30 pm
by newtoke
Code: Select all
ReefAngel.ActinicLights( Port5 );
ReefAngel.MoonLights( Port4 );
ReefAngel.PWM.DaylightPWMSlope();
ReefAngel.PWM.ActinicPWMSlope( 60 );
//Moon output
moonPWM = Moon.MoonPWM(0, 20);
if (moonPWM >= 1)
{
ReefAngel.Relay.On( Port3 );
}
else
{
ReefAngel.Relay.Off( Port3 );
}
//light temp
int lightTemp = ReefAngel.Params.Temp[T2_PROBE];
if(lightTemp > 1200) lightOverHeat = true;
if(lightTemp < 900)
{
lightOverHeat = false;
}
//fan control
if(lightTemp > 950)
{
//turn on fans when over 95 degrees
ReefAngel.Relay.On( Port8 );
}
else if(lightTemp <= (ReefAngel.Params.Temp[T1_PROBE] + 50))
{
//turn off fans when in five degrees of room temp;
ReefAngel.Relay.Off( Port8 );
}
//driver control
if (lightOverHeat)
{
ReefAngel.PWM.SetChannel(0, 0);
ReefAngel.PWM.SetChannel(1, 0);
ReefAngel.Relay.Off( Port5 );
}
else
{
ReefAngel.PWM.Channel0PWMSlope();
ReefAngel.PWM.Channel1PWMSlope(60);
ReefAngel.Relay.On( Port5 );
}
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 1:39 pm
by newtoke
Oh and the code worked fine with my older meanwell drivers.
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 2:16 pm
by rimai
This code doesn't use the dimming expansion.
Try adding this to see if it works:
Code: Select all
ReefAngel.PWM.SetChannel(0,100);
ReefAngel.PWM.SetChannel(1,100);
ReefAngel.PWM.SetChannel(2,100);
ReefAngel.PWM.SetChannel(3,100);
ReefAngel.PWM.SetChannel(4,100);
ReefAngel.PWM.SetChannel(5,100);
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 3:40 pm
by newtoke
Isn't this the dimming expansion code?
//driver control
if (lightOverHeat)
{
ReefAngel.PWM.SetChannel(0, 0);
ReefAngel.PWM.SetChannel(1, 0);
ReefAngel.Relay.Off( Port5 );
}
else
{
ReefAngel.PWM.Channel0PWMSlope();
ReefAngel.PWM.Channel1PWMSlope(60);
ReefAngel.Relay.On( Port5 );
}
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 3:43 pm
by rimai
Oh.
My bad. I didn't scroll down the code.
I just looked the top part.
You are correct. They are for the dimming module.
What do you see in the screen for the channels 0 and 1?
Is it showing 0 or some other number?
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 6:10 pm
by newtoke
Its 100 as it should be.
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 6:13 pm
by rimai
I'm thinking it is something in your wiring or your driver.
Can you post a sketch of how you connected stuff together?
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 7:13 pm
by newtoke
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 8:24 pm
by rimai
If you disconnect the white ch0 wire, what voltage do you get on channel 0?
Re: Stuggling with the LDD Drivers
Posted: Fri May 23, 2014 8:42 pm
by newtoke
I will have to check when I get back into work on Tuesday.