The 8x8x8 LED cube project published on the Instructables website was very detailed and yet looked simple enough for me not just to complete but add substantial enhancements as well.

Following is a tutorial on how I built my 8x8x8 LED cube and also how I created the firmware and simulation using Flowcode 6.

After planning on creating a larger single color version of the cube I quickly realized that to double the display dimensions to 16x16x16 meant multiplying the number of LEDs and interconnections by 8. The thought of processing 2,048 LEDs was too much for me so I scaled down my thinking and instead decided to repeat the 8x8x8 (512-LED) design but using full color RGB LEDs instead of single color LEDs. Even at 8x8x8 RGB LEDs it still tallies up to around 2,200 solder joints so be warned! From my research I also came across some great infinity mirror projects which are basically LEDs sandwiched between a mirror and a pane of glass with a one-way mirrored surface to create an effect that the LEDs go on forever. I decided to apply some of these simple techniques to my cube to try and extend the display beyond the bounds of the actual LEDs.

With 512 RGB LEDs in the design each with their own three internal LEDs a lot of control signals are required to switch the LEDs on and off. Therefore a method is needed to share control signals between LEDs (multiplexing). In the design the LEDs are cathode-grounded with a current limiter resistor on the anode.

## Step 1: Multiplexing Tool 1: Buffer ICs

The LED cube employs two types of multiplexing to allow all 512 RGB LEDs to be driven independently. The first method uses octal flip flop buffer ICs to allow us to create enough control signals to drive a full 8×8 segment, i.e. 1/8 th of the cube. In an 8×8 section there are 64 LEDs which means we need 192 control signals to allow us to drive all the individual color channels. To drive all the signals we need to chain 24 of the buffer ICs together so that the output of the first buffer drives the input of the second buffer, the second drives the third and so on. Figure 2 shows a simple schematic with two buffers chained together and connected to drive LEDs.

The clock signal is driven by the controller and used to shift the output signals from one buffer IC to be passed to the next buffer IC. I made the buffer driver fairly modular to allow me to scale up or down the size of the cube depending on how many LEDs I wanted. To do this I created a PCB with three buffer ICs on allowing me to control a single row of eight RGB LEDs. With eight of these driver PCBs chained together it allows me to control the entire 8×8 segment of the display. The smaller 16-way ribbon cable is used to pass the 10 control signals plus power and ground between the PCBs. The wider ribbon cable is used to pass the signals onto the LEDs via the on-board resistors. Each board is fitted with its own capacitors to allow a bit of current to be sourced locally as and when needed by the LEDs.

## Step 2: Multiplexing Tool 2: NPN Transistors

In Figure 3 each of the 8×8 LEDs in a single segment is driven via our chain of buffer ICs.

To allow us to control the other seven 8×8 segments of the display we need a second method of multiplexing. To do this we take the cathode pins of all the LEDs within the 8×8 segment and connect them all together. We then connect these to ground via an NPN transistor which allows us to enable and disable all the LEDs in the 8×8 segment at once using a single control signal to the transistor’s base pin. Figure 4 shows the approach schematically.

Photo shows the resulting stack of eight driver boards.

By connecting all the LED cathodes together for each horizontal 8×8 section we can then use eight NPN transistors to enable or disable each of the 8×8 sections and therefore control each of the LEDs in each section individually. This is great but obviously this means that we can only light up 1/8 th of the display at any one time. By constantly switching which 8×8 section is active at fairly high speed we can build up the entire display so it appears to the human eye that the entire cube is lit and constant.

## Step 3: The Build

So that’s pretty much it for the theory, it’s time to pull up our socks, make a brew and dive into the world of bending wire and soldering. There are two fairly laborious tasks that are required when building a LED cube, the first being bending LEDs and the second being soldering the bent LEDs together. Each step required a jig to make the process more manageable and to help maintain quality while I slowly lost the will to live. Luckily I managed to do most of this stage during the Christmas vacation so there was enough going on to keep my mind interested while my hands were occupied on the task.

## Step 4: Bending LEDs

