4x4x4 interactive LED-cube with Arduino

LED cube with Arduino (1)

To explain my 4x4x4 interactive LED-cube published before, a bit more clear, I will try to make my first step by step instructable.

This 4x4x4 cube is interactive by using the top four corner LEDs both as LEDs and as sensors that will react on light. Depending on what LED gets the least light, the cube will run a different show.

LED cube with Arduino (1)

Step 1: You will need:

soldering iron
small screwdriver
some drillbits
piece of wood
computer with Arduino software
breadboard (optional)

64 led’s
4 resistors that go with the LED’s (yes just 4)
1 Photocube
1 Arduino
some wire
some small COAX wire (isolated wire)
16 headerpins

Step 2: Making the rig

Draw on a piece of wood a grid with the lines 12,5 mm apart. (12 or 13 or whatever will also do, but I did 12,5) Draw at least 4 lines horizontally and 4 lines vertically. (I did more, because you’ll never know what plans I will have in the future) You will now have 16 crossings. Drill some 5 mm holes (if your LEDs are 5 mm) at the crossings of the lines. If you first drill small holes, the location of your holes will probably be more exact.
This plank with 16 holes will be the rig for your soldering.

Step 3: Bending the legs of the LEDs

First I bended the legs of 16 LED’s. Hold the led upside-down diagonally, with the short leg in the upper left and the long leg in the lower right. Bend the cathode (short leg) to the left and the anode (long leg) down. So the flat part on the side of the LED wil be in the upper-left corner (the film and pictures will make this more clear I hope).

You can also bend 32 LEDs already if you are on a roll.

Step 4: Placing the LEDs in the rig

When at least 16 LEDs have bended legs (leads), you can place them in your rig. You will have 4 rows of long legs (anode) touching each other and 4 rows of short legs (cathode) touching. On some places, the anodes will also touch the cathodes when they cross each other. That is not a problem. We will solve that later.

Step 5: Soldering the first grid

Where the anode from one LED touches the anode from an other LED we will solder them together. Make sure that you don’t solder an anode to an cathode.

At the places where the anodes are crossing the cathodes, we want to make sure that the legs aren’d touching. (they probably are touching now) We do this by forcing some room between the anodes and cathodes with the use of a small screwdriver. Be sure that you make enough room, but also be careful enough not to break anything.

Step 6: Start playing

Sure you can work on until you are all the way finished, but isn’t it much more fun to first start playing with your just creates 4×4 LED-grid?!
So place your anodes in a breadboard an run some resistors from each of your cathode-rows to some free lanes in your breadboard. (they must be the value that you will need to light one LED from the 5V of your Arduino. This could be something like 560 ohm)
Next run 4 wires from the anodes in your breadboard to ports 4 till 7 on the Arduino and 4 wires from the resistors in your breadboard to ports 0 till 3 on the Arduino. To make this already interactive you will place a LED with the anode (long leg) in analog-port 0 and the cathode in GND of the Arduino.

Next you run the following code (sketch) on the Arduino and when you go with your hand over the LED in the analog-port of the Arduino, you will see the lights of your LED-grid light up.Schematic LED cube

If it worked: yeah, you just multiplexed 16 LEDs. This means that you lighted up 16 LEDs individually by just using 8 Arduino ports, just by gritting them. We made just 4 anodes and 4 cathodes and with these 8 wires we can address 16 locations on the grid.

Step 7: The Next Layer

The leg bending
The next layer is the same as the first but not exactly! You will have to bend the legs of the LEDs the other way around. This means that you need to hold the LEDs with the flat side in the under-righthand corner. The anode will now be on the upper-lefthand corner and has to be bend to the left. The cathode in the under-righthand corner will have to be bended down.

Next follows the soldering.
First we solder the grid like we did with the first one.
Now you bend the anodes (long leads) of the first grid upwards and the cathodes of the first grid downwards. The anodes and the cathodes of the second grid will be bended downwards. Solder the four anodes from the first grid to the four cathodes of the second grid. The anodes of the second grid must just reach the bends in the cathodes of the first grid and have to be soldered there.

Read more: 4x4x4 interactive LED-cube with Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *