Wednesday, October 28, 2009

Power to the people

Besides their insane efficiency, one of the biggest differences between LEDs and incandescents (hotwire) lamps is how they are powered.

Incandescents are voltage-driven devices. What this means is that if you take a 20Watt lightbulb that is designed to run on 12 volts and connect it to a 12V car battery, it will take as much current as is required to consume 20 Watts of power and stay at that level of consumption.

LEDs are different: they are current-driven. If you were to take a 3W LED and connect it to a car battery, it would glow very brightly for a few seconds and then go up in smoke. This is because the LED is designed to be fed a certain amount of current. If instead we power it with a voltage source with an essentially unlimited amount of current available, it will take all the current it can and maybe burn up.

Just as incandescents are designed to run best at a fixed voltage, LEDs are designed to run best at a fixed current. Feed the above LED with a regulated 1 amp current source and it will be perfectly happy. However, most of the power sources we have: batteries, wall warts, 120 VAC from a wall socket, etc. are designed to provide a certain voltage but the LED needs a certain current. So what to do?

We can either supply the LED with a constant current from a regulated current source, or we can supply a voltage (like a battery) and limit the current somehow. This current limiting is often provided with an electronic component called a resistor.

The purpose of a resistor is to provide a resistance to current flow. Resistors have a specified resistance that's measured in ohms and a maximum allowable amount of power measured in watts. For our purposes, standard 1 watt resistors will normally be fine. So how much resistance do we need?

The formula for calculating the safe resistance for an LED circuit is this:
ohms = (Battery volts - LED volts) /LED current

For example, a 1Watt LED normally consumes 0.35A of current at a voltage of 3.2V. That means we need at least 3.2 volts across the LED for it to illuminate at it's rated lumens. Let's use three AA cells to make a 4.5volt battery. So the resistor value would be:
ohms= (4.5 - 3.2) / 0.35
That equals 3.7 ohms. 5 ohms is a commonly available value for resistors, so we'll choose that. It's always safer to go a bit higher than the calculated resistor value and let it run a little dimmer. Going lower may result in too much current through the LED and that can shorten its life.

You may ask where the "missing" 1.3 volts from the battery went. Well it is dissipated by the resistor as heat. The LED will also dissipate some of its energy as heat, so we will need to be sure it is attached to a surface that can remove that heat. Such a surface is called a heatsink. There are purpose-built heatsinks, but often the LED can be mounted to a convenient metal surface that will let heat move away from the device.

In a future post we'll look into a simple way to build a current regulator that will give better performance than a fixed resistor.

Friday, October 9, 2009

Temperature controller





This is a bit offtopic, but I'm posting this as a followup to my Sparkfun post since I'm too lazy to figure out how to post pictures there right now :-)

This is a differential temperature controller I designed a few years back. Honestly, I don't remember much about it other than I did it quickly at someone's request and tested it on my lab bench. Can't even remember who the guy was other than to say it was used to speed up a cooling fan on a battery pack when the battery got a certain amount of degrees hotter than the ambient air.

Normally the fan runs continuously with its speed controlled by a fixed resistor. When the temperature differential is exceeded, the transistor shorts out the resistor and the fan speed increases. Notice that it doesn't use hysteresis about the setpoint for example. Also, it isn't a true differential controller since the battery sensor output is made to be a fraction of the ambient sensor output instead of simply the difference between them. It's meant to be an example to start from, not the final item. So have fun with it.