The first step for assembly was to take all 512 LEDs and bend them correctly. To do this I drilled a 5mm hole in a spare piece of wood and checked that a LED fit snugly and flush to the wood but could also be inserted and removed easily. Once I had my hole correct I drew some guide lines to help with the bending. As pictured in Figure 6,

the lines I drew were one vertical running through the center of the hole (A), one horizontal line running through the center of the hole (B) and one horizontal line running through the very edge of the hole (C).

A metal ruler came in very handy during the bend stage. The photos in Figure 7 show the steps to follow when bending the legs.
1. Insert the LED into the jig ensuring you have got the LED in the correct orientation. The pins should all be sat in line with the horizontal line (B) and the cathode pin should be the second pin from the right.

2. First Bend: bend the cathode pin downwards and the anode pins upwards parallel with the line (A). Ensure they are fairly flat to the board and the bottom of the LED.

3. Second Bend: using the metal ruler bend the cathode pin to the left so it is parallel with line (B).

4. Third Bend: using the metal ruler on the second horizontal line (C), bend the anode pins upwards again. One LED down, 511 left to bend!

## Step 5: Assembling 8×8 Sections

Once you have at least 64 bent LEDs you are ready for the next stage which is to assemble one 8×8 section of LEDs. To hold the LEDs in place I created a jig using my trusty 3D printer and a design I uploaded to Thingiverse. If you don’t have access to a printer then the Instructables guide describes a different method to hold the LEDs in place. The LEDs were soldered together by inserting each LED one at a time into the jig before soldering the anodes together on the current column and the cathodes together on the current row as shown in Figure 8.

Take your time and ensure that every solder joint you make is nice and strong, spending a bit more time here will potentially save a huge amount of time later on when it comes to getting the thing up and running.

As each complete panel was finished I made sure to give it a full test while it was still in the jig to ensure that every LED lit correctly and that there were no breaks or shorts in the panel. To do this I connected long lengths of wire to my 5-V power supply. At the end of one of the pieces of wire I soldered the larger of my two resistor

values used on the driver board from Port 1 and this allowed me to drive all of the LEDs without any risk of damage. Using my trusty metal ruler pressed against the unconnected common leads

I was able to temporarily short all the common pins together to ground meaning I only have to test each anode column once rather than having to test each and every LED individually. To get the

panel of LEDs out of the jig I just gently pushed on the top of each top LED in turn and repeated until the entire panel popped loose. Setting the completed panel aside I went back to bending LEDs for the next 8×8 panel.

## Step 6: Combining the 8×8 Sections

After all the LED legs were bent and all the LEDs were assembled into panels it was time to start joining the panels together. I laid the first panel flat on a desk and soldered two lengths of straight single core wire to each the cathode wires one at either side of the panel to provide a good level of support and a bit of redundancy just in case

one of the solder connections on one of the wires were to fail. To obtain the straight wire I used the technique of holding both ends with a pair of pliers and pulling hard. I had to experiment with a few different types of wire before I found one that would be happy with the current from 64 x 3 LEDs and would also straighten nicely without too much effort on my part. I used a few small match boxes to space the next panel away from the first. Taking my time to ensure everything was as lined up as possible I repeated this process until all of the panels were together and then gave the LEDs another full test to ensure I hadn’t missed anything. A virtual 3D view of the cube in the making like in Figure 9 shows the position of the 8×8 section.

## Step 7: Preparing the Base

The cube once fully assembled is fairly strong but all it would take would be a bit of weight applied in a wrong place and all that work would be ruined. I used the same piece of MDF board that I used to create my jigs and drilled 5-mm holes into this at the correct pitch for the legs of the bottom row of LEDs to go through the MDF. To work out the pitch I took measurements from outer left LED to outer right LED on both sides of the cube and then averaged the spacing, then repeated for front to back. I then drilled a further

eight 3mm holes along one edge for the cathode wires to come through to the cube. Finally I routed a 6-mm groove for my glass cover to fit into and spray painted the MDF.

## Step 8: The Brain

