Picture of LED Cube 4x4x4
Amazing 3 dimensional LED display.

64 LEDs makes up this 4 by 4 by 4 cube, controlled by an Atmel Atmega16 microcontroller.
Each LED can be addressed individually in software, enabling it to display amazing 3d animations!

8x8x8 LED cube now available, by popular demand:


Step 1: What you need

Picture of What you need
First of all, you need quite a bit of time to solder together 64 leds ;)

Knowledge list:
  • Basic electronics and soldering skills
  • Know how to program an AVR microcontroller - I will not cover that in this instructable.

Component list:
  • Protoboard. The type with copper circles.
  • Atmel AVR Atmega16 microcontroller
  • Programmer to program the Atmega16
  • 64 Leds
  • 2 status leds. I used red and green. (optional)
  • Max232 rs-232 chip, or equivalent.
  • 16 resistors for leds. (100-400ohms) will get back to this.
  • 2x resistor 470 ohm. for status leds
  • 1x resistor 10k
  • 4x resistor 2.2k
  • 4x NPN transistor BC338 (or other transistor capable of switching 250-ish mA)
  • 1x 10uF capacitor
  • 1x 1000uF capacitor
  • 6x 0.1uF ceramic capacitor
  • 2x 22pF ceramic capacitor
  • 1x crystal 14.7456 MHz
  • 2x tactile button
  • optional pwr switch
  • connector for 12v power
  • optional connector for 5v power

1-40 of 766Next »
pranay_ss15 hours ago
dsahoo112 days ago

tell me how to generate code for 4*4*4 led cube.,.,

plz send me link for generationg code for AVR.

sudeep289618 days ago

can i use a bc548 instead of using bc 338 transistor

Aakash047 months ago

Hello, I'm a free user and i wanna make this project. It is showing 11steps, are they complete or should i turn to a paid user?
Please tell

There are only 11 steps, free uses can see all the steps and comments, but can not download the project as a pdf, support the site and other things.

SiddheshEM1 month ago

I am facing problem in compiling code . Which compiler or converter should be used to convert the above .c files to .hex files

SiddheshEM2 months ago

Is Willar programmer fine for Programming Atmega16??

ares2 months ago

I put the .hex file on the desktop. I got in command prompt this message:

error opening 4x4x4_ledcube.hex: no such file or directory

Whats the problem?

rachgaines3 months ago

I would really like to start this project; it looks so cool! Could I build the 8x8x8 with the Arduino Uno instead? It only has three ports so would it even be possible or would I only be able to build the 4x4x4 cube with the Arduino Uno? If I have to do the 4x4x4 cube, the wiring would probably be different and the code would remain the same though right?

dvberger3 months ago

Ungrounded layers sometimes light dimly:

I built a prototype of a 4x4x4 LED cube on a protoboard following the anode column/cathode layer approach with a set of current limiting resistors between the columns and an arduino controller and close the plane circuits with a set of 4 transistors in the software with an intent to only have a single plane on at a time. As I’ve been testing my cube, I found that the fewer the leds that I have lit, the more pronounced an unpleasant effect is where other leds in an activated column (but unactivated plane) light dimly. I’m really unsure why these leds would light up. The effect seems more pronounced with fewer leds being lit at a single time and totally disappears when all 16 leds in a plane are lit. Surprisingly, if I remove all grounding that closes a circuit, the activated column still lights with a diffuse lighting across the leds in the column. I’ve linked a video that shows the effect in the hopes that someone can help me understand what’s wrong. net/net, I copied this design but hooked it up to an arduino

Anesa4 months ago

I have problem with the usbtinyisp. who can help me?

sonauk Anesa4 months ago

You need to install windows driver for your 'usbtinyisp' first.

Anesa sonauk3 months ago

I installed the driver and the usbtiny communicated with the chip. But when I try to setting the fuse, the programm tell me something like "change 0 with ... (y/n)". I write "n" and from this moment the usbtinyisp can't communicated (connection failed, rc=-1)

nounou.bedri5 months ago

i need to know how can i programme a cube led 4*4*4 without arduino !!!! plzzzzz

kou6 months ago

can you email me the program with "mikropascal pro" ? khouloudkalil@gmail.com

aneamţu1 year ago

