Basic Stamp LED Cube

by StumpChunkman in Circuits > LEDs

33638 Views, 111 Favorites, 0 Comments

Basic Stamp LED Cube

ledcube.jpg
8002.jpg
8001.JPG

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

Materials

2001.jpg
2002.JPG
4001.JPG
6003.jpg
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

Soldering LEDs

3001.JPG
3002.jpg
3003.JPG
3004.JPG
3005.JPG
3006.jpg
3007.JPG
3008.JPG
3009.JPG
3010.jpg
3011.JPG
3012.JPG
3013.JPG
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.

Soldering the Cube

4001.JPG
4002.JPG
4003.JPG
4004.JPG
4005.JPG
4006.JPG
4007.jpg
4008.jpg
4009.jpg
4010.JPG
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.

Programming the Stamp

6001.JPG
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
----------------------------------------

Downloads

Components on the Stamp

6001.JPG
6002.JPG
6003.jpg
6004.JPG
6005.jpg
6006.jpg
6007.JPG
6008.jpg
6009.jpg
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.

Putting It Together

7001.JPG
7002.JPG
7003.JPG
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!

Battery

8001.JPG
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.