Silicon ChipA Digital Thermometer/Thermostat - August 2002 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Video cassette recorders: the end is nigh
  4. Feature: Digital Instrumentation Software For Your PC by Peter Smith
  5. Feature: The How, Where & Why Of Tantalum Capacitors by Peter Holtham
  6. Project: Digital Storage Logic Probe by Trent Jackson & Ross Tester
  7. Project: A Digital Thermometer/Thermostat by John Clarke
  8. Project: Sound Card Interface For PC Test Instruments by Peter Smith
  9. Project: Direct Conversion Receiver For Radio Amateurs; Pt.2 by Leon Williams
  10. Product Showcase
  11. Vintage Radio: The Ferris 214 Portable Car Radio by Rodney Champness
  12. Notes & Errata
  13. Weblink
  14. Book Store
  15. Market Centre
  16. Advertising Index
  17. Outer Back Cover

This is only a preview of the August 2002 issue of Silicon Chip.

You can view 24 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 "Digital Storage Logic Probe":
  • Digital Storage Logic Probe PCB pattern (PDF download) [04308021] (Free)
  • Panel artwork for the Digital Storage Logic Probe (PDF download) (Free)
Items relevant to "A Digital Thermometer/Thermostat":
  • Digital Thermometer/Thermostat PCB pattern (PDF download) [04208022] (Free)
  • Panel artwork for the Digital Thermometer/Thermostat (PDF download) (Free)
Items relevant to "Sound Card Interface For PC Test Instruments":
  • Sound Card Interface For PC Test Instruments PCB pattern (PDF download) [04108012] (Free)
  • Panel artwork for the Sound Card Interface For PC Test Instruments (PDF download) (Free)
Items relevant to "Direct Conversion Receiver For Radio Amateurs; Pt.2":
  • PIC16F84(A)-04/P programmed for the Direct Conversion Receiver (Programmed Microcontroller, AUD $10.00)
  • Firmware (HEX) file and source code for the Direct Conversion Receiver (Software, Free)
  • Direct Conversion Receiver for Radio Amateurs PCB pattern (PDF download) [06107021] (Free)
  • Panel artwork for the Direct Conversion Receiver for Radio Amateurs (PDF download) (Free)
Articles in this series:
  • Direct Conversion Receiver For Radio Amateurs; Pt.1 (July 2002)
  • Direct Conversion Receiver For Radio Amateurs; Pt.1 (July 2002)
  • Direct Conversion Receiver For Radio Amateurs; Pt.2 (August 2002)
  • Direct Conversion Receiver For Radio Amateurs; Pt.2 (August 2002)

Purchase a printed copy of this issue for $10.00.

