I purchased my first BASIC Stamp 2 Starter Kit in 2000. Once I got used to the programming I decided to port one of my existing alarm control systems over to it. This unit was the first alarm system I designed around the BASIC Stamp 2 to replace earlier Z80-based designs. Since it’s a prototype, it’s not intended for long-term use and differs slightly in design from the finished project.
This Prototype was built inside of a Pac-Tec Enclosures sloped cabinet with brushed aluminum instrument and rear panels. The keypad is a 16-key unit that I got from BG Micro, a good source of surplus parts. The LCD display was acquired from Dale Wheat, along with a chip to allow communication with a BS2 using only 1 I/O line. This chip is called PIC-an-LCD and for awhile I was using these exclusively in my early BASIC Stamp based designs. It appears that it is not only no longer available, but the original links have disappeared.
I started off by milling the cabinet for the cutouts I would need for this prototype. Various stages of this process are shown in these photos. Pilot holes were drilled first.
The parts had to be arranged so that they fit properly inside the cabinet when it was closed and the boards were mounted.
Next a nibbling tool was used to cut out the larger holes. Finally a dremel was used to clean-up and debur the edges.
The lettering was a rub-on type and sealed in with clear-coat acrylic enamel.
The front panel components were mounted next. The Piezo speaker and the power LED were simply hot glued in place.
The completed front panel.
The next step was to write code for the LCD display and the keypad decoder. Code for the LCD was simply taken from some other projects. The source code is written in a modular fashion, making it real easy to port to other projects. Almost all of the LCD code I have written so far uses the PIC-an-LCD from Dale Wheat. Mainly since it uses only one I/O pin, is easy to use, inexpensive, and was the first chip I ever used to do this with. Most of the prototypes are built on a standard Board Of Education from Parallax Inc.
The test rig for the keypad & LCD is shown here. Sorry for the blurry photo. The keypad is being decoded using an EDE1144 from E-Lab Digital Engineering, Inc. This IC can communicate with the host controller via parallel or serial interface. For our purposes we will be using the serial interface, as well as the Data Valid Output to detect when a key has been pressed. By using this extra line we can prevent the BS2 from waiting needlessly for serial data when there is none. There is sufficient time to test the Data Valid Output and then get the serial data while still running other code.
Here it is shown being tested with the optional key-click sounds on the Professional Development Board.
The completed unit was used to test several sensor interfaces, various code constructs, including serial keypad and LCD interfaces, power failure circuits and battery backups. Eventually the final Alarm System Project for our computer shop was designed and built and may still be in operation today.
A few people asked why an alarm system has a power switch. The power switch shown is a necessary part of the alarm system prototype, but would never be on the final design! For those that asked exactly why it’s on there, well it helps when debugging code…if you’re testing the alarm and it won’t shut off, it’s the next best thing to a kill switch!
Prototype Alarm System by Chris Savage – Savage///Circuits is licensed under a Creative Commons Attribution 3.0 Unported License.