Shop OBEX P1 Docs P2 Docs Learn Events
BASIC Stamp Tester — Parallax Forums

BASIC Stamp Tester

Chris SavageChris Savage Parallax EngineeringPosts: 14,406
edited 2010-05-31 21:25 in Robotics
ASSEMBLY

BASIC Stamps are one of the most well known microcontrollers out there.· That popularity is well deserved and includes vast amounts of free documentation and example code as well as free technical support and support/discussion forums.· Parallax takes great pride in manufacturing these microcontrollers here in the USA and every BASIC Stamp manufactured is fully tested before being sold.· This procedure is done one BASIC Stamp at a time, usually in lots of 50.· Over time Parallax has developed and improved the testing of BASIC Stamps.· Originally there were separate programs and test boards for each BASIC Stamp model.· The goal was to have one board and source code to handle all the testing.
To that end I worked with Application Engineer Jeff Martin to not only simplify the test procedure for manufacturing, but make it better and to be able to detect more possible types of problems discovered in my time in tech support.· While the code was being improved I created a test board that could handle any BASIC Stamp.· This includes the BS1 and all 24 and 40-pin BASIC Stamp 2 models.· Parallax has·decided to release the code and plans for this board to our customers as well as another tester I built for the exceptions...the exceptions are the Homework Board, Sumo Board and Toddler Board where the BASIC Stamp is surface mounted and cannot be removed to plug into this test board.
First I'll cover the test board, then the card tester.· If you would like you may skip straight to the Usage Tutorial below which is where the BASIC Stamp Source Code is attached.
EXPRESSPCB IS FAST AND EASY
We·needed the board in a hurry and we already had a reference schematic so I used ExpressPCB to quickly create the PCB you see below.· Using the mini-board service we got three of these for under $60.00 in 3 days.· The ExpressPCB file can be downloaded·below (attachment).
attachment.php?attachmentid=63553attachment.php?attachmentid=63554
As you can see from the solder side of the board all ground connections are part of the ground plane.·
ASSEMBLY TIME
For me populating the PCB begins with the smaller components.· I do this to make it easy to solder sockets and resistors while being able to lay the board down flat on a surface.· Once the smaller components are in then I start working my way up.
attachment.php?attachmentid=63555
Parts: (1) 14-pin and (2) 20-pin machined sockets.· The 14-pin socket mounts on the left side of the board as shown.· The two 20-pin sockets on the right need to line-up with the ZIF socket in the end so I plugged the socket in until I got these fully soldered in, then removed the ZIF socket for the rest of the assembly.

attachment.php?attachmentid=63556
Parts: (1) 3-pin RA SIP Header, (8) 4.7K resistors and (2) 470 ohm resistors.· 3-Pin RA SIP header mounts on the far left.· This is where the BS1 Serial Adapter connects.· The 4.7K resistors run from the bottom-right of the BS1 socket about half way up.· These are connected to the BS1 I/O pins.· The 470 ohm resistors mount above the 4.7K resistors and control current to the LEDs.· Note: These may be changed as needed for the color LEDs you use.



attachment.php?attachmentid=63557
Parts: (8) .01uF capacitors, (34) .1uF capacitors and (1) Tact Switch.· The eight .01uF capacitors (marked 103) install just to the right of each 4.7K resistor.· 32 of the .1uF capacitors (marked 104) install down either side of where the 40-pin ZIF socket will install.· The other two install just below where the DB-9 mounts.· Note the orientation of these two as it differs from the others (vertical rather than horizontal).· The RESET switch mounts bottom center of the board and should only fit one way.



attachment.php?attachmentid=63558
Parts: (4) 10K SIP resistor packs and (2) LEDs (any color).· The 10K SIP resistor packs should have a dot or line to signify pin 1.· This is very important as these are bussed and have a common ground pin which must be at the square pad on each of the four areas they mount.· The LEDs can also be mounted.· Color does not matter and you can always use two of the same color if you want.



attachment.php?attachmentid=63560
Parts: (1) DC power jack and (1) DB-9 RA serial connector.· Mounting holes for the DC power jack are slightly large on the units I have.· Be advised that you should exercise caution installing this unit because you'll need a lot of solder, but you don't want to melt the connector or damage the PCB from excessive heat.· The DB-9 should snap right in.· I only put a little bit of solder around the mounting tabs since they practically lock in place anyway.· The solder there is more to keep the tabs from unlocking.· Those holes don't need to be filled.



attachment.php?attachmentid=63561
Parts: (1) ZIF socket.· Finally you can snap your ZIF socket into place and you're ready to start testing BASIC Stamps.

If you need help getting started please see the usage tutorial below.· Source code is located on that page as well.

CUSTOMIZATION

