Introduction: Automatic, Biorhythm LED Aquarium Light

Normal aquarium lights are fluorescent tubes that require that you turn them on in the morning and off at night. This isn't the most efficient way to light a tank, but for some reason it's the default kit you get. Another issue is that the high-voltage circuit that powers the bulb is loud!

Also, in my house, we inevitably forget to turn on the light in the morning, or we turn it off way too late in the evening, and that means the "day" for the fish is always a little off. Considering that these are living creatures that base their life patterns on the sunshine, I always thought it must really be messing them up.

So this project had a couple of main goals:

1) Replace the fluorescent light with something that is quieter and more energy efficient
2) Come up with a way to vary the light intensity with the natural sunlight outside
3) Package it all within the existing light hood

Step 1: Materials

Setup:
1 - Existing fluorescent aquarium hood
4-5 feet - Braided steel picture hanging wire

Electrical:
1 - Amtel ATMega168 Microcontroller
50-70 - High Intensity, White LED's
3 - 1M resistor
1 - Potentiometer
1 - Light Dependent Resistor
1 - Push button switch (SPST, default off)
1 - Project board
1 - 7805, 5V voltage regulator
1 - IRF510, N-Channel Power MOSFET
2-4 feet - copper hookup wire
1 - 12V power supply (at least 2A, whatever you have lying around)
1 each - Male and Female headers

Tools:
Drill
Wire cutters
Pliers
Soldering Iron
(All the basics)

Step 2: Modify the Existing Hood

The first step is mainly about throwing away the old stuff. Happily, my fluorescent bulb was already going out, but the electronics weren't. I'll save those for some other future project. Otherwise, clean it out!

Next you'll want to drill holes to allow for mounting the electrical wires. We'll mount these using threaded aluminum posts... this way, the outside modifications to the hood aren't noticeable. While I want this to be a great mod in the end, I still want it to fit in the living room as it always has. Make it look professional!

The spacing of the holes isn't terribly important. For me, it was 3 inches. The actual spacing for you will be based on the size of your aquarium hood and the size of the project board. It might be a good idea to read through all of the instructions to get an idea of how to determine the spacing in your case.

Step 3: Installing the Main Wiring

So the main idea here is to mount two lengths of the braided stainless steel picture hanging wire parallel to each other. One will be positive, one negative. The LEDs will be strung between, allowing you to add more LEDs if you want more light.

I got four threaded aluminum posts with matching screws from Lowes for under a dollar each. Your mileage may vary, but they shouldn't be expensive at all. Mine are 3/8" long to allow for some space when installed.

That space comes into play when preparing the cable. You'll want to wrap it around the post for about 2 wraps, then pull out the post, keeping the loop in the cable. You can see it below in one of the clips of my helping hands. I soldered the wire to keep it solid. Since there will be tension applied to it, make sure your method is just as stable.

Getting one end done is a cinch, but the other side takes a bit of skill. You want to install the cable on one end, and then the remaining post on the other side. Now, wrap the loose cable end around the empty post, trying to keep enough tension. You want each cable to be fairly tight between each end.

Step 4: The LED Array

When i first began the project, I figured a dozen or so high-intensity LEDs would be plenty. After all, perusing the LED lighting aisle at the local hardware store found several 4-LED lights that made everything very bright.

The difference appears to be that we're shining the light through water. Strangely enough, that takes a LOT more light than you would otherwise expect. I tried it initially with 8 LEDs, and the brightness was negligible. I then experimented with other numbers, and it quickly became apparent that I needed MANY more. How do you cheaply acquire lots of high-intensity LEDs?

I found a $10 LED spot light at a local store that did the trick. It had 60 of the little guys all installed in a series, so I only had to desolder them and they were mine!

Once I had all of the LEDs I needed, I began soldering them together. Since I knew I was going to power the whole thing with 12V, I knew I needed to install no less that 4 LEDs in series That will provide 3V each, which is under their 3.3V max. Yes, that means I'm not getting every single lumen of brightness, but it turned out to be just fine in the end, and I know I'm not overpowering the individual elements.

I took a piece of basswood and cut holes for a template to hold the LEDs. I then went through and soldered about 4" of light gauge copper wire across their leads. This proved to be the quicker way to do it, rather than soldering each individual wire on at a time. After soldering the wire across, I snipped out the 1/16" or so that was between the leads.

Afterward, install the LEDs between the power cables as you see fit. Again, this is very dependent on your particular application, but I provided a picture of how I did it below.

Step 5: The Electronics

I've been holding off on posting this instructable because I wanted to provide a proper schematic, but I don't really have any software that makes that step very easy. To be honest, half of the hardware I installed below isn't necessary, and it was used while I was developing the circuit.

Since using an AVR microcontroller is out of the scope of this instructable anyway, and you would need existing experience, I'm hoping that providing the firmware (attached as 'main.c' below) will be enough to get you going. Of course, if there are any questions, please ask and I'll help as much as possible.

Suffice it to say, the signal for controlling the LED array is connected to pin 12 (PD6), the 'temporary off' switch is connected to pin 4 (PD2), and the LDR is connected through a voltage divider to analog pin 23 (PC0). I set up internal PWM, and simply change the PWM value based on the LDR analog reading. It's probably pretty messy, but it was my first real project with the AVR by itself. Any suggestions for improving the code would be welcome!

Attachments

Step 6: All Done!

In all, I'm very proud of the way this project went together. It took 10-15 hours in the end, mainly in experimenting and planning, but it paid off. Replacing the high-voltage driver and fluorescent tube with a small 12V power supply and efficient LEDs makes a huge difference in power consumption. I wish I had a kill-a-watt to test the before and after and give you absolute comparisons, but I know it's at least a good improvement. Not only that, I won't have to replace the bulb every 6 months when it burns out. While it's only a small improvement environmentally, it's better than nothing!

In addition, we never have to touch the light manually now. This gives us the assurance that the fish are setting their rhythms based on a regular light cycle, rather than the 'whenever we remember' phases, hopefully lengthening their lives. It also means we can go on vacation without having to worry about the fish light. Plenty of positives.

Possible Improvements
1) One thing I considered was adding a 'feeding light' to the outside of the light hood. This would light up when it was feeding time, and allow us to dismiss the light for that night with a button press. Since everyone in the family feeds the fish, it would keep us from feeding them too much.
2) I also considered adding an auto feeder into the mix. If I do that, I'll post a second instructable with the steps needed.

Conclusion
Though I've been a member since 2006, this is my first instructable so far. I hope to post many more as time goes on. Please give me feedback on things I didn't cover enough, as I'm always looking to improve!