For fun, I was going to create an 8 bit binary counter with my Arduino Uno. An obvious, simple way to do something like this would be 1-1 wires all grounded to the Arduino. That’s all fine and nice, but pretty soon you have a mess of wires. Also, its not a very challenging way to go about it. I read up on Charliplexing as a possible solution (I didn’t have a demultiplexer available at the time). With Charlieplexing, one can reverse the values of two inputs to an LED and take advantage of the fact that LEDs operate when the current must be directional–with the anode side having the higher (input) voltage and the cathode side being the ground (low) (hence the ‘diode’ part of the acronym). Charlieplexing requires tri-state logic ability of the controlling device. For example, on Arduino, we can set any output to be one of 3 states:


With 3 states available, 2 lines can control 2 LEDs, 3 lines can control 6, 4 can control 12, etc. The formula is number of LEDs = lines * (lines – 1). I was off to a good start controlling 2, 3 and even 4 LEDs, but controlling 6 became a bit cumbersome, mostly because the task of figuring out what went where became a tedious exercise in mapping wires. In my video below you can see it mostly works, but for some reason the 4th LED lights up when the 1st LED is switched on. Clearly I have something grounded where it shouldn’t be, and since this was just for fun, I didn’t spend much time trying to figure out why–at the end of the day, everything gets torn up and put back in my box of Arduino junk.

Long store short: Learning about Charlieplexing was a good exercise (and fun despite the frustrations), but to make anything practical a demultiplexer is the way to go (I have one on the way from TI). A demultiplexer will prevent the mess of wires and make creation of any kind of row or grid of LEDs simple. My ultimate goal is to create a permanent LED grid. Better yet, how about a huge LED grid that can scroll messages to my family that I send via THE INTERWEB!

Simple Charlieplexing Example Charlieplexing LEDs with Arduino


One thought on “Charlieplexing

Comments are closed.