Introduction: Build Your Own 4x4x4 RGB LED Cube

Picture of Build Your Own 4x4x4 RGB LED Cube

LED Cubes are awesome. The first one I created was a 8x8x8 blue led cube. It still works like a charm. But being able to display every colour in the spectrum is much more spectacular. Let's start with a small and simple 4x4x4 RGB LED Cube.

Step 1: Watch Part 1 of the Video Series!

As you might have noticed, part 1 concentrates on the cube itself and the case. No electronics yet. The video should already give you plenty of details. But I will give you a short list of parts that you will need to build the cube itself.

Step 2: Order the Parts for the Cube!

Step 3: You Finished the Cube and Case!

Picture of You Finished the Cube and Case!

Congrats on your finished cube and case. It should now look a little bit like mine in the picture. Go ahead and test all connections with a power supply. If everything works fine you can go ahead and build the electronics in the next steps.

Step 4: Watch Part 2 of the Video Series!

The video gives you plenty of info on how to build the controller for the cube. In the next step I will give you the schematic for the circuit and the part list.

Step 5: Order the Parts for the Controller and Solder It!

Picture of Order the Parts for the Controller and Solder It!

Step 6: Upload the Arduino Code and Test the Cube!

Picture of Upload the Arduino Code and Test the Cube!

Download the code for the LED Cube. This is already my updated version of the code which I showed in part 3 of the video series. Be sure to watch this part as well to get an idea how the code works.

Step 7: Watch Part 3 of the Video Series!

This time it is all about optimisation. You may get a better understanding of the code if you watch the video carefully.

Step 8: New Animations!

Here you can get some new animations which were created by a viewer.

Visit his channel here:

Step 9: Success!

Picture of Success!

You did it. You just finished your own 4x4x4 RGB LED Cube. Feel free to develope the code in more creative ways than I did. And feel free to share those new creations.

Feel free to check out my Youtube channel for more awesome projects.

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes informations.


Aviyoyo (author)2017-11-27


tomi942 (author)2016-12-29

Lovely thing GreatScott. I just started to do this :D

Chauhan Vivek R (author)2016-10-22

If i want to make just one color cube, i have to need just one ic and 4 MOSFET?

tomi942 (author)Chauhan Vivek R2016-12-29

four mosfets for 4 anode layers :D


JoshF79 (author)2016-11-14

Has anyone made a 3D (qube) infinity mirror with from this concept??

andyosoriol (author)2016-11-01

It would work if I do it with arduino uno? instead of the arduino nano

KasHoogeveen (author)2016-10-30

is there a way to do this with common cathode rgb leds? I've got some of those here.

Keep up the good work, love the channel.

Chauhan Vivek R (author)2016-10-28

During compiling the codes i found some error.

help me in programming.

Kunalv12 (author)2016-07-02

Bro the program is not working it is saying compiling error
Rest i made whole cube
Plezz help
Please give a link of new program

EliL12 (author)2016-05-21

Hi, I bought everything on your parts list and then realized that it is not completely comprehensive. The male and female header pins as well as the P channel Mos fets are not on the list. Also I don't know what the rotary potentiometers are for. Overall still a great tutorial. Almost done with the led cube part. I think I am going to need to buy more silver plated wire. Any help on what to do with the potentiometers would be greatly appreciated. Thanks.

MJ35 (author)EliL122016-06-02

I watched the third video and it explained what the potentiometer is used for. The shopping list is not complete, so just watch all the videos first and make a list that includes quantities. Use your own list along side the links in the tutorial and you should be good. Otherwise, incredeable tutorial.

Puudzza-lv (author)2016-04-29

Hi scott.

I am beginner in Arduino code writting.

I build the cube and upload your code, ewerything works fine but it show only one animation (random colors). How to get working other animations (wall, colorchange ) that are in function part in your code?

rwhite19 (author)2016-04-13

Does anyone know if it will possible to power this via a usb cable maybe not to a computer but a usb wall outlet? The one that i have says it is 2.1A 5v is that suitable?

GreatScottLab (author)rwhite192016-04-13

Should work

MatejS10 made it! (author)2016-03-19

Hi i have problem, please help me. Error....

Guransh Singh (author)2016-02-25

It is very good I will make it

'earl (author)2016-01-14

Hi scott, Can you recommend a different IC chip for the driver?
The TLC5940 is hard for me to get, I tried ordering them from futurlec and theyve kept my money and not shipped my parts for two months and digikey says theyre obsolete. So Im not sure what I can do I dont have a ton to spend on them. And if theres a current more up to date IC I can use that would be great.

MASTER_REX (author)2016-01-03

hey mairo123 and great Scott thanks to help me im done with the circuit and uploading the codes now the only thing which is left is to complete the cube build and then i m done. i basically made the whole thing on breadboard using and arduino uno. thanks alot to help me .

MASTER_REX (author)2015-12-31

i dont wanna waste the money spent on this project my dad will kill me

mairo123 (author)MASTER_REX2015-12-31


you sure that you have that tlc5940 folder in there?

and to open both of them together throw them in to the same folder and open one of them, it should open both

MASTER_REX (author)2015-12-31

pls help me with that

MASTER_REX (author)2015-12-31

