Stuggling with the LDD Drivers

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

Re: Stuggling with the LDD Drivers

Post 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.
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post 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%
Roberto.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Stuggling with the LDD Drivers

Post 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.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post 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.
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post by newtoke »

Is it true that only one ATO port can send out PWM?

Also what configuration have folks had success with?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

On the standard RA, only one, but on the RA+, you can use both.
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Stuggling with the LDD Drivers

Post 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
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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.
User avatar
Sacohen
Posts: 1833
Joined: Sun Apr 21, 2013 6:25 am
Location: Davie, FL

Re: Stuggling with the LDD Drivers

Post by Sacohen »

No Problem. Good luck with them.
I have 4 that I need to get motivated to set up.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

Code looks fine.

Sent from my SM-G900P using Tapatalk
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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?
blert
Posts: 9
Joined: Thu Apr 04, 2013 6:22 pm

Stuggling with the LDD Drivers

Post 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.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

Do you get any voltage when you measure the ago ports?

Sent from my SM-G900P using Tapatalk
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

Did you change your code to use the dimming expansion module?
Can we see it?
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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 );
  }
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post by newtoke »

Oh and the code worked fine with my older meanwell drivers.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post 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);
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post 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 );
}
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

Oh. :oops:
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?
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post by newtoke »

Its 100 as it should be.
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post 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?
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post by newtoke »

Image
Attachments
wiring.png
wiring.png (9.89 KiB) Viewed 4983 times
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Stuggling with the LDD Drivers

Post by rimai »

If you disconnect the white ch0 wire, what voltage do you get on channel 0?
Roberto.
newtoke
Posts: 39
Joined: Wed May 07, 2014 12:11 pm

Re: Stuggling with the LDD Drivers

Post by newtoke »

I will have to check when I get back into work on Tuesday.
Post Reply