Arduino 4x4x4 LED Cube


This instructable will cover the building process of an 4x4x4 LED Cube. I will be using an Arduino to control the LEDs.  Since the Arduino (Freeduino) has a total of 20 pins (including the analog pins) we will not need to have any multiplexing or shift registers.  I will take you though what i did in order to build the cube and create some designs of your own.

Arduino 4x4x4 LED Cube

Step 1: Bill of Materials

Bill of Materials

For this project I used the freeduino Arduino. Because the Freeduino has a total of 20 I/O pins (with using the analog pins) we will not need and multiplexing or shift registers. So all we will need for our project is:

1. LED x 64
2. Resistors x 16
3. Arduino x 1
4. Perforated PCB
5. Soldering Iron
6. Drill (for the jig)
7. Piece of wood (for a jig)


I have found and to be good suppliers of small electronic components in general and are currently the only two that I have purchased anything from.

Step 2: Choosing LED

LED Type:

LED’s come in different shapes, sizes and colors. For this project we will need diffused through hole LED’s. When an LED is diffused is disperses the light in all directions rather than mainly toward the top of the LED. By using diffused LED we will have get good color out of our LED’s from the side of the cube. Since we will only have a cube that is 4 LED deep I chose to use 5mm super bright LED’s from Sparkfun. 3mm LED’s will work just fine for this small of cube the fall back from brighter LED is when you have a large cube and cannot view the LED’s in the center.

The LED’s I ordered were not diffused this is not that big of problem all you need is some sand paper (a dremel is faster) to sand each LED will light up all parts rather than the focal point at the top.

Test your LED’s:

I would recommend that you test each LED in a bread board before soldering. Simply use the +5v and connect that to a resistor (size discussed later) and to the LED just to make sure each LED lights up it would be bad to build the cube with a faulty LED in the middle somewhere.

LED Layout:

Most LEDs positive pin (anode) is the longer pin coming out of the LED and the negative (cathode) is the shorter pin. You can also look at the little metal inside the smaller metal piece is the positive end (anode) of the LED.

Step 3: Choosing the Resistors:

Arduino 4x4x4 LED Cube circuit
The resistors you end up using depend on the LED’s that you order. Since only one LED in a column should be on at once we only need to use one LED in our calculation. Using Ohms Law V = IR we can calculate the size of resistor.  This may require looking at some spec sheets but all we need to know is max operating current and the voltage drop. The LED’s I used have a voltage drop of 3.4 and a max current of 20 mA. To find the resistor size we can plug these into (Volts – Voltage drop)/(Max Current) = R. Since the arduino will be putting out 5 volts we get (5-3.4)/.020 = R. Solving for this gives a resistor size of 80 ohms that would be allowing for the max current. To have longer LED life I used just a tad larger resistor of 100 ohms to better protect the LED’s.  I was able to find a good price for resistors on digikeay and since we do not need a certain tolerance or anything these will be pretty cheap.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]1. LED x 64
2. Resistors x 16
3. Arduino x 1[/box]


For more detail: Arduino 4x4x4 LED Cube

This Post / Project can also be found using search terms:

  • 4x4x4 led cube arduino
  • yhs-004
  • 4x4x4 led cube arduino code pdf

Leave a Comment

Your email address will not be published.

= 5 + 3

(Spamcheck Enabled)

Scroll to Top