I have been looking around at 4x4x4 and 8x8x8 LED Cubes and I had a couple of question about them. A few I have seen have a full range of colors from the LEDs which I am assuming means they are using some kind of LED driver with PWM to control them. Looking around though I wasn't able to find many chips that support more than around 8 RGB LEDs and for 8x8x8 cube that would mean 64 chips which would get pricey fast.

So if I were to try to create one of these cubes and control it from my PIC, what would be the best and/or most cost effective way of controlling this many RGB LEDs?

EDIT: Currently looking at the TLC5940.

  • \$\begingroup\$ There are a few variables you are leaving out. How many colors do you need to be able to generate? What kind of update time for your colors to change? Are you defining best as fitting the specs at the lowest cost? \$\endgroup\$ – Kortuk Sep 30 '11 at 18:51
  • \$\begingroup\$ Since I am just considered this as a personal project I don't really have an exact number of colors I would like to support. As to the refresh rate I am still attempting to do some research into what kind of frequency would be need to avoid flickering. I apologize for being vague but I am just trying to get some input on what I should consider if I were to make one of these. \$\endgroup\$ – Tarmon Sep 30 '11 at 19:02
  • \$\begingroup\$ it makes a major difference, would 256 colors make you happy, or do you have a target price and as many as possible. Right now there could be 100 different answers with varying cost and color availability and you would not have a "right answer". Also, I meant how often does the cube need to be able to change color? \$\endgroup\$ – Kortuk Sep 30 '11 at 20:13

You can multiplex it to save drivers, up to about 8:1, but need a fair amount of speed to update sufficiently fast as you need to reload the drivers for each row, and row update needs to be fast enough to avoid flicker - something like 4ms for 12 bit PWM at 8:1 wih 1MHz PWM clock - you're probably going to need something with more grunt than an 8 bit MCU.


You can drive a 512 point array with 16 row x 32 column drivers (or vice versa). You can use 6 latches and 48 transistors to drive this, or use say 4 x ULN2803 (datasheet) or similar for 32 low side drive lines and 16 high side drivers. You'd still need latches or multiple ports.

ULN2803 can notionally sink 500 mA / line but total pkg dissipation reduces that.

The MM5450 datasheet here can drive 34 LEDs. There are DIP and LCC versions. About $3.80 each from Digikey in quantity needed.

At max clock of 500 kHz you can update it at about 10,000 times per second. It's just on/off per LED but by running at say 100 brightness levels with N cycles on and 100-N off you get 1000 frames per second.

For 8x8x8 = 512 LEDs you'd need 512 / 34 = 16 ICs. These can be daisy chained. Not the ideal solution BUT it would work. May or may not have enough segment drive current for you. Extremely easy to drive 0 just a long shift register.

132 LED driver IC !!!!

I just heard (October 2011) on PICList (thanks Colin) about this IC . 132 LED driver from Austrian Micro. Digikey sells a number of their ICs but do not list this one as yet.

They say:

  • The AS1130 is a compact LED driver for 132 single LEDs. The devices can be programmed via an I²C compatible interface.

    The AS1130 offers a 12x11 LED-Matrix with 1/11 cycle rate. The required lines to drive all 132 LEDs are reduced to 12 by using the cross-plexing feature optimizing space on the PCB.

    The whole LEDMatrix driving 132 LEDs can be analog dimmed from 1 to 30mA in 256 steps (8 bit). Additionally each of the 132 LEDs can be dimmed individually with 8-bit allowing 256 steps of linear dimming.

    To reduce CPU usage up to 36 frames can be stored with individual time delays between frames to play small animations automatically.

    The AS1130 operates from 2.7V to 5.5V and features a very low shutdown and operational current. The device offers a programmable IRQ pin. Via a register it can be set on what event (CP request, Interface timeout, Error-detection, POR, End of Frame or End of Movie) the IRO is triggered. Also hardware scroll Function is implemented in the AS1130.

    The device is available in a ultrasmall 20-pin WL-CSP and an easy to solder 28-pin SSOP package.

Product page / General details here

Data sheet here



I know you said PIC, but there's a pretty interesting Arduino library for PWM control via shift registers: http://www.elcojacobs.com/shiftpwm/. It's been on Hack-a-Day in recent months. Seems kind of perfectly suited to your needs. And it was actually designed to be a cheaper, software based alternative to the TLC5940 type chips using plain old shift registers (like 74HC595's). You should check it out, and if you have your heart set on PIC perhaps you could port the library to it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.