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

TV-B-Gone clones

TV-B-Gone is pure subversive fun. If you don’t know it, it was invented by Mitch Altman and it is a universal TV remote control with a single button, the power button. You can only switch TVs off. No longer dumb advertisements everywhere you go. Just switch them off. Extra portions of fun in a MediaMarkt.

Just another fine device, well suited for DIY.

My DIY TV-B-Gone and Mini-TV-B-Gone

Continue reading

Programmable LED gallery

Back in March I published my first instructable called Programmable LED. The idea was simple, have a device that is able to record and play back light sequences. Light sequences are recorded with an LDR, a light dependent resistor and played back with an LED.

After a while some users at Instructables began to rebuild, modify and improve the Programmable LED. Ok, that’s what Instructables is all about, to share and to distribute, but it was astonishing to me, how it worked.

This is a gallery of these derived and improved versions. Kudos to all the builders.


Continue reading

DIY Tengu on a breadboard

When I first saw Crispin Jones Tengu, I was sure, I must have one. If you don’t know tengu and don’t want to follow the link, it’s a small face, made of LEDs, that reacts to music and sound.
It did not take long until I decided to clone this funny little device. All it needs is a microcontroller, an LED matrix and a sound sensor.

Tengu clone

Continue reading

Synchronizing Fireflies

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.

The rule behind this is very simple. All fireflies have nearly the same frequency for their flashing, but their phase is shifted. If a firefly receives a flash of a neighbour firefly, it flashes slightly earlier.

This circuit simulates fireflies with small microcontrollers.

A single Firefly

The board consists of 25 fireflies. Every single firefly is self contained, there is no over-all controller. A single firefly consists of:

  • ATtiny13 microcontroller, 1k SRAM, 64 bytes RAM
  • Light Dependant Resistor (LDR)
  • LED
  • 2 resistors


The circuit is the same as for the Programmable LED.

The complete Board

Assembling 25 fireflies on a prototype board is easy. Harder is to get the right distance between all fireflies. It has to be close enough to let one firefly influence another, but not the whole group.

The LEDs I used emit the light mostly straight up. So a kind of reflector is needed. I used a piece of paper which is located 5 mm above the LEDs. For the next version I would take LEDs with a wider light emitting angle and use a kind of diffuser, as proposed by Tod for his Smart LED Prototypes.


Here is a video. It is a bit dark as my camera is not very suitable for this.