This is only a preview of the February 1995 issue of Silicon Chip. You can view 28 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. Articles in this series:
Items relevant to "50-Watt/Channel Stereo Amplifier Module":
Items relevant to "Digital Effects Unit For Musicians":
Articles in this series:
Articles in this series:
Items relevant to "Build An Oil Change Timer For Your Car":
Articles in this series:
|
The HexTemp
is a 6-channel
thermometer which
allows the observation
of temperatures in six
locations within a 10
metre radius. It could
be used for keeping a
check on the operation
of air conditioning,
solar heaters,
greenhouses, small
animal enclosures &
fish tanks.
Build the HexTemp: a
6-channel thermometer
By JOHN WESTERN
Temperatures on the Hextemp are
displayed in the range of 0-50°C with
a resolution of 0.2°C; eg, 23.6, 24.8,
34.2, etc. The liquid crystal display
(LCD) initially shows all six readings
at once but can also be cycled through
individual sensors to display the
current temperature, together with
the maximum and minimum temperatures.
In total, there are seven different
display screens which can be cycled
through using the SEL switch. The
maximum and minimum readings for
each channel are cleared by pressing
the CLR switch when that channel is
displayed.
If the temperature exceeds 50°C, the
display will show ++.+ and if the temperature drops below 0°C, the display
will show —.-.
The circuit consists of a 68HC11A1
microcontroller, a 16-character by 2line LCD panel, six current to voltage
40 Silicon Chip
converters and the power supply.
The microcontroller has 256 bytes of
RAM, 512 bytes of EEPROM, five I/O
ports and an 8-bit 8-channel analog to
digital converter, all on the one chip.
The LCD has a built-in microprocessor
and accepts data and instructions via
an 8-bit parallel interface.
Circuit description
IC5, an LM336 precision voltage
reference, is used to provide +5V to
pin 52 of IC4, the 68HC11. IC5’s output
is also divided by two, buffered by op
amp IC2d and fed to the six current to
voltage converters. Only two of these
are shown on the circuit diagram; ie,
IC6 & IC2b and IC11 & IC1a. VR13 allows the output from IC5 to be adjusted
for precisely 5V.
The temperature sensors IC6 and
IC11 (and ICs7-10, not shown on the
circuit) are LM334 adjustable current
sources, arranged so that their current
increases by one microamp (1µA) for
each 1°C rise in temperature above
absolute zero; at 0°C, the current will
be 273µA.
To simplify matters, let us on concentrate just on sensor IC6 and its
accompanying op amp, IC2b. IC2b
is connected as a current to voltage
converter so that its output increases
by 100mV for every one degree temperature rise above 0°C, as sensed by
IC6. Trimpot VR1 is used to set the
output of IC2b to 0V at 0°C, while
trimpot VR7 is used to calibrate the
sensor against steam; ie, at 100°C.
This latter calibration is done as a
voltage measurement, as the LCD is
over-ranged at this temperature.
The output of IC2b is then fed via
a 10kΩ resistor to one of the A/D inputs of the 68HC11, in this case, pin
43. Each of the five other temperature
sensors is connected in the same way,
and the current to voltage converters
+12V
+5V
REF
2.7k
+12V
4
13
VR13
10k
IC2d
12 LM324
11
10k
A
IC5
LM336
10k
VCC
VR7
5k
14
VR1
1k
8.2k
220
IC2b
5 LM324
45
220W
4.7k
2
IC1a
3 LM324
T1
AL7VA
IN
BR1
12V
IN
12V
1000
N
IN
CASE
470
1
REG1
7812
REG3
7905
GND
OUT
REG2
7805
PE0
10k 46
RN2/1
4.7k
OUT
IC3
S8054
OUT
51
VRL
37
12
36
13
35
14
PC0 9
PC1 10
4
PB6
5
6
PC2 11
2
VCC
D0
D1
LCD
D2 MODULE
D3
D4
D5
D6
D7
RS
R/W
E
GND
1
BL
-V
K
RN2/3-7
5x4.7k
PC3 12
PC4 13
VCC
PC5 14
PC6 15
VCC
17 RESET
PA1
0.1
10M
8
X1
8MHz
18pF
18pF
Fig.1: the circuit uses six LM334 constant current sources to monitor
temperature. These are connected to current to voltage op amp stages which
then feed the A/D inputs of the microprocessor. This processes the readings &
drives the LCD panel.
operating clock for the chip. The LCD
panel is connected to ports B & C of the
68HC11, with port B being used as an
8-bit data path and bits 0-2 (three lines)
of port C used for the control lines. Port
A is used to read in the condition of
the SEL and CLR front panel switches.
Unused port lines are held high with
4.7Ω pull-up resistors in SIL resistor
networks RN1 & RN2.
The LCD panel is available with
or without backlighting. The backlit
version should be used for vertical
EXTAL
XTAL
4.7k
34
S1
S2
33
PA2 32
PA7 27
7
10
4.7k
PA0
VCC
0.1
-5V
drive pins 44, 45, 46, 47 and 49 of IC4.
The 68HC11 is supplied with a reset
signal on pin 17 by IC3, an S8054 low
voltage detector. When the +5V supply
to IC4 drops to +4.6V or below, it is
reset by IC3. This is required because
a program not executing the correct
instructions during power down
could accidentally erase the 68HC11’s
EEPROM.
An 8MHz crystal, X1, is connected
to pins 7 & 8 of the 68HC11 and is
used to provide the 2MHz internal
11
PB5
PE5
52 VRH
IN
MULTI CHANNEL THERMOMETER
10
38
A
BL +V
VO
PC7 16
+12V
10
39
PB3
PE4
VCC
10
9
PB7
GND
10
40
IC4
68HC11A1
1
10
GND
8
PB4
PE3
V-
OUT
7
41
PB1
PE2
3
42
PB0
PE1
8.2k
-5V
LM334
GND
E
91k
+5V
REF
A
V- R V+
VIEWED FROM BELOW
240V
AC
49
44
G I O
A
47
1 AND 6 OF SIX
TEMPERATURE SENSOR
CIRCUITS
33
VR14
10k
PB2
VR6
1k
V+
IC11
LM334 R
LM336
10k 43
18 19
V-
VR12
5k
S8054
7
8.2k
-5V
8.2k
1
91k
6
V+
IC6
LM334 R
-5V
4.7k
RN1/1-7
7x4.7k
VCC
PD5 25
PD4 24
PD3 23
PD2 22
PD1 21
PD0 20
MOD MOD
B VDD
A
26
2
3
mounting and is also more useful in
low ambient light conditions. The
viewing angle of the non-backlit
version makes it more suitable for
horizontal mounting.
A standard linear power supply is
used to provide +5V, +12V and -5V to
the various circuits. The 7805 voltage
regulator requires a small heatsink.
The power transformer used is an
Arlec AL7VA/24 and it is mounted on
the printed circuit board.
Software
The 68HC11’s contains a machine
language program that makes the
whole thing work. The program has
February 1995 41
The 68HC11 microprocessor is mounted in a 52-pin carrier socket, while
16-way & 3-way pin headers are used to interface the LCD panel & the two
switches to the PC board. Make sure that the mains cord is securely anchored
& that all polarised components are correctly oriented.
routines that convert the voltages to
numbers, send the correct information
to the LCD, interrogate the switches
and generally manage things.
The A/D converter produces a
number from 0 to 255 which represents the analog voltage applied. This
number must then be multiplied by
a scale factor to produce the desired
output. As only 256 different values
are produced, it is only possible to
display this number of temperatures.
Hence, instead of temperatures being
displayed in 0.1 degree steps, for
example, the temperature display
may skip from 11.2 to 11.4 and not
show 11.3.
Construction
The HexTemp is housed in a folded
steel box measuring 110 x 62 x 180mm.
The LCD panel and two pushbutton
switches are mounted at one end while
a PC board measuring 150 x 102mm accommodates all of the circuitry except
for the six remote sensors. The case
will need to be drilled and a cutout
made for the LCD panel. This should
be done before any work is done on
the PC board.
Assembly of the PC board is
straightforward except for the need
to fit a carrier socket for the 68HC11.
We suggest that you first fit all the
PC pins and wire links, then the
resistors and capacitors and then
the semiconductors and the 52-pin
socket for the microprocessor. Leave
the on-board power transformer and
the 68HC11 till last. Make sure that
you correctly orient the ICs and the
polarised capacitors.
Note that trimpots VR1 to VR6 are
RESISTOR COLOUR CODES
❏
No.
❏ 1
❏ 6
❏ 8
❏
12
❏ 8
❏ 1
❏ 6
❏ 1
42 Silicon Chip
Value
10MΩ
91kΩ
10kΩ
8.2kΩ
4.7kΩ
2.7kΩ
220Ω
33Ω
4-Band Code (1%)
brown black blue brown
white brown orange brown
brown black orange brown
grey red red brown
yellow violet red brown
red violet red brown
red red brown brown
orange orange black brown
5-Band Code (1%)
brown black black green brown
white brown black red brown
brown black black red brown
grey red black brown brown
yellow violet black brown brown
red violet black brown brown
red red black black brown
orange orange black gold brown
multi-turn types, to take account of the
sensitivity of the zeroing adjustment of
the op amps. All the other trimpots are
horizontal single-turn types since their
adjustment is not critical.
Header sockets will need to be installed
on the PC board for the connections to
the two pushbutton switches and to the
LCD panel.
The 3-core mains flex should be anchored with a cord-grip grommet and
the green/yellow Earth wire connected
directly to a solder lug at the rear of the
case. The Active and Neutral wires are
soldered directly to the PC board. Place a
layer of insulation tape over the AC mains
connections on the board. The board is
mounted in the case using four 9mm PC
standoffs.
S1
LCD MODULE
33
10uF
0.1
4.7k
10k
10k
RN1
IC5
2.7k
VR13
10k
10k
10k
IC2
LM324
SENSOR 1
IC3
S8054
IC4
68HC11A1
RN2
10k
1
1
VR7
91k
8.2k
2x
18pF
VR1
8.2k
VR2
10uF
VR9
IC1
LM324
SENSOR 5
8.2k
VR6
8.2k
91k
8.2k
4.7k
VR12
VR11
POWER
TRANSFORMER
VR5
GND
N
N (BLUE)
8.2k
Fig.2: the wiring
diagram of the
HexTemp. Note that the
connections to the LCD
panel go via header
sockets. Trimpots VR1VR6 should be multiturn types.
1000uF
10k
10k
1
SENSOR 6
REG2
470uF
4.7k
VR10
REG
1
10uF
BR1
4.7k
VR3
10uF
91k
VR4
91k
4.7k
91k
SENSOR 4
REG3
8.2k
8.2k
8.2k
8.2k
8.2k
SENSOR 3
10M
1uF
4.7k
EARTH LUG
ON CASE
REAR
2V0VAC
A
A(
BR
OW
N)
VR8
8.2k
SENSOR 2
91k
4.7k
X1
Testing & calibration
When power is applied, the display
should show six readings between 00.0
and 50.0. Pressing the SEL switch should
step through the seven display screens.
The CLR switch should turn the maximum reading to 00.0 and the minimum
reading to 50.0. If all seems to work properly then the calibration can be performed.
First adjust trimpot VR13 so that the
+5V REF line is exactly 5V. Each channel
should then be calibrated in the following
manner, as for sensor IC6. Place the sensor
in a thermos flask of ice water, with the
sensor below the floating ice. Measure the
voltage at the output of IC2b and adjust
trimpot VR1 to obtain 0V.
Next, place the sensor in steam coming
from a boiling kettle and adjust VR7 for an
10uF
0.1
PROG
CONN
VR14
4.7k
Sensors
The six sensors are each wired with
the 220Ω current setting resistor soldered
between the R and V-pins. The V+ pin is
connected to the centre wire of a length
of shielded cable, while the V- pin is connected to the shield. Once the connections
are made, the sensor leads are protected
with a short length of heat-shrink tubing,
as shown in the lead photo.
Each of the six temperature sensors is
connected via its shielded cable to the
appropriate PC pins on the board.
Before installing the 68HC11 into its
socket, do a voltage check on all the socket
pins. These should all be at +5V or 0V,
apart from the A/D inputs which will
depend on the outputs from the op amps.
If all is OK, the 68HC11 can be plugged
into its socket and the LCD panel can be
connected to the board. Check the LCD’s
power connections carefully as reverse
polarity will destroy it!
A
K
GND
+5V
CON
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
A
K
GND
+5V
CON
RS
R/W
E
D0
D1
D2
D3
D4
D5
D6
D7
S2
N/
REE )
E (GLLOW
YE
CORD
GRIP
GROMMET
February 1995 43
PARTS LIST
1 folded metal case, 110 x 62 x
180mm
1 PC board, 150 x 102mm
1 8MHz crystal
1 Arlec AL7VA/24 transformer
1 LCD panel (Altronics Cat
Z-7299; backlit version Cat
Z-7301)
2 pushbutton SPST switches
1 52-pin PLCC socket
1 3-pin header & plug
1 16-pin header & plug
1 small TO-220 clip-on heatsink
4 PC supports
13 PC pins
4 9mm spacers (for LCD panel)
1 3-core mains cord & moulded
3-pin plug
1 cordgrip grommet to suit mains
cord
1 grommet (for sensor cable
entry)
2 SIL 7 x 4.7kΩ resistor
networks (RN1, RN2)
2 10kΩ trimpots (VR13,14)
6 5kΩ trimpots (VR7-11)
6 1kΩ multi-turn trimpots (VR16)
Semiconductors
2 LM324 operational amplifiers
(IC1, IC2)
1 S8054 low volt detector (IC3)
1 programmed 68HC11A1
microcontroller (IC4)
1 LM336 5.0V voltage reference
(IC5)
6 LM334 constant current
sources (IC6,7,8,9,10,11)
1 7812 voltage regulator (REG1)
1 7805 voltage regulator (REG2)
1 7905 voltage regulator (REG3)
1 W04 bridge rectifier (BR1)
Capacitors
1 1000µF 25VW PC electrolytic
1 470µF 25VW PC electrolytic
5 10µF 25VW PC electrolytic
1 1µF 25VW PC electrolytic
2 0.1µF MKT polyester
2 18pF ceramic
Resistors (0.25W, 1%)
1 10MΩ (5%) 8 4.7kΩ
6 91kΩ
1 2.7kΩ
8 10kΩ
6 220Ω
12 8.2kΩ
1 33Ω
Miscellaneous
Shielded cable, hook-up wire,
heatshrink sleeving, solder.
The LCD panel is secured to the front panel of the case on 9mm spacers, as
shown here. Note the small clip-on heatsink fitted to 3-terminal regulator REG2
at bottom right.
output of +10V at pin 7 of IC2.
Some sensors may require the value
of the 4.7kΩ resistor to be increased or
decreased to obtain the correct calibration value of +10V. Be careful not to
short circuit any tracks with the meter
probe as applying the +12V or -5V rail
to the 68HC11 could damage it. (The
A/D inputs are normally protected by
the series 10kΩ resistors).
When all the sensors are calibrated
they can be installed in the required
locations. The prototype HexTemp has
had sensors positioned up to 10 metres
from the control unit and all seems to
SC
work satisfactorily.
1
2
Where to buy the
microprocessor
The programmed 68HC11
microprocessor is available only
from the author, John Western,
who can also provide the printed
circuit board. Pricing is as follows:
(1) 68HC11 programmed microprocessor, $37.50; (2) PC board,
$28.00. Postage & packing $5.00.
Send cheque or money order to
John Western, 81 Giles Avenue,
Padbury, WA 6025. Phone (09)
401 2733.
3
°c
4
5
6
.
Select
.
Clear
HexTemp
Thermometer
Fig.3: use this full-size artwork as a drilling template for the front panel.
44 Silicon Chip
|