my profile  |  logon  |  helpsearch 
Virtual Tanks
> Database
> Virtual Tanks
> Resources
> Articles
> Reviews
Articles Home


This article is a brief description of how I made my own moonlights for an aquarium. It required a bit of math, because if the components are not matched properly there is a risk of overheating and possibly a risk of fire. So I don't recommend you attempt a similar project unless you're comfortable with math and good at soldering electronic parts. These lights cost me around $18 - $25 in parts, depending on the configuration. You can buy moonlights for around $40, so it doesn't make sense to try to make them yourself if do it wrong and have to start over buying new parts.

Getting Started

I basically start a moonlight project with two items in mind: the power supply and the light-emitting diode. I usually choose a low-voltage DC power supply, typically 6 volts or so. The LEDs should be as bright as possible. Not even the brightest LEDs will over-illuminate an aquarium, unless you use 200 of them!

The specs of these components will govern the entire project. These are covered in Table 1. The first task is to check that the power supply will be adequate. Vcc must be creater than Vf , or the power supply will not work for the particular LED type we have selected. Next, we have to make sure the power supply can handle the current. I multiply If by the number of LEDs I'm using. If that number is not significantly less than Ismax , then we will risk overheating the power supply. Most power supplies can supply more than enough current to power a few LEDs.

It is also a good idea to test the power supply with a volt meter. Some 9 volt DC adaptors will actually put out up to 11 volts! This can really throw off your calculations and maybe even overheat the components. I don't use the value on the sticker for Vcc . I use the value that I see on the volt meter.

Doing The Calculations

Between the power supply and the LED, we will have a component called a resistor. I carefully select the value of the resistor to "bias" the LED. This means that the resistor will control the amount of current flowing through the LED. Too much current, and the LED will burn-out. Too little current, and the LED will not glow. Equations 1 and 2 help us calculate the value of the bias resistor.

For example: Radio Shack LED model #276-316 has Vf = 3.7v and If = 20mA. This means that the voltage across the LED must be 3.7v, and the current through the LED must be .020A. If I am using a 9-volt power supply, then Vr = 5.3v (according to equation 1). Plugging Vr and If into equation 2 gives us a value for the bias resistance Rb = 265 ohms.

Now I must also keep in mind the standard resistor values. I can't just go out and buy a 265 ohm resistor. The closest value I can find in a store is 220 ohms. I can test that value in equation 2. For our example, a 220 ohm bias resistor will set If = .024A, using our previously calculated Vr . Though this is a little more than our "ideal" current value, it is still much less than the LED's Ifmax , which is 30mA. So it is safe for me to use the 220 ohm resistor.

However, you can't always find an acceptable resistor for each application. But if you connect two or more resistors in parallel, you can change the resistance value. In our example I wanted to use the standard value of 220 ohms. But if for some reason I cannot find 220 ohms, I can connect a 330 ohm and a 470 ohm resistor in parallel to make a 250 ohm resistor (according to equation 4).

The next concern is the power rating of the resistor. Most small resistors are rated at 1/4 Watt. I have to make sure that I do not exceed this rating. Using equation 3, the resistor in the above example will dissipate .016 Watts. This is acceptable because it is less than the 1/4 Watt rating. But suppose this is not the case. Let's assume I need a 220 ohm bias resistor and the value for Vr is 8.8 volts. This will force the resistor to dissipate .352 Watts, which is much more than 1/4. How can I fix that? I can use parallel resistors. If I use a 330 ohm and a 470 ohm resistor in parallel (as before), the total resistance is 250 ohms. Using equation 3, we know that the 330 ohm resistor will dissipate .234 Watts, and the 470 ohm resistor will dissipate .165 Watts. Now I will not have to worry about resistors burning-out.


The next step is connecting it all together. I solder one end of the bias resistor (or resistor bundle) to the anode of the LED. (The anode is the positive lead for the LED -- it is usually the longer of the two.) Then, I solder the cathode (the negative lead for the LED) to the negative wire from the power supply. Finally, I solder a fuse between the free end of the bias resistor and the positive lead for the power supply. The fuse should have the same current rating as the power supply. This is very important for safety.

Multiple LEDs can be connected to the same power supply, but they must each have their own bias resistors. I connect all cathodes to the negative lead from the power supply, and the bias resistors to the fuIse, just as did for the single LED above.

Examples: My Two Tanks

For my freshwater tank, I had a 9 volt DC adaptor and I bought six LEDs from Radio Shack (model #276-316). I started with these values: Vcc = 9v, Ismax = 1A, Vf = 3.7v, If = 20mA, Ifmax = 3mA. Using equation 1, I found that Vr = 5.3v. Then I calculated that Rb = 265 ohms, using equation 2. 265 is not a standard value, so I used a 220 ohm resistor instead. This would set If = 24mA, which is still acceptable. I drilled holes in my lighting chassis and glued the LEDs in place inside. Then I soldered all the connections together and tested it. Beautiful!

My saltwater tank was a bit more difficult. I bought a single high-brightness LED from Mouser (part number 697-SSP-LX6144A7UC), which was a bit more expensive itself, but much cheaper than buying 6 of the weaker ones like before! Using a similar power supply as before, here are my values: Vcc = 9v, Ismax = 1A, Vf = 3.4v, If = 120mA, Ifmax = 250mA. Using equation 1, I found that Vr = 5.6v. Then I calculated that Rb = 46.7 ohms, using equation 2. Equation 3 told me that the resistor would have to dissipate .671 Watts, but that is way too much! So I decided to use a 6 volt power supply instead. That makes Vr = 2.6v and Rb = 21.7 ohms. Now my resistor had to dissipate .31 Watts, which is much closer to the 1/4 Watt rating. I used two 47 ohm resistors in parallel, for a total of 23.5 ohms, which is very close to 21.7. In this configuration, these resistors will each have to dissipate .14 Watts, which is much safer. This time, I connected everything in a tiny plastic box, with a hole drilled for the LED so the light would shine through the glass top of my aquarium.

Dave Morgan