Introduction: Basic Stamp LED Cube

About: Matthew was previously a STEAM integrator with a private K-8 school. He loves taking things apart to see how they work, and will sometimes put those things back together. Much of his time is spent working with…


I like trying to teach myself about basic electronics.  I feel like once I can get a firm grasp on all of the basic elements (capacitors, resistors, transistors, etc), I'll be better able to understand more advanced components (resistor networks, rheostats, microcontrollers), and how they all interact.  I've seen a lot of LED Cubes on this site, and I've wanted to make my own for a while.  With all of this in mind, I decided to try to get as component level as I could to make it.

I found a Basic Stamp board, which is programmed in Basic, a programming language that came along almost 20 years prior to C++.  With that, and a bunch of resistors, transistors and wire, I set out to make my first LED Cube.

There were two Instructables that were of immense help while creating this:
LED Cube 4x4x4
5x4 LED display matrix using a Basic Stamp 2

Step 1: Materials

First we need all of our components! Everything for this project I bought from RadioShack (with the exception of the block of wood that was sitting in the shop).

22 Gauge solid core wire
BASIC Stamp Homework Board
Red LEDs (12 total)
Green LEDs (12 total)
Yellow LEDs (12 total)
White LEDs (12 total)
Resistors (22ohm, 33ohm, 82ohm, 220ohm)
NPN Transistors (I purchased a grab bag and used four different types to see if I could. Turns out I can)
9V Battery (or a 1A 12VDC Wall Plug Adapter) (You only need one)
Small scrap piece of wood

Step 2: Soldering LEDs

LED Cube 4x4x4 has excellent instructions on exactly how to space and drill your board, as well as soldering LEDs.

I have my LEDs set so the positive is travelling down the columns of LEDs, and the ground is common on each level. Later the NPN's will allow us to let the ground out to any layer to enable a current to flow through.

Step 3: Soldering the Cube

Mark your circuit board however big it'll need to be to house the LEDs. And cut the circuit board to fit.

You can use scissors, a paper cutter, a dremmel, power tools, or whatever you like (MAKE SURE you wear breathing and eye protections. Not only is there flying pieces, but fibreglass dust isn't friendly to your lungs)

Solder your LEDs to your circuit board.

Once the first layer is done, stack your next layer on top of it, and solder them together. Make sure you solder every connection.

Continue until all layers are stacked.

Solder wires from each of the levels to the board for ground.  Solder addition wires out. (see black wires in images)
Solder wires to each of the lowest level of LED legs, take all wires out and bind them together. (see red wires in images)

Once this is all taken care of, the LED Cube is finished, now we need to program.

Step 4: Programming the Stamp

5x4 LED display matrix using a Basic Stamp 2 is an amazing resource for learning the basics of programming LEDs in Basic.

The following code is based of of his instructions, and allows for a brief show to make sure things are working.

It flashes levels on in a specific order (I plan to have each level plugged into pins 4-7)

Ensure you download and install the software, plug the board into your computers serial port, then you can program it.

----------------------------------------
' {$STAMP BS2}
' {$PBASIC 2.5}
' {$PORT COM1}
DO
OUTS = %000000000010000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000100000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000001000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000010000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000011000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000001000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000001100000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000100000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000110000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000010000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000110000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000001110000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000011110000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000011100000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000011000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000010000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000011110000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000100000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000010000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000010000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000001000000
DIRS = %111111111111111
PAUSE 250

OUTS = %000000000000000
DIRS = %111111111111111
PAUSE 250

OUTS = %111111111110000
DIRS = %111111111111111
PAUSE 1000

DIRS = 0
PAUSE 250

OUTS = %111111111110000
DIRS = %111111111111111
PAUSE 1000

DIRS = 0
PAUSE 5000
LOOP
----------------------------------------

Step 5: Components on the Stamp

Now that the board is programmed, it's time to install the components.  Find the least complicated way for yourself. For me, you can see in the images.  You're making the same circuit 4 separate times.

Stamp power to 33 ohm resistor to transistor's base.
Stamp ground to appropriate resistor to transistor's collector.

Step 6: Putting It Together

With the board all set up, it's time to connect the two together!

Connect the LED Cube's ground wires (black) to the transistor's emitter on the Stamp Board.

Voila!

Step 7: Battery

With everything put together, all that's left is plugging in a battery or external power supply.

For an external power supply, just put the power into the power in, and ground into the boards ground.

For a 9V Battery, plug into the battery connector and everything will start right up!

See the video for a working model.