-
- Introduction
- This little project revolves around the interfacing of the HP48 with Parallax's Basic
Stamp microcontroller and Dallas Semiconductor's DS1620 digital thermometer chip. The
DS1620 is an inexpensive(~$6) and fairly accurate(+/- 1 degreeC) chip packaged neatly in
an 8-pin DIP. The chip uses a 3 wire serial communication which can be interfaced directly
to the Basic Stamp with minimal parts support(1 resistor and 1 capacitor). The Basic
Stamp reads the temperature from the DS1620 and outputs the reading via a RS-232 port to
the connected HP48. The HP48 then takes the temperature data and does some conversion then
you can have the option of doing something with the data. Like displaying it or return the
temperature as a value to the stack or time stamp each measurement for logging purposes.
-
- Construction
- Making a probe out of the DS1620 required a little ingenuity. First, I mounted a 8-pin
IC socket on a small piece of PCB cut out to fit into the slotted end of a 9-pin DSub
shell. The PCB was etched out for the 8-pin socket where wires would also be attached from
the backside. I then
proceeded to mount the capacitor on the backside (copper-side) of the PCB. Using a 5
conductor shielded computer cable, I attached the resistor to one of the leads. With all
the leads cut to the same length, I soldered each to their respective pins on the backside
of the PCB. With all the connections made, I housed the sensor in the plastic 9-pin DSub
shell. If you plan to use the sensor in a hostile environment, I would recommend
filling the shell with epoxy. With the shells I used, it was necessary to shim the wire
anchor, since I was using a narrow diameter cable. With
all the support components mounted within the shell, it was only necessary to attach the
wires to the Basic Stamp. In my case, I was using a Basic Stamp II with the carrier board
which conveniently has a built-in RS-232 port, a 9-volt battery clip and a male header for
external pin connections. I soldered the wires from the probe to a set of female
headers and plugged
them into the carrier board's header pins. One set for the I/O pins and the other for
power. The same RS-232 port that would be used in programming the Basic Stamp would also
be used to connect to the HP.
-
- Software Interface
- The Basic Stamp requires a small program in order to get readings from the DS1620. The
DS1620 has a few undocumented features which allows you to get temperature readings with a
higher resolution. This particular feature is useful when you want to know the relative
temperature change. Take note, this has nothing to do with accuracy. The rated
accuracy is +\- 1 degreeC over the range of -55 to +125 degreeC. Basically, the stamp will
read three parameters, the temperature and two counter values. The three values along with
a start marker will be sent serially to the HP48. The start marker is necessary to mark
the beginning of the three parameters in order to separate each successive reading.
On the HP side, I wrote a small library to read the serial port and to take the three
parameters and convert them to a meaningful temperature. Depending on which command you
run, you can either display the temperatures as they are being read-in, or take one
reading and return the converted temperature to the stack, or take one reading and return
an array containing a Julian day time stamp along with the converted
temperature.
-
- Practical Use
- There are countless applications for this project but one of the more interesting
features is the ability of the HP to log at certain times and intervals. You could set a
control alarm to log anywhere from 10s intervals to weekly intervals. 10s is the minimum
interval because it takes about 5s to acquire a reading. When you finish logging or want
to inspect the data, you can graph it directly using a scatter plot and observe any
trends, anomalies, etc. How you want to implement the project is up to you, so send me a
note if you have done something interesting. Good luck!
-
- Download Software
- Therm v1.0 - HP48 library to interface with the Basic
Stamp.
- bstherm.bs2 - Basic Stamp II code to interface with
the DS1620 and HP48.
|