0% found this document useful (0 votes)
37 views

Arduino 4x4x4 LED Cube

This document provides instructions for building an Arduino-controlled 4x4x4 LED cube. It describes: 1. The required materials including LEDs, resistors, an Arduino board, perforated PCB, soldering iron, drill and wood. 2. Choosing diffused LEDs and testing them before assembly. 3. Calculating the appropriate resistor value using Ohm's Law based on the LED specifications. 4. The general structure of the 4x4x4 LED cube, which will have 16 columns and 4 layers that are controlled to light up the LEDs. 5. Constructing a wooden jig or template to aid in precisely soldering
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Arduino 4x4x4 LED Cube

This document provides instructions for building an Arduino-controlled 4x4x4 LED cube. It describes: 1. The required materials including LEDs, resistors, an Arduino board, perforated PCB, soldering iron, drill and wood. 2. Choosing diffused LEDs and testing them before assembly. 3. Calculating the appropriate resistor value using Ohm's Law based on the LED specifications. 4. The general structure of the 4x4x4 LED cube, which will have 16 columns and 4 layers that are controlled to light up the LEDs. 5. Constructing a wooden jig or template to aid in precisely soldering
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Home Sign Up!

Browse Community Submit


All Art Craft Food Games Green Home Kids Life Music Offbeat Outdoors Pets Photo Ride Science Tech

Arduino 4x4x4 LED Cube


by Phogie7 on April 27, 2011

Table of Contents

Arduino 4x4x4 LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro: Arduino 4x4x4 LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1: Bill of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 2: Choosing LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 3: Choosing the Resistors: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 4: General LED Cube Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 5: Constructing the Jig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 6: Constructing the Cube Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 7: Constructing the Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Step 8: Base and soldering resistors: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 9: Programming: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Intro: Arduino 4x4x4 LED Cube
Overview:

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.

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)

Vendors:

I have found sparkfun.com and digikey.com 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.

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Image Notes
1. Special thanks to http://blackbox86-en.blogspot.com/2011/02/basic-
microcontroller-led.html
Image Notes
1. Diffused
2. Original
3. Look at the Difference!

Step 3: Choosing the Resistors:


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.

Step 4: General LED Cube Information


The cube I am constructing will be a 4x4x4 in other words it will contain 64 LED’s with 16 columns and 4 layers. Each column will be the LED’s positive pins connected
together allowing 5 volts to pass to all the LED’s in that column. The Layers will consist of the LED’s negative pins connected together To control the LED’s we will be
able to supply 5 volts to the column and let the layer connection go to ground. In order to prevent a column from drawing to much current there should only be one layer
on at a time.

How do we light up the entire cube at once you ask? Well, we will use something call persistence of vision. An LED leaves an afterimage in the human eye, in other
words even when the LED is turned off for a fraction of a second our brain perceives the LED as still light up.

Using this we can control each LED in the cube with only a total of 20 I/O from our arduino. For example if we want to light the third LED on the fourth column we will
simply set the output to that column to HIGH (5 V) and the output for that layer to LOW (0 V) thus creating a ground and allowing current to flow and the LED lighting up.

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Step 5: Constructing the Jig
In order to solder up a good looking symmetrical cube we will need some help. A jig can be thought of as a template that we will use to hold each layer in place while
soldering. To create the template we will need a flat piece of wood that will be able to hold your cube, a drill and some measuring tools. Depending on the size of your
LED's the size of your holes will be different. Try to find a bit that will allow the LED's to fit snug in the hole but not to tight.

To determine the size of your cube you will need to measure the bent cathode portion of the LED. My bent LED turned out to be about 25 mm therefore I drilled my holes
roughly 23 mm apart to allow me 2 mm in order to solder the cathodes together.

Image Notes Image Notes


1. Test hole to find the right bit 1. Measure to determine the length between holes (remember to leave solder
room!

Step 6: Constructing the Cube Layers


Now that we have the jig in place we can start building the individual layers. When soldering try not to heat up the LED’s too much if they get too hot it could destroy the
LED, so try to solder faster when soldering close to the LED.

To start we will have one LED whos negative pin will go outside the cube. Next start placing LEDs and soldering as you go I recommended that you complete the row
where the pin is sticking out. Then solder up the other rows to that main row.

Image Notes Image Notes


1. Solder here :) 1. After the first row is done continue with these rows
2. Start with this row 2. First row
3. Then solder me...
4. and me
5. and me..

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Image Notes
1. Main row with neg pin sticking out of the cube

Step 7: Constructing the Cube


Now that we have all of the pins it is time to start soldering up the layers. Place the best looking layer you built back into the jig. In order to be able to connect the
positive pins we need to bend the higher layers pins enough so that the pin goes around the lower layers LED and we can solder to that lower pins positive pin.

To hold up the Cube while i soldered I used erasers that i cut to the correct size.

Simply continue this step until all of the layers are soldered together.

Image Notes
1. Bend away

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Step 8: Base and soldering resistors:
For the base is is pretty open ended on what you would like to do. For mine I simply used a PCB (or glued PCB together) to solder my cube to. Once i had my cube
done i soldered wires from each column to a resistor. Each resistor was connected to another wire that i planed to plug the Arduino into. You will also need a wire
soldered of each layer allowing for negative control (no resistor needed). You can make this part look alot better than mine but for time reasons i just soldered it up quick.

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
Step 9: Programming:
Programming can take some time some tutorials have good condensed code that is easier to do designs but again for time reasons i was not able to spend much time
doing that. However I was able to do some designs and looking at them will let you better understand what is going on. I provided my code at the bottom (its kinda
sloppy)!

The ground/negative/layer pins:

Remember the Persistence of Vision since we want to be careful to only have one layer on at a time (although I have made the mistake and am pretty sure the arduino
can handle it but why try and break things?). Since the layers are ground they are backwards from the column pins. When we want to ground a layer we set the pin in
the code to LOW. This creates a difference in potential allowing current to pass and the LED to be lit up. When we set the ground pins to HIGH no there is no potential
difference and the LED's do not light up.

The Column/Positive pins:

To control the column pins we can set the pin number to HIGH thus allowing 5 V to flow out of the pin. So when a specific layer has been grounded the 5 V will flow
and the LED on that column and layer will be lit up! If we do not want a LED on that column to be lit up when a layer is grounded we can set that column to LOW and the
LED will not light up.

Here are some videos of my cube at work! Pardon my camera but the time limit on the video was not very long...time to upgrade!

http://www.youtube.com/watch?v=eK8EkYZOKEw
http://www.youtube.com/watch?v=Mtb2-ncjh3k
http://www.youtube.com/watch?v=I4aYvZDm9uo
http://www.youtube.com/watch?v=v9uJDHZeQVE

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/
File Downloads

LEDCube.pde (6 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'LEDCube.pde']

Related Instructables

Led Cube 4x4x4 8x8x8 led cube LED Cube 4x4x4


(video) by bajgik The (build) by by chr
LED Cube and Removed by
4x4x4 LED cube fallinsquirrel
Arduino Lib by author! by
(Arduino) by
gzip crazyjoe1027
forte1994

http://www.instructables.com/id/Arduino-4x4x4-LED-Cube/

You might also like