Trouble dimming with the 16 channel expansion

Do you have a question on how to do something.
Ask in here.
Post Reply
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Trouble dimming with the 16 channel expansion

Post by dlplunkett44 »

Hey guys, I was wondering if someone could help me with figuring out how to properly use the 16 channel dimming expansion so that it is using all 4096 levels of dimming. I have been looking around the forum and this is how I am currently TRYING to do it:
ReefAngel.PWM.SetChannelRaw(0,PWMSigmoidHighRes(9,0,21,0,0,4095,0);
When I use this code, it starts ramping up at 9 but by 9:05, the lights are really bright and then they just shut off. What could be my issue?
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Trouble dimming with the 16 channel expansion

Post by rimai »

What if you use a different waveform?
PWMSlopeHighRes or PWMParabolaHighRes?
Roberto.
dlplunkett44
Posts: 74
Joined: Mon Aug 05, 2013 3:16 am

Re: Trouble dimming with the 16 channel expansion

Post by dlplunkett44 »

Sorry for the late reply. I will try those waveforms tonight.

However, I did try:

Code: Select all

ReefAngel.PWM.SIXTEENChannelPWMSlope(0,0,4095,0);

ReefAngel.PWM.SIXTEENChannelPWMSlope(1,0,4095,5);

ReefAngel.PWM.SIXTEENChannelPWMSlope(2,0,4095,10);

ReefAngel.PWM.SIXTEENChannelPWMSlope(3,0,4095,15);

ReefAngel.PWM.SIXTEENChannelPWMSlope(4,0,4095,20);

ReefAngel.PWM.SIXTEENChannelPWMSlope(5,0,4095,25);

ReefAngel.PWM.SIXTEENChannelPWMSlope(6,0,4095,30);

ReefAngel.PWM.SIXTEENChannelPWMSlope(7,0,4095,35);

ReefAngel.PWM.SIXTEENChannelPWMSlope(8,0,4095,40);

ReefAngel.PWM.SIXTEENChannelPWMSlope(9,0,4095,45);

ReefAngel.PWM.SIXTEENChannelPWMSlope(10,0,4095,50);

ReefAngel.PWM.SIXTEENChannelPWMSlope(11,0,4095,55);

ReefAngel.PWM.SIXTEENChannelPWMSlope(12,0,4095,60);

ReefAngel.PWM.SIXTEENChannelPWMSlope(13,0,4095,65);

ReefAngel.PWM.SIXTEENChannelPWMSlope(14,0,4095,70);
With that, they all dimmed very well, but they all dimmed together, I set an offset of 5 minutes difference for each channel, but that didn't work.

I also tried:

Code: Select all

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(0,0,4095,0,0);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(1,0,4095,5,5);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(2,0,4095,10,10);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(3,0,4095,15,15);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(4,0,4095,20,20);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(5,0,4095,25,25);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(6,0,4095,30,30);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(7,0,4095,35,35);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(8,0,4095,40,40);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(9,0,4095,45,45);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(10,0,4095,50,50);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(11,0,4095,55,55);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(12,0,4095,60,60);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(13,0,4095,65,65);

ReefAngel.PWM.SIXTEENChannelPWMSigmoid(14,0,4095,70,70);
With that, I liked the slope better (I think), but it still all dimmed together, and it never went down to 0, just really low.


Both of the above examples also had this in the code:

Code: Select all

    InternalMemory.StdLightsOnHour_write(9);
    InternalMemory.StdLightsOnMinute_write(0);
    InternalMemory.StdLightsOffHour_write(21);
    InternalMemory.StdLightsOffMinute_write(0);
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Trouble dimming with the 16 channel expansion

Post by rimai »

The last number is not offset.
Here is the function in the libraries:

Code: Select all

void RA_PWMClass::SIXTEENChannelPWMSlope(byte Channel, int Start, int End, byte Duration)
If you want offset, you need to use this:

Code: Select all

void RA_PWMClass::SIXTEENChannelPWMSlope(byte Channel, int Start, int End, byte Duration, int MinuteOffset)
Roberto.
Post Reply