This is only a preview of the June 1997 issue of Silicon Chip. You can view 31 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 "Colour TV Pattern Generator; Pt.1":
Items relevant to "High-Current Speed Controller For 12V/24V Motors":
Items relevant to "Build An Audio/RF Signal Tracer":
Articles in this series:
Articles in this series:
Items relevant to "Manual Control Circuit For A Stepper Motor":
Articles in this series:
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
A PC-controlled
thermometer/thermostat
Consisting of just a few parts, this simple
project plugs into your PC’s printer port and
is a fully working digital thermometer and
thermostat. The accompanying software
generates the on-screen display and lets you
adjust the thermostat settings.
By MARK ROBERTS
This little project is ideal for use as
a thermostat in an industrial control
system and once programmed, it can
operate independently of the PC.
Alternatively, you could use it to just
give a digital readout of the current
temperature on your PC’s screen.
It’s the software that does all the
10 Silicon Chip
hard work here. As well as generating the on-screen display, it displays
the current temperature and lets you
set the high and low trip points for
the thermostat just by clicking a few
buttons. We’ll take a closer look at
this shortly.
By using software control, the
hardware requirements are kept to
an absolute minimum. In fact, all the
parts except for a single IC are housed
in the backshell of a DB25 connector.
Circuit details
Fig.1 shows the circuit details of
the Digital Thermometer/Thermostat,
together with an optional relay driver circuit. The IC, which forms the
heart of the hardware, is a DS1620
Digital Thermometer & Thermostat
(IC1) from Dallas Semiconductor –
see Fig.2. This programmable device
measures temp
er
atures from -55°C
to +125°C in 0.5°C increments and
has three “alarm” outputs designated
THIGH, TLOW and TCOM.
In operation, THIGH goes high (ie,
switches from logic 0 to logic 1) when
the temperature exceeds a user-de-
fined upper limit. Conversely, TLOW
goes high when the temperature falls
below a preset lower limit. The third
output, TCOM goes high when the
temperature exceeds the upper limit
and stays high until the temperature
falls below the lower limit.
These three outputs can be used to
directly control heating and cooling
appliances via suitable driver circuitry (eg, relays and optocouplers).
Data is read from and written to the
DS1620 via a 3-wire serial interface
(CLK, DQ & RST). In addition, the
user-defined upper and lower trip
points are stored by the IC in a nonvola
tile memory. This means that
the IC can be programmed before
building it into a control system.
Alternatively, the IC can be interfaced
to a microprocessor (or left connected
to a computer), so that the trip points
can be quickly adjusted to suit the
process.
In this circuit, IC1’s clock and reset
inputs (pins 2 & 3) are driven via pins
3 & 9 of the parallel port, respectively.
Pin 1 is the data (DQ) input and this is
driven by pin 2 of the parallel port via
diode D1 and pulldown resistor R1.
The outputs from IC1 – T HIGH,
TLOW & TCOM – are connected back to
pins 11, 12 & 13 of the parallel port,
respectively. This allows the software
to read the values on these lines and
adjust the on-screen display accord-
The software lets you set THIGH and TLOW just by clicking the Min and Max
buttons. Note that the TLOW indicator (at right) has come on here because the
measured temperature is at TLOW.
ingly. In addition, each output controls an NPN transistor (eg, BC327)
in the suggested relay driver circuit.
Transistor Q1 is driven by pin 7 (the
THIGH output) of IC1. Normally, THIGH
is low and so Q1 and RLY1 are off.
However, if the monitored temper-
ature exceeds the preset maximum,
THIGH switches high and so Q1 turns
on and switches on RLY1 to control
the process. At the same time, TCOM
also goes high and this turns on Q2
and RLY2.
If the temperature now drops below
Fig.1: the circuit is based on the DS1620 Digital Thermometer/Thermostat IC from Dallas
Semiconductor and uses just three components. Also shown here is a suggested thermostat
control circuit based on three transistors and three relays.
June 1997 11
the preset maximum, THIGH switches
low again and Q1 and RLY1 both turn
off. However, TCOM remains high
until the temperature drops below
the preset minimum, as which point
it switches low again and Q2 turns
off. TLOW now goes high and turns
on Q3 and RLY3.
In practice, you can use one or more
of these outputs to control a fan or a
heating appliance to suit your application. For example, you could use the
TCOM output to activate a fan when
the temperature exceeded THIGH. This
fan would then remain on until the
temperature dropped below TLOW. It’s
up to you how you use the outputs.
Construction
Fig.3 shows the wiring details for
the unit. As can be seen, the two internal components (R1 and D1) are
soldered directly to the pins of the
DB25 connector, while the IC is con
nected via eight flying leads. These
flying leads are best run to an 8-pin
socket, so that the IC can be easily
removed after programming.
Software
The software comes on three floppy
discs and runs under Windows 3.1x
Windows 95. It’s easy to install – you
simply run the Setup.exe file on the
first disc (within Windows) and follow the on-screen instructions.
The accompanying screen grabs
show the control panel that appears
when you boot the thermometer/
thermostat program (Therm.exe). As
Fig.2: block diagram of the DS-1620 Thermometer/
Thermostat.
12 Silicon Chip
Fig.3: the circuit is built by directly wiring it to a
DB-25 male connector.
Both the THIGH and TCOM indicators come on when the
measured temperature reaches THIGH, as shown here.
shown, the current temperature is directly displayed (both as a direct readout and on a dial) and you can easily
set THIGH and TLOW by clicking the
appropriate Min. and Max. buttons.
You can also choose an alternative
printer port (LPT2).
The control panel also shows the
status of the outputs. This lets you
program the unit and then check that
everything is working correctly. Once
the unit has been programmed, you
can unplug it from the computer and
use it in your application.
Note that pin 8 of the DS1620
must be connected to the +5V rail
when used in the thermostat mode
(ie, disconnect pin 8 from the DB25
SC
connector).
Once it turns on, the TCOM indicator stays on until the
measured temperature falls below TLOW.
Where To Buy Parts & Software
Parts and software for this design are available as follows:
(1). DS1620 Thermometer/Thermostat .................................................$12
(2). DS1620 Thermometer/Thermostat with programmed TLOW
and THIGH (you specify) ..................................................................$15
(3). Software (read current temperature, TLOW & THIGH only) ............... $15
(4). Software (full read/write version) ....................................................$25
(5). Optional LPT2 interface card for PC ...............................................$15
Please add $5 for postage. Payment by cheque or money order only to:
Mr Softmark, PO Box 1609, Hornsby, NSW 2077. Ph/fax (02) 9482 1565.
Note: the software associated with this project is copyright to Mr Softmark
and may not be copied without permission.
PARTS LIST
1 DS-1620 Thermometer/
Programmer software (3-disc
set for PCs)
1 DB-25 male connector with
backshell
1 8-pin IC socket
1 DS1620 Digital Thermometer/
Thermostat (IC1)
1 1N4184 silicon diode
1 1kΩ 0.25W resistor
Optional thermostat
3 5V relays (RLY1-RLY3)
3 BC337 NPN transistors
(Q1-Q3)
3 1N4004 silicon diodes (D2-D4)
3 2.2kΩ 0.25W resistors
3 1kΩ 0.25W resistors
This close-up view shows how the parts are wired to the DB-25 connector. Note
that the final version differs slightly from this early prototype.
June 1997 13
|