3D LED Charlieplex Cube From Chrismas Tree Lights





Introduction: 3D LED Charlieplex Cube From Chrismas Tree Lights

About: update later

Christmas time is a great time to obtain large numbers of LEDs very cheaply. This instructable uses 80 LEDs from an LED christmas tree light string to make the venerable 3D LED cube. In this case a 5x4x4 cube.

The only other components are a 7805 5V voltage regulator, 2x100nF decoupling capacitor, 16 resistors, an IR receiver and a single PIC 16F88 microcontroller. Many other LED cube projects use all sorts of shift register chips etc to perform their addressing of the LED matrix.

To save on component and wiring effort it makes use of the charlieplexing addressing technique previously described in instructables:
previous projects using this are:

I'd recommend reading at least the first two before continuing to read this instructable.

Step 1: Strip the LEDS From a String

This is pretty boring actually. Get a string of Christmas lights. Preferably ones with a concave lens, ie they look like someone has countersunk the top of the LED.

Strip and unsolder all the leds in the string.

Step 2: Build the Cube

Now build the cube.

Because we are using charlieplexing we can take a few shortcuts to your average LED cube making.

In particular we can use a bunch of sections that all have the same connection. The main picture below shows one section. It's just tinned copper wire soldered together. Each section becomes one line in the charlieplex matrix.....you did read the articles mentioned in the intro didn't you??

I soldered my wire into a 5x4 grid and left some tags on the bottom. These are used to fit down onto some stripboard (aka veroboard) and gives both some mechanical stability and allows easy even spacing of the grid.

Note if I did this again, I would use some premade pet cage mesh, say for rabbits or other small animals rather than solder a whole bunch of wires together.

The other pictures in this section show the individual LEDs soldered to each section. One leg of the LED solders to the mech section and the other is bent out at 90 degrees to solder to the cross pieces.

Step 3: Making It All Charlieplex Like

New comes the wiring into a charliplex matrix.

The first picture below shows one section (thick lines) with LEDs attached. Each row has LEDs attached to the mesh with the same polarity. The next row is attached with the opposite polarity. Each alternate row is connected together. This forms another charlieplex line.

So for the schematic below if I wanted to light up the top most right hand corner LED I'd put a +ve signal on line C1 and a -ve signal on line C11. The topmost LED in the next mesh would have a +ve signal again on line C1 and a -ve signal on line C12 and so on.

Because I have 5 rows in each mesh I connected the bottom row alternately as shown. A 6x4 or other even numbered mesh would simply repeat the top connection scheme.

The second picture is a rough 3D schematic....which I hope shows the connections with a little more clarity.

The final picture shows a partially completed grid.

Step 4: The Video and Last Words

Now we have 80 LEDs connected into a 5x4x4 cube. Consisting of 14 charlieplex lines.

Those of you who actually read the referenced articles in the intro will note this is a sparse charlieplex matrix. With 14 lines, I could theoretically connect 13x14=182 LEDs.....however the wiring would have been more complex.

The remaining part of the circuit was simply the charlieplex line current limiting resistors, a very simple PSU (7805 regulator) and a PIC with an IR receiver connected. When the silly season is over I'll hopefully be releasing the PIC program, but it basically sends random PWM signals down the lines, an IR remote can control the speed and distribution of the PWM patterns.

Note this isn't strictly charlieplex driving, I'm not addressing each individual LED one by one, switching lines tri-state as needed. However random PWM signals seem to work great with charlieplex grids....if you like randomly pulsing LEDs that is. Too close to Christmas to finish that part of the setup.

One thing to notice if you don't properly tristate lines when driving a charlieplex grid, is that one LED will light brightly, and several others will light up dimly. It's a little unpredictable, however for random patterns this is no problem because an element of randomness is what you want.

Coming next article will be a proper charlieplex driving scheme where individual LEDs can be lit up and some more interesting patterns made. I'm hoping to do a sort of 3D game of life unit, and perhaps re-do the grid with nicer, larger, neater sections made of pet cage mesh. I was only slightly whelmed by how it turned out with hand soldering the grid.

For now here is a pretty video (warning 9Mb).....sorry I didn't have time to youtube it.

Hopefully this brief article has shown how to make use of the charlieplexing method of driving LEDs and will put those old LED christmas string lights to good use.



    • Water Contest

      Water Contest
    • Oil Contest

      Oil Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    31 Discussions

    I don't see the beauty in this design. I would suggest a circular arrangement with the LEDs facing downward. The wires can be left alone and slip the wires into a plastic holder of some kind which can be cut with x-acto knife and then glued back together with superglue. Alternatively, I got an idea from another project, to find some kind of small bottles that one can cut the base off and use the neck. I seem to recall there are small candies that come in the right size tiny bottles. Put those into a disk with holes facing downward...

    lol, my local store has 4 leds for 5 bucks, i went to ebay and got 90 for 5 bucks (im in canada and i ordered them from the states, that 5 bucks shipping and everything.) its amazing what the internet can do.

    This seems to be a very costly way of buying leds. Ebay can be amazing. i was able to get 9000 total for just: 2000 WHITE $24.39 5000 BLUE $34.78 2000 WHITE $28.89 $86.06 (that is less than a penny each)

    4 replies

    well that is not too bad, for such a small number. most of the time you cna't spare $100 for just some LEDS.

    Yes it is true that you can probably get them cheaper, however, due to the fact that there are so many colors of leds being called a single color, you do know for a fact that the ones you buy in the store will be the ones you need.

    those leds i got came in sealed reals. Every LED was exactly the same. it was not any "Loose leds" even when i have bought loose ones they were all exactly the same.

    mmmm you're right....how about a cubic lattice, or given my construction was a little wonky and it bends a little.... a rhombic prism !

    Check out this article to see a way to group the anodes and cathodes with resistors in series with, say, that cathodes that will if only a single CPU pin is driven high at a time allow multiple LEDs to be controlled at a time without ghosting.
    I'm not sure how much it will complicate the layout.

    1 reply

    AWESOME! I saw the vid. How did you create the code for that? Does it just use variables and pseudo-random number generation to light different LED's?? Also, I know this cannot light an LED individually, but it looks like that's not so, according to the video... Or is it only diagonal rows, or something?I saw something very similar to this in a MAKEZine podcast. I'd love to do this with an AVR; I'm getting an Arduino for Christmas; maybe I'll try something similar...Great job!

    2 replies

    Actually, yes it can light each LED individually - read some of the links the man provided...

    The trick is that the output of the microcontroller isn't just "High" versus "Low" (0V) - you can actually pick one of three states: High / Low / Open. That means that, with some clever wiring, you can actually control a lot more LEDs than with just a binary output.

    And this is all done without a separate driver IC?? Won't that use up too much I/O??