I used some pieces of veroboard to allow me to connect an ECIO40P16 micro-controller brain directly to my 5-V power supply and to create the NPN common driver circuitry. A 5-V power supply must be used to allow a fairly large current to flow without generating any additional heat. The Flowcode LED Cube component is flexible so will work with pretty much any microcontroller family apart from 8-bit PICs as these cannot have arrays greater than 256 bytes in size. The ECIO40P16 packs a lot of punch for its size but a standard AVR based Arduino should also be able to drive the cube if that’s what you have available.

Whatever method you choose of packaging or securing the control electronics to the cube assembly, remember to add a hole to allow your power supply to be connected. Some of the popular SMPSUs come in small metal cases so this could also be included inside the box to neaten things up a bit. You may also want to leave the USB cable connected to the ECIO to allow you to a) reprogram without having to re-open the casing and b) for communications via USB should you want to go down this route using the Flowcode USB components to interact with the cube.

## Step 9: Enter Flowcode 6

To create the simulation and the code to drive the display I used the Flowcode v6 software and this had everything I needed to allow me to create a masterpiece. I began by creating a sphere on the panel, making it invisible and then using the simulation API to clone the sphere enough times to match the X, Y and Z dimension properties. I then went about creating routines allowing me to get and set the color of each individual sphere. This then allowed me to generate the line and cuboid drawing routines as well as the slightly more complex shift and rotation macros. By using a previous graphical LCD component I was able to rip out the text drawing macro and by finally adding a double buffering system the simulation side of the component was about feature complete.

To add the embedded functionality I created an array of 16-bit variablesto store each of the LED color values in the cube. I then created a routine which could be called repeatedly to handle things like clocking out the data to the buffers and switching between the eight common channels. Finally all that was left to do was to add code into the get and set color macros to allow the array to be read and written when not running via the simulation. The final component is now available [3] which can simply be dragged onto the Flowcode panel. The Flowcode program is shown in Figure 10.

## Step 10: Visualizations

The Flowcode tool has been used to develop a set of test programs to generate a rain effect with lightning, a fireball, two interacting plasma balls, a textual display and a vector based animation. A video is also available showing the visualizations running on the hardware.

The next step is to add a microphone to the internal circuitry and use this to control the movement of the visualizations using techniques such as FFT to chop up the audio signal into frequency bins. Plenty of challenges there, let us know how you get on.

