Page 1 of 1
Timer for UV
Posted: Thu Jan 23, 2014 4:25 am
by ishtak
Hi boffins,
How would I set an on/off timer for a UV light .. ie 6 hours on 6 hours off
Justin
Re: Timer for UV
Posted: Thu Jan 23, 2014 6:11 am
by Pny
I would leave it on, unless you have problem with the heat it generates... Turning on/off of any electrical product tend to reduce their life span.
Re: Timer for UV
Posted: Thu Jan 23, 2014 7:09 am
by lnevo
ReefAngel.Relay.Set(Port7, now()%43200<21600);
Re: Timer for UV
Posted: Thu Jan 23, 2014 7:21 am
by lnevo
For the record and to help people understand. The above command sets the port to On/Off based on the conditional.
The now()%43200 part divides the current time in seconds by 12 hours. If the remainder is less than 6 hours than the port will be on. If it's greater than 6 hours it will be off.
Re: Timer for UV
Posted: Thu Jan 23, 2014 10:40 am
by ishtak
Thanks Lee .. Pny, I've been told that if you run pellets then it is better to not run UV constantly.
Re: Timer for UV
Posted: Fri Jan 24, 2014 5:56 pm
by Smotz
Hers's mine
Code: Select all
// Only turn on UV Sterilizer between 11pm and 4am
if ( (hour() >= 4) && (hour() < 23) ) // from 4a - 11p
ReefAngel.Relay.Off(UVlight);
else ReefAngel.Relay.On(UVlight);