■ PHOTO 1.
BS2 OEM
kit parts.
the BS2, but I chose this module because it is strongly
supported with free tutorials and programming
documentation from the Parallax website and numerous
online user groups. It programs in PBASIC which is easily
learned by hobbyists who are not experienced in
programming. After you’re finished experimenting with the
project described here, you will have the confidence and
skills to re-use the BS2 in other projects with programs
you create!
With the BASIC Stamp, FREQOUT
and DTMFOUT do all the work
The kit for the BASIC Stamp 2 OEM module (Parallax
part number 27291) is easy to assemble even for the novice
builder, and includes a PCB (printed circuit board) with all
the components and their locations clearly marked. It is
easily programmed via the on-board serial port in the
PBASIC language developed by Parallax. One of the unique
features of the BS2 is its ability to generate standard
touchtones, as well as custom MF tones using the PBASIC
commands DTMFOUT and FREQOUT which make it
possible to generate both standard telephone Touchtones as
well as any other single- or dual-frequency tones and
sequences. This micro module is well supported with free
reference materials and IDE (Integrated Development
Environment), and serves as a good intro to microcontrollers
and their practical uses (which will doubtless spur the user
to devise project ideas of their own). Finally, the BASIC
Stamp 2 is available from a number of sources.
Here you’ll learn how to interface the BS2 module with
■ PHOTO 3. Header pins (top view).
■ PHOTO 2. Header pins (bottom view).
a keypad, a few switches, and a handful of discrete
components, then load free open source firmware to make
your own unlimited tone generator box. The concept is
simple: The hardware checks the state of the 12 keys on the
keypad in a continuous cycle, along with monitoring the
state of the toggle and pushbutton switch; it then instructs
the BS2 to generate the appropriate touchtone or custom
tone(s) output via pin 0. By simply changing the values in
the software and loading it onto the BS2 via the integral
serial port, you can generate any single- and multi-frequency
tone(s)/sequences without changing the hardware. Tone
frequency, duration, pauses, and sequences can all be
modified according to your needs. (More on the
programming later.) Now, let’s build the PhreakEncoder!
The Build
Step 1: Assemble the BS2.
The BS2 OEM version comes complete with the PCB
and all necessary parts, and costs about $30 for the kit
form. (See Photo 1.) Assemble the module according to the
directions from Parallax ( www.parallax.com); however, do
not install the bank of 16 angled male header pins on the
lower edge of the board. This will permit direct wired
connections between these BS2 pin connections and the
keypad and control switches later.
There are several approaches you can use to assemble
this project. You can breadboard the BS2 and related
components if you intend on building the project as a
temporary setup. Or, if you’d like a more permanent
assembly you may want to house everything in a project
case like I did.
I chose to sandwich the BS2 module and keypad on
opposite sides of the project case lid. I soldered in a divided
row of 16 female header pins on the output tabs of the BS2
■ PHOTO 4. All header pins (side view).
October 2010 53