I built my ledcube thanks to your awesome tutorial, but saw this "To compile the program, open a command prompt, enter the directory with the source code and type "make" on the command line. You should now have a file named main.hex in the source directory" I tried that with the source files and I get all kinds of errors. C:\WinAVR-20100110\xledcube>make

0 [main] sh 2156 sync_with_child: child 1572(0x14C) died before initializa

tion with status code 0xC0000142

670 [main] sh 2156 sync_with_child: *** child state waiting for longjmp

/usr/bin/sh: fork: Resource temporarily unavailable

-------- begin --------

avr-gcc (WinAVR 20100110) 4.3.3

Copyright (C) 2008 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO


Compiling: main.c

avr-gcc -c -mmcu=atmega16 -I. -gdwarf-2 -DF_CPU=14745600UL -Os -funsigned-char

-funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-

adhlns=main.lst -std=gnu99 -MD -MP -MF .dep/main.o.d main.c -o main.o

In file included from main.c:74:

draw.c: In function 'setplane':

draw.c:170: warning: comparison between pointer and integer

draw.c:170: warning: comparison with string literal results in unspecified behav


..... long list down. What is the problem ? I want to try this to remove some of the effects. I already uploaded the hex file but I want fewer effects.

hey. can u email me the program? hediana11@yahoo.com

Adhyastha. MI8 months ago


Hi there, I want to make my LED Cube on STM32F4 Discovery board. It has Current Limit 150 mA and I have only 270 ohm resistors, which give

3V Ouput

11 mA per LED

177 mA when all 16 LEDs are ON. Will it damage my board?

Here is documentation link, p 77


P.S. Thanks for great instructable!

I made the cube with this board.

It won't damage the board. You will have only 150/16~9 mA per LED instead of 11 mA.

The side-effect is that one LED in layer will glow brighter then 16 in the same time.

P.S. sorry for my english.

sunnyt11 months ago

i want to make a 5*5*5 led cube.what changes should i consider??

bam50011 months ago

Hello ! Thank you for this awesome instructable.
I made a mistake while programming the microcontroller.
I ran "avrdude -c usbtiny -p m16 -U lfuse:w:0xc9:m" instead of "avrdude -c usbtiny -p m16 - U hfuse:w:0xc9:m" (the difference is "lfuse" instead of "hfuse").
What's the command to reset the microcontroller ?
Thank you for your help.

akki5230 made it!11 months ago

Great Instructable!!!

fliberty made it!1 year ago

Wahoo! It's finally complete! One of my inner bottom LEDs just died on me though :( That will be fun to switch out.

This instructable was great!


Time to move up to an 8X8X8 for your next project - and then on to the 8X8X8 RGB....fortunately got you I have instructables on both!

pankaj7771 year ago

ok then how i can set the fuse bits .... plz tell me.....

i am using top2008(a universal programmer) burner to program the atmega......

thanx for the reply

yurka3331 year ago

Hello. Thank you for this great detailed instructable, it helped me alot. But i have a question, if all leds will be turned on, wouldn't they all consume (4*4*4)*0.012A=0.768A? And what will be with microcontoller, when its allow max 200mA at once?

Firstly - there are current limiters on the LEDs.

Second, only one layer is on at a time, max 16 LEDs

Third - LEDs are modulated - not ON with DC .

End result - very VERY little current draw.

From what I know the LEDs are not turn on all at once but one by one in a very fast rate nearly 200 frames per second, just giving the illusion of them turned all at once.

Thanks for reply. Thats right what i was thinking :)

pankaj7771 year ago

i program the with given hex file but speed is very slow how can i increase the speed.

I am guessing you forgot to set the fuse bits to use the external crystal, so the ATmega is running on the internal 1 or 4MHz clock rather than the external 16MHz.

Or in this case, the external 14.7456MHz.

pankaj7771 year ago

how can i increase the speed please tell me

maks97071 year ago

Hello. Tell me, what transistors attach layers.

chirag19961 year ago

i am new to programming can someone please tell me how to start or insert codes in this thing. Thank you..

jimfu1 year ago


Mrwolf811 year ago

i see people can't seem to read.... it's not hard. 'save as' re-name


to main.hex. upload to atmega16 chip and you are done!

How to increase the flashing speed of led.... ?
kchauhan1 year ago
How to increase the flashing speed of led.... ?
1-40 of 766Next »