<p>This is a really nice, clean and professional looking build. Good job :)</p>
<p>damn cool</p>
Super cool project
<p>Hey, we would like to build something similar. Is there a list of materials and equipment?</p>
<p>Too Kool for words!!</p>
<p>hey are you able to link where you got the glass from or anything like it please want to do this as a project :) thank you</p>
Great let me know how your getting on. I believe I used these tempered glass kitchen shelves. http://www.diy.com/departments/it-kitchens-glass-cupboard-shelf-l266mm-d247mm-pack-of-2/110199_BQ.prd
<p>it's not a complete square does that matter? and thank you i'll let you know how i get on</p>
<p>Mine doesn't have a top at the moment so the glass is just there on the 4 sides. Each pane is laid with the longest side on the top and bottom. For other projects involving mirrors I have bought custom made mirrors to get the correct size I need to match the glass. I'm guessing you could also do this for tempered glass if you wanted a perfect square. I used the glass shelves mainly because they are easily available and fairly low cost.</p>
<p>For some reason I can't open the BOM... Any advice?</p>
<p>What are you trying to open it with? It was created in Libre Office but I have just tried downloading it and opening it in Excel and it seems to be ok. It's an old Excel file format so I could try saving it as a newer .XLSX format if your still having problems.</p>
<p>I'm trying with Excel 2014, still coming up with errors when saving it as an .xlsx. Would you mind uploading as a .pdf? I'm really keen to give this build a go!</p>
<p>That's hypnotic, actually.</p><p>Awesome job there, mate!</p>
Nice build, is there any video of it?
<p>There certainly is. For some reason videos don't seem to work on the instructables app or mobile site, the desktop version works fine. See this URL: </p><p>https://www.youtube.com/watch?v=odFljHeCNaY</p>
You need like 1.21 Gigawatt to power it up right? ;)
at least ;)
<p>Hey try moving the glass and mirrors closer to the LEDs and the infinity effect will be increased!</p>
mirrors rather than glass really make the effect pop but means you can't see through on all sides. having the glass closer also helps.
<p>Very nice, I wish I could make something this cool.</p>
keep at it and you will get there :)
<p>im not smart enough to build one. so are you selling yours? and how much?</p>
<p>Hi, I dont want to be a party pooper but check this : <a href="http://www.seeedstudio.com/depot/L3D-Cube-8x8x8-Full-Color-Kit-p-2322.html" rel="nofollow" style="">http://www.seeedstudio.com/depot/L3D-Cube-8x8x8-Fu...</a></p><p>My friends of the Looking Glass Factory are building these everyday here at Makerbay, in Hong Kong. It will take you less than 30 minutes to assemble. Just saying :)</p>
<p>That looks quite cool and isn't too expensive, good find. The LEDs look to be surface mount. Does that mean there is a dark side of the cube?</p>
<p>Many thanks for your interest. When I built mine there was a company in China where you could buy them pre-made, not sure about quality or shipping such a fragile thing. Just had a quick look and couldn't find them so they might not be there anymore but there seems to be movement in this area. Either way unless we are talking silly money there was a lot of love and sweat gone into this project so I probably wouldn't want to sell it. At least not just yet :)</p>
<p>Just Wow! Mother of God! Waht kind of sorcery is this? Impossibru!</p>
Nice job... Looks awesome and professional.
One question.... Why is it that I don't see the small pcb's anymore at the segment &quot;the brain&quot; when the cube is up side down.
<p>Thanks for the comment. The PCBs are still there you can see all the ribbon cables going to them, I found I had to separate them from their nice neat tower to get them to fit better in the base.</p>
<p>Hi</p><p>I have got some <a href="http://www.rgbledcolor.com/sell-2393587-sk6812wwa-led-white-color-cct-1800k-to-6500k.html#.VcAsvvOqqko" rel="nofollow">sk6812wwa led strip</a>,which declare it can acheive the white color cct from 1800k to 6500k in one smd led.<br>but I how to control it to mix the different white cct as I want,such as 2500k,3500k,4000k and so on.<br>by the way,the ic they use it SK6812 ,which is similar to ws2812.<br>anyone can help will be grateful.<br>thanks</p>
<p>ExTrAoRdInArY...... LoVd It.....</p>
<p>Beautiful LED sculpture! Congrats!</p>
<p>If anyone would like to build a ...well, not simpler - but if you want an easier to build circuit, drop by <a href="http://www.theledcube.com/" rel="nofollow" style="">www.TheLEDCube.com </a>as well as my original instructable on the RGB cube at <a href="https://www.instructables.com/id/8X8X8-RGB-LED-Cube" rel="nofollow" style="">https://www.instructables.com/id/8X8X8-RGB-LED-Cube...</a> .</p><p>My PCB boards make assembly a snap for the less electronically gifted. </p><p>I use a single PCB board for the main circuit with a very low parts count, making it easier and cheaper to build. You could then apply this guy's shell to it so you wind up with something that looks just like it, but is easy to assemble and more functional.</p><p>Demo source code for Arduino UNO, Arduino MEGA2560, ChipKit UNO32 and ChipKit uC32 are provided. (Doug Domke, Nick Schulze, Kevin Darrah and myself).</p>
<p>You made the LED cube even more trippy. Nice effect.</p>
This is so cool!!
<p>This is so cool!</p><p>Perhaps I missed it, but can you tell a little about the materials/construction of the infinity mirror portions of cover? </p>
<p>I may not have said in the text. I simply used 6mm toughened glass kitchen shelves from B&amp;Q. I then applied reflective car window tint to the inside of the glass to give the mirrored yet transparent effect. I routed a 6mm slot in my base and the bottom of the glass fits snugly in there. The top of the glass is held together using 3D printed brackets. Black electrical tape completes the effect and hides the seams in the glass. :)</p>
<p>Nice. This is so cool. Thanks for the details on that part of it!</p>