This is only a preview of the April 2000 issue of Silicon Chip. You can view 33 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "A Digital Tachometer For Your Car":
Items relevant to "RoomGuard: A Low-Cost Intruder Alarm":
Articles in this series:
|
Do you need to track
temperatures inside a coolroom, a shipping container
or inside a factory or
warehouse? This low-cost
logger is set up using a PC
and can record up to 2048
measurements. The
accompanying software lets
you display the results as a
table or in graphical form.
Design By MARK ROBERTS
Temperature Lo
L
OW COST, portability and versatility are the key features of
this temperature recorder project. All components are mounted on
a single PC board measuring only 57
x 60mm, which means that it could
be placed just about anywhere that
temperature monitoring is required.
No external connections are required
during operation, as the recorder
is powered by an on-board battery
and all measurements are logged in
non-volatile memory.
The recorder board plugs directly
into the parallel port of your PC to
allow setup and data retrieval. Windows-based software makes the task
straightforward and even includes
charting and graphing facilities.
The measurement range is from
-40°C to +85°C in 0.5°C increments
and a total of 2048 measurements can
be logged in memory. Also included is
a histogram feature which provides 63
data bins with 2°C increments. Both
temperature logging and histogram
tabulation can be programmed for
72 Silicon Chip
sampling intervals of once per minute
to once every 255 minutes.
Circuit details
A Dallas DS1615 temperature
recorder IC does all the work (see
Fig.1). The actual temperature sensor
is contained on-chip, as is a real time
clock/calendar, non-volatile memory,
a serial interface and the associated
control logic (see Fig.2).
The DS1615 can source power from
either its VCC or VBAT pins. When the
VCC pin is higher than VBAT, the entire chip is powered from VCC. When
the VBAT pin is higher than VCC, the
VBAT pin powers everything except
the serial interface circuitry.
Two TTL output lines from the
PC parallel port supply power to the
VCC pin via a 100µF capacitor. At
first glance this might seem to be a
rather unorthodox approach but as
the DS1615 draws little current it
does the job.
A 3.6V lithium battery powers the
temperature recorder when it’s not
connected to a PC. With the serial
interface powered down, current is
really only consumed during a temperature conversion cycle, when it
peaks at a maximum of 600µA. This
drops to a couple of µA between
conversions, which is probably less
than normal battery leakage. As you
can see, the sample rate ultimately
determines battery life.
Communication with the DS1615 is
via the PC parallel port and a 3-wire
synchronous serial bus. Transfers are
initiated when the RST pin is driven
high. Data is clocked in/out of the I/O
pin by high-low-high pulses on the
SCLK pin, with a maximum transfer
speed of 2Mbps.
On the PC side, data is received
on parallel port pin 10 and transmitted on parallel port pin 6. When
the DS1615 is transmitting data, the
software writes a low to pin 6 of the
parallel port to reverse bias diode D1.
As a matter of interest, the DS1615
also provides an asynchronous serial
interface (on pins TX and RX), suita-
Fig.1: the circuit is based on the Dallas DS1615 temperature recorder IC. The device is self-powered and is plugged
into the parallel port of a PC for setup and data retrieval.
ogger
ble for interfacing to a PC serial port
or modem. However, neither the PC
board nor software provide support
for this connection method.
Pushbutton switch S1 performs
double duty. When it is pressed, data
logging is initiated and the red and
green LEDs flash simultaneously four
times to indicate acknowledgment.
Alternatively, if data logging is
already under way, pressing S1
instructs the DS1615 to check its
temperature alarm status. If all the
samples recorded to that point are
within the lower and upper temperature range (programmed during setup), the green LED flashes four times
(INSPEC). If any sample exceeded the
thresholds, the red LED flashes four
times (OUTSPEC).
Of course, the software can also
perform all these functions and more
but the switch and LEDs provide a
quick way of checking temperature
alarm status without having to plug
the recorder into a PC.
What about the yellow LED? This
LED illuminates whenever the INT
pin is driven low in response to a
temperature and/or time of day alarm.
Once active, the INT pin remains so
until cleared under software control.
You will probably want to disable
this feature to maximise battery life.
Alternatively, the INT output could
be interfaced with other low-power
CMOS logic for remote temperature
alarm monitoring.
Finally, a 32.768kHz watch crystal
together with an internal oscillator
provides the timebase for the DS1615s
clock/calendar circuitry.
If you would like to delve more
deeply into the internal workings of
the DS1615, the complete datasheet
is available for download from the
Dallas Semiconductor website at
www.dalsemi.com
Construction
With only a handful of components,
this could be the simplest project
you’ve ever constructed!
First, carefully check the PC board
for shorts between tracks. This is particularly important as the battery is a
high-energy lithium type and won’t
cope well with a short circuit!
Fig.3 shows the full-size compo-
Fig.2: block diagram of the DS1615 Temperature Recorder IC
internals. Even the temperature sensor is located on-chip.
April 2000 73
you must, a word of warning - it
will probably need to be quite short
due to the low-cost design of the
interface.
Another point we should mention is that if you come in contact
with any of the connections on
the PC board while the DS1615
is recording, data corruption may
result. To reduce the chances of
this happening, a piece of insulating material could be attached
to the solder side of the board, or
you might opt to fashion a simple
enclosure (open to free air, of
course!).
Fig.3: the full-size component overlay
for the Temperature Recorder. Link L1
functions as the on/off switch.
nent overlay. As usual, install the
links, resistors and diode first, followed by the crystal and LEDs. Note
that depending on the revision of PC
board you receive, you may notice a
diode (D2) shown on the silk screen
overlay next to IC1 – do not install
anything in this position.
We recommend socketing the
DS1615, so install the IC socket next.
The D-connector and 2-way header
pins for LK1 can be installed next but
don’t install the jumper shunt just yet.
Now install the capacitors, switch and
battery. Finally, plug in the DS1615
IC (carefully noting its orientation)
and install the jumper shunt on LK1.
The Temperature Recorder PC
board is designed to plug directly
into the parallel port connector on
your PC. We don’t recommend using
a cable to make the connection but if
Software
Software suitable for Windows
95/98 and Windows NT is provided
on four floppy disks. To install it, run
the Setup.exe file on the first disk and
follow the on-screen instructions.
Click on the Start button and select
Programs, DS1615 Temperature Recorder to launch the program. Every
time the software is launched, a dialog
box appears that allows you to select
which port the recorder is connected
to (LPT1 or LPT2).
A total of six tabulated windows
provide easy access to all software
functions. First stop is the Time/
Alarm window, as this allows us to
set the DS1615’s clock and calendar
(Fig.4). Clicking on the red circle
at the bottom of the calendar automatically sets the date to match the
current PC date. The time must be set
manually using the up/down arrows
next to the time display.
The Time/Alarm window also al-
Fig.4: clicking on the red circle at the bottom of the
calendar automatically sets the date to match the current
PC date.
74 Silicon Chip
Parts List
1 PC board, 57 x 60mm
1 DB-25 PC-mount male
connector (CON1)
1 3.6V PC-mount Lithium battery
1 16-pin IC socket
1 32.768kHz crystal (X1)
1 4-disk software package
Semiconductors
1 DS1615 temperature recorder
IC (IC1)
1 1N4148 diode (D1)
1 subminiature red LED (LED1)
1 subminiature green LED (LED3)
1 subminiature yellow LED (LED2)
Capacitors
1 100µF 16VW PC electrolytic
1 0.1µF monolithic ceramic
Resistors (0.25W, 5%)
4 2.7kΩ
1 1kΩ
Where To Buy The Parts
Full kit (hardware & software.....$65
PC board only.............................$6
Payment by cheque or money order
to Softmark, PO Box 1609, Hornsby
NSW 2077. Phone/fax (02) 9482
1565; email softmark<at>ar.com.au
Please add $6 for postage.
Website: www.ar.com.au/~softmark
lows us to alter the DS1615 control
register bits. Let’s briefly examine
each of these settings:
(a) The Disable Oscillator setting
Fig.5: the temperature alarm is set here. If an alarm
condition occurs, the respective indicator changes colour.
The settings can’t be altered once recording is under way.
The DB-25M connector mounts on the PC board, so that
you can plug the unit directly into the PC’s parallel port.
shuts down the DS1615s internal
oscillator if it’s not in the process of
logging data. The chip enters standby
mode, drawing only about 0.2µA.
(b) The Clear mem-Enable setting
enables clearing of all internal memory including datalog and histogram
memory (a clear memory command
can be issued from the Graph window).
(c) Pushbutton switch S1 (see hardware section) can be enabled or disabled with the Start Ext-Enable setting.
(d) The Roll Over setting, if select
ed, allows data recording to “wrap
around” when memory is full (ie after
2048 samples).
(e) Finally, hitting the SAVE NEW
button saves the current settings
(including the alarm time) in a file
called DS1615.ini in the C:\Windows
Fig.6: temperature sampling is set up and initiated from
this window. Note that if a recording is in progress,
clicking in the START LOGGING button actually stops
recording.
directory. This initilisation file is automatically loaded each time the software is started. Note that if recording
is in progress when you change any
of the settings, it will be terminated
when the software writes the changes
to the DS1615.
As mentioned in the hardware
description, the DS1615 includes a
temperature alarm feature. This is
programmed in the Temperature window (Fig.5). The indicators marked
“THigh”, “TLow” and “Time” display
current alarm status. Note that the
“Time” indicator is associated with
the time of day alarm, which is set in
the Time/Alarm window.
Recording settings are found in
the Graph window (Fig.6). Both the
sampling interval (Sample Ratio) and
delay until first sample can be set
Fig.7: a variety of graph types and colours are supported
in the histogram-plotting feature.
here. Clicking on the START LOGGING button initiates the recording
cycle. Once at least one sample has
been performed, clicking on the READ
button retrieves datalog memory and
displays the readings on the graph.
Note that the Total Samples value
is the total number of samples ever
performed. This value can be zeroed
by disconnecting the battery.
Histogram memory is retrieved and
displayed in the Histogram window
(Fig.7). There are no surprises here,
so let’s skip over to the Logging window (Fig.8). Clicking on the Read Log
button reads datalog memory and
creates a log file called DS1615.txt
in the root directory of your C: drive.
This file could easily be imported into
a spreadsheet or database for further
SC
processing.
Fig.8: log files can be created, viewed and printed from
the logging tab.
April 2000 75
|