Picture of LED Cube 8x8x8
Create your own 8x8x8 LED Cube 3-dimensional display!

We believe this Instructable is the most comprehensive step-by-step guide to build an 8x8x8 LED Cube ever published on the intertubes. It will teach you everything from theory of operation, how to build the cube, to the inner workings of the software. We will take you through the software step by step, both the low level drivers/routines and how to create awesome animations. The software aspect of LED cubes is often overlooked, but a LED cube is only as awesome as the software it runs.

About halfway through the Instructable, you will actually have a fully functional LED cube. The remaining steps will show you how to create the software.

A video is worth a thousand words. I'll just leave it up to this video to convince you that this is the next project you will be building:

I made this LED cube together with my friend chiller. The build took about 4 days from small scale prototyping to completed cube. Then another couple of hours to debug some faulty transistors.

The software is probably another 4-5 days of work combined.

Remove these adsRemove these ads by Signing Up

Step 1: Skills required

Picture of Skills required
At first glance this project might seem like an overly complex and daunting task. However, we are dealing with digital electronics here, so everything is either on or off!

I've been doing electronics for a long time, and for years i struggled with analog circuits. The analog circuits failed over half the time even if i followed instructions. One resistor or capacitor with a slightly wrong value, and the circuit doesn't work.

About 4 years ago, I decided to give microcontrollers a try. This completely changed my relationship with electronics. I went from only being able to build simple analog circuits, to being able to build almost anything!

A digital circuit doesn't care if a resistor is 1k ohm or 2k ohm, as long as it can distinguish high from low. And believe me, this makes it A LOT easier to do electronics!

With that said, there are still some things you should know before venturing out and building this rather large project.

