Basic Starter Package - Assembling the Development System

copyright, Peter H. Anderson, Dept of EE,
Morgan State University, Baltimore, MD, Dec 1, '97

Introduction.

The Basic Starter Package was developed to help newcomers. Although it is specifically targeted to newcomers to the Parallax Basic Stamp 2, it may be used with other similar devices such as the TIC62 by VersaTech or with the Parallel Port.

The idea is to furnish everything required, along with a few tutorials, such that the user may begin "tinkering" quickly and relatively inexpensively.

Deficiencies of this Documentation Package.

This is an incomplete draft intended for initial distribution with the Basic Starter Package. I am not at all satisfied with the depth and fear that what has been developed has not been adequately proofed.

Please bear with me. Each week, more material will be developed and shipped to each person who has purchased this Starter Package. Hopefully, over the next month I will have a final documentation package that I feel is acceptable. This will then be published and a free copy will be provided to all of those who have purchased the Starter Package.

Thus, over the next month, watch your mailbox for a weekly mailing of additional material.

Return Policy.

If you are not completely satisfied, you may return the kit for a full refund. Even if you have opened all of the envelopes and performed a few experiments and conclude, you really don't want it, package everything up and return it.

If you have suggestions, please e-mail them to me.

But, if you are pleased, please note the availability of these Starter Packages on News Groups and on the Stamp mailing list when you see such newcomers who have bought a Stamp and probably an unnecessary Parallax Starter Package and even after spending several hundred dollars of discretionary or luxury income, do not have the materials nor documentation on how to do anything.

Please appreciate that the time I give and the time my students give is free and I have no overhead. Thus, the cost of these packages are what I pay to acquire the materials with a modest markup. With a modest markup, I am hopeful I come out even. I haven't been too good at this, but that's the theory.

Items You Should Have.

Other Resources.

WWW.

In addition to the Parallax Manual and the tutorials supplied with this Package, there are a wealth of materials on the web.

My page (http://www.access.digex.net/~pha/stamp) provides a good many applications.

High Tech Horizons (http://www.hth.com). In addition to maintaining a List of Stamp Applications (LOSA), Christer has a library of zipped files for the BS2. Note that these have been contributed by a number of people, including myself. Authors have different styles, but this is probably the best resource on the web. His main page is in Swedish, but near the bottom, you will find a link to an index which looks like Hardware Hackers Technical Library.

Nuts & Volts Magazine (http://www.nutsvolts.com) have a good collection of past articles dealing with the Stamp.

An AltaVista search on the keywords +basic +stamp will give you thousands of links.

Stamp Mailing List.

In addition, Parallax maintains a listserver devoted to the Stamp which is very active, perhaps 30-50 mail messages each day. To subscribe, send e-mail to majordomo@parallaxinc.com with one line in your message;

     SUBSCRIBE STAMPS
This is a place where newcomers are welcome and there are many fine people who will spend time replying to you.

Book.

I recently acquired;

Claus Kuhnel and Klaus Zhnert, "Basic Stamp", Newnes, ISBN 0-7506-9891-8, 1997.

This is available from Jameco (Jameco #143651 @ $34.95) or from Amazon.Com.

The quality of books depends on one's experience level and financial situation. I am fortunate, in that $35 is not all that much and I did learn a few things I didn't know. The book does treat the Basic Stamp 1, with the BS2 as almost an after thought, which helps to fill out the number of pages.

Ratings on the Stamp list were not good, but as I say, different books appeal to different people. If $35 is a lot of money to you, I don't think you will miss a great deal by not buying it.

Assembling Your Development System.

Find the following in your Basic Starter Package.

In addition, there is an envelope containing a some 40 resistors. Keep that handy. Put the stepping motor, DC motor and the package of ICs to the side.

Refer to Figure #1 which is a suggested layout of your breadboard. Note that these are only suggestions based on a bit of experience in seeing my students make a lot of errors and waste a lot of time.

Note there are three binding posts. I don't use these as there is too strong a tendency to want to plug something in, when in fact all of the power is already on the breadboard itself.

Note there are four power strips running vertically, each consisting of a red and a blue line. In electronics, red implies voltage and black, or in this case, blue implies ground.

I suggest you connect the wall transformer to the right most power bus. Towanda has verified the polarity and soldered red and black leads on the transformer for you to do this with little effort.

The right most red power bus is then +12 VDC which may be used to power the motors. By keeping this +12 to the right, you can remember where the +12 is, and thus avoid accidentally connecting it to the Stamp or other 5 Volt devices.

The power supply regulator is located in the upper right. Note that only a single connection is required from the +12V bus to the input of the 7805.

The five volt output of the regulator is then connected to the other three red power busses using red wire. The four blue ground busses are interconnected using black wire.

Note that the 10 pin wire-wrap header to accommodate the flex cable is located in the upper left. Note that the wire-wrap terminals must be sprung such that each row is on the two sides of the channel.

The Stamp is located next to the header as all of the wiring associated with the header is connected to the Stamp.

I have shown the logic probe below the Stamp, but it may be located anywhere.

Note that all ICs should be placed such that terminal 1 is to the upper left. That is, be consistent. This helps to avoid errors.

Assembling the Power Supply.

See Figure #2 (+12 / +5 VDC Power Supply Kit).

Assemble this in the upper right or the breadboard. Start with the 7805 regulator and hopefully the rest follows.

The supply kit is shipped with a heat sink and it is screwed on with some thermal conductive paste which can be messy. The last time Paul and I made these up, we did 50 and we were getting the paste all over ourselves and everything else and of course there were no paper towels. Thus, we wrapped them, and you may desire to wipe off the residual paste. I don't think this paste is any too toxic, but obviously something you don't want the cat to eat.

The heat sink is provided for such that the regulator can handle well over 500 mA. In fact the Stamp's drain is but 7 mA and I doubt you will ever draw more than 100 mA of +5 VDC. Thus, the heat sink probably isn't even required.

The 7805 regulator is an amazing design. If it does overheat because of an accidental short, it shuts down to protect itself.

Note that the standard with electrolytics is to show the positive side on the schematic. However, many electrolytics are marked with a minus - - - sign. Connect the minus side to ground.

The purpose of the LED and 330 Ohm resistor is to maintain some quiescent current through the regulator. Note that this LED is a standard LED that requires the series limiting resistor.

Once done, check your work and connect the transformer to the +12 red bus on the extreme right side of the breadboard. You should see the LED light. Use a multimeter to verify the presence of nominally +12 from the transformer and +5 VDC at the output of the 7805.

A few words about the wall transformer. This is a rated as a nominal 9 VDC unit at 1.0 Amp. With a light load, this may be between +11.5 and 13.5 VDC. When you are tinkering with the stepping motor or DC motor, you may see this sag to 9.0 or 10.0 Volts. However, the voltage will be sufficient to drive the motors.

I went with the wall transformer for my students as it is cheap and it keeps the 120 VAC power line away from them. These wall transformers have been around for years and I assume one can apply a dead short without fear of damaging the unit. Please don't do that, but I wanted something that was cheap and very safe and feel that if this approach is safe enough for Atari, Motorola, AT&T and thousands of other companies, it is safe for my students.

Once you have verified you have +5 VDC, connect it to one of the three unused red power busses and connect these together using red wire as shown in Figure +1. Connect the four blue ground busses together using black wire.

One of the greatest frustrations is to spend hours on a problem, only to find an unpowered IC. In connecting three of the red power busses to +5 and all four of the blue ground busses together, I am hopeful you will avoid this.

Connecting the Serial Cable to the Stamp 2.

Please refer to Figure #3 titled DB-9 Serial Cable to Basic Stamp 2.

Install the 10 pin wire-wrap header and the Basic Stamp on the breadboard.

Remember to bend the leads on the wire-wrap header such that the two rows of 5 pins are on different sides of the channel.

Note that the terminal numbering on the 10 - pin header and the Basic Stamp are different.

Integrated circuits are descendants of vacuum tubes where the numbering was in a circular pattern. Thus, the Basic Stamp terminal numbering is in a counter clock wise manner.

However, on the 10-pin header, the terminals are assigned much as we read. An arrow on the header identifies terminal 1.

Note that ground is connected to terminals 4 and 23 of the Basic Stamp and terminal 5 of the 10-pin header. Black wire is suggested.

Note that +5 is connected to terminal 23 (PWR) of the Stamp. Leave terminal 21 unconnected. (There are a few words on the reason for this below).

Note that in addition to ground, there are three leads from the header to the Stamp and a strap between terminals 6 and 7 on the header. Any color of wire other than red and black is suggested.

Locate the envelope containing the resistors, LEDs and capacitors and remove;

     1    10K resistor (brown - black - orange)
     4    LEDs (These LEDs have an integrated 330 Ohm resistor)
Connect one side of the 10K resistor to terminal 22 (/RESET) and the other side to +5 VDC. You may also wish to connect one side of a black lead to terminal 22 as well. Leave the other side unconnected for the moment. This is your reset switch. By momentarily connecting this lead to ground, you reset the Stamp.

My students and myself use another approach to reset the Stamp. We simply momentarily disconnect the source of +12 from the transformer, and there is no harm in doing this.

Preparation for Tutorial 1.

Refer to Figure #3. Note 16 terminals one the Stamp are used as I/O leads. They are functionally identified as P0 through P15. The actual physical terminals are 5 through 20. It is important to note the difference between the functional designation and the actual terminal number. Parallax really did a nice job in the human factors area in assigning the physical termianls in a continuous manner. Note that the terminal number = functional designation plus 5. For example, P11 is at terminal 16.

In all of the tutorials, I use P0 through P7 as outputs and P8 through P15 as inputs. Note then that physical terminals 5 through 12 will be confined to outputs and 13 through 20 to inputs. This is a bit of good human factors design on my part as the outputs are then on one side of the IC and the inputs are on the other.

Please refer to Figure #4 titled "Preparation for Tutorial #1.

Tutorial #1 uses a single LED on P0 (terminal 5). Tutorial #2 extends this to four LEDs, one each on P0, P1, P2 and P3. (Some switches will also be used in Tutorial #2, but let's save that for later).

Install four LEDs as shown in Figure 4.

Note that these are special LEDs in that they contain an integrated 330 Ohm limiting resistor.

Thus, unlike the conventional LED which was used in the power supply, you do not need an external 330 Ohm limiting resistor.

These special LEDs make life a whole lot easier. However, I am concerned that users may become confused and try to drive conventional LEDs without the series limiting resistor or get these special LEDs mixed in with conventional LEDs.

My assistant, Paul Roach tells me that if you carefully inspect these special LEDs with a built in 330 Ohm limiting resistor, you can actually see the resistor; a small black shape inside the LED. You might verify this yourself.

But, it is important that all LEDs have a series limiting resistor. With the LEDs we have supplied, this is built in to the LED. If you do not use these, you must provide an external 330 Ohm resistor (orange, orange, brown).

Comments on Power to the Stamp.

The Stamp has an onboard regulator. The voltage applied to terminal 24 (PWR) may be +5 to +12 VDC. The onboard regulator then supplies the Stamp with the regulated +5 VDC.

But, the Stamp has another feature which I very strongly recommend you never use. This regulated +5 VDC is made available to the user on terminal 21. I strongly recommend, you always leave terminal 21 unconnected.

The Parallax approach is to provide a 2.5 X 3 inch board and power the Stamp at terminal 24 with a 9 Volt transistor battery. This, then leaves the user with no option other than to use terminal 21 as a source of +5 to power their other circuitry. Unfortunately, if you draw too much current, and accidents do happen, you blow a $49 Stamp and I have seen many such sad postings on the Stamp mail list.

My approach is quite a bit different. We have spent the extra 35 cents for an external 7805 regulator which is virtually indestructible and use this +5VDC to power the Stamp at terminal 24.

The on-board regulator on that very expensive Stamp is then a protection mechanism in case the user accidentally applies +12 to terminal 24.

Never use the output of the on-board regulator available at terminal 21 of the very expensive Stamp to power other circuitry. Always leave terminal 21 unconnected. Rather, use the output of the 35 cent regulator we have provided to power your circuitry.

Just how Parallax can be so very creative on the one hand and fail so wretchedly on this matter is beyond me.

Just remember, never connect terminal 21 to anything.

With that bit of deserved negativism off my chest, lets move on the to use the amazingly powerful Basic Stamp 2.