Driving an LED with or without a resistor

In this post I will try to show, why it’s a good idea to use a current limiting resistor for an LED. And when it’s save to drive the LED without any resistor.

If you read about LEDs, you will notice that everyone tells you, that you need a current limiting resistor. But mostly they do not tell you why.

LED with current limiting resistor

If you look at a datasheet of an LED, you will notice that graphs shown are not linear. An LED is a diode, a semiconductor and behaves differently compared to a resistor.

If you apply a specific voltage to a resistor, you can compute the resulting current with:

I = V / R Example: I = 5 Volt / 100 Ohm = 50 mA

Continue reading

64pixels are enough

I love Blinkenlights. And all kinds of other blinking and flashing LED stuff. I think, it’s already a form of addiction. When I ran across an LED matrix with square pixels, I thought it would be cool to build a small animated display with it. To keep things simple, the display is attached directly to the microcontroller the “Evil-Mad-Scientist-way”.

The display performs really well, the pixels are bright and the batteries last for over two weeks running non-stop. The microcontroller has 2 k flash RAM. That’s enough for three simple animations and a couple of messages.

If you want to see the guts, then follow me to the 64pixels howto.

LED matrix projector


Lately I was playing with my dual color LED matrix from Sparkfun. It is a matrix of 8 by 8 dual color (red and green) LEDs that measures 5 cm by 5 cm. I just had some sprites flickering across the matrix as the magnifying glass of my “third hand” came in the way. I realized, that, if in the right distance, it will project the sprites on the ceiling. Although the projection is not very bright, it works, if the room is dark enough. Disco, here I come.

Continue reading

Synchronizing Fireflies NG


Update 04. Dec. 2008: This article is replaced by the new howto.

This is a remake of the fireflies which I did a year ago. I was always fascinated by the emergence of patterns. One I like most is the synchronization of hundreds or thousands of fireflies. First they flash randomly but after some time and influencing each other, they flash in sync.

This circuit simulates fireflies with small microcontrollers. Note that every firefly acts completely autonomously, it is not a preprogrammed pattern. It is a self organizing system.

The NG version uses a small PCB (Printed Circuit Board) and a RGB-LED.

Continue reading

Nervous BlinkM

BlinkM is a smart LED, developed by Tod E. Kurt from ThingM. In a way it is a cousin of the Programmable LED. It is a microcontroller with an attached RGB LED. The idea is to implement PWM to control the color and brightness of the LED and put it in the controller. That means you have an abstraction level to make your programming easier. You can simply order “fade to red” or “fade to blue”.


Continue reading