Charlieplexing

How do you control 3 LEDS with only 3 wires?

Impossible, right? Wrong.

Charlieplexing is a mechanism to do just that. It was developed by Charles Allen at Maxim.

Because LEDS are diodes they only work in one direction – and they only work above a certain voltage. These characteristics can be used to help control them in a multiplexing fashion.  Imagine for example you had TWO wires – surely you can only drive one LED with that. Well no. Imagine you put 2 LEDS and their associated resistors across the two wires – but in the opposite direction. Take wire A high and B low… and one of the LEDS will light up – takes wire A low and B high and the OTHER LED will light up. 2 wires, 2 LEDS.

So how many LEDS can you multiplex onto 3 pins… 3, 4, 5… no – SIX

leds

And here’s a library suitable for Arduino-like chips I spotted out in the wild!

http://playground.arduino.cc/code/charlieplex

Advertisements

One thought on “Charlieplexing

  1. If the the LEDs requrie (say) 1V, and you apply 2/1/0V to the top/middle/bottom wires respectively… then you’ll end up either lighting up all three blue LEDs, or frying the right-hand blue LED. Ican’t see how you can light the left-hand two blue LEDs without lighting the right-hand one.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s