The unit shown·below was the first BASIC Stamp Tester built.· As you can see I prefer the release lever at the bottom and my reset button was a custom unit.· You can use any switch that will fit that configuration.
You can also choose your own LED colors.· Blue is even an option.· Just be sure to pick a resistor value appropriate for the LED you choose.· The 470 ohm resistors are fine for most Red and/or Green T1-3/4 LEDs.
I also mounted my board on an acrylic back-plate with some rubber feet.· This makes it easier to handle and keeps it from being shorted on metal surfaces.· It also protects my hands from the trimmed leads on the back of the board and adds stability.

attachment.php?attachmentid=63562

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage

Parallax Engineering
50 72 6F 6A 65 63 74 20 53 69 74 65


Post Edited (Chris Savage (Parallax)) : 9/6/2009 11:40:38 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-24 16:47
    EXCEPTIONS TO THE RULE...
    BASIC'ly there are a few Stamp-based boards we cannot put into the tester because their BASIC Stamp is surface mounted.· Examples are the Homework Board, Sumo Board and Toddler Board.· So for those I designed a card-type solution that could plug into the 16-pin SIP socket available on all three boards.· In fact, the card could be used on the Board of Education, Professional Development Board or any other board that has a 16-pin socket with access to the I/O pins on the BASIC Stamp.· This allows you to test a BASIC Stamp on a development board if you should choose to.
    ASSEMBLY TIME...AGAIN!
    This board is much smaller requiring only three different parts.· Here's a quick view of the component and solder sides.
    attachment.php?attachmentid=63563attachment.php?attachmentid=63564
    The layout is intentionally simplistic.· Again though...ExpressPCB to the rescue with fast boards.· Of course, as small as this design is, I managed to get twelve modules out of one order of the mini-boards by panelizing the design.

    attachment.php?attachmentid=63565
    Parts: 16-pin RA SIP header.· Just mount this header along the bottom edge.



    attachment.php?attachmentid=63566
    Parts: (16) 10K resistors.· These go in the lower set of holes as shown above.



    attachment.php?attachmentid=63567
    Parts: (16) .1uF capacitors.· These go in the upper set of holes.· Now your tester is complete!

    ...oh, you're wondering about the extra hole, aren't ya?



    attachment.php?attachmentid=63568
    That was for an optional grounding wire.· Originally the design required a grounded bus, however the state of all the other lines during the tests acts as an effective ground making the wire unnecessary.

    If you need help getting started please see the usage tutorial below.· Source code is located on that page as well.

    BUILDING THE TESTER ON A BUDGET

    Okay, so you want to build one of these little gems, but don't want to pay for three mini-boards.· Understandable.· The average hobbyist only needs one anyway, right?· Before I started at Parallax I had already built my own test board based on a discussion in these forums.
    attachment.php?attachmentid=63569
    Here is my home-brew version which later became the board above.· All of the parts were obtained from my local Radio Shack, including the solder ring board itself.
    attachment.php?attachmentid=63570
    Here is a shot of the tester being used on a Board of Education.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65


    Post Edited (Chris Savage (Parallax)) : 9/6/2009 11:48:56 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-24 17:02
    USAGE TUTORIAL - TESTING BASIC STAMPS
    The first thing to realize is that the BASIC Stamp Tester cannot detect all issues or BASIC Stamp failures.· The most obvious case is that the BASIC Stamp cannot be detected by the BASIC Stamp Editor or some other communication error.· The tester is designed to detect issues with the I/O pins, RAM·and in a sense, the on-board regulator.· The code is designed to·be as thorough as possible.
    INTERNAL/EXTERNAL TESTING
    The first thing that needs to happen is you need to tell the BASIC Stamp Editor which BASIC Stamp it is testing.· This is done by selecting the appropriate Stamp Directive from the toolbar or menu.· The reason this is important is that the test code uses conditional compilation to setup different parameters and code blocks that are different for the various BASIC Stamp models.· If you don't change the stamp directive you will be directed to do so when you download the program and the editor detects a different model.
    Bear in mind there is a verbose mode and a non-verbose mode.· Parallax manufacturing uses the non-verbose mode for speed.· Tech Support uses the verbose mode to see exactly what is happening.· These modes are set by a variable toward the beginning of the code.· The default is to use verbose mode, which takes slightly longer to run.
    Once the code has been downloaded to the target BASIC Stamp Module it does the following...
    • The OUTS register is checked for integrity so it can be used as a counter for the next test.
    • Variable RAM is tested.
    • If the module has scratchpad RAM it is tested.
    • I/O pin drivers are tested.
    • I/O pins are tested via external RC circuit.
    WHAT IS GOING ON IN THERE?
    The OUTS register is checked first because in order to test RAM we need some way to keep track of the address, but we're essentially destroying RAM so we can't create a variable.· Besides that we need to do a complete test.· Status of each test is shown on the DEBUG screen in verbose mode.
    Once variable RAM is tested SPRAM is tested (if available).· The EEPROM is not tested save verification of the code download.
    The I/O pin drivers are read back by the input register to verify that each pin reads what it is set to in the OUTS register.· This is our loopback test.· This is visually seen by a pattern of ones and zeros on the DEBUG screen.
    Finally, each pin is tested using an RCTIME test with an external RC circuit.· There are actually about a dozen ways a pin can fail and the last two tests are designed to catch them all.· This test ensures that each pin is within spec and is fully connected externally to the module (no broken traces or bad solder joints).· The values for the RCTIME test are shown on the DEBUG screen along with a pass/fail indication.
    During development of the code I was trying to find a clever way to determine if a BS2p40 was connected.· I had a few choices since there is no separate directive for 24 and 40-pin BS2p modules.· I finally used the fact that on 24-pin modules the AUX pins are internally pulled-up.· This is a reasonable method for determining whether we have 16 or 32 I/O pins to test.
    LET THE TESTING BEGIN
    Okay, let's grab our BASIC Stamp Tester and drop in a BASIC Stamp Module to test.
    attachment.php?attachmentid=63571
    In the example, a BS2 was loaded onto the tester.· Notice the top LED lights?· This is an indication that the on-board regulator on the module is working.· The LED should light when the ZIF socket is closed.· If we now connect our Serial Cable or USB to 232 we can download the test code and see what the status of this BASIC Stamp is.
    attachment.php?attachmentid=63572
    In this example a BS1 is installed in the socket on the left and a BS1 Serial Adapter is connected to download the BS1 Test Code (atached below).
    Note: Due to architectural differences between the BASIC Stamp 1 and BASIC Stamp 2 line there is a different program (and as you can see, a different socket) for testing the BS1 Module.
    TESTING THE EXCEPTIONS...
    In the following examples we'll be testing a Homework Board which includes a surface-mounted BASIC Stamp 2 installed on it.· For this we'll use the Card Tester since it can connect to the 16-pin SIP socket on the board, connecting to all 16 I/O pins and providing the RC circuit required by the test code.
    attachment.php?attachmentid=63573
    The Card Tester plugs in as follows.
    attachment.php?attachmentid=63574
    If you installed the optional grounding wire you can connect it to the VSS connection on the board.
    attachment.php?attachmentid=63575
    Here the Homework Board is ready for testing.· For those wondering about the built-in series resistors on the Homework Board, they do not affect the overall resistance in the RC circuit enough to affect the test results adversely.
    attachment.php?attachmentid=63576
    Here are the first 4 Card Testers created after cutting up the first mini-board.

    JAVELINS?!?
    Yes, that is correct.· The Javelin Stamp can be tested using the attached program.· There are two pieces to the program, "Javelin_Test.java" and "J_test.class".· Both files must be in the same folder when using this code.· You would load the Javelin_Test.java code into the IDE and run it to get the results.· Be sure your DEBUG window is opened sufficiently to view the data shown.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65


    Post Edited (Chris Savage (Parallax)) : 9/6/2009 11:57:03 PM GMT
  • tpw_mantpw_man Posts: 276
    edited 2008-10-28 22:57
    That is cool! Maybe for revision 2, you can put on a prop and have it program a stamp and monitor the outputs, for computerless testing!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-29 14:08
    A stand-alone tester was designed at one point using the BS2p. Our senior software engineer had the same idea as you did though...use a Propeller. I'm sure once he has time to devote to it, it will become a reality. For now this solution is quick, inexpensive and rock-solid. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65


    Post Edited (Chris Savage (Parallax)) : 9/6/2009 11:39:31 PM GMT
    320 x 233 - 19K
  • DosManDanDosManDan Posts: 179
    edited 2008-10-29 23:09
    Wow, what a great idea Chris! I don't know why, but until now, I didn't think of using SIPs to mount a ZIF socket. I am building a board to program SX-28s using a ZIF and I didn't want to solder it in.

    Also, nice example of how to properly design a board.
    Dan
  • davejamesdavejames Posts: 4,045
    edited 2008-10-30 19:48
    This thread brings to mind the question of how the Parallax chips are tested at the wafer sort and packaged part stages.· I'm curious as to what test system (or systems)·is used to verify functionality.· Does Parallax do in-house testing or use an outside test house?

    DJ
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-31 14:25
    DJ,

    The BASIC Stamp is a hybrid microcontroller…that is, it is made from another microcontroller. In the case of the BS2 this is a PIC chip. In the case of all other models this is an SX chip. Now Parallax is the manufacturer of the SX chip, so we do some pretty thorough in-house testing on the SX chips using a machine not unlike a pick-and-place which pulls the chips from the tube, takes them to one of the tester blocks and drops it in, where it undergoes rigorous testing. If the chip passes it is put into another tube. If not, I think it is re-seated once and retested, but any failures are rejected. This system is driven from a PC and a microcontroller system.

    As for the Propeller, it has a stand-alone tester which is built using a Propeller chip. This is a pretty sophisticated unit which performs quite a few tests on the chip under test. Because it is stand-alone there are only three LEDs on the board. Green means pass, Red means fail and yellow means it is being tested. For failures we can connect a composite video monitor and see the exact reason for the failure. Chip, of course, designed the tester.

    I hope this provides some insight into our testing methods here at Parallax. If you saw the pictures Ken posted on the website of our manufacturing department, these are the people who perform the testing. And, like the BASIC Stamps, the Propeller chips are tested one at a time. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • davejamesdavejames Posts: 4,045
    edited 2008-10-31 15:09
    Thanks Mr. Savage, it does.

    On the Propeller tester, is the unit under test compared to a "golden" Propeller device?

    Are there any plans to move from in-house designed test systems to ones made by tester companies?

    Is temperature testing performed?

    Curious as this is the industry in which I work,

    DJ
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-10-31 15:15
    DJ,

    The Propeller test doesn’t make a live comparison to another chip. The tester knows what it is looking for; however, should there be an issue with multiple failures we commonly keep a ‘known good’ unit available to ensure the tester is working properly. In fact, when I was in Tech Support we also had a ‘known bad’ unit. I don’t know any details about temperature testing other than what’s been posted in the datasheet. I doubt we would have reason to move testing outside the company when we can do the testing here. Our hands on approach to things has helped us develop and improve even the testing process. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • davejamesdavejames Posts: 4,045
    edited 2008-10-31 15:25
    ...understood.

    Thanks,

    DJ
  • servelloservello Posts: 113
    edited 2009-01-02 07:27
    Greetings Chris and all,

    I found this thread and decided to try my hand at making one of these (The simple card version) to check on the three BS2's I have.

    I've read through your posts and was unable to find a PCB file for that version, but I did see the GIF file. I've never used ExpressPCB before, so this made a good introduction to it.

    I've attached the file I created. Could you check it out to see if I got it right? I'm especially concerned about the size of the board. I know there is a restriction for the MiniBoard style (3.8 X 2.5 inches). I also know that choosing "New" defaults to the correct size, but I cropped it so as to be more compact. How can I tell what size the board is? I found no way to do this.

    BTW, you don't sell these do you? That would make everything easier as I only need one.

    Thanks for your time,
    Dominic

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Deus tantum me iudicabit
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-02 16:38
    Hello everyone. Not sure how I missed attaching the ExpressPCB file for the CS testers, but I edited the original post above and attached my original file. Please note that this board contains 4 testers per mini-board. So using the mini-board service would yield 12 boards (they have to be cut up). For us this worked out great, but for others you may want to consider having a single board made, or even copying/pasting this board onto another you’re going to have ordered. I hope this helps. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2009-08-21 20:00
    Glad this was on as project of the week so I could remember to post my pictures. I made one of the versions for my homework board. My 40 pin version is still in process. I made mine on a piece of perfboard and used an 0402 cap and 0603 resistor so they could fit on the same pads. A simple piece of bus wire made the ground connection daisy chain. Didn't have an RA header at hand, so just mounted a vertical header on its side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    1000 x 540 - 152K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-09-06 23:40
    Attachment Post

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    320 x 240 - 26K
    320 x 240 - 24K
    320 x 240 - 28K
    320 x 240 - 30K
    320 x 240 - 30K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-09-06 23:44
    Attachment Post 2


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65


    Post Edited (Chris Savage (Parallax)) : 9/6/2009 11:49:46 PM GMT
    320 x 249 - 27K
    320 x 240 - 22K
    320 x 240 - 20K
    320 x 280 - 26K
    320 x 237 - 20K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-09-06 23:51
    Attachment Post 3

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    320 x 256 - 21K
    320 x 260 - 21K
    320 x 278 - 29K
    320 x 240 - 13K
  • rh3drh3d Posts: 14
    edited 2010-05-31 21:25
    This is a great thread, thanks!

    I have started building my own but before I finished I wanted to find out if there were any other posts that would help me add the BS2 to USB interface rather than the serial? I don't own a computer with a serial connection and I hate the bulky serial to USB adapters. I plan on removing the BS1 part of the circuit as I currently only us the 24 and 40-pin BASIC Stamp 2 models.
Sign In or Register to comment.