the error is something like this after opening it altogether: Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Uno"

In file included from C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_animations.h:30:0,

from C:\Users\Goale\Desktop\function\ledcube.ino:10:

C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h: In function 'void CubeUpdate(int)':

C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:27: error: variable or field 'tlc_setGSfromProgmem' declared void

void tlc_setGSfromProgmem(prog_uint8_t *gsArray);


C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:27: error: 'prog_uint8_t' was not declared in this scope

C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:32:41: error: 'gsArray' was not declared in this scope

void tlc_setGSfromProgmem(prog_uint8_t *gsArray);


C:\Users\Goale\Documents\Arduino\libraries\Tlc5940/tlc_progmem_utils.h:68:27: error: variable or field 'tlc_setGSfromProgmem' declared void

void tlc_setGSfromProgmem(prog_uint8_t *gsArray)


ledcube:65: error: expected '}' at end of input



ledcube:65: error: expected '}' at end of input

exit status 1

expected '}' at end of input

This report would have more information with

"Show verbose output during compilation"

enabled in File > Preferences.

MASTER_REX (author)2015-12-31

but how do i open both together

MASTER_REX (author)2015-12-30

the code with led cube says reset was not declared . what does that mean now pls help me pls.

mairo123 (author)MASTER_REX2015-12-31

Make sure you open the 2 files together, Both of them need to be open at the same time. This solved the problem for me. Also with that TLC config file Remember to throw the file in the right place C:\users\name\files\arduino\libbaries

MASTER_REX (author)2015-12-30

as u said dont forget to upload tlc config file i even did that but its still not working

i am really in a great loss of money .

MASTER_REX (author)2015-12-30

pls reply pls

MASTER_REX (author)2015-12-30

can u pls help me with that

some problems are there with the codes it show error compiling again and again

and again.

and can i use arduino uno instead of nano.ii think yes cuz the pins are the same mostly.

so pls check the codes and help me with that pls its a show error compiling and i m not able to get rod of that so pls. thank you so much for this project.

MASTER_REX (author)2015-12-28

hey my name is
Yash and i m just trying to make a cube so instead of arduino nano can i use arduino uno with the same pins and connections

GreatScottLab (author)MASTER_REX2015-12-30


MASTER_REX (author)2015-12-29

hey there is some kind of problem with the codes it says that "exit status 1" and even error compiling can u pls help me with that

ziad67 made it! (author)2015-08-18

I was able to make it even bigger by adding more mosfets and adapting the code a little bit and i was able to make a animaton and a explsion animation too with colors and it turned out to be quite nice,Thanks for the tutorial GreatScott.

MASTER_REX (author)ziad672015-12-28

this one is good

HussainA3 (author)ziad672015-12-11

hi, can you help to have the code

GreatScottLab (author)ziad672015-09-01


ziad67 (author)ziad672015-08-18

and more TLCs as well but and i was able to pump it up to 8x8x8 so its doble but its based off your tutorial,Thanks

MASTER_REX (author)2015-12-28

pls reply great scott

jojo_1220 made it! (author)2015-12-27

Well, Scott, thank you for that nice Instructable what you are created here and that nice Video series at all.

I also rebuildet your Cube in the same way and it looks really awesome. But, first of all, i decided to check the circuit on an breadboard with no success. I got really trouble with uncontrolled blinking but i checked the circuit more then several times.....but after all i soldered that all on an board and then it works^^

really, really interesting but now i am glad to show you my success :)

JoshB78 (author)2015-12-26

Great tutorial. Is it possible to use 6x 74HC595 instead of the 3x TLC5940?

WhittlinThom (author)2015-12-22

It there a way to do this project using common Cathode RGBs?

Sure. But that costs time and more money. Better switch to common anode.

HussainA3 (author)2015-12-11

hi, how can I change the code to work with 8x8x8 with tlc5940. please can you help

VladT6 (author)2015-12-02

can anyone help me with the PCB design? I am a totally beginner at this.

'earl (author)2015-11-13

Hey so I noticed you left the 24 pin IC sockets out of the part list.

'earl (author)'earl2015-11-18

28 pin*

electricbird (author)2015-09-03

I realy like your projects! And i have a question, how many led drivers would i need for 10x10x10 led cube? And if i understood right this drivers that you use wont have enough outputs for such a big led cube, is this right?

samuel123abc (author)2015-08-31

hi greatscott!

Thanks for the great video!

I am planning on making this, although I am not quite sure about how to connect the MOSFETS up, it seems like you have pin A0 ( for the first MOSFET) connected to gate, but also to the source through a 1K resistor, then linked to 5V, and the drain is going to the anode layer, is it correct?

Also where should I connect the capacitors? Just somewhere in the circuit between ground and VCC? Thanks!

sivovic made it! (author)2015-07-12

i made it and its sweet. good job great scott for this awesome tutorial

p.s i also made video

GreatScottLab (author)sivovic2015-07-16

Awesome. Thanks for sharing.

About This Instructable




Bio: Awesome Electronics Tutorials, Projects and How To´s
More by GreatScottLab:Make Your Own Crude Cocktail MachineMake Your Own Solid State RelayMake Your Own Simple Theremin
Add instructable to: