+ All Categories
Home > Documents > Basic Stamp Led Cube

Basic Stamp Led Cube

Date post: 07-Apr-2016
Category:
Upload: vn-champion
View: 228 times
Download: 1 times
Share this document with a friend
Description:
 
Popular Tags:
15
http://www.instructables.com/id/Basic-Stamp-LED-Cube/ Food Living Outside Play Technology Workshop Basic Stamp LED Cube by StumpChunkman on June 30, 2011 Table of Contents Basic Stamp LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Intro: Basic Stamp LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 2: Soldering LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 3: Soldering the Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 4: Programming the Stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Step 5: Components on the Stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Step 6: Putting it Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Step 7: Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Transcript
Page 1: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Food      Living       Outside        Play        Technology       Workshop

Basic Stamp LED Cubeby StumpChunkman on June 30, 2011

Table of Contents

Basic Stamp LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Intro:   Basic Stamp LED Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Step 1:   Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

Step 2:   Soldering LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Step 3:   Soldering the Cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

Step 4:   Programming the Stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Step 5:   Components on the Stamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Step 6:   Putting it Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Step 7:   Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

Page 2: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Author:StumpChunkman

Intro:  Basic Stamp LED Cube

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 betterable 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, andI'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 4x4x45x4 LED display matrix using a Basic Stamp 2

Page 3: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 1: MaterialsFirst 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 wireBASIC Stamp Homework BoardRed 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

Page 4: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 2: Soldering LEDsLED 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 toany layer to enable a current to flow through.

Page 5: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Page 6: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 3: Soldering the CubeMark 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.

Page 7: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Page 8: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Page 9: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 4: Programming the Stamp5x4 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}DOOUTS = %000000000010000DIRS = %111111111111111PAUSE 250

OUTS = %000000000100000DIRS = %111111111111111PAUSE 250

OUTS = %000000001000000DIRS = %111111111111111PAUSE 250

OUTS = %000000010000000DIRS = %111111111111111PAUSE 250

OUTS = %000000011000000DIRS = %111111111111111PAUSE 250

OUTS = %000000001000000DIRS = %111111111111111PAUSE 250

OUTS = %000000001100000DIRS = %111111111111111PAUSE 250

OUTS = %000000000100000DIRS = %111111111111111PAUSE 250

OUTS = %000000000110000DIRS = %111111111111111PAUSE 250

OUTS = %000000000010000DIRS = %111111111111111PAUSE 250

OUTS = %000000000110000DIRS = %111111111111111PAUSE 250

OUTS = %000000001110000DIRS = %111111111111111PAUSE 250

OUTS = %000000011110000DIRS = %111111111111111PAUSE 250

OUTS = %000000011100000DIRS = %111111111111111PAUSE 250

OUTS = %000000011000000DIRS = %111111111111111PAUSE 250

OUTS = %000000010000000DIRS = %111111111111111PAUSE 250

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %000000011110000DIRS = %111111111111111PAUSE 250

Page 10: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %000000000100000DIRS = %111111111111111PAUSE 250

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %000000010000000DIRS = %111111111111111PAUSE 250

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %000000000010000DIRS = %111111111111111PAUSE 250

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %000000001000000DIRS = %111111111111111PAUSE 250

OUTS = %000000000000000DIRS = %111111111111111PAUSE 250

OUTS = %111111111110000DIRS = %111111111111111PAUSE 1000

DIRS = 0PAUSE 250

OUTS = %111111111110000DIRS = %111111111111111PAUSE 1000

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

File Downloads

Blink_LED1.bse (2 KB)[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Blink_LED1.bse']

Page 11: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 5: Components on the StampNow 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 makingthe same circuit 4 separate times.

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

Page 12: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 6: Putting it TogetherWith 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!

Page 13: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Step 7: BatteryWith 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.

Page 14: Basic Stamp Led Cube

http://www.instructables.com/id/Basic-Stamp-LED-Cube/

Related Instructables

How to EntertheThanksgivingReuseChallenge byContest Robot

[blog 2006-04-24] Maker Fairepresentation byinstructables-eric

COPY ANYCD\DVDCOMPUTERGAME byJmraub86

HyperGuys on a Stickby kellyb77

Best of 2009:Best of EachCategory byInstructablesGuides

Despereaux(Photos) byMerriven

Comments

6 comments Add Comment

 H4T says:  Jul 7, 2011. 10:28 AM  REPLYSuper professional, amazing pics and video! But I'm curious about one thing - why use the BASIC Stamp? The last thing I want to do is incite a fanboy slug-fest (I'm looking at you, Arduino community :P), I'd just like to understand the motivation and reasoning for using BASIC Stamp in this day and age. Seemslike since Arduino has come on the scene, everything else that has been used for many years has been largely quashed in the hobby sites (PIC, Stamp,Maple, etc). Can you provide some advantages or advocate the BASIC Stamp over the other platforms? Is it just a matter of personal familiarity, or do youhave specific, strong reasons for choosing the BASIC Stamp platform?

 StumpChunkman says:  Jul 7, 2011. 11:53 AM  REPLYActually, the reason for choosing the BASIC Stamp is much simpler that you're thinking. The challenge was posed to me to try to make an LED Cubewith nothing but parts from RadioShack. The challenge seemed interesting and I wondered if it could be done.

I do also like the fact that I've now used another programming language other then Processing/Arduino. I was playing Gorilla and Nibbles in QBasic way,way back in the day and loved them. I would look at the code on occasion and wonder how it worked. I still don't know, but I understand that language alittle better now, which is a nice feeling.

In addition, having worked with both the Arduino and the Stamp at this point, I can honestly say that I don't think it would have been as easy to controloutputs with the Arduino as it was with this. Being able to control each output with a string of binary was actually quite liberating. I hope someone addsthis ability to Arduino at some point.

 H4T says:  Jul 7, 2011. 5:23 PM  REPLYOh! That explains all the RadioShack stuff in the post, lol. Boy, you must be out a pretty penny :P

Looking at the BASIC code, it looks like what you might gain in logical simplicity, you also lose in semantic clarity (might be easier to type and take upless characters, but is harder to intuitively grasp if you don't know exactly what the author intended). But really, this can be said about anymicrocontroller platform at some level.

By the way, you actually can using a bitmask to address pins of a port with the Arduino, it's just not presented to beginners very often:http://www.arduino.cc/en/Reference/PortManipulation .

 SHIFT! says:  Jul 7, 2011. 9:31 AM  REPLYI had no idea an LED cube was so easy! Always thought Arduino was required, not simply an addition.

Anyway, I've got to build a Companion Cube version of this!


Recommended