Silicon ChipProgrammable Electronic Thermostat - November 2000 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Anyone should be able to do their own house wiring
  4. Feature: Quick Circuit 5000 PC Board Prototyping System by Peter Smith
  5. Feature: ShockLog: Monitoring The Things That Go Bump by Silicon Chip
  6. Project: Santa & Rudolph Christmas Lights Display by John Clarke & Ross Tester
  7. Project: 2-Channel Guitar Preamplifier by John Clarke
  8. Product Showcase
  9. Order Form
  10. Serviceman's Log: Most customers are reasonable by The TV Serviceman
  11. Project: Message Bank & Missed Call Alert by Leo Simpson & Rick Walters
  12. Project: Programmable Electronic Thermostat by Michael Jeffery
  13. Feature: Tektronix TDS7504 Digital Phosphor Oscilloscope by Leo Simpson
  14. Vintage Radio: The intriguing Philips "Philetta" by Rodney Champness
  15. Book Store
  16. Back Issues
  17. Project: Protoboards: The Easy Way Into Electronics, Pt.3 by Leo Simpson
  18. Notes & Errata
  19. Market Centre
  20. Advertising Index
  21. Outer Back Cover

This is only a preview of the November 2000 issue of Silicon Chip.

You can view 38 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 "Santa & Rudolph Christmas Lights Display":
  • Santa & Rudolph Christmas Light Display PCB pattern (PDF download) [16111001] (Free)
  • Santa & Rudolph Christmas Light Display panel artwork (PDF download) (Free)
Items relevant to "2-Channel Guitar Preamplifier":
  • 2-Channel Guitar Preamplifier PCB patterns (PDF download) [01111001/2] (Free)
  • Digital Reverb PCB pattern (PDF download) [01112001] (Free)
  • 2-Channel Guitar Preamplifier panel artwork (PDF download) (Free)
Articles in this series:
  • 2-Channel Guitar Preamplifier (November 2000)
  • 2-Channel Guitar Preamplifier (November 2000)
  • 2-Channel Guitar Preamplifier, Pt.2: Digital Reverb (December 2000)
  • 2-Channel Guitar Preamplifier, Pt.2: Digital Reverb (December 2000)
  • Digital Reverb - The Missing Pages (January 2001)
  • Digital Reverb - The Missing Pages (January 2001)
  • 2-Channel Guitar Preamplifier, Pt.3 (January 2001)
  • 2-Channel Guitar Preamplifier, Pt.3 (January 2001)
Items relevant to "Message Bank & Missed Call Alert":
  • Message Bank & Missed Call Alert PCB pattern (PDF download) [12111001] (Free)
  • Message Bank & Missed Call Alert panel artwork (PDF download) (Free)