You should have an understanding of:
  • Basic electronics. (We would recommend against building this as your very first electronics project. But please read the Instructable. You'll still learn a lot!)
  • How to solder.
  • How to use a multimeter etc.
  • Writing code in C (optional. We provide a fully functional program, ready to go)
You should also have patience and a generous amount of free time.

1-40 of 2871Next »
tarek118 days ago

HELLO, i have made led cube 8*8*8 but the strange thing that there r some leds lighting when they shouldn' t i used an atmega 32A, i wonder if the hex file here doent work well with atmega 32A. thanks

power00016 days ago

hi , i have made CRR's led cube but something very strange is happening

there are led lighting that must not light. I have change emmitter with collector , i have use only one 2n222 as uperTech-IT says but nonthing good.

What have you used, atmega or arduino?

and of course i have place 8 pull up resistors on collectors ,6.2k

finally it works! there were many short circuits and tow transistor had electrik leak

Glad you got it all up and running! Hope to see a video of your cube in action!

tarek118 days ago

hello, i need help i have problem with my cube 8*8*8 i have used atmega32A i have some ledslighting when they shouldnt , i wonder if the firmawere in instructable dosn't work normally in atmega 32A. thank you

AlexC279 days ago

Hello, great project I really want to build it, but i can't download any file in this post, please can you send me the code of arduino to my email thanks

rebeltaz21 days ago

I am confused regarding the selection of the LED resistors, partially because the voltage rating of the LEDs you chose is not specified. Blue LED voltage drop is typically around 3.2v give or take, so using that, the 5v supply voltage and the 100 ohm resistors you chose, I=E/R or I=(5-3.2)/100 or I=0.018a ... 18ma for each LED. While that is well within the typical operating range of the LED, it's far below the maximum peak current of most LEDs. Now, I understand that the maximum current ratings of the ICs must be taken into account, I'm just curious why we worry about the peak current of the LED if we can't drive the LEDs anywhere near that rating. Also, since we need to take into account the fact that the I/O pins of the flip-flops are limited to 25ma and the fact that there may/will be times when the IC must supply current to 8 LEDs on at one time, using R=100 and I=18ma for each LED, eight LEDs on at one time would be 144ma - FAR above the maximum current handling capabilities of the I/O pins.

Can you please tell me where I am wrong, because I know there is an error in my calculations somewhere and I am sourcing components for this as we speak. Thank you!

Many people made a lot of miscalculations in this project including CHR. The first mistake is using calculations assuming a DC current into the LEDs when they are never driven by a DC voltage - it is ALWAYS pulsed. We are driving the LEDs with a high frequency, never a static DC voltage. Basically, all the calculations you know kind of go right out the window because frequency is never part of them, and it absolutely must be, along with the ratio of on to off time. For instance, if you are pulsing an LED at 1Hz (just to make the mental calculation easier), at a 50% ratio, the LED is on for 1/2 a second out of every second. But if you only turn the LED on for 1 microsecond out of every second, you can see how the average current then drops drastically - the same way that if you only turn it off for 1 microsecond out of every second, it goes way up - even though the frequency remains the same. Since neither frequency nor pulse width are part of your calculations, they cannot be even close to being anywhere near accurate for the running circuit.

SuperTech-IT.... You are SOOOO far off on your comments about not needing to do calculations in Digital electronics. I hope you just stick with TOYS! From your comments about just picking resistors based on price or what is on hand is just..._____. Pull-ups and capacitors are how you remove noise. Filter networks. Time constants. NOT just pick a resistor out of a hat. LEDs have current limits for a reason. PWM pulsing LEDs is how you dim them. The eye the light integrates, that's why the LED APPEAR dimmer. It is actually at full brightness. Transistors need to be in saturation mode to drive high loads otherwise you burn them up. Try designing a 15KW DIGITAL inverter you would blow it sky high.

Folks digital is different than analog by miles. Straight digital only is pretty easy as long as you keep it s..l..o..w. High freq in a whole different world too. Digital power is another.

Please ...READ and LEARN... Don't take the words of others to be gospel (not even mine). YOU must learn. Engineering is SO much deeper than SuperTech-IT makes it sound. BUT it is all doable. Just THINK, read and learn. Arduinos are great tools. Don't stop inventing!

Sorry supertech-it I couldn't let this keep going.

In THIS specific circuit, the pull-ups on the transistors have nothing to do with noise - they are specifically so we don't leave the output floating. The same is true of the pullup on the reset line. It can be 100 ohms or 100K and it will do the same job without having to break out the slide-rule.

Saturating a transistor (of course without overdriving the base) is how you use it as a switch, which is exactly what we do in this circuit. It's either off, or we saturate the base to turn it on. Yes we could get into the whole "we are really using it as a current amplifier" thing, but for our purposes here, it's a fast on/off switch. No, I couldn't design a digital inverter because I simply know nothing about them. Yes, in this type of circuit we use PWM - or more precisely BIT ANGLE Modulation (BAM) to "dim" them, however if you go below a certain voltage/current they will ACTUALLY dim and will NOT be at full brightness - so we pick a resistor that won't let the LED dim on it's own, but also won't allow enough voltage/current to damage it - and the range here is actually quite wide and was picked on price and availability. In terms of low/high frequency, this entire project is pretty much "low frequency" in the grand scheme of things simply due to the nature of the Arduino itself. Yes, high frequency is another world, and a shitload of calculations need to be done in that realm, but we are talking about low voltage, low current, low speed hobby electronics here. I doubt anyone is going to take what they learn here and think that's all there is to it in the world and immediately attempt to design 15KW inverters or 200GHz supercomputers. Take a breath and drop the know it all attitude here just a bit. For what these people are building, we really don't need a crapload of formulas etc to calculate anything. Yes, the value for the bypass capacitors was pre-calculated, as were the values for the caps on the crystal, but nobody is asking how to calculate those.

There are better ways to make your point without jumping all over someone and trying to make them look like an idiot in front of the universe.

While I appreciate your taking the time to reply, your answer doesn't really help very much except to say "you're wrong." I understand that the LEDs are pulsed, but there is still a maximum peak current rating for both the LEDs and the IO Pins. Since the value of the limiting resistors must still be calculated, it would be more helpful if you could explain, or provide, the formulas used.

Sorry if you take this as "you're wrong" again, that is not the intent at all - but "you're wrong". Very little in DIGITAL electronics requires calculations. In most cases, there are best guesses within wide ranges. For instance, we need a resistor to pull up the reset line so that noise doesn't accidentally reset the processor. The value? well, not so large that it can still accidentally reset, and not so low that you load down the supply or burn out the pushbutton or resistor when the button is pressed. Typically I have used 5-10K, but 100 ohms and 1 meg work equally well.

When we look at what kind of transistor to use to turn on and off the layers, CHR grossly overcompensated for these same reasons. The maximum current rating of a 2N2222 is much lower than the momentary peak current and again, we are pulsing it meaning there isn't a continuous temperature rise to the breaking point. Instead actually they don't even heat up. I made a video where I fill the cube with all LEDs on, while powering the entire cube through a single 2N2222 as a "power switch" for the whole cube. Thus, my designs all use a single 2N2222 for each layer. When the cube is "full on" the whole thing uses less than 3/4 of one amp, which is below the maximum rating of 800mA for a single 2N2222.

The resistor on the base of the transistor is chosen so that current flow through the base doesn't burn out the driving circuit, but not so high that we don't drive the transistor into saturation. I used to use 100 ohms, because it worked fine...until I made a design that incorporated the ATmega328P, and realized the ICSP programmer would tend to fail since these signals also are used to drive layers 7 and 8. So I changed to 1K resistors, and VOILA, you could program it without disconnecting the cube, and the transistors are still driven well into saturation.

The current limiters for the LEDs truth be known can actually be eliminated and the circuit will work without blowing anything up - however they are a nice safety measure to have. Arbitrarily I use 100 ohms because should the cube stop processing it will prevent LED popping. Because of the way LEDs exponentially draw more current as they approach terminal voltage, any value that can handle the current that will flow through it when it is forced to drop the remaining voltage in the circuit will work. Just don't make the resistor so large that it drops more than the LED forces it to (IE - it actually limits the voltage to the point the LED dims) is good. Some LEDs however break down at a lower current/voltage, so we like a little extra protection. Semi-arbitrarily, we use 100 ohms for bright LEDs with a higher breakdown voltage, and 220-330 ohms for LEDs like standard red/green LEDs. The values picked were more a matter of experimentation in a DC circuit than any kind of calculation. You will find in most low-speed digital electronics, very little comes down to any form of calculation and many or most values for resistors are simply chosen based on availability and price more than anything else. If you like making calculations and burning up your calculator, build an amplifier or radio or a radio with an amplifier...LOL.

Most calculations in digital will pertain to timing rather than anything else.

Well... I actually am an electronics technician with 25+ years in consumer electronic repairs, but, as you can probably guess, what I was taught was audio amplifier circuits and the associated formulas. So that is what I am comfortable with. I do like calculations as they tend to make sense to me! This new-fangled digital circuitry... lol...

Again, I do appreciate your taking the time to reply. All I hope for is a functioning cube! I do have one question on your "improved" design, but I suppose I should post that question to that page. See you there :)

