Instructables
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:

http://www.instructables.com/id/Led-Cube-8x8x8/


 
Remove these adsRemove these ads by Signing Up

Step 1: 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 747Next »
maks970714 days ago

Hello. Tell me, what transistors attach layers.

yurka3331 month 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?

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 :)

aneamţu1 month 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

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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

ior

..... 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.

chirag19962 months ago

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

jimfu2 months ago

I LIKE THIS

Mrwolf813 months ago

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

F6JRI6AFJ1I6CP0.tmp

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

kchauhan Mrwolf813 months ago
How to increase the flashing speed of led.... ?
kchauhan3 months ago
How to increase the flashing speed of led.... ?
ClA0074 years ago
i have a question  how do i use the zip file? the hex i can use it from windows to send it to avr but the zip i didn't know how to use..! can someone tell me if it s important o not?
Mrwolf81 ClA0073 months ago

the zip file contains the original naked coding files which you can edit if you want to, but if you dont know what you are doing... dont touch it.

if you uploaded the .hex file... you've completed the programming of the atmega chip and theres nothing more you need to do

How do you connect an avr to your pc for the code to load on it? And yes I do have linux

you need a gadget called a 'usbtiny' which is available on Ebay

Bartjeeh4 years ago
so this is what i do. and i really don't understand what i do wrong.

Bartjeeh@linux-b5pm: cd /home/Bartjeeh/Desktop/4x4x4_ledcube
Bartjeeh@linux-b5pm:~/Desktop/4x4x4_ledcube> make
If 'make' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf make

in that folder are the following files

file:///home/Bartjeeh/Desktop/4x4x4_ledcube/F6JRI6AFJ1I6CP0.tmp
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/Makefile
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/draw.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/effect.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/frames.c
file:///home/Bartjeeh/Desktop/4x4x4_ledcube/main.c
if anyone could help me please!!!
Mrwolf81 Bartjeeh3 months ago

change this file :

F6JRI6AFJ1I6CP0.tmp

to main.hex

then type

avrdude -c usbtiny -p m16 -U flash:w:main.hex

mateuszrjzr2 years ago
hello
I know, that last post was in 2008, but can you explain me why when i'm klicking "4x4x4_ledcube.hex" suddenly i am downloading something like : F6JRI6AFJ1I6CP0.tmp???? please so much help me...

before you click the link, right click on it and "save as", then change the filename to main.hex...

you need to rename int to 4x4x4_ledcube.hex
andrejmdias3 years ago
someone has the full pdf of this circuit to send
send: andrejmdias@gmail.com
thanks

if you can log in to comment you can login and download the whole pdf!

top left button with the pdf icon and the word "download"

karyochi3 years ago
i'm having some problems, when i use the make command, it responds with:"makefile: ***missing seperator", could someone plz help?, i want to use an ATmega8 or ATmega32, maybe somoene just could send me the HEX code, Karyochi@gmail.com.
Mrwolf81 karyochi3 months ago

dude, to change to the atmega32 you will need some sort of avr program writter like the one you can download from atmel (atmel studio).

open the makefile in atmel studio and then change this line...

mcu = atmega16

to

mcu = atmega32

and then compile and upload!

egange8 months ago
I recently made the cube. but i only have arduino to control it. Does anyone converted chr animation code to arduino? please helpp...
Steve25 egange7 months ago
I gues not, but why don't you buy an usbasp from ebay? It will cost you only 3 euro!
kchauhan Steve254 months ago
Sir can we use atmega 16 A instead of given above as I am only gettin A one on ebay so.... Please rply sir
egange Steve257 months ago
i already have asbasp programmer but i don't have Atmega32-16PU 40 pins. only atmega328 w/ 28 pins. im quite new in programming micro-controllers. i need to traslate chr code to be used in atmega328 or arduino. please helpp. :D
kchauhan4 months ago

Sir What is the total cost of whole project in INR ?

kchauhan4 months ago

Sir What is the total cost of whole project in INR ?

waka20077 months ago
I want to make this for my first real project. I was wondering how important are the transistors and the capacitors. I have seen cubes that run with just LEDs and resistors so why the extra stuff?
mpick92 waka20074 months ago

The short answer is because he built his development board from scratch. If you look at an Arduino, all those components are placed on the board when it is manufactured (and then you have the input/output pins to use).

temi5 months ago

can any one post me the 4x4x4' 'compiled' hex.? i cannot compile it withStudio6.0, talk less of programming it with my TL866A.

alexcavazos677 months ago

I just published a 3D-printable template for this project. I hope it is helpful to anyone out there.

http://www.thingiverse.com/thing:229633

photo 1.JPG
Hi guys
I built the circuit without the rs232-interface and programmed the (above attached) hex-file to the chip with a separate programmer. The status-leds are working, but none of the led's are lighting up. I measured the outputs (at cathode out from transistors and anode) and was surprised when my multimeter gave me a negative voltage.
Has anyone experienced the same problem ever?
I build it to without the rs232 interface and did not have that experience. Did you connect you're transistors right? My transistor had an TO-92 package (CEO). I nearly connected them wrong.
Hi Steve, You were right. I connected the transistors wrong. Now some Leds are lighting up but they only go on for about 10 secs and off again. Did you program the chip in circuit as in this instructable or on a separate programmer?
Yes i followed all steps in this guide. When i uploaded the program, 4 rows didn't light up. But after setting the fusebits it worked perfect.
If you also followed all the steps there might be an problem in you're wiring.

Hi Steve
It's running now! I indeed set the fuses wrong. thanks for your help! all the best
Great to hear! I'm happy that you got it working.
I build it to without the rs232 interface and did not have that experience. Did you connect you're transistors right? My transistor had an TO-92 package (CEO). I nearly connected them wrong.
1-40 of 747Next »