Hi boffins,
How would I set an on/off timer for a UV light .. ie 6 hours on 6 hours off
Justin
Timer for UV
- Pny
- Posts: 35
- Joined: Wed Aug 08, 2012 5:06 am
- Location: Sweden
Re: Timer for UV
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.
200 liter reef cube + 1000 liter FOWLR
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
- lnevo
- Posts: 5422
- Joined: Fri Jul 20, 2012 9:42 am
Re: Timer for UV
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.
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.
-
ishtak
- Posts: 41
- Joined: Wed Apr 25, 2012 3:50 am
- Location: JHB, South Africa
Re: Timer for UV
Thanks Lee .. Pny, I've been told that if you run pellets then it is better to not run UV constantly.
-
Smotz
- Posts: 401
- Joined: Sat Mar 30, 2013 5:02 pm
- Location: CT, USA
Re: Timer for UV
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);