Well, we're in about the same boat there, except I hated analog design. Repair, I can do, no problem - as long as I have a schematic and a scope and maybe a signal injector / waveform generator. If I am designing something analog though, and it's not working right - oscillating when it's not supposed to or not oscillating when it is supposed to etc. then I get frustrated and many components land leads up, never to be used again. Digital is just SOOOOO much easier. Good point and case - I was having an issue where the signal going into the music module of my RGB colour cube wasn't strong enough at standard line levels. I figured - no problem - I'll add a LM386 to it. It failed badly initially, so I scrapped it, and realized that I could digitally adjust the sensitivity to the signal in the firmware. It worked gloriously. I later figured out that my design with the 386 was actually OK, but this means 1 less IC and 5 less parts total, so in the end the digital solution was better. I'll see you over at my instructable later.

I love your LED Cube and how you did it, it is really amazing, i am in the process of making one myself just like it i have all the parts with me already, i just have a small question i just finished my first layer now i need to put in the braces what kind of wire did you use. Is it regular soldering wire because i bought some aluminium wire from the hardware section but my solder wount stick to it.

CHR used wire from a spool that he straightened out. I didn't have any, but since I needed 512 LEDs but had yo buy 1000, I used clipped off LED leads from the "extra" LEDs to make the cross braces. More about that can be seen at

I will add here now that I have re-read this that NO, solder won't stick to aluminum properly, or at all. You want tinned copper wire or something like it. Again, because I didn't have any, I used clipped LED legs from leftover LEDs because they are already straight and strong.

PopescuC21 days ago

someone has printed circuit board for led cube 8x8x8?

I do, but don't ask for the files. I have not found a home, college or university facility that can produce them because my goal was to make the boards as small as possible, and because of that, the spacings and tolerances are far too tight. I had to get a high end facility in Hong Kong to make them for me. If you want a board, inbox me and I will get back to you.




Either using wrong code OR you have the wrong microcontroller selected when compiling.

jlj0425 made it!2 months ago

i made it!!! Thanks guys. its really great


hey. i want to try make this led cube 8x8x8. can u sent all info that i needed to make this led cube please? sent to this email

Hi, i help the same information about that, please send me too.

Everything you need to know to make this cube is in this instructable if you go through all the steps. I have improved on the assembly process a bit and added a few features at
Go here. I has all the step by step guide with pictures.

Ya, but if you run normal code on that circuit, the letters come out backwards.

No. Mine work perfectly. And i did not use only one code. I combine all available code in the net to a single code. And it works perfect.

It works fine with your code, or the one by Jameco - which is backwards when compared with CHRs original project. Trust me.
Go here. I has all the step by step guide with pictures.

looks impressive, well done

Hey, what program you use to made this led cube. I want to make this led cube.

jlj0425: Hai, i want to make this led cube 8x8x8. can u sent me all the detail to make this thing. i also want the program to move this thing. sent to my email .
Just follow this. More detailed instruction. Gud luck

Nice and clean setup, funny you kept the image underneath.

Very nice, I worked 8x8x8 cube and submitted a draft, but I have a glitch in the programming codes possible help me and sent to the codes and talk shows( ALkitab University), if possible, you write the codes and help me and very necessary to have the honor to ask for help you can send code to the site(

varshal1 month ago
my4pop11 month ago

Very nice liked. I hope you the further development.

1-40 of 2871Next »