Timer for UV

Do you have a question on how to do something.
Ask in here.
Post Reply
ishtak
Posts: 41
Joined: Wed Apr 25, 2012 3:50 am
Location: JHB, South Africa

Timer for UV

Post by ishtak »

Hi boffins,

How would I set an on/off timer for a UV light .. ie 6 hours on 6 hours off

Justin
Image
User avatar
Pny
Posts: 35
Joined: Wed Aug 08, 2012 5:06 am
Location: Sweden

Re: Timer for UV

Post 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.
200 liter reef cube + 1000 liter FOWLR
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Timer for UV

Post by lnevo »

ReefAngel.Relay.Set(Port7, now()%43200<21600);
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Timer for UV

Post 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.
ishtak
Posts: 41
Joined: Wed Apr 25, 2012 3:50 am
Location: JHB, South Africa

Re: Timer for UV

Post by ishtak »

Thanks Lee .. Pny, I've been told that if you run pellets then it is better to not run UV constantly.
Image
Smotz
Posts: 412
Joined: Sat Mar 30, 2013 5:02 pm
Location: CT, USA

Re: Timer for UV

Post 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);
Post Reply