The 4x4x4 LED Cube (Arduino)
Intro: The 4x4x4 LED Cube (Arduino)
In this instructable I will show you how to make a 4x4x4 LED cube that will be controlled by an Arduino Demulionove. now yes you might say" that Arduino has only 14 I/O pins well also the 6 analog pins can be used as pins 15,16,17,18,19,20. that way giving us enough pins (16 columns + 4layers = 20 I/O pins)
This instructable is made for those who know how to solder (well) and how to program the Arduino. Also I will be providing detours to skip sum steps so if you see (Detour available skip to __ Step) you can follow if you are to lazy to do that.
This instructable is made for those who know how to solder (well) and how to program the Arduino. Also I will be providing detours to skip sum steps so if you see (Detour available skip to __ Step) you can follow if you are to lazy to do that.
STEP 1: Get the Materials
To start of you will need these materials:
Mandatory
-- 64 LED (color optional) **
-- Arduino Demulionove
-- Wire
Optional
--32 male pin strip
--PCB prototype board
--Fine Grit (400 +) sand paper
Your choice
-- 64 resistors or 16
you can get 64 resistors which will help by keeping all the lights at the same light out put regardless of how many are on but it will be considerably more work.
Tools:
--Computer
--Soldering Iron
--Solder
--thin nose pliers
**Color is optional but use this website to find the right resistor for your leds http://led.linear1.org/led.wiz (I got Green so I used 100 ohm resistors)
Mandatory
-- 64 LED (color optional) **
-- Arduino Demulionove
-- Wire
Optional
--32 male pin strip
--PCB prototype board
--Fine Grit (400 +) sand paper
Your choice
-- 64 resistors or 16
you can get 64 resistors which will help by keeping all the lights at the same light out put regardless of how many are on but it will be considerably more work.
Tools:
--Computer
--Soldering Iron
--Solder
--thin nose pliers
**Color is optional but use this website to find the right resistor for your leds http://led.linear1.org/led.wiz (I got Green so I used 100 ohm resistors)
STEP 2: Assemble the Board(the LED Cube Base)
(Detour available skip to next step)
In this step you will need the board and the wiring. First you will want to map out were all the wires will go and then feed the wires through the board. Don't mind the LED and resistor note on the picture for now.
NOTE: I recommend you use Different color wire just because you won't get confused which wire is which.
In this step you will need the board and the wiring. First you will want to map out were all the wires will go and then feed the wires through the board. Don't mind the LED and resistor note on the picture for now.
NOTE: I recommend you use Different color wire just because you won't get confused which wire is which.
STEP 3: Defuse the LED
DETOUR if you don't want to do this then go to next step
So to defuse the LED I took normal 400 grit sand paper and sanded all the LEDs which made them look pretty good.
So to defuse the LED I took normal 400 grit sand paper and sanded all the LEDs which made them look pretty good.
STEP 4: Construct the Cube
Now there is the Easy way to do this and that is to connect all the (--) in one layer and then the columns (+) to the resistor and then board. (Look at picture diagram below) what happens is when you turn it on (all of them) the lights are dimmer then when one is on.
My solution to this was to solder a 100 ohm resistor to each LED. (Follow picture instruction on how to do it.) Everything is done in the same way only now you solder all the resistors to the column which is a piece of Ethernet wire. (See picture)
My solution to this was to solder a 100 ohm resistor to each LED. (Follow picture instruction on how to do it.) Everything is done in the same way only now you solder all the resistors to the column which is a piece of Ethernet wire. (See picture)
STEP 5: PROGRAM
Good job on making it too this step now all you need to do is upload this code and you are done.
the code did not fit the line so here it is
the code did not fit the line so here it is
STEP 6: ADD On
so to program the cube all you need to do is change the
B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, 80,
code
each B1111 corresponds to a line of LEDs in your cube 0 being off and 1 being on. The last number is the time it will display that part in milliseconds.
so get programing and enjoy.
B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, 80,
code
each B1111 corresponds to a line of LEDs in your cube 0 being off and 1 being on. The last number is the time it will display that part in milliseconds.
so get programing and enjoy.
112 Comments
MuhammedA85 6 years ago
hello i am a beginner to programming and is interested in this project.Can you sent the description to my id muhammedaslam3011@gmail.com
PeterM439 6 years ago
Hello, from what I understand from the code, you multiplex the cube by turning on one layer at a time by connecting the cathodes for that layer to GND, and then turning on the columns you want to be lit by putting 5V on them with a series resistor. In this way you only need 16 resistors, since at any given time, there is always just one LED active per resistor and output.
Julio Galindo 8 years ago
Hi!
Are you powering the cube using only the arduino? and will an arduino uno be enough to make it?
andrew.fowler.39904 9 years ago
is there away of using the random number command to make paterns
SamuelD4 9 years ago
I want to know how to code for the patterns. how can i design my own codes?
MariusG1 9 years ago
I made a program that can produce patterns real easy. Would you like me to share it?
SamuelD4 9 years ago
Yes, that will be helpful. Thank you!
MariusG1 9 years ago
Something happened to the link I posted but I made an intstructable with the program, check it out:
https://www.instructables.com/id/LED-CUBE-CODE-4x4x...
SamuelD4 9 years ago
Thanks for your help.
MariusG1 9 years ago
If you want to make your own codes real easy check out this:
https://www.instructables.com/id/LED-CUBE-CODE-4x4x...
kashif.mushtaq07 9 years ago
i need 16x16 led cube progrming code of ardiuno
JohnS18 9 years ago
I wondred if someone could post a link to were I can buy the PCB/stripboard and the link to the wires.
parmarravi 9 years ago
i made an 4*4*4 led cube with ,16 cathodes and 4 anodes but now the issue is only column works perfect and when ,i light an one row ,it also lights up other rows too...could u tell me how to fix this issue.i have not used any transistors in a cube only resistors and leds
forte1994 9 years ago
ajvdmeij 12 years ago
Making the code for great patterns is kind of difficult, so I made a little Javascript program to make designing them more easily. It basically works as follows. You see four squares: the first square is the front layer, the second, the one behind that, the third the one behind that and the last is the back layer. You can set the LEDS on or off and when you have made a pattern, and have set a time in a text box, you can write it to a text area. Then make another one, and another one and.. When you are finished, you can copy the contents of the text area and paste it in the Arduino Code. Then go for it!
Try it here: http://home.kpn.nl/ajvdmeij/makecode.html. If you want the source code, you can copy it or tell me and i will mail it to you.
Have fun!
twitter.com/arjanvandermeij
simplyelectric 10 years ago
ddemayo 10 years ago
will2313 11 years ago
can u send me the source code for the 4x4 led cubes? thx a bunch..
will,
fryddog 11 years ago
Any chance you could whip up a similar program but for an 8x8x8 cube?
mbrenig 10 years ago