PWM and Overheat

Do you have a question on how to do something.
Ask in here.
Post Reply
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

PWM and Overheat

Post 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?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PWM and Overheat

Post 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); 
}
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

Re: PWM and Overheat

Post 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?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PWM and Overheat

Post 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.
ufgators2k
Posts: 58
Joined: Sun May 12, 2013 2:21 pm

Re: PWM and Overheat

Post by ufgators2k »

I am just using the Parabola function.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: PWM and Overheat

Post 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.
abfranklin3
Posts: 8
Joined: Sun Jul 21, 2013 3:20 pm

Re: PWM and Overheat

Post by abfranklin3 »

Would you mind posting the code that would accomplish the same thing but with regular non-dimming T5 lights?
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: PWM and Overheat

Post by rimai »

It is already built-in by default :)
Simply check mark it to turn off on overheat when you are using the wizard.
Roberto.
abfranklin3
Posts: 8
Joined: Sun Jul 21, 2013 3:20 pm

Re: PWM and Overheat

Post 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?
abfranklin3
Posts: 8
Joined: Sun Jul 21, 2013 3:20 pm

Re: PWM and Overheat

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

Re: PWM and Overheat

Post 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.
Roberto.
Post Reply