< Nick's Home -- Nick Parlante 8/2012
When hooking up an LED, you are always supposed to use a current-limiting resistor to protect the LED from the full voltage. If you hook the LED up directly to the 5 volts without a resistor, the LED will be over-driven, it will be very bright for a while, and then it will burn out. That's what they say.
But suppose we hook up the LED directly to the 5 volts -- exactly like you are not supposed to do -- but then switch the voltage on and off very fast, e.g. on for 1 millisecond, then off for 9 milliseconds (on about 10% of the time). This is called Pulse Width Modulation, PWM. With PWM, the LED has a reasonable looking brightness, but the question remains: are the brief periods of the direct 5 volt connection destroying the LED, or is it fine? Hence today's experiment. The top LED is driven the usual way with a current-limit resistor, so that's the control. Below that there are 4 LEDs in a row. The LEDs are driven via PWM with various percentages to see how their brightness holds up over time.
I started it running on 8/3/2012, so we'll see how they hold up (the experiment is currently visible at my Gates office). At the start of the experiment, the PWM LEDs show three brightness levels as you would expect. My suspicion is that the 50% LED really is getting overloaded, and in the end with dim or burn out or something. We'll see. This experiment was constructed with an open source Arduino board which is a nice little $25 computer for art/hobby projects like this.
I was motivated to look in to this because the world's most geeky geocache, The Dragon Puzzle, is burning too much power running LEDs. It turns out, that if you drive your LEDs through PWM, they use about 50% less power than if you do it the old resistor way. It's also a little bit motivating out of just laziness. Why bother with wiring up a resistor if you can just use PWM instead. Most modern chips have lots of PWM capacity. The resistor is sort of a crude solution -- getting in the way of all those poor electrons. With PWM, we're sort of solving it in software, the hip way. Well, hip unless it burns out the LED.