This thermometer uses a K-type thermocouple probe and is ideal for both industrial and inhome use. It can measure temper­atures over the range from -55°C to 1200°C and includes under and over-temperature alarm outputs, which can be used to provide thermostatic control. By JOHN CLARKE A CCURATE TEMPERATURE measurements are vital during many industrial processes that involve heating or cooling. That’s because too much or too little heat can give poor results, so it’s necessary to ensure that the temperature is accurately controlled. Kilns, for example, often operate at 34  Silicon Chip temperatures in excess of 1000°C and measuring temperatures of this order requires a probe that can cope with the heat. Further down the scale, a probe can also be used to measure the temperature of solder in a solder bath – eg, for tin-plating or wave-soldering PC boards. In the latter case, the sol- der must generally be maintained at a fairly constant temperature to ensure correct adhesion. Accurate temperature measurements are also vital in the refrigeration industry. After all, many foods and other products can quickly spoil unless kept below specific temperatures. This new Digital Thermometer/ Thermostat can measure temper­atures from -55°C to 1200°C, depending on the probe that’s used. Its resolution is 0.1°C for measurements from -55°C to 199°C, and 1°C for measurements 200°C to 1200°C. However, the measurement accuracy itself depends on the calibration and the linearity of the probe used. Typically, the accuracy is within 2% of reading for meas­ www.siliconchip.com.au urements up to 500°C. Table 1 shows the expected readings from the Digital Ther­mometer for a given temperature. A bi-colour LED situated on the front panel of the instru­ment is used as the temperature “alarm”. It simply changes colour when the measured temperature either rises above or drops below a preset “alarm” temperature (as set by a pushbutton switch). At the same time, a small piezoelectric buzzer inside the case provides an audible alarm when the preset temperature is reached. The buzzer can be left out of circuit if an audible alarm is not required. The unit also provides two outputs to drive external relays (if required) for thermostatic control. One of these outputs is used to control the “under-temperature” relay, while the other controls the “over-temperature” relay. In use, the relays could typically be used to automatically switch heating elements, fans or refrigeration units on or off. K-type thermocouple As mentioned above, this design uses a K-type thermocouple (a thermocouple consists of two dissimilar metals) as the temper­ature probe. A K-type thermocouple uses an alloy of chrome and nickel (called Chromel) for one wire and an alloy of aluminium, manganese, silicon and nickel (called Alumel) for the second. The two wires are insulated and only make contact at one end – ie, at the temperature probe end. The other ends of the wires are sepa­rately connected to a 2-pin plug Basically, a thermocouple’s operation relies on the princi­ple that two dissimilar metals produce a voltage which is depend­ent on temperature. Fig.1 shows how the thermocouple (Sensor1) is connected to the thermometer circuit. A K-type thermocouple produces a voltage output that chang­ es by 40.44µV/°C. This change in output per degree C is called the “Seebeck Coefficient” – it refers to the output change that occurs due to the temperature difference between the probe end and the plug end of the thermocouple. If both ends are at the same temperature, there will be no output voltage. It follows that if we know the temperature at the plug end of the www.siliconchip.com.au Fig.1: block diagram for the Digital Thermometer/ Thermostat. IC1 amplifies the thermocouple output and drives the LCD module and comparator IC2. thermocouple, we can calculate the temperature at the probe since we also know the Seeback coefficient. For example, if the plug end is held at 0°C, the output will increase by 40.44µV for every 1°C above zero. Similarly, the output will decrease by 40.44µV for every 1°C drop in temperature. This means that the output voltage from the thermocouple will be at 404.4mV at 10°C and at 1.01mV at 25°C. If we then multiply the thermocouple output by 24.73 using an amplifier (op amp IC1), we effectively convert the output from 40.44µV/°C to 1mV/°C. This can then be used to give a direct readout of the temperature on a panel meter. Compensating the output In practice, our thermometer operates somewhat differently because we don’t keep the plug end of the thermocouple at 0°C. Although this MAIN FEATURES • • • • • • • • • -55°C to 1200°C reading (dependent on probe) 0.1°C resolution to 199.9°C 1°C resolution to 1200°C Under and over temperature alarm indication Suitable for driving relays for thermostat control Adjustable alarm temperature AC plugpack or 2 x 9V battery operation LCD readout Compact case could be done using an ice bath that is constantly stirred and topped up with ice, it’s too cumbersome to be a practical proposition. Instead, we compensate the thermocouple output by firstly measuring the temperature at the plug end using a semiconductor sensor (Sensor2 in Fig.1). We then add 40.44µV for every 1°C that the thermocouple plug end is above 0°C. Normally, if the thermocouple plug is at 25°C (ie, at about room temperature), its output will be 1.01mV lower than it would be if it were at 0°C. By adding an extra 1.01mV to the reading (ie, 25 x 40.44µV), we obtain the correct result without having to keep the plug end at 0°C. Note that there are several dissimilar metal junctions within the connections between the thermocouple plug and amplifi­ er. These include the Chromel to copper junction and the Alumel to copper junction on the PC board itself. However, these do not contribute to the overall voltage reading after calibration provided they are all kept at the same temperature. As a result, the PC board has been designed to help main­ tain similar temperatures at these junctions by making the copper connections all the same size. And once the PC board is installed inside its case, the inside temperature will remain fairly con­ stant. Note, however, that if the thermocouple lead is extended, it is necessary to use the same thermocouple wire for the whole length between the probe and plug. In addition, an op amp with an extremely low input offset voltage change with temperature is used for August 2002  35 36  Silicon Chip www.siliconchip.com.au SC 2002 + + TP3 A K 1N4004 + VR3 10k +2.49V + -9V TP4 + 100k VR2 10k 1k D2 1N4004 D1 1N4004 IC1 7 +16V 0.1F -16V 470F 25VW -9V 1k 10k OUT GND GND OUT REG2 7909 IN IN TP2 VR4 500 VR5 500 6 10F 25VW 10k 0.1F REG1 7809 -9V 4 3 LM627 2 470F 25VW 0.1F 0.1F 1.1k 430 750k 100k SENSOR1: K TYPE THERMOCOUPLE 5.6k ADJ SENSOR2 LM335 S1 POWER ADJ -2.49V D6 1N914 VR6 10k D5 1N914 D4 1N914 VR1 10k LM335, LM336 3.3k ADJ ADJ D3 1N914 TP1 NC NO VR7 1k S3a 10F 25VW 10F 25VW VR8 500 22k -9V TP5 +9V C 0.1F S2: POS1 -55° - 199.9°C POS2 -55° - 1200°C 2 RANGE 1 S2a -2.49V 5.6k 27 470 5.6k +2.49V K-TYPE THERMOCOUPLE THERMOMETER/THERMOSTAT 12V AC IN REF2 LM336 -2.5 REF1 LM336 -2.5 3.3k -9V 4 IC2 OP77 7 -9V  6 A E B K A + 1 A 2 -2.49V -16V D8 1N914 K 11 DP1 ZD2 15V 1W B B S2b 2 1 150 0.5W 2.2k 10k 10k 2.2k ZD1 15V 1W 150 0.5W C 5 COM D G 8 RFL 2N7000 6 INLO S 9 RFH A K 10 ROH 12 IN TO RELAY1 COIL -1V G NO NC OUT Q3 2N7000 10k TO RELAY2 COIL GND OUT 7809 IN S D BUZZER* *ONLY ONE BUZZER USED BUZZER* 7909 GND DISP- 4 DP2 C S3b Q2 BC327 Q1 BC337 LED C E E C LCD MODULE INHI 7 +16V D7 1N914 +2.49V LED1 RED/GRN  2.2k BC327, BC337 S3: PUSH TO SET ALARM TEMP 2 3 10F 25VW 10M +9V Fig.2 (left): the complete circuit diagram for the Digital Thermometer/ Thermostat. IC1 acts as a non-inverting amplifier with a gain of 24.73 for Sensor1 (a K-type thermo­couple), as an inverting amplifier with a gain of 0.1009 for Sensor2 and as an inverting amplifier with a gain of 0.1106 for REF1. IC2 compares the output of IC1 with a reference voltage derived from VR7 and drives the under and over-temperature alarm circuits (Q1, Q2 and a buzzer). IC1 (LM627). In fact, this op amp has a maximum drift of 0.6µV/°C between -25°C and 85°C. Assuming that its temperature changes by 40°C, this would contrib­ute a maximum of 24µV to the thermocouple output – equivalent to just under 0.6°C. As shown in Fig.1, IC1’s output is fed to comparator IC2. This comparator also monitors the voltage at the wiper of the Set potentiometer (VR7). If the temperature goes above the set value, then IC2’s output goes low. Conversely, if the temperature goes below the set value, the comparator’s output goes high. This output drives the bi-colour LED and also drives two transistors stages to control the relays and the buzzer. Note that the buzzer can be wired in one of two positions. In one position, it sounds only when the temperature rises above the set value. Conversely, in the other position, it sounds only when the temperature falls below the set value. Note also that we have specified an OP77GP (or OP07CN) op amp for IC2. This device has similar specifications to the LM627 but note that, because of its internal diode clamps, we cannot use an LM627 for IC2. The OP77GP and OP07CN have clamping too but it is imple­mented differently. As a result, the op amp’s input impedance always remains high which means that it doesn’t load down any voltages at its inputs. And here’s an interesting twist: although we cannot substi­tute an LM627 for IC2, the reverse isn’t true for IC1! An OP77GP or OP07CN can be used instead of the LM627. Watch this point when building the PC board. Circuit details Refer now to Fig.2 for the complete circuit of the K-Type Thermocouple Thermometer/Thermostat. As before, www.siliconchip.com.au IC1 provides the gain for the thermocouple output while Sensor 2 and REF1 provide the compensation for the thermocouple probe. As shown, the thermocouple’s output is fed to IC1’s non-inverting input (pin 3) via a low-pass RC filter to remove RF signals. Thus, IC1 functions as a non-inverting amplifier for thermocouple signals. Its gain is set by the feed­back components connected between pins 6 and 2, together with the 430Ω resistor to ground, and is adjusted using VR4. As explained above, this stage has a gain of 24.73 (ie, giving 1mV/°C at pin 6). This involves adjust­ing VR4 (during calibration) for a resistance of 204Ω (ie, 1 + 10,204/430 = 24.73). Sensor2, an LM335 temperature sensor, is used to measure the temperature at the plug end of the thermocouple. In opera­tion, this device provides a nominal 10mV/°C output. It is sup­plied with current from the -9V rail via a 5.6kΩ resistor and its output (at the negative terminal) is fed to pin 2 of IC1 via 100kΩ and 1.1kΩ resistors. As a result, IC1 functions as an inverting op amp stage for signals from Sensor 2. In this case, its gain is 0.1009 (ie, 10204/(100,000 + 1100) so Sen­sor2’s nominal 10mV/°C output is reduced to 1.009mV/°C at IC1’s output. Trimpot VR2 allows Sensor2 to be adjusted so that IC1’s output in fact changes by 1mV/°C. This matches the 1mV/°C output from IC1 due to the thermocouple and so Sensor2 provides temper­ature compensation. Offset voltage One problem with Sensor2 is that its output at 0°C is 2.73V as opposed to 0V from the thermocouple. So while Sensor2 can provide the required 1mV/°C temperature compensation, it has a 2.73V offset voltage which must be corrected. This translates to an offset voltage of 275.5mV at IC1’s output (since IC1 has a gain of 0.1009 for signals from Sensor2). This offset voltage is corrected using voltage reference REF1. This device delivers a nominal 2.5V but this can be adjust­ed over a small range using VR1 at it ADJ (adjust) terminal. Diodes D3 and D4 provide temperature compensation for the sensor, so that its output remains constant over a wide temperature range. In practice, VR1 is used to adjust REF1 to give 2.490V, as this provides Table 1: Thermocouple Calibration Thermocouple Thermocouple Temperature Output (Degrees C) (mV/(Degree C) -60 -2.243 -40 -1.527 -20 -0.777 -10 -0.392 0 0 10 0.397 20 0.798 25 1.000 30 1.203 40 1.611 50 2.022 60 2.436 80 3.266 100 4.095 120 4.919 140 5.733 160 6.539 180 7.338 200 8.137 220 8.938 240 9.745 260 10.560 280 11.381 300 12.207 320 13.039 340 13.874 360 14.712 380 15.552 400 16.395 420 17.241 440 18.088 460 18.938 480 19.788 500 20.640 520 21.493 540 22.346 560 23.198 580 24.050 600 24.902 620 25.751 640 26.599 660 27.445 680 28.288 700 29.128 720 29.965 740 30.799 750 31.214 760 31.629 780 32.455 800 33.277 820 34.095 840 34.909 860 35.718 880 36.524 900 37.325 920 38.122 940 38.915 960 39.703 980 40.488 1000 41.269 1020 42.045 1040 42.817 1060 43.585 1080 44.349 1100 45.108 1120 45.863 1140 46.612 1160 47.356 1180 48.095 1200 48.828 Display Reading (Degrees C) -55.5 -37.8 -19.2 -9.7 0 9.8 19.7 24.7 29.8 39.8 50.0 60.2 80.8 101.3 121.6 141.8 161.7 181.5 201.2 221.0 241.0 261.1 281.5 301.9 322.5 343.1 363.8 384.6 405.4 426.4 447.3 468.3 489.4 510.4 531.5 552.6 573.7 594.8 615.8 636.8 657.8 678.7 699.6 720.3 741.0 761.7 771.9 782.2 802.6 822.9 843.2 863.3 883.3 903.2 923.0 942.8 962.4 981.9 1001.3 1020.6 1039.8 1058.9 1077.9 1096.8 1115.5 1134.2 1152.7 1171.1 1189.4 1207.5 August 2002  37 are effec­ tively in parallel with the 430Ω resistor). However, their effect is really quite small (less than .06%) and, in any case, is easily corrected during calibration. Range switch The rear panel carries two sockets – one for the thermocouple and the other for the power supply. In addition, there are two access holes for the screw terminal blocks. the lowest change in value with tempera­ture. This 2.49V output is fed to pin 2 of IC1 via a network consisting of a 100kΩ resistor, trimpot VR3 and a 750kΩ resistor. VR3 allows IC1’s gain to be precisely adjusted for this signal, so that it cancels the 275.5mV offset generated by Sensor2. Note that the 750kΩ resistor and VR3 also have some effect on the gain of IC1 for the thermocouple (since they In summary then, IC1 provides us with a 1mV/°C output, as measured by the thermocouple probe. This means that at 200°C, its pin 6 output will be at 200mV which is sufficient to overrange a 200mV LCD meter (as used here). Consequently, a voltage divider is included immediately after IC1, so that the meter can display temperature measurements above 200°C – ie, up to 1200°C. This divider consists of a 10kΩ resistor, a 1kΩ resistor and a 500Ω trimpot (VR2) connected in series to ground. In practice ,VR2 is set to 111Ω, so that IC1’s output is divided by 10 at the junction of the 10kΩ and 1kΩ resistors. Range switch S2a is used to select between the two tempera­ture ranges (ie, either -55°C to 199.9°C or -55°C to 1200°C). From there, the signal is applied to the pin 7 input (INHI) of the LCD module. In addition, the divided signal on position 2 of the range switch is fed to the inverting input of comparator IC2. Alarm indication Fig.3: the top trace is this scope shot shows the 50Hz square-wave drive to the unused decimal point DP2. This square wave is in phase with the LCD backplane signal (not accessible from the pins of the LCD module). The lower trace is the inverted (out-of-phase ) signal at the drain of Mosfet Q3. This out-of-phase signal drives decimal point (DP1) when the -55°C to 199.9°C range is selected. 38  Silicon Chip IC2 compares this divided signal with the voltage on its non-inverting (pin 3) input, as set by trimpot VR7 (Alarm Set). This trimpot is fed by a divider network connected between the +2.49V and -2.49V rails and to ground. It allows the voltage on pin 3 to be adjusted between -5.5mV and +120mV (in practice, it’s a little more than this), corresponding to setting the alarm threshold between -55°C and +1200°C. The -2.49V rail is obtained using another LM336-2.5 refer­ence (REF2). This works in a similar fashion to REF1, with VR6 setting the output to -2.49V. If the voltage at pin 2 of IC2 is higher than the voltage on pin 3, the pin 6 output goes negative and sits close to the -9V supply rail. This indicates the “over-temperature” condition and turn on the green LED in LED1. At the same time, D8 is for­ward biased and PNP transistor Q2 turns on and drives the buzzer (if connected). In addition, Q2 drives Relay 2 (if connected) via a www.siliconchip.com.au 150Ω resistor in series with the -16V supply. Zener diode ZD2 is included to limit the voltage across the buzzer if a relay is not connected. Conversely, if pin 2 is lower than pin 3, IC2’s output will swing close to the +9V rail. This indicates the “undertempera­ture” condition and turns on the red LED in LED1. It also turns on Q1 to drive the buzzer and Relay 1 (if these are connected). As before, a 150Ω 0.5W resistor is included in series with the supply rail to the relay. This resistor value is suitable for use with 12V relays with coil resistances ranging from 285Ω to 400Ω. Note that although two buzzers are shown on the circuit, only one is used in practice. If an audible alarm is re­quired when the temperature goes above the set level, connect the buzzer to Q2. Alternatively, if an audible alarm is required when the temperature drops below a certain value, connect the buzzer to Q1. The 10MΩ feedback resistor between pins 3 & 6 of IC2 provides hysteresis for the comparator. In operation, the resis­tor pulls the voltage on pin 3 an extra 350µV higher when pin 6 goes high and lower by about 350µV when pin 6 goes low. This set the hysteresis to 3.5°C but this can be increased by using a smaller value for the feedback resistor. Setting the alarm temperature Pressing switch S3a connects VR7’s wiper directly to pin 7 of the LCD module. This allows the module to indicate the set alarm temperature. This can be altered by using a small screw­driver to vary VR7 (which is a 10-turn trimpot) through a small adjustment hole in the front panel. LCD module The LCD module is operated from a nominal 5V supply using the +2.49V and -2.49V reference voltages provided by REF1 and REF2. As shown, the COM, RFL (Ref-Low) and INLO (In-Low) inputs all connect to ground, while the ROH (Reference) output at pin 10 sits 100mV above ground and provides the 200mV (ie, twice the reference voltage) full-scale range for the display. This pin is connected to the RFH (Ref-High) input. Unfortunately, the LCD module used in the prototype (Jaycar Cat.QP5570) doesn’t have an output that can www.siliconchip.com.au Parts List 1 PC board, code 04208022, 117 x 102mm 1 plastic case, 140 x 110 x 35mm 1 front panel label, 132 x 28mm 1 12VAC 100mA plugpack 1 LCD 3.5-digit panel meter (Jaycar QP-5570, Altronics Q-0571 – see text) 1 ‘K’ type thermocouple with probe (Sensor1) 1 ‘K’ type thermocouple panel socket (Farnell Cat 708-7949) 2 2-way PC mount screw terminals (5.04mm pin spacing) 1 DC power socket 1 mini PC-mount buzzer (7.6mm pin spacing) 1 12VAC 100mA plugpack 1 SPDT toggle switch (S1) 1 DPDT toggle switch (S2) 1 DPDT momentary pushbutton switch (S3) 1 10-way pin header socket (2.54mm pin spacing) 1 2-way pin header socket (2.54mm pin spacing) 1 5mm LED bezel 1 200mm length of red hookup wire 1 200mm length of black hookup wire 1 200mm length of yellow hookup wire 1 200mm length of white hookup wire 1 200mm length of green hookup wire 1 150mm length of 0.8mm tinned copper wire 4 M3 x 6mm screws 4 50mm long cable ties 19 PC stakes 1 LM335 temperature sensor (Sensor2) 1 BC337 NPN transistor (Q1) 1 BC327 PNP transistor (Q2) 1 2N7000 N channel signal Mosfet (Q3) (for decimal point switch­ing on LCD) 1 7809 regulator (REG1) 1 7909 regulator (REG2) 2 1N4004 1A diodes (D1,D2) 6 1N4148, 1N914 diodes (D3-D8) 2 15V 1W zener diodes (ZD1,ZD2) 1 5mm bicoloured LED (2-leads) LED1 Capacitors 2 470µF 25VW PC electrolytic 4 10µF 25VW PC electrolytic 5 0.1µF MKT polyester (code 100n or 104) Resistors (0.25W, 1%, 50ppm/°C or better tempera­ture coefficient) 1 10MΩ 3 2.2kΩ 1 750kΩ 1 1.1kΩ 2 100kΩ 2 1kΩ 1 22kΩ 1 470Ω 6 10kΩ 1 430Ω 3 5.6kΩ 2 150Ω 0.5W 2 3.3kΩ 1 27Ω Trimpots 4 10kΩ horizontal cermet trimpots (VR1, VR2, VR3, VR6) (code 103) 1 1kΩ horizontal multi-turn trimpot (VR7) (code 102) 3 500Ω horizontal cermet trimpot (VR4, VR5, VR8) (code 501) Semiconductors 1 LM627CN, OP27GP, OP77GP or OP07CN op amp (IC1) 1 OP77GP or OP07CN op amp (IC2) 2 LM336-2.5 2.5V reference (REF1,REF2) Extra parts required for battery operation 2 9V batteries 2 battery snap-on connectors 2 battery clip holders (Altronics S 5050) 1 DPDT toggle switch (S1) 2 M3 x 6mm screws and nuts directly drive the decimal points. As a result, Mosfet Q3 has been included to drive decimal point DP1. In order to turn DP1 on, it must be driven using an invert­ed version of the LCD’s backplane signal. This signal operates at about 50Hz. The voltage swings between the DISP- level (which is about -1V below ground) and the 2.49V positive supply. This gives a square-wave drive of 3.49V peak-to-peak. Q3 monitors the high-impedance backplane signal on one of the unused August 2002  39 12V AC INPUT SOCKET TO OVER ALARM RELAY2 decimal points (in this case, DP2 at pin 12). When the voltage goes high, Q3 switches on and the drain voltage is pulled to the -1V level. Conversely, when the backplane signal goes low, Q3 switches off and the drain is pulled to the +2.49V supply via a 10kΩ resistor. As a result, the drain voltage is an inversion of the back­plane signal and this drives decimal point DP1 via range switch S2b and Set switch S3b. Note that while the decimal point can be displayed by con­ necting its pin directly to the positive supply, it is not a recommended practice. There are a couple of reasons for this: first, it places a DC voltage on the segment which can shorten the life of the LCD; and second, the decimal point segment would appear rather washed out instead of fully black. K-TYPE THERMOCOUPLE SOCKET (FOR SENSOR1) TO UNDER ALARM RELAY1 TATSOMREHT/RETEMOMREHT K EPYT SENSOR2 LM335 TP1 + 430 10F 25VW 1 IC2 OP77 D6 1 D4 914 5.6k VR6 10k Alternative LCD panel meter 5.6k DNG q2.49V TUOTUC DCL 13 12 1110 9 8 7 6 5 4 Q3 2N7000 2 1 VR5 500 +2.49V 1k TP2 TES 2.2k D7 914 D8 914 22k HCTIWS 914 470 D5 1k 3.3k 0.1 10k q2.49V 10k By contrast, the alternative LCD module from Altronics (Cat. Q-0571) does include a decimal point drive output (pin 10). This means that Q3 and its associated 10kΩ resistor are no longer required if the Altronics module is used. Instead, the decimal point driver output at C pin 10 is connected directly to NO the NC contact of switch S3b. Fig.8 shows how the Altron­ NC ics module is used. Note the different pin numbering. 27 + VR8 500 100k REF2 LM336-2.5 TP3 VR4 500 BC337 750k VR7 1k (-) 10F 25VW BC327 TP5 11 IC1 LM627 2.2k 10F 25VW Q2 D3 VR1 10k VR3 10k 1.1k 0.1 0.1 10M 7909 0.1 REG2 10F 25VW Q1 914 VR2 10k TP4 100k 0.1 3.3k REG1 7809 REDNU MRALA 25VW (BUZZER) 10k 25VW (BUZZER) 10k 470F 5.6k 2.2k 470F +2.49V ZD1 REVO MRALA 0.5W 150 D1 D2 0.5W 150 ZD2 REF1 LM336-2.5 GND 914 CA 22060140 10k LED1 S3 S2 S1 POWER LCD MODULE Fig.4: follow this wiring diagram to build the Digital Thermometer/Thermostat but note that only one buzzer is installed in the positions indicated (see text). Note also that PC stakes are installed at all external wiring positions and at the test points (TP). Q3 and its associated 10kΩ resistor can be omitted for panel meters with a decimal point driver pin (see Fig.8). Power supply Power for the circuit is derived from a 12V AC plugpack. Its output is rectified using D1 and D2 to give Table 2: Resistor Colour Codes  No.   1   1   2   1   6   3   2   3   1   1   1   1   2   1 40  Silicon Chip Value 10MΩ 750kΩ 100kΩ 22kΩ 10kΩ 5.6kΩ 3.3kΩ 2.2kΩ 1.1kΩ 1kΩ 470Ω 430Ω 150Ω 27Ω 4-Band Code (1%) brown black blue brown violet green yellow brown brown black yellow brown red red orange brown brown black orange brown green blue red brown orange orange red brown red red red brown brown brown red brown brown black red brown yellow violet brown brown yellow orange brown brown brown green brown brown red violet black brown 5-Band Code (1%) brown black black green brown violet green black orange brown brown black black orange brown red red black red brown brown black black red brown green blue black brown brown orange orange black brown brown red red black brown brown brown brown black brown brown brown black black brown brown yellow violet black black brown yellow orange black black brown brown green black black brown red violet black gold brown www.siliconchip.com.au This view shows the completed unit with the buzzer in the under-temperature alarm position. Use plastic cable ties to secure the wiring to the LCD module and switches. nominal ±16V DC rails. These rails are then filtered using 470µF electrolytic capacitors and applied to regulators REG1 and REG2 to derive ±9V rails. Alternatively, the ±9V rails can be obtained directly from two 9V batteries. Trimpot VR8 is used only for calibration and is not usually used in-circuit. During calibration, it is used to provide a small DC voltage to the non-inverting input of IC1. IC1’s output is then measured while VR4 is adjusted to give the required gain (more on this later). Construction The unit is built on a PC board coded 04208021 and this fits into a low-profile plastic case meas­uring 140 x 110 x 35mm (W x D x H). www.siliconchip.com.au Begin by checking the PC board for breaks or shorts in the copper tracks and check that the holes sizes for the larger components are correct. The PC stakes (used at all external wiring positions and test points) should be a tight fit into their mounting holes, while 1.5mm holes are required for the screw terminal blocks. Note that there is a rectangular cutout at the front of the PC board – see Fig.4. This cutout provides clearance for the bottom of the LCD module. It allows the LCD module to be slid down far enough to clear the moulded ridges at the front of the case lid. Fig.4 shows how to build the plugpack-operated version, while Fig.5 shows the changes required for the battery-operated version. Note that the latter does not require REG1, REG2, D1, D2, the 150Ω resistors or the 470µF capacitors. Install the PC stakes, resistors and wire links first. Table 2 shows the resistor colour codes but it’s also a good idea to check the resistor values using a digital multimeter. The diodes can go in next, followed by zener diodes ZD1 and ZD2. That done, install LED1 at maximum lead length, taking care to ensure that it is correctly oriented. It is later bent over at right angles and clipped into a matching bezel on the front panel. Now for the semiconductors. These include Sensor 2, REF1, REF2, regulators REG1 & REG2, transistors Q1 & Q2 and the two ICs. Make sure that all these parts are correctly oriented and that you don’t get any of them mixed up. The capacitors and the screw-terminal blocks can now be installed, along with the buzzer. Install the buzzer in August 2002  41 K-TYPE PROBE AVAILABILITY Altronics: Q 1092 (-20°C to 1200°C) Dick Smith: Q-1438 (-50°C to 1200°C) Jaycar: QM-1282 (-55°C to 1200°C); QM-1283 (-40°C to 250°C) Fig.5: here’s how to modify the PC board assembly for battery operation. Reg­-ulat­ors REG1 & REG2 and the two 150Ω resistors are re­placed by wire links, while diodes D1 & D2 and the 470µF capacitors are left out of circuit. the under-temperature alarm position (at right) if you want it to sound when the tem­ perature falls below the set value. Conversely, install it in the over-temperature alarm position if you want it to sound when the temperature rises above the set value. Final assembly Now for the final assembly. The first step is to secure the PC board to the base of the case using 4 x M3 screws which screw into the integral pillars. That done, work can begin on the front panel. Fig.5 can be used as a drilling template – you will have to drill holes to accept the three switches and the LED bezel, plus an extra hole to provide access to VR7. In addition, you have to make a large cutout to accept the LCD module. The cutout for the display can be made by first drilling a series of holes around the inside perimeter of the cutout hole. The piece can then be broken away and the job filed for a smooth finish. Once that’s done, affix the front panel label and install the switches and the LED bezel. The front panel can then be slid into position and LED1 bent over and pushed through the bezel until it clips into place. The LCD module can now be installed and the wiring complet­ed as shown in Fig.4. We used two header sockets (one 2-way and one 10-way) for the connections to the LCD module, so that it can be easily removed. Alternatively, the leads could be directly soldered to the pins on the module as shown in Fig.4. Note that Q3 and its associated 10kΩ resistor are either mounted on the cable entry side of the pin header socket (see photo) or soldered directly to the pins of the LCD module. Use cable ties to secure the wiring, as shown. If you are building the battery version, the two 9V batteries are secured to the lid using metal battery clips. One side of each clip is removed, after which they are secured to the side of the case using M3 x 6mm countersunk screws and nuts. The rear panel will require holes for the power socket and the thermocouple socket, plus access holes through which to pass leads to the screw terminal blocks (to wire external relays). The thermocouple socket is mount­ ed directly in-line with Sensor2. It should be mounted fairly high up on the rear panel (about 4mm from the top), since it sits directly over Sensor2 when the rear panel is in place. You will need to cut a 17 x 11mm hole to accept the sensor socket. This can be done by first marking out the cutout area, then drilling a series of small holes around the inside perimet­ er, knocking out the centre piece and filing to a smooth finish. Once that’s done, the socket can be clamped into position and short lengths of tinned copper wire run between its terminals and the adjacent stakes on the PC board. Finally, complete the construction by running the wiring to the AC power socket. Testing Before doing anything else, it’s a good idea to go over the PC board and check that the assembly is correct. In particular, check that all parts are in the correct locations and that they are correct­ ly oriented. You should also carefully check the wiring to the LCD module. That done, apply power and check that the LCD shows a reading. Now, using a multimeter, check that there is a nominal +9V at pin 7 of IC1 & IC2 and -9V at pin 4 of IC1 & IC2. If these readings are correct, check that there Fig.6: this full-size artwork can be used as a drilling template for the front panel. 42  Silicon Chip www.siliconchip.com.au The way in which the thermocouple socket is mounted and its leads connected to stakes on the PC board can be clearly seen here. Note the holes in the rear panel opposite the screw terminal blocks. is approximately +2.5V at TP1 and -2.5V at TP3. Note that these voltages could be 100mV higher or lower than the nominated values at this stage. They should all be measured with the common lead from your multimeter attached to the GND terminal near Sensor2. If everything is correct so far, you can now carry out the following steps to calibrate the in­strument: (1) Adjust VR1 for +2.490V at TP1. Similarly, adjust VR6 for -2.490V at TP3. (2) Switch off and connect a clip lead between Sensor1’s plus (+) terminal (ie, pin 3 of IC1) and ground. Also, short TP1 and TP4 to ground. (3) Apply power and measure the voltage at TP2 using a multimeter set to read millivolts. Write this offset voltage down, then switch off and remove the short at Sensor1’s plus terminal. (4) Connect a clip lead from Sen­ sor1’s plus terminal to TP5. Reapply power and adjust VR8 for a reading of 100mV at TP5. www.siliconchip.com.au Fig.7: this is the full-size etching pattern for the PC board. August 2002  43 Here’s how the two metal clips are attached to the case lid for the batterypowered version. It’s also a good idea to place some foam rubber over the PC board, so that the batteries cannot short anything out if they come loose. (5) Monitor the voltage at TP2 and adjust VR4 for a reading that’s equal to the voltage at TP5 x 24.73 + the offset voltage that was written down. For example, if TP5 is set to exactly 100mV and the recorded offset voltage is 0.5mV, then VR4 should be adjusted so that the voltage at TP2 is 100mV x 24.73 + 0.5mV, or 2.4735V. Note that it may be difficult to set VR8 to provide an exact 100mV output at TP5. In that case, just set the value to somewhere around this value and multiply it by 24.73. You then add the offset voltage and adjust VR4 for this reading at TP2. (6) Switch off and again short Sensor1’s plus terminal to ground. Disconnect the short for TP4 but leave the short to ground at TP1. (7) Using a reference thermometer of known accuracy, check its reading of the ambient temperature in °C. Add 273 to this measured value (to convert from °C to the Kelvin scale) and label this value as millivolts. Add the initial offset voltage of IC1 to this value, then switch on and adjust VR2 so that TP2 equals this value in mV. (8) Switch off and remove the short across REF1 by disconnecting TP1 from ground. Also, disconnect the short on the plus terminal of Sensor1. (9) Connect Sensor1 to its socket and reapply power. Adjust VR3 so that the voltage at TP2 in mV is equal to the current tempera­ture in °C as measured on the reference thermometer (eg, if the ambient temperature is 25°C, adjust VR3 so that TP2 is at 25mV). Fig.8: here’s how to use the Altronics Q0571 LCD panel meter in the Digital Thermometer/Thermostat. Note that Q3 and its associated 10kΩ resistor are no longer required. 44  Silicon Chip DSE KIT HAS LED PANEL METER The Dick Smith Electronics kit for this project will be supplied with a 3.5-digit LED panel meter (Cat. Q2230), instead of an LCD panel meter. This ensures a bright display but also means that the DSE kit is suitable for plugpack operation only. A few minor circuit changes were required to accommodate the LED panel meter. These design changes, along with a slightly modified PC board, have all been carried out by Silicon Chip Publications. Full details are included in the DSE kit. Note: as it stands, the DSE 3.5-Digit LCD Panel Meter (Cat. Q2220) is not suitable for use in this design. Note that this reading should also now be displayed on the LCD. On the low range, it should be displayed with 0.1°C resolu­ tion, with the decimal point lit. The high range reading will be displayed with 1°C resolution. Adjust VR5 so that the readings are the same on both ranges. (10) Press S2 and check that the alarm set temperature range can be adjusted between -55°C and 1200°C using VR7. Better accuracy can be gained by repeating this entire calibration procedure again. That’s because the adjustment of VR3 can slightly alter the overall calibration. Also, better accuracy will be achieved if the circuit is allowed to stabilise for several minutes each time power is reapplied and when components are allowed to cool to normal operating temperatures after being heated by a soldering iron (eg, as can occur during the removal of shorting leads). A 12V relay can be connected to the over or under-temperature alarm terminal block, so that it can be used to switch in a heating element or a compressor for cooling. Make sure that the relay is adequately rated for the job and note that the leads connecting to the relay contacts must be kept electrically isolated from the coil leads, particularly if mains is to be switched. By the way, we don’t recommend that you attempt to wire up a relay to switch mains voltages unless you are very experienced with high voltage work and know exactly what you are doing. In fact, that’s a job that’s best SC left to a licensed electrician. www.siliconchip.com.au