Page 1 of 1

PWM and Overheat

Posted: Thu Jun 13, 2013 4:48 am
by ufgators2k
I have what I think is a simple question. Is there a way to have the PWM light ports go off (0%) on an overheat and have them come back on to their previous state if the temp drops to an acceptable level?

Re: PWM and Overheat

Posted: Thu Jun 13, 2013 5:18 am
by lnevo
Put this after any code that sets your pwm % and change LowTemp and HighTemp to your desired numbers.

Code: Select all

static boolean pwmOverheat;
if (ReefAngel.Params.Temp[ReefAngel.TempProbe] > 0) {
  if (ReefAngel.Params.Temp[ReefAngel.TempProbe] <= LowTemp) pwmOverheat=false;
  if (ReefAngel.Params.Temp[ReefAngel.TempProbe] >= HighTemp) pwmOverheat=true;
} 

if (pwmOverheat) {
  ReefAngel.PWM.SetDaylight(0);
  ReefAngel.PWM.SetActinic(0); 
}

Re: PWM and Overheat

Posted: Thu Jun 13, 2013 8:09 am
by ufgators2k
I guess I need to read the PWM code. Does the PWM function determine it's rise/fall on the current time? If so, that would mean it would return to the current level based on the current time, correct?

Re: PWM and Overheat

Posted: Thu Jun 13, 2013 8:14 am
by lnevo
The code we added will override whatever you had previously. It forces it to 0 after whatever fucntion that you are using sets it to what you want. I'm not sure which function your using so I can't answer your question.

If you are using the Slope or Parabola function than yes.

Re: PWM and Overheat

Posted: Thu Jun 13, 2013 12:08 pm
by ufgators2k
I am just using the Parabola function.

Re: PWM and Overheat

Posted: Thu Jun 13, 2013 12:28 pm
by lnevo
Yeah it calculates what level the light should be at for the current time and sets accordingly. So if you put the above code after that calculation it will get set to 0 during your "overheat" period.

Re: PWM and Overheat

Posted: Sun Jul 21, 2013 3:24 pm
by abfranklin3
Would you mind posting the code that would accomplish the same thing but with regular non-dimming T5 lights?

Re: PWM and Overheat

Posted: Mon Jul 22, 2013 8:13 am
by rimai
It is already built-in by default :)
Simply check mark it to turn off on overheat when you are using the wizard.

Re: PWM and Overheat

Posted: Tue Jul 23, 2013 12:07 pm
by abfranklin3
Oh, ok. I figured you had to add something extra for everything to turn back on once the temperature was back to normal?

Re: PWM and Overheat

Posted: Mon Aug 26, 2013 9:33 am
by abfranklin3
So, my lights turn off once my overheat temp setting is reached. How do I get them to turn back on once the temperature drops back down to a normal level? My lights are standard T5's using the relay. Right now I have to manually press the overheat clear button.

Re: PWM and Overheat

Posted: Mon Aug 26, 2013 2:41 pm
by rimai
You need to clear it manually.
We could code it to restore back, but I would be very concerned if I had an overheat in my tank and would not want it to clear it by itself.