Articles in this series:
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.1 (September 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.2 (October 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.3 (November 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)
  • Protoboards: The Easy Way Into Electronics, Pt.4 (December 2000)

Purchase a printed copy of this issue for $10.00.

Looking for an electronic thermostat that’s easy to build and is programmed using Windowsbased software? This unit interfaces with a DS1620 Thermometer/ Thermostat IC and has three relays to control external equipment. T HIS PROJECT IS based on the “PC-Controlled Thermometer/ Thermostat” described by Mark Roberts in the June 1997 issue of SILICON CHIP. That design used a DS1620 Digital Thermometer/Thermostat from Dallas Semiconductor as the sensor and interfaced to the parallel port of a PC. An accompanying Windows-based software program allowed the user to set the high and low switching points of the device so that external equipment could be controlled via relays. In the original design, the DS1620 plugged into an 8-pin header socket and was connected to the pins of a DB25 connector via flying leads. Two other components – a 1N4148 diode and a 1kΩ resistor – were housed in the backshell of the DB26 connector. Fig.1 shows the software interface 66  Silicon Chip By MICHAEL JEFFERY that was used for programming, while Fig.2 shows a block diagram of the DS1620. The original design also showed how the outputs of the IC could be used to drive three 5V relay circuits. However, no con­ structional details were given for these. Similarly, no details were given showing how the device could be made to operate inde­ pendently of the PC after programming (although this is fairly simple as we shall see). The software allowed the user to set the high (THIGH) and low (TLOW) points for the thermostat just by clicking a few buttons. It also featured a bargraph and a digital readout that showed the current temperature. In operation, THIGH switches high when the temperature exceeds a programmed upper limit but immediately switches low again when the temperature falls below that limit. Conversely, TLOW switches high when the temperature falls below a programmed lower limit but is low when the temperature goes above that limit. A third output from the DS1620, TCOM, switches high when the upper preset is exceeded and remains high until the temperature goes below the lower preset. TCOM could, for example, be used to control a fan which would come on when the temperature exceeded THIGH and stay on until the temperature dropped below TLOW. Making it independent It’s quite easy to make the device operate independently of the PC. All we have to do is provide a regulated +5V supply rail and the necessary clock signals to pin 2 of the DS1620 Fig.1 (above): the software lets you set the THIGH and TLOW trip points of the DS1620 Thermometer/Thermostat IC by clicking the Min and Max up/down buttons. Fig.2 at right shows the block diagram for the DS1620. It covers a temperature range from -55°C to +125°C. – two functions that were previously provided by the PC’s parallel port. We also have to ground pin 3 (reset) All these functions are provided here and the circuitry is built on a PC board, along with the relay output stages. The DS1620 is mounted on a sepa­rate PC board, with spare pads to make it easy to connect flying leads to its pins (supply, clock, outputs, etc). Fig.3 shows the circuit configuration for the DS1620 after programming. Actually, there are two small PC boards for the thermostat IC – one for mounting a single DS1620 and the other for mounting two DS1620s (eg, to provide two independent thermostats with different trip points). Both boards carry machined-pin IC sockets. That way, a DS1620 IC can be easily removed and plugged into the pin header for programming, then transferred back to its PC board again. The thermostat board is connected to the relay board via flying leads. Basically, it’s a 2-way street – the DS1620 drives the relay board and at the same time, the relay board provides the DS1620 with clock signals and a regulated +5V rail. used as a control output. Just imagine switching a re­frigeration compressor motor on and off at around 2-3 Hz for even a few seconds at a time. Do that on a regular basis and you will end up with a very hot motor that could eventually burn out. The answer to this problem is to clock the DS1620 chip with a brief pulse at preset intervals. This means that the THIGH and TLOW outputs are only updated at widely-spaced intervals which, in this circuit, can be set by the user. TCOM, on the other hand, has a certain amount of switching hysteresis built in, depending on the programmed upper and lower limits. For example, if the upper limit is 60°C and the lower limit is 30°C, then the hysteresis is 30°C. In practice, this means that TCOM can toggle rapidly in response to temperature changes only if it has a very narrow hysteresis range. In this circuit, there are 10 preset clock intervals to choose from, ranging from 6.7 seconds to 1.9 hours. So, if you wish, you can have the DS1620 update every 1.9 hours, although in most cases you will want a time interval that’s much less than this (eg, a few minutes). Circuit details Refer now to Fig.4 for the circuit details. The final clock circuit is very simple and uses a 4060 14-bit binary counter (IC1) with an inbuilt clock oscillator. It has 10 binary outputs, one of which is selected to drive a 74C14 (or 40106) Schmitt inverter to give a brief logic low timing pulse. The external RC network on pins 9 & 10 of IC1 (C7 & VR1) sets the oscillator frequency and this can be adjusted using VR1. When VR1 is set to maximum (200kΩ), IC1 is clocked Clocking the DS1620 The DS1620 toggles its relevant output (THIGH or TLOW) fairly rapidly (2-3 times a second) when the temperature is very close to a programmed set point. When used as a freestanding thermostat, this toggling effect can cause problems if THIGH or TLOW is Fig.3: this circuit shows how the DS1620 is configured after programming. The programming circuit is shown on page 11 of the June 1997 issue. November 2000  67 Fig.4: the complete circuit for the temperature controller relay board. It has three relay output stages, a clock circuit (IC1, D1 & IC2a) and a power supply (BR1, REG1 & REG2). at a nominal 0.42Hz. Its 10 binary outputs divide this down (by 16, 32, 64, 128, 256, 512, 1024, 4096, 8192 & 16,384) to give time durations ranging from about 6.7 seconds to 1.9 hours. Any one of these 10 outputs can be selected on the circuit board. If you want longer periods, increase VR1 to 1MΩ. Converse­ly, for shorter periods, reduce the value of C7. When the selected output from IC1 goes high, a brief posi­tive-going pulse is fed to pin 13 of IC2a via C8 and diode D1. Resistor R2 discharges C8 after each pulse, while D1 prevents pin 13 of IC2a from being pulled negative each time the selected output from IC1 switches low, as this could damage the IC. 68  Silicon Chip Schmitt trigger IC2a inverts and squares up the signal on its pin 13 input. The resulting clock signal appears on pin 12 and is used to clock pin 2 of the DS1620. Pulldown resistor R4 is there to prevent pin 13 of IC2a from floating when D1 is not conducting. Note also that the remaining unused Schmitt inputs are tied to the ground rail. This is done to prevent them from oscillating due to stray electrical noise. R3 and C9 provide a brief posi­tive-going pulse to pin 12 (reset) of IC1 at power on, so that it automatically resets. Power for the circuit is derived from a 16V AC plugpack supply. Its output is rectified by diode bridge BR1 and then fed to 3-terminal regulator REG1 which provides a +12V rail. REG1 also drives REG2 which delivers a regulated +5V rail. Relay options One application I use this circuit for is to switch a 30A solid state relay, to turn a heater on and off during winter. This involves using an onboard relay on the Temperature Con­ troller PC board to switch the solid state relay at low voltage. By using a timing cycle of 3.5 minutes from IC1 (ie, one clock pulse every 3.5 minutes), the room temperature stays within 1°C of the programmed set point. There are a few options for the relays and the power supplies: (1) If you are using 5V relays and switching 5V, omit REG2, C4, C5, C6 and use a 7805 for REG1. Resistors R7, R10 & R13 should be reduced to Fig.5: the parts layout for the relay driver board. Note that the linking options and resistor values shown here are for 12V relays. You can also use 5V relays by making a few simple changes – see text & Fig.4. Fig.6(a): this diagram shows how the DS1620 is installed on its PC board. Fig.6(b) below shows the dual DS1620 board. 470Ω and you have to link points B to D and B to C. The relay(s) are then used to switch between the +5V rail at point B and ground (+5V to NO; ground to NC). (2) If you are using 5V relays and switching 12V, install both regulators and use 470Ω resistors for R7, R10 and R13. Link point A to C and point C to D. As before, connect point B (now at +12V) to the NO relay contact and ground to the NC contact. (3) Finally, if you are using 12V relays and switching 12V, use 1kΩ resistors for R7, R10 and R13. Link points A to C and B to D and connect point B and ground to the relay NO & NC contacts respectively (if you want to switch 5V, connect point A to NO instead). Note that 12V relays will be supplied in the kit (along with both regulators), so most people will want to use option 3. What ever you do, make sure that the DS1620 is powered from a +5V rail, otherwise it will be destroyed. One option is to use mini DIL PCB relays (which require only low current), especially is you want to run the unit from solar power. These relays are available in both 5V and 12V versions and can handle 1A at 30V DC. The PC board can accommodate both conventional and mini DIL PCB relays (see Fig.5). Stand-alone timer By the way, you don’t have to use this design to switch the outputs of a DS1620 chip. If you wish, it could be used as a stand-alone relay driver board with various timed outputs. You could even use a rotary switch to select between the outputs of IC1. The selected output could then be used to drive one of the relay circuits. Construction Fig.5 shows the assembly details for the PC board. The first thing to do is to decide how you want to configure the power supply (see above). The links shown in blue on Fig.4 are for option 3 described above (ie, 12V relays). It’s up to you to install the rele­vant links to switch +12V or +5V. Begin construction by installing all the wire links, fol­lowed by the resistors, trimpot VR1, the capacitors and diodes. Make sure that all polarised parts are installed the correct way around. Next, install the bridge rectifier (BR1), the transistors, regulators and LEDs. The two ICs can then be installed, along with the relays and the fuseholder clips. Be careful with the fuseclips; these have a small spigot at one end and this must go to the outside. Put them in the wrong way round, and you won’t be able to install the fuse. Don’t worry about installing a wire link between the se­lected output of IC1 and the track adjacent to pin 16 (which links across to C8) at this stage; that step comes later, after test­ing. The two smaller boards will only take a few minutes to assemble. In Resistor Codes  No.   1   2   1   3   3   3   3 Value 1MΩ 100kΩ 47kΩ 2.2kΩ 1kΩ 1kΩ 470Ω 4-Band Code (1%) brown black green brown brown black yellow brown yellow violet orange brown red red red brown brown black red brown brown black red brown yellow violet brown brown 5-Band Code (1%) brown black black yellow brown brown black black orange brown yellow violet black red brown red red black brown brown brown black black brown brown brown black black brown brown yellow violet black black brown November 2000  69 TABLE 1 ivision Pin No. DR atio 7 16 5 The prototype used 0Ω resistors instead of wire links but you can simply use tinned copper wire. A cable gland is now recommended instead of the 6-way barrier strip at top. either case, you simply install a machined-pin IC socket (8-pin or 16-pin, depending on which board you use). The larger of these two boards also carries a 0.1µF capaci­tor to provide extra supply line decoup­l­ing. Finally, complete the construction by linking the appro­priate pins on the DS1620 board back to the relay board (ie, to THIGH, TLOW & TCOM, +5V, 0V and clock). This can be done using 6-way telephone cable. Setting up After you have checked the PC board thoroughly for correct compo- WARNING! This design is intended for switching low voltages only. Do not attempt to use it to switch 240V AC mains voltages or any other high voltages. The track spacings between the relay pins are too close for 240V use and also the external barrier terminal strip is not suitably protected. If you wish to switch mains voltages, you can use the on-board relays to switch suitably isolated (and rated) external relays at low voltage (either 12V or 5V). The external relays then do the mains switching. Do not attempt this unless you are experienced and know exactly what you are doing. It’s a good idea to use a zero switching solid state relay if you are switching inductive loads, such as a motors, fluores­cent lighting and compressors, etc. In that case, the on-board relays are used to simply activate the internal LED of the solid state relay via a suitable resistor. 70  Silicon Chip 32 4 64 6 128 14 256 13 512 15 1024 1 4096 2 8192 3 16,384 nent positioning and polarity, apply power and check that you have +5V between point A and ground and +12V between point B and ground. If all is OK, disconnect the power then link point A to C and point B to D. Now reapply the power and place a test LED in series with a 1kΩ resistor between pin 7 of IC1 and ground (0V). Adjust VR1 until the test LED flashes at 3.5-second intervals (ie, the LED should light for 3.5 seconds, then go off for 3.5 seconds and so on). Once you have set the oscillator speed, temporarily link pin 7 of the 4060 to C8. Now place the test LED and its series resistor between pin 12 (clock out) of IC2a and ground. The test LED should now briefly flicker every 7 seconds. Assuming it all checks out, remove the link on pin 7 of IC1 and connect a link between pin 13 and X2 for a 3.5-minute clock or between pin 15 and X2 for a period of 7 minutes. Altern­ ative­ ly, you can link to any of the other output pins for shorter Where To Buy The Parts Parts List Parts for this design are available as follows: (1). Main Relay Driver PC Board ....................................................... $16.50 1 DS1620 Thermometer/Pro­ grammer software (see panel) 1 or 2 DS1620 Thermometer/ Thermostat ICs 1 relay-driver PC board 1 PC board for DS1620 (single or dual) 1 TO-220 heatsink 3 1A DPDT mini DIL PC-mount relays (RLY1-3); Altronics Cat. S4128 (5V) or S4130 (12V); or 3 10A SPDT PC-mount relays 2 M205 PC-mount fuseclips 1 1A M205 fuse 1 200kΩ 5mm horizontal mount trimpot (VR1) 1 test LED and 1kΩ resistor 1 6mm cable gland (replaces 6-way barrier strip in prototype) 1 8-way barrier terminal strip 8 3mm x 20mm metal screws 4 12mm spacers. 4 3mm nuts and washers. 1 plastic electrical case, 170 x 120 x 90 (L x W x H) 1 16V 1A AC plugpack supply. (2). PC Boards For DS1620 (both types) ............................................ $9.50 (3). DS1620 Thermometer/Thermostat IC ......................................... $13.50 (4). DS1620 Thermometer/Thermostat with program­med THIGH & TLOW (you specify) ........................................................ $15.50 (5). 16VAC 1A Plugpack Supply ........................................................ $23.50 (6). Complete kit (does not include DS1620 chip, software or plugpack supply) ......................................................................... $76.00 (7). Basic Kit including Relay Driver PC Board, DS1620 Boards & all components for Relay Driver PC Board .............................. $54.00 Please add $3.95 for p&p if ordering the PC boards only, or $9.95 p&p for the complete kit (Australia only). Payment by cheque or money order to: Michael Jef­fery, Clinch Security Systems, R.M.B. 5811, Myrtleford, Vic 3737. Ph: (03) 5756 2424. Email michael.jeffery<at>porepunkahps.vic.edu.au Note: this design is copyright to Clinch Security Systems. All prices include GST. Software availability: the programming software for the DS1620 is available from Softmark, PO Box 1609, Hornsby, NSW 2077. Ph/fax: (02) 9482 1565. Price: $25 plus $5 p&p (includes GST). or longer periods. Table 1 shows the division ratios for IC1’s outputs. The three relays can be tested by connecting the +5V rail to each of the RET inputs in turn. Warning: do not attempt this while a DS1620 chip is connected. Now place a programmed DS1620 into the socket on its board. The DS1620 will now sample and hold every 3.5 or every 7 minutes (or at some other interval, depending on the output from IC1 that’s used). If a relay is tripped, it should remain in that state at least until the next clock pulse comes along. Even then, it will only change state if the output from the DS1620 also changes state in response to changing temperature conditions. The prototype relay board was installed in a plastic elec­trical case with a clear lid. The four mounting holes in the board mate with integral pillars inside the case, so it’s easily secured using spacers and 3mm machine screws (the screws make their own thread in the plastic pillars). An 8-way barrier terminal strip is mounted on one side of the case adjacent to the relays, while (on the prototype) a 6-way barrier strip was mount­ed on the opposite side. The 8-way strip accepts the relay outputs Semiconductors 1 4060 14-bit binary counter (IC1) 1 74C14 hex Schmitt inverter 1 W04 bridge rectifier (BR1) 1 7812 12V regulator (REG1)* 1 7805 5V regulator (REG2) 3 BC337 NPN transistors (Q1-Q3) 1 1N4148 signal diode (D1) 3 1N4004 silicon diodes (D2-D4) 3 5mm red LEDs (LED1-3) A couple of pin headers were install­ ed at the X2 position in the prototype, to make is easy to select between two different timing outputs from IC1. and the 16VAC power supply leads from the plugpack. The 6-way strip was used to terminate the three outputs from the DS1620 (RET1, RET2 & RET3), the clock output signal and the +5V & 0V rails (for the DS1620). Alternatively, you could simply run the 6-way telephone cable through a 6mm cable gland and terminate the leads directly to the PC board, thus eliminating the 6-way barrier strip. Note that kits will be supplied with the 6mm cable gland (not the 6-way barrier strip). Capacitors 1 1000µF 25VW electrolytic (C1) 1 100µF 25VW electrolytic (C4)* 1 1µF 25VW electrolytic (C7) 1 0.22µF monolithic (C8) 7 0.1µF monolithic (C2, C3, C5*, C6*, C9, C10, C11) Resistors (0.25W, 1%) 1 1MΩ (R1) 2 100kΩ (R3,R4) 1 47kΩ R2 3 2.2kΩ (R5,R8,R11) 3 1kΩ (R6,R9,R12) 3 1kΩ or 470Ω (R7,R10,R13)* * Omit or change to suit 12V or 5V version.* Finally, don’t overtighten the screws when you’re attaching the lid, otherwise it may crack. Just lightly nip them SC up so that it seals properly. November 2000  71