LEDs vs. CFLs

There are lots of discussions of how LEDs are the ultimate power savers that beats all other methods of lighting. On the other hand, it only beats some lighting methods but not all. Compact fluorescent light (CFL), for instance, has similar efficiency in converting electricity into light to LEDs.

It’s funny that most people thought that vacuum tube technology was useless and CFL is just one of them that is still kicking! After reading some wiki I was reaffirmed that LEDs and CFLs actually have similar principles of operation, that is when you compare them with incandescent light. The two still have some slight differences if you care to know:

*While LEDs have conduction electrons moving inside semiconductor, CFLs have free electrons moving in glass vacuum tube.
*While conduction electrons excite semiconductor bonds in LEDs, free electrons excite gas molecules in CFL.
*While excited semiconductor bonds decay and directly emit light in LEDs, excited gas molecules emit UV light in CFL, which strikes fluorescent powder, which turns UV into visible light.
*There is electrical resistance in semiconductors against electron motion but no electrical resistance in vacuum tubes, but the fluorescent powder does waste energy converting UV into visible light.

I guess that’s why these trade-offs made them similar in efficiency. So what is your take on LED vs. CFL?

Sourcing and sinking current

Occasionally you see terms such as sourcing and sinking current and you keep wondering what they mean. So to make this clear, let’s look at sourcing and sinking current to light up LEDs:

Say you hook up an LED with a serial resistor and between an arduino output pin and gnd. If you direct the output to HIGH, you put 5V over the LED and resistor so current flows from the arduino pin to ground through the LED and resistor. In this case, you are sourcing current from the output, meaning flowing current from the pin through the LED, like turning a faucet on and flowing water out of the faucet. If you direct the output to LOW, the potential on both sides of the LED and resistor is zero so no current flows.

Say now you connect the LED and resistor between an arduino output pin and 5V. When you set the output pin to gnd, you are sinking current to the output, meaning flowing current from 5V to the output pin through the LED and resistor. It is like the arduino pin is a sink in a kitchen. Your 5V source will flow water via the LED and resistor to the sink.

Arduino pins can both source and sink when they are outputting while some other output devices such as a TLC5940, can only sink current, while others can only source current. In case only one-way conduction is allowed, you need to set up the circuit correctly to source or sink otherwise the circuit will not work or get damaged.

How to calculate current-limiting resistor for LEDs

Here is typically how you calculate the “current-limiting resistor” for an LED.

You will need to know ahead of time:

1) Supply voltage Vdd, in case of the typical 5V arduino boards, Vdd=5V

2) Typical forward bias voltage of the LED Vfb, read the spec sheet. My personal experience is that more powerful LEDs have higher value of Vfb.
Take this one for example:

http://dipmicro.com/store/LED5G

A range of 3.0 to 3.6V is given. I would try to use the average of 3.3V. Some other spec sheets give typical values and you will use that value.

3) Current rating i_m. The above LED is said to have 20mA current rating. It’s the maximal sustained current you want it to have. Again some other spec sheets give you current at typical forward bias voltage and you can use that value.

Now to calculate the current-limiting resistor, just do this:

Vdd=Vfb+Vr, where Vr is the voltage dropped on the current-limiting resistor. So Vr=i_m*R. Where i_m is the LED current rating.

So R=(Vdd-Vfb)/i_m

For the above LED, R=(5V-3.3V)/0.02A=85 ohm. That is when you are pushing a little bit. Plus, arduino pins can only supply 20mA and the entire ATMEGA chip can supply 200mA. So to be safe, I would use a 150 ohm resistor. Then the LED will be less bright. If you use the LED for lighting purpose, its brightness is relevant to you. But you use it as an indicator instead of illumination, make it not that bright by using larger resistors.

Typically, if an LED is passing 1mA of current, you can see it in the dark, or straight on in a room but hard to see from sideways. If you run 20mA on an LED, it hurts your eyes to stare at it.

The following is taken in a dark bedroom. I believe only 3 LEDs were on together, passing around 6mA each only 🙂