LUNAR’clips 2002                        Volume 9, Number 6

Livermore Unit of the National Association of Rocketry              November/December 2002

Copyright © 2002 by LUNAR, All rights reserved.

Basic Stamp Basics

By Maarten Korringa (Lunar 1090)

Several years ago, I got back into model rocketry when I was a Cub Scout Den Leader looking for a good project for the boys. Most of the boys went on to other things but I got hooked again. My "thing" is little rockets that fly high.

The downside of little rockets that fly high is that if you want your rocket back, you are faced with a difficult choice: either use a minimal streamer and repair the crash damage, or use a real parachute, hope it isn't too windy, and spend a lot of time wandering around in South Livermore retrieving your rocket.

It did not take long to discover that there is a third choice: dual deployment--fire a small streamer at apogee, and then use a flight computer to fire the real parachute much later, a few hundred feet above ground.The flight computer has the additional bonus that it can be used to measure the rocket's maximum altitude.

I saw that there are a number of small flight computers available for rocket hobbyists, but being something of a control freak, I never really considered buying one. I wanted to come up with my own collection of instruments, I wanted to write my own software, and I wanted to do my own secondary deployment system.

I am not an electrical engineer, and my programing experience consists of a couple of JC computer courses and creating some C language hobby-type applications for DOS. I figured I could write a flight computer program if it didn't have to be in machine code or in assembly language, and if I didn't have to create my own operating system.

Basic Stamps to the rescue

There is a daunting variety of microprocessors and microcontrollers on the market. But I didn't have a clue how I could use any of them to read instruments or control hardware, or how to run a program on them. The learning curve looked like El Capitan viewed from below.

Poking around the internet, I happened across a couple of references to something called a "Basic Stamp," which hobbyists had used for microcontrollers for various projects. I found the manufacturer's website, and Eureka! It was as if someone had anticipated my exact predicament. Here, in one teensie package, was everything I would need to get the job done!

The Basic Stamp gets its name from the fact that it is programmed in a language that looks a lot like Basic (it's called PBASIC), and it is the size of a postage stamp, albeit a largish one. It is a 24-pin DIP package, about 1.2" long and 0.63" wide. On its tiny 3/4 square inch area, the manufacturer provides the following: a Microchip 20 MHz PIC16C57C 8-bit RISC microcontroller, a 20 MHz clock, a 2K x 8-bit EEPROM, a 5 VDC voltage regulator, and an RS-232 interface. But that's just the beginning! Already loaded on the Basic Stamp is the PBASIC operating system, capable of communicating with my Windows PC. Of the Basic Stamp's 24 pins, four are dedicated to the RS-232 port, four are dedicated to power management, and the other 16 are there for my pleasure! Sixteen I/O pins for talking to my instruments, lighting up LEDs, or firing secondary deployment.

I contacted the manufacturer, Parallax, Inc. (www. Parallax.com), a great little company in Clovis, California. I plunked down $49 for a BS2-IC, their most popular Basic Stamp. While waiting for UPS, I downloaded two freebies from Parallax.

One was the Basic Stamp Programming Manual, a 351-page tome that details the Stamp's data structures, math operators, and every PBASIC command. The book is very well done, rivaling the manuals Hewlett Packard published for their classic Rocky Mountain Basic operating system. I printed it out and keep it in a binder next to me when I'm programming.

The other was the Basic Stamp Windows Editor. I installed this little beauty on my WIN 98 PC, and I had in front of me a single application that allows me to create the software, check it for syntax errors, download it to the Basic Stamps RS-232 port, and display the Stamp's output messages. The Parallax web site teems with technical hints, project descriptions, and sample programs.

When my Stamp arrived, I plugged it into a breadboard, powered it up with a 9-volt battery, hooked up the four wires to the RS-232 9-pin D-sub to plug in the back of my PC, and I was ready to roll. Within an hour, I was downloading small programs, getting data from the Stamp, and blinking LEDs to my hearts content. As an engineer who has had to wade through masses of technical literature, I feel that the job Parallax has done to make something this complex simple and accessible is nothing short of remarkable. (No, I don't own stock in the company).

I did build a prototype flight computer, which added an altimeter, an accelerometer, a clock, and an 8K x 8-bit EEPROM. I wrote my own software for it, and finally flew it in a BT-55 E-28 RMS powered rocket on November 14. When the ten-second delay fired just after apogee, the shock cord between the computer and the motor housing let go, and the computer came down in free fall. But at 400 feet, the computer fired the secondary deployment parachute and managed to drop gently to the ground a few feet from launch pad 24. The motor housing came down undamaged within 100 feet of the pad it had flown off from. Of course that Saturday there was almost no wind, but, still, it took only a very short walk to retrieve my rocket after a 1200 foot flight.

What's next? I'm planning to build a somewhat smaller computer on a homemade printed circuit board, small enough to fit in 29mm motor tubing. I intend to make improvements to the clock circuit and to the software. Then off to fly the new rocket on a G-40, somewhere else. But whatever form the new computer takes, its heart will always be a Basic Stamp.

The detail shows the section of the rocket that has the computer. The square hole is the access port for the RS-232 used to upload software and download recorded data. The two red pins are actually switches--they pull out to turn circuits on; the upper one turns on the computer, the lower one arms the deployment device. There's an LED in them so you can see if the softwware is running and the ignitor has continuity. All three ports are taped up for flight.

The vertical slot is a vent hole to keep the pressure inside about the same as ambient so that the barometer can respond quickly to changes in altitude. Needless to say, those are not taped up.

The rocket simulated out at 1500'. The barometer and the integrated accelerometer data both said lower, but also disagreed. The barometer said 1200' and the accelerometer data pointed to about 1300'. I've been unable to reconcile them.

Return to Index


| About LUNAR | Home | Calendar | Contacts | Gallery | Old Gallery | Member Pages | Events | Presentations & Docs | LUNAR'clips | Handbook | Space Place | Mailing Lists | Joining | Other Rocketry Pages | Site Map | Frames |

All content is the responsibility of LUNAR. If you have comments or suggestions regarding these web pages, please contact the

Copyright © 1992 - 2024 LUNAR