Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Fish Light

Status
Not open for further replies.

FrankVolkel

New Member
Hi. i'm very new to pic programming, and i'm trying to construct a fish light with leds for my tank. the concept is simple: PWM drives 3 rails of LEDs, and it changes color across a period of an hour at predetermined hours of the day, just to simulate light changes. Daylight is white and moonlight is blue + red.

the circuit works great, however the programming aint going as smoothly as i hope it is. i'm using a PIC16F628A with JAL. the reason i used JAL is because i'm new to pic programming. i'm using Toon Beerten's PWM library for controlling the LEDs and is using the internal oscillator.

how do i make sure my program loops nicely every 24 hours, and how do i insert long delays (11 hours to be exact) while keeping the LEDs lit?

my present code is a modified version of Toon Beerten's LED mood light, and so is the circuit. i'll attach my codes with the next post, as i'm away from my desktop right now. help is very much appreciated :D
 
I hope you're not expecting it to be a subsitute for real aquarium lighting?

Those fluroescent tubes give of some UVA which is required the plants and I think the fish need it to.

Also red+blue light gives magenta, for luna white you need red+green+more blue than red & green.
 
Hero999 said:
I hope you're not expecting it to be a subsitute for real aquarium lighting?

Those fluroescent tubes give of some UVA which is required the plants and I think the fish need it to.

Also red+blue light gives magenta, for luna white you need red+green+more blue than red & green.
i'm afraid it is =s i'm running a simple marine tank, no live corals, just a few clown fishes and some dead corals. no plants either.

i used to have a simple setup as moon light, just some red and blue LEDs. the LEDs do not give magenta directly though. the LEDs are pretty much there for illumination (=

btw sry for the delay in attaching the code, i'll attach the pwm library for now as I do not have my main code on my laptop.
 

Attachments

  • jPWM3.zip
    1.9 KB · Views: 102
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top