# Charlieplexing LEDs- The theory

## Step 6: Some Practical matters

The magic of charlieplexing relies on the fact the individual voltage presented across multiple LEDs in series will always be less than that across one single LED when the single LED is in parrallel with the series combination. If the voltage is less, then the current is less, and hopefully the current in the series combination will be so low that the LED will not light.

This isn't always the case however.

Lets say you had two red LEDs with a typical forward voltage of 1.9V in your matrix and a blue LED with a forward voltage of 3.5V (say LED1=red, LED3=red, LED5=blue in our 6 LED example). If you lit up the blue LED, you would end up with 3.5/2 = 1.75V for each of the red LEDs. This may be very close to the dim operating area of the LED. You might find the red LEDs will glow dimly when the blue is illuminated.

It is a good idea therefore to make sure the forward voltage of any different coloured LEDs in your matrix are roughly the same at the operating current, or else use the same coloured LEDs in a matrix.
In my Microdot/Minidot projects I didnt have to worry about this, I used high efficiency blue/green SMD LEDs which fortunately have much the same forward voltage as the reds/yellows. However if I implemented the same thing with 5mm LEDs the result would have more problematical. In this case I would have implemented a blue/green charlieplex matrix and a red/yellow matix seperately. I'd have needed to use more pins....but there you go.

Another issue is to look at your current draw from the micro and how bright you want the LED. If you have a big matrix, and are rapidally scanning it, then each LED is on for only a brief time. This it will appear relatively dim compared to a static display. You can cheat by increasing the current through the LED by reducing the current limiting resistors, but only to a point. If you draw too much current from the micro for too long you'll damage the output pins.
If you have a slowly moving matrix, say a status or cyclon display, you could keep the current down to a safe level but still have a bright LED display because each LED is on for a longer time, possibly static (in the case of a status indicator).

Some advantages of charlieplexing:
- uses only a few pins on a microcontroller to control many LEDs
- reduces component count as you don't need lots of driver chips/resistors etc
- your micro firmware will need to handle setting both voltage state and input/output state of the pins
- need to be careful with mixing different colours
- PCB layout is difficult, because the LED matrix is more complex.
Remove these ads by Signing Up
ebeccarayray3 years ago
Thank you so much for posting this! I am working on my electrical engineering senior design project which is going to be a bicycle with a lighting system along with other features. I am looking into Charlieplexing the taillight which is made up of 3 premade LED matrices.

My main question is, what is the actual time that each LED is lit up? I understand that the human eye takes in a new image 25 time per second, so I'm wondering how long should each LED stay lit for.

I'm also concerned that with the LED matrix I'm using, I won't actually be able to wire all of them up in the way that you've shown. This is the part I'm using: http://www.futurlec.com/LED/LEDM88RGCA.shtml