3x3x3 LED Cube with Arduino Lib using arduino

There are other Instructables about building LED cubes, this one is different for several reasons:

1. It’s built with a low number of off-the-shelf components and hooks up directly to the Arduino.
2. A clear, easy to reproduce circuit diagram is provided with plenty of photos.
3. A unique approach is used for the software which makes programming the cube easier and more expressive.
LED Cube with Arduino Lib
Parts needed:

–   1 Perfboard
–   3 NPN Transistors (2N2222, 2N3904, BC547, etc.)
– 12 Resistors (~220 ohms and ~10k ohms)
– 13 Headers (male or female)
– 27 LEDs
– Wire

Step 1: Prepare the LEDs

This step largely follows the LED Cube 4x4x4 but we’ll be building a 3x3x3 cube instead. A cube of this size is about as big as it gets without introducing additional circuitry and complexity. We’ll need a total of 27 LEDs that will be grouped into three sets of nine.

Each set of nine LEDs will share a common connection amongst their cathodes (negative leads). I’ll refer to each of these sets as a “level”. Each of the nine LEDs on a level is connected to the corresponding LED on the other two levels through their anodes (positive leads). These will be referred to as “columns”. If that didn’t make sense it will become self explanatory as we build the cube.

To start we’ll use a drill to create a jig out of a small piece of scrap wood. The jig will hold the LEDs in place while we solder them. I decided to space the holes around 5/8 of an inch apart (~15 mm) but the exact distance isn’t critical. The hole should have a tight fit around the LED since we don’t want them to move around while soldering.

Once the jig is done we’re going to bend the cathode of each LED in a 90 degree angle. The cathode is identifiable in three ways: 1) It’s the shorter leg, 2) It’s on the flat side of a round LED, 3) it’s connected to the larger piece inside the LED. Make sure you bend the cathode in the same direction for all of the LEDs.

Now we’re ready to begin soldering.

Step 2: Solder the LEDs

First place nine of the LEDs in your newly built jig. Position them so that the legs point in the same counter-clockwise direction. The photos show the cathode pointing clockwise with the anode facing out, but I’d turn the LEDs around if I did it again in order to keep the leg from obstructing the view of the LED.

Solder the sides together, one pair on each side. Use small clips to keep the legs clamped together while applying the solder.

Once each of the four sides are soldered, move the clips to hold the corners together and apply solder to each. Lastly, solder the cathode of the middle LED to one of the sides and trim away the excess.
LED Cube with Arduino Lib
Repeat three times.

You should now have three sets of nine LEDs. Position two of the sets one on top of the other. Keep the distance equal to the spacing already established between LEDs. Once you’re comfortable with the spacing you can clamp each set of legs using two clips, one in each direction, to keep the legs firmly in place while soldering. You may need to bend around a LED to get a good connection. Solder each of the nine pairs, one at a time.

Do this one more time and you’re done with the cube.

Place the cube on one side of the the perfboard. Make sure the nine legs are positioned apart evenly while you guide each one through a hole. My board has five holes between each set of legs. You want to leave as much room as possible on the other end of the perfboard to fit the various components.

 

For more detail: 3x3x3 LED Cube with Arduino Lib


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