4x4x4 interactive LED-cube with Arduino

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

Step 1: You will need:

TOOLS
soldering iron
pliers
small screwdriver
some drillbits
drill
solder
piece of wood
pencil
ruler
computer with Arduino software
USB-cable
snips
sharpie
breadboard (optional)

PARTS
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 with Arduino
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.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]64 led’s
4 resistors that go with the LED’s (yes just 4)
1 Photocube
1 Arduino[/box]

 

For more detail: 4x4x4 interactive LED-cube with Arduino


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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

Scroll to Top