Motor Control with Meccano
Part 4a – Introducing the Stamp II
In the past few years, a hobby interest has developed which is much like
Meccano. This is an interest in the building of robots. In particular, the interest
is centered on intelligent robots. In some instances, these robots are
controlled by a computer having a cable connection between the robot and a
computer. In other instances, these robots have their own micro controller
circuits. Having its own micro controller allows the robot to be mobile and self
directed. This micro controller is programmable and can accept many types of
sensory input which results in an amazing performance.
One such micro controller currently available is the Stamp II, manufactured by
Parallax, Inc. It has captured the attention of the robot hobbyist and is
frequently used in their projects. It has the advantage of reasonable cost, small
size, ease of programming, and a wealth of available resource literature.
Courtesy of Parallax, Inc.
Figure 45: The Basic Stamp 2.
It is obvious that such a micro controller can be useful in the design and
construction of Meccano models. What is this micro controller called the
Stamp 2? The Stamp 2 is actually a small circuit board fitted with pins that
enable it to be mounted in a 24 pin DIP (Dual in-line Pin) socket. The top of
the circuit board contains a number of discrete devices which used together
gives the Stamp some very unique properties. The Basic Stamp #BS2-IC
runs at a speed of 20 MHz and contains 2K of memory in its EEPROM. The
memory is of sufficient size to permit 500 lines of PBASIC instructions. With a
RAM of 32 bytes and 16 I/O terminals this Stamp provides Meccano
enthusiasts with the ability to construct some rather awesome models.
Several scenarios for model action come to mind. Imagine a movable
platform built of Meccano that can be programmed to follow a precise track on
the floor, a track which can be changed through the program entered in the
Stamp's memory or by using a remote (IR) control. The platform could even be
programmed to avoid collision with any object in its path, or even a movable
platform when running on a table top can be programmed to stop when it
detects the edge of the table to prevent it's falling. All of this and more is
possible when using the Stamp to control a model. Robotic enthusiasts call
such a movable platform a "Bot." These Bots are the working models that
most robotic beginners use to learn micro controller techniques.
With its 16 input – output (I/O) connections, many input sensors can be added
to the movable platform. Any electrical sensor can be used from a simple
photo cell to detect light to a Hall-Effect sensor to detect the presence of a
magnetic field. Thermistors can be used to detect the presence and quantity
of heat; Load cells can be used to detect the weight of some object. Even
simple switches can be used for input to the Stamp.
Outputs can be made to lights, motors, relays, etc. Several types of motors
can be controlled by the Stamp. These would include the typical DC motor
used with Meccano, a stepper motor, an AC motor using line voltage (through
an intermediary device), or a R/C servo motor for positioning some part of the
Figure 46: Radio Control Servo Motor.
The R/C servo motor was developed for radio controlled aircraft and other
similar applications. It is a direct current motor which can rotate ¼ turn to each
side of the center position. Thus, it can position itself anywhere within an arc of
180 degrees. As yet seldom used in Meccano, it could be a very valuable
device in many models where it is desired to power a linkage to cause some
desired result. The servo motor is uniquely adaptable to control by the Stamp.
The output angle is directly controllable by the Stamp. It can be set to very
small increments so as to permit precise positioning.
A feature of the servo motor which should be of interest to Meccano is the
ability to rework the motor so that it will give continuous rotation. This is simply
done by opening the case of the servo and removing the retaining tabs. This
then results in a continuous turning DC motor whose speed and direction is
directly controlled by the Stamp. The Bots frequently use a pair of these servo
motors as the drive motors. A wheel disk is directly mounted on the output
shaft of the motor and this wheel disk serves as a wheel. The torque is
amazing for a motor of this size and could well drive a small Meccano moving
platform. Instructions for the modification of the servo motor are available on
line from the Parallax downloads.
There are three models of the Stamp 2 available. The BS2-IC which has been
discussed sells currently for US $49.00. The next model is the BS2-Ile
runs at the same speed as the IC but has an enlarged memory. Its EEPROM
has 16K bytes for a maximum of 4000 lines of PBASIC code. It's cost is US
$54.00. The BS2-SX-IC has all of the features of the IIe but boasts a speed of
50 MHz or 10,000 instructions per second. It's cost is US. $59.00. The
appearance of all of the Basic Stamps is much the same, and they all fit a 24
The Basic Stamp needs some support to work properly. First, there must be
some source of power. This can be either a 9 volt battery or a wall-pack to
provide 9 volts from the home power source. However, the wall mounted
transformer will restrict the free motion of the model in which case a battery
must be used. The drain of the Stamp is most moderate, only 7 ma. when
running and 50 micro amps when in the sleep mode.
The Stamp will need to be programmed. This is done by means of a PC
connected to the Stamp through a serial cable. Software furnished by Parallax
running in either MS Dos or Windows makes the task of programming easy to
accomplish. The Stamp has its own set of commands called PBASIC. This is
a set of commands which resembles Basic Language especially designed for
the Stamp. Anyone with just the barest minimum of programming experience
will have little difficulty with the programming in PBASIC.
The Stamp will need to be mounted in a socket with connections for the power
source as well as the serial connection to the PC. One of the best means of
accomplishing this and achieving flexibility in using the Stamp is to acquire a
board made for use in the educational environment. This is called "The Board
Figure 47: Board of Education with Stamp II.
This board is valuable in the design of the control system to be used in a
model. In fact, it can be used as is in a model since it measures only 3" x 4".
The plug-in board on the right side of the board allows one to construct
electronic circuitry to use with the Stamp. If one purchases the full kit as listed
by Parallax, included with the board is the wall-pack and the serial cable to
connect the board to the serial port of your PC. Also included are several
extras including the programming disk for your PC.
There are also auxiliary circuits available such as a real time clock which can
be used for various timing functions, an additional RAM plug in, or a Motor
Mind (motor drive) which can be most effective for Meccano models. The
Motor Mind can control a DC motor using up to 30 volts. It will support a surge
current of 3.5 amps and a continuous current of 2 amps. It is controlled by the
stamp and has controls for speed and direction, and even has a control for a
braking action with the motor. Tests have proven that it can be used to control
the M5 Meccano Motor. These auxiliary circuits are easily connected to the
stamp and their connectors can be inserted in the holes in the plug-in board
on the Board of Education.
The Robotic hobbyists have a discussion medium much like Spanner in which
they swap ideas, ask questions, etc. They have shown some interest in using
Meccano to construct their projects so feel free to communicate with them if
you have questions about the stamp. But, first you need to check the web site
First, click on Downloads, then go down to Parallax Videos. These avi files
show typical Bots in action following a line, etc. You can see from this just what
control you can have over the movement of your Meccano models. This is only
a small idea of what is possible.
Also you will find in the Downloads, much material that is of interest to those
who wish to utilize the Stamp 2 as a control device in their models. Included in
the rather long list of downloads are instructions for the Parallax Robotics Kit
which in addition to the kit of components to build the Bot, contains a
workbook with 6 activities to give some idea of what the Bot can do. Read this
and download it if you wish – it will give you some insight into using the Stamp.
The Reference Manual (V 1.9) is also available for download. You will be
interested in only pages 197 to 461 which deal directly with the Stamp 2. This
reference contains the complete commands for the programming of the stamp.
The robotic discussion group may be reached by clicking on Discuss/E-Mail.
This group runs much the same as Spanner and contains much valuable
If you have any questions, please feel free to contact the author,