DIY LED lighting Guide 24
LED lighting is becoming increasingly popular in fish tanks, case mods, and even household lighting. This article intends to be a comprehensive guide to their advantages, powering them, and creating dimming solutions.
- Why use LED lighting?
- Powering your LEDs with a DC source
- Using an AC source to drive LEDs
- Dimming your LEDs (with PWM)
- Purchasing LEDs
LED lights are extremely efficient compared to standard incandescent lighting. No other lighting source outputs as many lumens per watt. They are particularly efficient at producing a single color of light. Other light sources have to produce the entire spectrum and optically filter out unwanted colors. However, LEDs can be manufactured to produce only one wavelength of light. This makes them particularly useful in stop lights.
Another advantage to LEDs is their operating temperature. Most available today can be function for hours and remain cool to the touch. Directionality is another key property. They only emit light over a relatively small angle. This can be advantageous for reading lights, but hinders performance when attempting to light an entire room.
If the advantages of LED lighting interest you, Myths Busted, LED Lighting is an excellent article by a researcher in outdoor lighting solutions. (And the source of most my information.)
Warning: Driving your LEDs with too much current will permanently disable them.
If you attach LEDs directly to an unlimited power source, they naturally draw enough current to blow themselves out. Therefore, the driving current must be limited with a resistor. The relationship as described by Ohm’s Law, is
V = I*R where V is the voltage over the resistor, I is the driving current, and R is the limiting resistor. Two example circuits are shown below. These particular LEDs are rated at 25mA and are powered by a 12 volt regulated supply.
Each white LED gives a voltage drop of 3.6 volts. As an example for a 12 volt light, you can run a maximum of 3 white LEDs in series at full power (3.6 x 3 = 10.8 volts drop). Subtract this from your supply voltage of 12 volts to get the additional voltage that must be dropped (in this case, 12 - 10.8 = 1.2 volts of additional drop needed). In this case, 1.2 volts of additional drop / .025 amps (25 ma) = 48 ohms… resistors are rated in watts. So in this case, 1.2 volts x .025 amps = 0.03 watts. A 1/4 watt resistor would work fine.
The tutorial above also explains how to construct a 12 volt voltage regulator from any 12+ volt DC source. Voltage regulation is highly recommended because large shifts in your driving voltage can cause the driving current to increase and burn out your LEDs!
If you are in doubt of your calculations, use one of the many LED resistor calculators.
In operation, a DC voltage of around 170 is produced from the bridge rectifier and 50uF capacitor. The capacitor value is not critical and can be anything from 20uF or more… To find the resistor value and wattage, multiply the number of LEDs by the individual LED voltage. Then subtract this number from 170 and divide the result by the desired current (usually 20 milliamps).
Using pulse width modulation (PWM) to dim your LEDs is extremely important! Simply decreasing the input voltage yields unreliable results and potentially reduces their life-span. Pulse width modulation basically pulses the source voltage on and off so quickly that your eye is unable to distinguish the difference.
PWM can be implemented using a variety of methods. The simplest is switching on/off the output of a microcontroller. There are also several circuits that implement PWM. My favorite method uses two comparators. The details are excruciatingly painful and may deserve their own article someday.
The first example uses the standard op-amp oscillator circuit to generate a triangular waveform which is level-shifted and fed to a comparator (e.g. LM339) to give the PWM waveform.
LEDs are available all over the Internet. Recommending a single source or particular LEDs is hard as prices, projects, and the LEDs themselves may vary. If you are planning on starting an LED lighting project, it is best to do some research. For smaller applications, like a reading light, it may be more cost-effective to skip out on the top-of-the-line and buy a few more (relatively) cheaper LEDs. If you want to build a moonlight for your fish-tank, then you don’t need all those lumens blinding your fish!