One project in the back of my mind was trying to capture the essence of a jar of fire flies. I’d seen several projects around the internet that were built on LARGE jars, I wanted to represent it in miniature, almost like a ’ship in a bottle’. The stumbling block had always been trying to fit the number of wires required to do traditional multiplexing into a small jar. I figured 3 or 4 wires was about all I could hope to reasonably work with in such a confined space. That’s when I stumbled across Charlieplexing.
I was wanting to drive 6 or 7 small 0603 size LED “fire flies”. Traditional multiplexing would require at least 5 wires, (2 rows & 3 columns) However, Charlieplexing uses tri-state logic so 3 wires can drive 6 LED’s. Note that this does not come for free. With Charlieplexing, you can only drive a single LED at a time and the control logic is a bit more complicated because you have to control 3 states of each output pin, hi, low, and High-Z.
There are serious limitations to what you can do with Charlieplexing. For example, you can only switch on 1 LED at a time (where as with traditional multiplexing a whole row is switched on at once), this means you need a higher refresh rate and the effective brightness may be reduced due to the reduced duty-cycle for each LED. In a normal 3×2 multiplex matrix, each LED is on 1/2 the display cycle time (50% each row). However with Charlieplexing, those same LED’s are only on for 1/6 the display cycle time.
You will also find that the wiring and software driver complexity increases greatly as each LED is added to the Charlieplexed matrix. In addition you’ll run into issues if all your LED’s do not have the same forward voltage as certain states may then turn on unwanted LED’s. However, I found Charlieplexing to be quite useful in this specific case. It’s definitely something useful to keep in your bag of tricks.
In order to control the LED’s you need to follow a state table similar to this:
This is what the total circuit looks like: