Ed

CoA

Ed's Site

Chivalry

Computers and Tech

Creativity

Pics / Pets

Misc


Made with vi. The RIGHT way!

Hacker Emblem

Linode Powered
Get Firefox!


Connecting LEDs to your Power Supply
By Bones (Ed T. Toton III)
September 24, 2002

Some people like blinking LEDs. Some people like them a lot. Others just want to rig up a new power light in a different color. Whatever your reason is, you may find yourself wanting to hook up new LEDs in your computer, and obviously the only place you're going to easily draw power from is the power supply.

If you've bought a fairly high-voltage blue LED, for instance, you may find that simply connecting it to the same pin-outs as your old power LED might not work, because your motherboard is assuming a lower-voltage LED to be present. Connecting it directly to the power supply might be your only option.

However, if you connect an LED without a resistor, you're most likely going to burn-out or even explode your LED. Let's take a look at what "LED" means. It stands for "Light Emitting Diode". The key word is the last one: Diode. Diodes are designed to allow electricity to pass through them in one direction, but not the other. They're not meant to absorb or use power, just to control the direction of current. Light-Emitting Diodes are a slightly different case, in that they do use some power and put it to work, but they still allow most of the power they're given to pass through. That means that connected by themselves, they will draw an enormous amount of current, overheat, and possible burn up.

Many standard diodes, rectifier diodes, etc, tend to cause a voltage drop on the line of about 0.5 to 0.7 Volts. LED's are all different, depending on their designed brightness and color. Low-power red LEDs tend to start with a voltage drop of about 1.5 to 1.7. Many of the blue LED's require 3.7 to 5 volts. And nearly all LEDs use between 20 and 30 milliamps (0.02 to 0.03 Amps).

Luckily Radio Shack has started printing these specs on the LED packages that they sell, and if you order from a larger electronic component distributor, the specs are often in the catalog.

So what do we do with these numbers? Well, the equation is very simple:

Rs = (Vin - Vled) / Iled

  • "Rs" = Resistance needed
  • "Vin" = Input voltage (either 12v or 5v, depending on which wire you used from the power supply)
  • "Vled" = Voltage of the LED (typically 1.7v to 5v)
  • "Iled" = Current of the LED (usually 0.02A to 0.03A)

So for instance, if you're using the 5v power lead, with a blue LED that uses 3.7v and 20mA, the equation would be:

Rs = (5 - 3.7) / 0.02

Which becomes:

Rs = 65 Ohms.

And there's your answer. For a plain red LED, it might be more like this:

Rs = (5 - 1.7) / 0.02 = 165 Ohms

Once you have that figured out, all you need to do is connect a resistor of approximately the correct resistance in series with the LED in question. You can connect resistors in series with each other to add them up. Or if you can't find any resistors exactly fitting your need, you can often approximate. In the case of this latter red LED example, you can probably get away with a 110 Ohm resistor, for instance.

It should be noted, however, that self-blinking LEDs are a completely different story. They usually have the appropriate resistor built into them, and can often be connected directly to a 5v line safely.

Now you can safely connect LEDs without them melting or popping or slowly burning out. Enjoy!

[PS- I found a mod-site that has a handy web-based LED calculator you can use, and a site with cheap bulk LEDs]


(1024x768 or better resolution is recommended for this site)

All content Copyright © Ed T. Toton III, All Rights Reserved.
Any and all unauthorized duplication of any content in whole or in part is strictly forbidden.

(A NecroBones® Website)
(NecroBones® is a registered trademark of Ed T. Toton III)