by Jon Williams
Putting the Spotlight on BASIC Stamp Projects, Hints, and Tips
An Industrial Cup o’ Joe
Real-world Control Through
Java — On a Stamp!
It's no secret that for as long as Stamp microcontrollers have existed, Stamp customers have been
very industrious ... and now, with a little help from the
Stamp PLC, Stamp users can have a nice product that will
help them get industrial.
The Stamp PLC isn't the first time Stamp modules
have been fitted for an industrial environment, but it does
offer a package that is more similar to large scale, high-dollar products — and is a good fit when a "standard" PLC
(and its expensive development software) isn't required.
One of my first "pro" uses of a BASIC Stamp was to
replace a $1,200.00 PLC that wasn't behaving as desired
(it was part of a trade show display). When the display
company couldn't reprogram the PLC (they had farmed
out that task), my boss asked me to "fix" it. I did by replacing the PLC with a BASIC Stamp 1 module and some tri-acs. My boss was happy, the display looked and worked
great, and my employer saved about $1,150.00.
The Stamp PLC was developed for Parallax by Lawicel
Figure 1. Inside the Stamp PLC.
NUTS & VOLTS
HB of Sweden. Lawicel HB specializes in industrial applications and has found the BASIC Stamp quite useful in
many projects. With their considerable expertise, they've
designed an elegant, industrialized enclosure for 24-pin
Stamp modules that fully protects the inputs and outputs
(optical isolation), has visual indicators for digital I/O
ports, provides for an optional four channel, 12-bit ADC,
and has a clean power supply for the circuitry. As would
be expected, the Stamp PLC mounts on a standard DIN
rail, and can be powered with 18 to 36 volts DC ( 24 VDC
is standard for industrial applications). Finally, professionals will appreciate that the Stamp PLC meets the requirements to carry the CE certification mark.
Since we're starting a new year, I thought I'd try something different. As the code for the Stamp PLC is not particularly complex, what I thought I'd do is compare code
for two different Stamp modules: the stock BS2 and the
Javelin Stamp (my choice for Stamp PLC projects).
Whoa ... this is different; two languages in one article.
Yes, it is. The reason for it though is that many BASIC
Stamp users have been experimenting with the Javelin
and some are not being as successful as they would like
to be right out of the gate. Part of that is human nature;
the BASIC Stamp is very easy to use and the Javelin
Stamp is quite a sophisticated little beast and takes a bit
of time getting used to, especially for those that haven't
programmed in Java or C. That doesn't mean that the
Javelin is difficult to use, it's just different. By looking at
listings side-by-side, it may help those wanting to work
with the Javelin get up and running, ultimately taking
advantage of some of the Javelin's unique features.
Do keep in mind that the Javelin is still a new kid on the
block, and has a lot of really great features that aren't yet
available in BASIC Stamps. The timer object, for example, is
very useful in the Stamp PLC and you'll see how it gets used
to set the I/O scan and process interval to a specific rate.
Okay, then, let's crack open the Stamp PLC and get started.
Pick a Stamp ... Any 24-pin
To be perfectly honest with you, one of the trickiest
aspects of the Stamp PLC is opening the enclosure so