Silicon Chip8-Station Automatic Sprinkler Timer - July 1992 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: When will domestic appliances be quiet?
  4. Vintage Radio: Unusual problems lead to interesting repairs by John Hill
  5. Feature: Understanding The World Of CB Radio by Herb Zallner
  6. Project: Build A Nicad Battery Discharger by Marque Crozman
  7. Project: 8-Station Automatic Sprinkler Timer by Graham Blowes
  8. Serviceman's Log: How do you get to blast a ghetto by The TV Serviceman
  9. Order Form
  10. Project: Portable 12V SLA Battery Charger by Darren Yates
  11. Project: An Off-Hook Timer For Telephones by Darren Yates
  12. Feature: Computer Bits by Paul Lynch
  13. Feature: Amateur Radio by Garry Cratt VK2YBX
  14. Project: Multi-Station Headset Intercom; Pt.2 by Marque Crozman
  15. Feature: Electronics Workbench For Home Or Lab by Leo Simpson
  16. Market Centre
  17. Advertising Index
  18. Outer Back Cover

This is only a preview of the July 1992 issue of Silicon Chip.

You can view 48 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:
  • Computer Bits (July 1989)
  • Computer Bits (July 1989)
  • Computer Bits (August 1989)
  • Computer Bits (August 1989)
  • Computer Bits (September 1989)
  • Computer Bits (September 1989)
  • Computer Bits (October 1989)
  • Computer Bits (October 1989)
  • Computer Bits (November 1989)
  • Computer Bits (November 1989)
  • Computer Bits (January 1990)
  • Computer Bits (January 1990)
  • Computer Bits (April 1990)
  • Computer Bits (April 1990)
  • Computer Bits (October 1990)
  • Computer Bits (October 1990)
  • Computer Bits (November 1990)
  • Computer Bits (November 1990)
  • Computer Bits (December 1990)
  • Computer Bits (December 1990)
  • Computer Bits (January 1991)
  • Computer Bits (January 1991)
  • Computer Bits (February 1991)
  • Computer Bits (February 1991)
  • Computer Bits (March 1991)
  • Computer Bits (March 1991)
  • Computer Bits (April 1991)
  • Computer Bits (April 1991)
  • Computer Bits (May 1991)
  • Computer Bits (May 1991)
  • Computer Bits (June 1991)
  • Computer Bits (June 1991)
  • Computer Bits (July 1991)
  • Computer Bits (July 1991)
  • Computer Bits (August 1991)
  • Computer Bits (August 1991)
  • Computer Bits (September 1991)
  • Computer Bits (September 1991)
  • Computer Bits (October 1991)
  • Computer Bits (October 1991)
  • Computer Bits (November 1991)
  • Computer Bits (November 1991)
  • Computer Bits (December 1991)
  • Computer Bits (December 1991)
  • Computer Bits (January 1992)
  • Computer Bits (January 1992)
  • Computer Bits (February 1992)
  • Computer Bits (February 1992)
  • Computer Bits (March 1992)
  • Computer Bits (March 1992)
  • Computer Bits (May 1992)
  • Computer Bits (May 1992)
  • Computer Bits (June 1992)
  • Computer Bits (June 1992)
  • Computer Bits (July 1992)
  • Computer Bits (July 1992)
  • Computer Bits (September 1992)
  • Computer Bits (September 1992)
  • Computer Bits (October 1992)
  • Computer Bits (October 1992)
  • Computer Bits (November 1992)
  • Computer Bits (November 1992)
  • Computer Bits (December 1992)
  • Computer Bits (December 1992)
  • Computer Bits (February 1993)
  • Computer Bits (February 1993)
  • Computer Bits (April 1993)
  • Computer Bits (April 1993)
  • Computer Bits (May 1993)
  • Computer Bits (May 1993)
  • Computer Bits (June 1993)
  • Computer Bits (June 1993)
  • Computer Bits (October 1993)
  • Computer Bits (October 1993)
  • Computer Bits (March 1994)
  • Computer Bits (March 1994)
  • Computer Bits (May 1994)
  • Computer Bits (May 1994)
  • Computer Bits (June 1994)
  • Computer Bits (June 1994)
  • Computer Bits (July 1994)
  • Computer Bits (July 1994)
  • Computer Bits (October 1994)
  • Computer Bits (October 1994)
  • Computer Bits (November 1994)
  • Computer Bits (November 1994)
  • Computer Bits (December 1994)
  • Computer Bits (December 1994)
  • Computer Bits (January 1995)
  • Computer Bits (January 1995)
  • Computer Bits (February 1995)
  • Computer Bits (February 1995)
  • Computer Bits (March 1995)
  • Computer Bits (March 1995)
  • Computer Bits (April 1995)
  • Computer Bits (April 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • Computer Bits (July 1995)
  • Computer Bits (July 1995)
  • Computer Bits (September 1995)
  • Computer Bits (September 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits (December 1995)
  • Computer Bits (December 1995)
  • Computer Bits (January 1996)
  • Computer Bits (January 1996)
  • Computer Bits (February 1996)
  • Computer Bits (February 1996)
  • Computer Bits (March 1996)
  • Computer Bits (March 1996)
  • Computer Bits (May 1996)
  • Computer Bits (May 1996)
  • Computer Bits (June 1996)
  • Computer Bits (June 1996)
  • Computer Bits (July 1996)
  • Computer Bits (July 1996)
  • Computer Bits (August 1996)
  • Computer Bits (August 1996)
  • Computer Bits (January 1997)
  • Computer Bits (January 1997)
  • Computer Bits (April 1997)
  • Computer Bits (April 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Computer Bits (July 1997)
  • Computer Bits (July 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits (September 1997)
  • Computer Bits (September 1997)
  • Computer Bits (October 1997)
  • Computer Bits (October 1997)
  • Computer Bits (November 1997)
  • Computer Bits (November 1997)
  • Computer Bits (April 1998)
  • Computer Bits (April 1998)
  • Computer Bits (June 1998)
  • Computer Bits (June 1998)
  • Computer Bits (July 1998)
  • Computer Bits (July 1998)
  • Computer Bits (November 1998)
  • Computer Bits (November 1998)
  • Computer Bits (December 1998)
  • Computer Bits (December 1998)
  • Control Your World Using Linux (July 2011)
  • Control Your World Using Linux (July 2011)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Items relevant to "Multi-Station Headset Intercom; Pt.2":
  • Multi-Station Headset Intercom PCB [01302921] (AUD $7.50)
  • Multi-station Headset Intercom PCB pattern (PDF download) [01302921] (Free)
Articles in this series:
  • Multi-Station Headset Intercom; Pt.1 (June 1992)
  • Multi-Station Headset Intercom; Pt.1 (June 1992)
  • Multi-Station Headset Intercom; Pt.2 (July 1992)
  • Multi-Station Headset Intercom; Pt.2 (July 1992)
Eight S ta-tion '~ vr· . controller Sprinkler . Take the drudgery out of watering your garden with this versatile 8-station Sprinkler Timer. It has 32 programmable start & run times & can also be used to control lights or other appliances . ({if:, . t;d By GRAHAM BLOWES 8-STATION AUTOMATIC SPRINKLER CONTROLLER A RE YOU TIRED of running outside to shift the hose onto the next group of plants? Do you trust your neighbours to water all your garden properly while you are on holidays? Do you have plants that need to be watered more than once a day and others that only need watering once a week? Well, fear no more because this little gadget will solve your problems. It is completely bullet-proof when it comes to power failures and has all the features of the expensive models that are on display at nurseries and 30 SILICON CHIP specialised plumbing suppliers. It is also simple to drive, as there are only four buttons to worry about, and it has a large, easy to read display. Most other controllers have a small 4-digit display and many confusing buttons. Also, many of these controllers work in a sequence. Once the start time has been reached, station 1 will turn on, followed by station 2 when station 1 's run time has expired. You don't have a choice! It's either all or nothing! By contrast, this automatic sprinkler controller allows you to selec- tively water any area of garden as little or as often as you like. It has other uses too; eg, as a security light controller or as a generalpurp9se timer. And although it normally runs off a 24VAC plugpack supply, it can also be made to run off 12V DC, as explained elsewhere in the text. Heavy duty relays wired externally could then be used as slaves to the relays on the PC board for switching the lights on and off. Alternatively, you could delete the internal relays, run a link between pins 3 and 5 of each relay position, and use heavy duty, externally wired 12V relays driven directly from the relay driver (IC5, ULN2803). In standard form, the on-board relays are used to switch up to eight water control solenoids (available from gardening suppliers). In addition, an optional ninth relay (RL9 on the circuit) can be used to con,trol a master solenoid. This master relay can be wired to turn on when ever any or just some selected stations turn on. Each station can be operated up to four times a day (or as little as once every 14 days) and the ontime (run time) for each cycle can be set from 1-99 minutes. A complete list of features is given below in Table 1. As you can see from this list, the unit compares favourably with the Richdel controllers which are available for about twice the price. The Hardie Pope and Cardena units available at department stores are sequencers only (ie, the next station starts when the previous one finishes). You cannot have separate start times for each station or cycle, as you will have discovered if you bought one. They are also messy to set up and only have very small displays. Button functions 0 Eight Station 0 0 Sprinkler Controller 0 Time Date T--,-- - _J T L _ Run ,__ _ _ _ _ start Start Sprink~ Cycle~ Day 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 €)• 1<at>• S l -->S8,Time Fig.1 shows the layout of the front panel controls. There are just four pushbutton switches to operate: Sl-S4. It might look complicated at first glance but it 's really very easy to drive as we shall see. Button 1: Sl is the MENU switch. Each time it is pressed, the next sprinkler number will show under the flashing cursor, immediately to the right of the "S". Following sprinkler 8 (SB on the display), the time setting menu. appears. This looks exactly like the default display, except that the colon does not flash and the cursor is over the HOUR setting. Pressing Sl again then takes you back to the default display. Button 2: S2 is the CURSOR key. Each time it is pressed, the cursor moves to the next field to the right. There are six fields: Sprinkler, Cycle, Day, Time Min. Hour Time Display * ... Program 0 0 : -. I0a:23 09: 11 :921 Auto mode on/off All active stations off display • Auto ... Manual Any <at>• other _. Is rn 1 01 08: 10:201 0 on/off single station on/off position single ... station : *is+, IS - 0 Fig.1: this front panel layout shows the four control switches. TABLE 1: MAIN FEATURES (1 ). Controls up to eight solenoids plus a master solenoid. (2). Each station can have up to four cycles (ie, up to four start times a day or as seldom as one every fortnight). (3). Each station (and cycle) is completely autonomous, which gives a possible 32 programmable start times. (4). Run time: minimum - 1 minute per cycle; maximum - 99 minutes per cycle. (5). LED indication of station status. Red LED= auto mode active; Green LED= solenoid active; All active red LEDs flash in "Rain Off" mode. (6). Manual on/off control for each solenoid. The run time of cycle 4 is also used here to provide an automatic cut-off feature. This lets you manually switch on the sprinkler and forget it. The sprinkler will then automatically turn off after the run time of cycle 4 has expired. (7). Rain mode (deactivates all automatic cycles while saving program settings). (8). All settings are stored in an EEPROM (X24C04) and the time is supplied by a real time clock IC (PCF8573). Battery backup is provided by a small lithium cell for the clock, which will last for about one year if the power is left disconnected for that long! The settings memory is good for 100 years. (9). When power is restored after a power failure, all appropriate solenoids are enabled and the various cycles completed. (10). Uses Motorola 68705P3 microcontroller. (11). Runs from a single 24VAC, 1A plug pack supply. (12). Uses a 16 x 1 liquid crystal display (LCD) to show time and sprinkler settings. Default display is the current time and date. JULY 1992 31 TABLE 2: SPRINKLER SETTING MODE FIELD FUNCTION COMMENTS 1 Station (1 - 8) Selected by pressing switch S1 . S3 toggles the automatic mode on or off for the station indicated; S4 toggles the selected station solenoid manually. 2 Cycle (1 - 4) This sets the number of cycles that occur during the day for any one station. Set using S3 or S4 3 Day (01 - 14) 01 means turn on every day; 02 means turn on every second day, etc. A display of -- means cycle off. Incremented using S3; decremented using S4 4 Start Time Hours (00 - 23) Incremented using S3; decremented using S4 5 Start Time Minutes Incremented using S3; decremented using S4 (00 - 59) 6 Run Time Minutes (00 - 99) Incremented using S3; decremented using S4 Note: each successive field is selected by pressing S2. Hour, Minute and Run Time. The cursor will cycle back to Field 1 (Sprinkler) after the button is pressed at the last field (Run Time). Field 1 of the sprinkler setting mode is explained below, under the heading "Buttons 3 & 4". Table 2 lists the remaining fields and their functions in the sprinkler setting mode, while Table 3 lists the fields in the time setting mode. Buttons 3 & 4 : these buttons have several functions, depending on whether the unit is in the sprinkler setting mode or in default mode (time and date display). In the sprinkler setting mode , if the cursor is flashing over the number immediately to the right of the "S", S3 toggles the automatic mode on or off fo r the station indicated (red LED on/ off) . S4 toggles the selected station solenoid manually (green LED on/ off). In any other field, S3 increments the setting and S4 decrements the setting. If either button is held down, then th e setting will increment/decrem ent automatically. The one exception is the Cycle field - it only cycles in th e one direction. When the Cycle field is incremented, all the fields to the right change to reflect the settings for that cycle. In the default mode, S3 toggles TABLE 3: TIME SETTING MODE FIELD FUNCTION 1 Hour (00 - 23) 2 COMMENTS Incremented by S3; decremented by S4 Date (00 - 31) Incremented by S3; decremented by S4 4 Month (00 - 12) Incremented by S3 ; decremented by S4 Year (00 - 99) Incremented by S3; decremented by S4. Note: does not automatically increase at 12 midnight on Dec. 31 due to lack of room in EEPROM Note: in the default mode, S3 toggles "Rain Off", while S4 turns off any manually activated solenoid. 32 How it works The software performs all the timing and display functions, so I won't go into that too deeply. ICZ and IC3 have a bidirectional serial interface built into them called an I2 C bus, which uses only two wires (see Fig.2). This is a Philips designed protocol. There are other systems such as SPI (Serial Peripheral Interface), a popular one that Motorola seems to favour. This latter interface is built into the more expensive Motorola microcontrollers. The microprocessor used here only has an 8-bit timer. The software includes all the routines for "talking to" and "listening to" the slave chips, as ICZ & IC3 are called. To talk to an IC on the I2C bus, a ST ART condition is sent out on the bus and all !Cs go into LISTEN mode. Minute (00 - 59) Incremented by S3; decremented by S4 3 5 "Rain Off". This causes any lit red LEDs to flash, to indicate that the automatic mode has been deactivated (a handy feature if you want to stop automatic watering due to rain). If S3 is pressed again , the automatic mode is re-activated with the original program settings. Also, in the default mode, S4 turns off any manually activated solenoid. This saves you from having to step to the particular sprinkler setting before pressing S4. The solenoid will also turn off automatically after the run time of Cycle 4 has expired, as explained previously. Set Cycle 4's run time to 99 if you don't want this to happen too soon. Cycle 4 was used for this function because it is unlikely to be used in real life. Note that all automatically operated sprinklers also turn off when S4 is pressed to turn off manually activated sprinklers in the default mode. These automatic sprinklers then turn on again a short time later (60 seconds max.) when the internal microprocessor receives its next interrupt signal. SILICON CHIP Fig.2 (right): the circuit is based on EEPROM IC2, a PCF8573 clock calendar chip (IC3) & a Motorola 68075P3 microprocessor (IC4). IC6 & IC7 latch the outputs of IC4 to drive the LEDs, while IC6 also drives the station relays via relay driver IC5. ► ~ ~ N co co ....-< t-< c:: ....... ~ 11 G~D 1 E'LJc B .,. 4 l 1 +5V ___ C9 27pf+ SPRINKLER TIMER ~K IC3 ISDA~ PCF8573 SC1 0 t15h .,. 8 7 TESTVCC 5 IC2 SDA 2 A1 X24C04. 6 1 A2 OV SCL L ~!?l , PA4 PA3 ' ' ":" VPP IC8 7555 06 18 015 I 28 PAS~ 07 05 17 07 06 05 04 03 02 ~ 0216 01• 5 5 4 ~~~: tth = LED9-16 8xGREEN 18 07 l7 06 14 05 02 8 03 74~i~74 13 D4 1 DO ~ K o IC5 ULN2803 110 _ (~~ J _ ®+ _A©i 8 7 6 5 4 3 2 1 ·LED1-8 8xRED r------+5V C1 50VW - 1000I,J; 11 .11 Jl .).! ~ ,12. JI 18 ,- R1 180Q 10W r~~~~"u'"'"' l 05115 REL6 -""1""0-~1.J 7 REL31 REL1 4R10-R17 RELB REL7 REL6 REL5 REL4 REL3 REL2 REL1 023 74HC374 IC6 03 9 REL~4~~W;~°'1~' ~DO ~01 !!!I 20 ~ CONTRAST VR1 50k I 11ICLK VC~2 +5V .ll 12 11 10 03 04 15 16 8 9 01 02 7 6 5 2 I 14 PA6~ 1N4148 1+ C15~ .,. .. LOU CONN 4 13 DO 12 PB7~ 9 PB6 PB5 PB4 PB3 PB2 PB1 PBO PA2 221 21 PA1 20 PAO J6 , RESET' GND IC4 68075P3 13 I EXTAL IITT 271PA7 4 47..r , R32 33k , 5 XTAL 24 23 E C13.l.i -:-- +5V 011 C10 +5V Rl 8} ..i t :i :rtt :: %i~ VIEWED FROMI BELOW i~I R '~"' 81 3Vi ! 0141 1N4148 MENU' S1 l +SV ··i:-i C2 " 47 -50VW. Pu3o .1,; ,ovw+ J!!!T C1i C18 +5V t ! 24VAC 01+ 01+ 0.1 1 .C16 +12V RL1 FBR211 F1 1A 1 1 X2 MK8/2 t X4 'f;j PARTS LIST 1 double-sided PC board, code SPV3, 133 x 82mm 1 pre-punched plastic case with screened front panel 1 battery holder, Bogan BH906-c 1 3V lithium battery (CR2032) 1 14-way PC connector strip 6 2-way PC mounting terminal blocks (Klippon MK8/2) 4 12mm spacers 2 6mm spacers 4 3mm insulating washers 1 heatsink (see Fig.4) 1 4MHz crystal (X1) 1 32. 768kHz crystal (X2) 2 fc90 inductors (L 1,L2) 1 28-pin IC socket 1 8-pin socket 4 momentary contact pushbutton switches 2 fuse clips 1 1A fuse (20mm) 9 miniature 12V SPOT PC relays (FBR211O012 or equiv.) 1 100kQ miniature horizontal mount trimpot (VR1) 4 15mm x 3mm-dia. machine screws & nuts 2 5mm x 3mm-dia. machine screws & nuts 2 8mm x 2mm-dia machine screws & nuts Semiconductors 1 7805 3-terminal regulator (IC1) 1 X24C04 EEPROM (IC2) 1 PCF8573 clock/calendar (IC3) 1 68705P3 microprocessor (IC4) 1 ULN2803 8-channel driver array (IC5) 2 74HC374 latches (IC6,IC7) . 1 ICL7555 timer (IC8) 3 BC547 transistors (Q1-Q3) 4 1N4004 diodes (01-04) 11 1N4148 diodes (05-015) 8 3mm red LEDs (LED1-8) Next, an 8-bit address is sent out (by IC4), to which the addressed IC will respond with an ACK (acknowledge) signal. The four MSB's (most significant bits) of the 7-bit address - Lhe 8th bit is read/write (R/W)- are "hardwired" internally to that particular chip (IC4). The next two bits (PA3 & PA4) of the address are brought out to external 34 SILICON CHIP 8 3mm green LEDs (LED9-16) Capacitors 1 1000µF 50VW electrolytic (C1) 1 100µF 10VW electrolytic (C3) 1 47µF 50VW electrolytic (C2) 1 4.7µF 10VW tantalum (C13) 21µF 10VWtantalum (C14,C15) 7 0.1 µF monolithic (C4C8,C 10,C11) 1 27pF monolithic (C9) 1 10pF monolithic (C 12) Resistors (0.25W, 1%) 1 10MQ (R26) 2 1MQ (R33,R34) 1 33kQ (R32) 10 10kQ (R18-R21,R23-R25, R27,R28,R30) 1 4.7kQ (R22) 21kQ (R29,R31) 8 820Q (R2-R9) 8 330Q (R10-R17) 1 180Q 10W (R1) Where to buy the parts A complete kit of parts, excluding the relays, is available for $125 plus $1 0 p&p. The relays are $3. 75 each (please specify number required). Alternatively, the following parts can be purchased separately: programmed 68705P3 $25 (V10 for 2-chip LCD, V13 for single-chip LCD); PC board (SPV3) $25; C24C04 EEPROM $8; PCF8573 clock/calendar IC $8; LCD (16 x 1) $16; plastic case (Rp3) with p,u nched screened aluminium front panel $20; relays $3.75. Please add $6 p&p without the plastic case or $10 with the case. Send cheque or money order to Graham Blowes, 38 Garnet St, Niddrie, 3042. Phone (03) 337 1917. Fax (03) 575 3369. pins. This enables you to have four clock chips and four EEPROM chips all on the one pair of wires. The 7th bit of the address is used as a page select (depending on the chip used) . After the address, you can either send or receive data. A STOP condition is sent out on the bus to terminate the transaction. The actual protocol/ signals are a story in themselves, so we won't go too deeply into that here. Power supply The 24V AC passes through inductors 11 and 12 to a bridge rectifier formed by diodes D1-D4. The resulting DC is then filtered by a l000µF electrolytic capacitor (Cl). 11 and 12 prevent any glitches generated by switching the solenoids from feeding into the DC supply. A relatively high voltage (37V DC approx.) is present across Cl, which has to be dropped down before it is fed to the regulator (ICl). A 180Q, 10watt resistor was chosen for this task. The voltage across Rl varies somewhat, depending on how many LEDs and relays are on at the time. With a 24V AC 1A plugpack, it is recommended that only one station solenoid plus the master solenoid be operated at any one time. The circuit by itself (no LEDs etc) requires 60-90mA, most of which is used by the microprocessor. The 12V relays operate over a fairly wide range (70% to 225% of rated voltage), so they are quite safe. If you try to operate too many relays at once, the voltage at the "low" end of Rl falls below that of the pull-in voltage of the relays, thus preventing too many solenoids from being operated at the same time and blowing the fuse. On the PC board layout (Fig.3), you will find space for an inductor called 13 (top lefthand corner). Originally, a 4 70µH choke was used here to do the job that 11 and 12 now do. It didn't work too well but I left the mounting position on the layout in case anyone has difficulties with glitches. The track between the mounting holes has to be cut for it to be used, however. Real time clock IC3 (PCF85 73) is the real time clock. This chip generates an interrupt every minute. When this happens, the microprocessor (IC4) reads the clock and the EEPROM and tests to see if any sprinklers should be on. The output from IC3 at pin 9 is not a pulse but a waveform that is high for 30 seconds and low for the next 30 seconds. Ql, Cl0, Cll, R27, R28 & R29 then turn this into a pulse every minute for the IRQ input of the microprocessor. Basically, Ql and its associated parts form a rising edge detector. When removing the appropriate diodes. Q3, C14, R34 & R23 form a timing circuit which holds the Output Enable (pin 1) of IC6 high during power up. This prevents the solenoids from momentarily operating during power up, before the microprocessor has initialized the port. At switch on, C14 pulls the base of Q3 close to Vee, turning Q3 on. Once C14 has charged (via R34), Q3 turns off and pin 1 of IC6 is held low by R23. IC7, another 74HC374 latch, is used to control the red LEDs. Note that the green LEDs have smaller current limiting resistors than the red LEDs. That's because green LEDs don't shine as brightly as red LEDs for a given amount of current. This view shows the top of the PC board with all components in position but with the heatsink removed from the 7805 regulator. Note that only four station relays plus the master relay (RL9) have been fitted here. pin 9 of IC3 goes high, Ql momentarily turns on via Cl 1 and pulls the IRQ pin of IC4 low. IC3 also has an inbuilt power fail detector. This automatically puts it in a power fail mode which keeps the clock running via the battery but disables the outputs. D13 prevents the battery from being used while 5V is present. Capacitor C12 (lOpF) can be replaced by a small trimmer capacitor (5-25pF) which is used to adjust the frequency precisely if required. This involves connecting a frequency meter to pin 11 of IC3 and adjusting the trimmer for a reading of 128Hz. In practice, a value of lOpF gives reasonable accuracy, especially for this application. TheEEPROM IC2 (X24C04) is an EEPROM with 512 x 8 bits storage space. This is used to store all the sprinkler settings as well as system status; ie which sprinkler(s) are in auto mode (red LEDs) and whether the system is enabled. This means that if the power were to fail and then come back on, everything would be as it was before the power failure. The system status and settings are read every minute while only the status is read at power up. The 7th bit of the address is used to select the upper 256 bytes or the lower 256 bytes. Watch dog circuit The watchdog circuit consists of Q2, ICB and their associated parts. The circuit around Q2 is the same as around Ql. PORT A BIT 7 (PA7) of IC4 is toggled up and down as long as the program is running in the main loop, which is continually polling the four pushbutfon switches. This action turns QZ on in sympathy with the action of PA7. Thus, Q2 continually discharges C13, which forms part of the timing circuit of IC8 (7555). IC8 is connected in the astable mode with a high duty cycle. While C13 is unable to charge up via R32 and R33 (due to QZ), pin 3 of IC8 is unable to go low. However, if PA7 stops toggling, Q2 will remain off, thus allowing C13 to charge and switch pin 3 of IC8 low. C15 now discharges via D15 , thus resetting the microprocessor. PA7 then starts to toggle during the high portion ofIC8's duty cycle, which keeps pin 3 of IC8 from going low again. If the microprocessor does not reset properly, it will receive another reset pulse from IC8. In reality, this circuit will only be used if a fast glitch on the mains causes the microprocessor to go into "mumble mode". Solenoid latch IC6 (74HC374) is the latch that is used to control the green LEDs. It also drives the solenoid relays (RL1-RL8) via IC5 (ULN2803). The master relay (RL9) is controlled by IC5 via an OR gate consisting of diodes D5-D12. As shown, RL9 will turn on if any of the other stations turns on but it can be left off for selected stations simply by Liquid crystal display The controller can be used with the two types of LCDs in common use. The different types can be easily distinguished by the number of chips on the display's PC board. The type with the two chips (usually a HD44 780A00 controller and a HD44100H LCD driver) uses Vl0 of the software and the single chip type (usually HD44780A00) uses V13 of the software. The 2-chip type is easier to use, as the data can be written to the display in 16-byte chunks. It is configured as a 1 x 16 character display, as you would expect. The single-chip type requires the display to be configured as a 2-line device and the data to be split into 8byte chunks. After the 8th byte has been sent, the DD RAM address has to be changed up a page, then the last eight bytes can be sent. In other words, the single chip type is treated as a 2 x 16 character display! If you already have a display, make sure you know what type it is before you order the programmed microprocessor. Trimpot VRl is used to adjust the contrast of the display, although the setting range is not very broad. Construction Those people who don't read instructions are advised to change their habits, especially for this project. It will be necessary to follow the exact procedure set out below to successfully build the Sprinkler Controller. The PC board measures 13 3 x 82mm JULY 1992 35 UNDER PCB 0 [] Fig.3: install the parts on the PC board as shown here but note that the four switches, the LEDs, eight resistors, trimpot VR1 & three capacitors go on the solder side of the board (see text). Note also that only the tracks on the underside (solder) side of the board are shown here for clarity. and is mounted on the lid of a Retex case (RP3). This board is double sided with plated through holes, and features a component overlay and solder mask. The front panel has been screen printed, punched and drilled to fit the PC board exactly. The PC board must be assembled using high-quality soldering techniques. You will require a soldering iron with a long pointed tip, as some of the solder pads are nearly hidden by the pushbutton switches. Sixteen LEDs, eight resistors, three capacitors, the four momentary pushbutton switches, contrast trimpot (VR1) and the LCD are mounted on the solder side of the PC board. Capacitors C5 , C7 & C8 are mounted first 36 SILICON CHIP (C6 is mounted on the silk screen side). Clip off the excess leads close to the board as soon as these parts are soldered in. Mount the pushbutton switches next (ie, on the side without the silk screen). Check that the flat side of each switch is oriented exactly as CAN BE CUT HERE TD DISABLE MASTER RELAY i°PERATIDN IC6 IC5 A A ~ 05 --012 I Fig.4: mount diodes D5-D12 as shown here so that individual diode leads can be cut to disable master solenoid operation for selected stations. shown in Fig.3. Also, make sure that the switches are sitting flat on the PC board before you solder their leads. After you've soldered them, trim their pins as close to the board as possible. The remaining parts on the solder side of the board are installed later on. It's now necessary to install most of the parts on the top of the board. Capacitor Cl can be installed first. It is placed directly above S2 and S4, with the positive side towards the outside of the PC board. Make sure that you don't damage the plastic of the adjacent switches when you solder the positive lead of Cl (remove the switch tops if necessary). It's also a good idea to clip the positive lead to length before installing the capacitor. Next, mount diodes D5 -D12 as shown in Fig.4. You can then decide later on whether or not the master relay (RL9) turns on when a particular station is activated. If you don't want the master solenoid to turn on for a particular station, just cut the lead to the relevant diode (eg, cut the lead to DB if you don't want the master solenoid on when station 4 is on). If all the diodes (D5-D12) are left in circuit, the master relay will turn on when ever any of the eight stations turn on. Resistors RZO & R21 can now be installed. Note that these parts must be installed end on. This done, install IC5, IC6 & IC7. The row of pins for IC5 that runs under S1 must be soldered from the top (IC side) of the board. In addition, pins 4, 5, 6 & 7 of IC5 must be shortened a bit before the IC is installed so that they don't hit S1. Pins 4, 5 & 6 of IC6 have to be bent inwards, so that they don't foul the case of S1. Note particularly that IC6 is installed the opposite way to that of IC7 and IC5. This is not good board layout practice but it made the track placing easier. The relays, the six 2-way connectors, the fuse clips and the power diodes (Dl-D4) are installed next. Be careful with the orientation of the diodes: A pin of RL9 fouls S3 , so bend the pin before you solder it. Ensure that the connector screw terminals face the centre of the board and check that the fuse clips are oriented correctly. Before installing 11 and 12, place about 10mm of spaghetti insulation over one lead and bend this lead back HEATSINK 7B05 .., ., --, 1 _ _ _ _ _ _ _ BEND DOWN _ _ _ _ _ PCB ~---+--+ Fig.5 : the heatsink for the BEND HOLES A= 3mm DIA. MATERIAL:· 1.6mm ALUMINIUM .1/.P_ fir---10 ::! 7805 regulator should be bent up according to the dimensions shown here . Make sure that the heatsink doesn't short against any other parts on the PC board when it is bolted in position (see above). 70 DIMENSIONS IN MILLIMETRES down the side of the choke. Mount each choke so that the covered lead is next to diodes D1-D4. The sockets for ICZ and IC4 can now be soldered in place, followed by R18, R19, R22, R23 & R26-R35 (most are end-mounted). The rest of the capacitors and D13-D15 can then be installed, together with the two crystals (Xl & XZ). Install Xl so that it sits slightly proud of the PC board. Similarly, mount CZ about 3mm proud of the board to provide clearance for the adjacent mounting nut. IC3 and IC8 are the next to go in, followed by transistors Q1-Q3. If you want, you can use a socket for IC3 (PCF8573). Take care with the orientation of the transistors. Now we come to the LEDs which are a bit tricky. The best approach is to cut two pieces of thin cardboard to use as temporary standoffs. Each piece should be 10mm wide x 100mm long and has to be thin enough to fit in between the legs of the LEDs. The eight red LEDs (LEDs 1-8) go in the top row and are each mounted with the cathode lead (ie, the longest leg) in the round hole. Position the piece of thin card along the line of LEDs, then install all eight LEDs over it and solder one side of each LED only. This done, remove the card and align the LEDs before soldering the remaining leads. It is easier if you do this from the solder side (remember the LEDs are mounted on the solder side). The green LEDs are mounted in similar fashion. R9,R17,R8 , R16,R7,R15,R24,R25 & VR1 can now all be installed on the solder side of the board. This done, turn the board over and mount R2-R6 and R10-R14 (end on). Before soldering the battery holder into place, check that one of its leads doesn't foul switch S3 on the other side of the board. Bend the lead so that it will be facing away from the switch if necessary. You may also have to cut off the small standoff that clashes with one end of R9. Place about 10mm of spaghetti over the leads of 10W resistor Rl before soldering it to the PC board. This method of mounting leaves it about 8mm above the board to allow for air circulation, as it gets quite hot (although it is well within specification). Mounting the display The 14-way LCD connector can now be mounted on the solder side of the board (use the short pins). This done, position the LCD over the long pins and secure the opposite edge of the display with 2mm bolts and 6mm nylon standoffs. An insulating washer must be installed under each nut on the silk screen side of the main board. Now adjust the height of the connector side so that the display is level and solder the pins. If you feel uneasy about permanently mounting the LCD in this way, you can install a row of Molex pins on the board and solder the short pins of the connector to the display board. That way, the display can be quickly removed to give access to the main board. The battery should be mounted in its holder with the positive side facing upwards. Be sure to mount to 10W resistor (Rl) about 8mm above the board so that the air can circulate beneath it for cooling. JULY 1992 37 All that has to be done now is to mount the front panel using the 3mm bolts and 12mm standoffs provided. Use plastic insulating washers under the nuts for the top two holes. The main body of the case comes without any holes in it for the solenoid and supply leads, so that you can choose the exit points. A series of small holes, the same diameter as the cable used , spaced evenly along the bottom of the case will probably be the most convenient. Switching on Before switching on, rotate VR1 fully anticlockwise and do a final visual check of your soldering. Don't plug the microprocessor in yet! Now turn on the This is the solder side of the PC board, with all the power. The red LEDs parts (including the LCD) mounted in position. should all light up and, Note that two of the resistors on this side of the after about one second, board go under the LCD (see Fig. 3). the green LEDs should light and the relays A fairly substantial heatsink must should operate. The 2-chip type LCD be fitted to IC1 (7805) to provide suffi- should have all pixels lit, while the cient heat dissipation. Make this heat- single-chip type should have the first sink up as shown in Fig.5 and bolt it eight character positions lit. Check loosRly to IC.1 and then to the PC the voltage at the output of the 7805 board via the hole provided. This regulator (IC1) to ensure it is 5V. If all the above happens, turn the done, solder the IC in place and tighten power off, plug in the microprocessor the mounting bolt. The PC board assembly can now be and re-apply power. This time, all the completed by installing the battery red LEDs should flash on (none, some or all may stay on) and the LCD should positive side up in its holder. Date Tin1e <-:•)1·1 , , ~ . ·,.,,. ' I ,\. l.c '" •• ·~ . c ~'dc D;iy • T Ti 111c say "SPRINKLER V 10" or "GRB V13", depending on the display used, for about a second. After that, the time and date should be displayed, except that there will be nonsense values showing. The colon between the hour and minute should be flashing. Adjust VR1 until you are happy with the contrast of the LCD. Now press S1 - the settings for sprinkler 1 should now appear on the display. They will all be nonsense values and question marks but that's normal at this stage. Press S1 until the time setting display is reached. The cursor should now be flashing over the HOUR setting which can now be adjusted by pressing S3 or S4. Once the hour is set, press S2 again to move to the minute setting. When the rest of the settings have been completed, press S1. This process writes to the clock and EEPROM and returns to the default display. The colon should be flashing and the values that you just entered should be displayed. If this happens, turn off the power, wait about five seconds, then switch on again. The time and date should be as you entered it. In particular, take note that the year is correct, as this is stored in the EEPROM and indicates that writing and reading is working properly. Press S1 again - the red LED for sprinkler 1 should now toggle each time S3 is pressed. Similarly, the green LED and the relay for sprinkler 1 should toggle if S4 is pressed. Initialising the EEPROM The next step is to initialise the to all zeros. This process is a bit tedious but it is good practice and only has to be done once. (Unfortu- EEPROM I)ate L ~u~ 'Ei'.11e: Stai t , Im . . ' - - - -- - Start Hour • • • ~ The default display shows the time (hours : minutes) & the date (day: month: year). Although not visible here, there is a flashing cursor between the hour & minute digits. 38 SILICON CHIP Pressing button S1 brings up the SPRINKLER SETTING mode. The desired station can then be selected for programming by repeatedly pressing of St. The LCD is secured to the main board via a 14way pin header at the top & two 6mm spacers at the bottom. The completed board assembly is then secured to the front panel on 12mm spacers. A cardboard template ensures that the LEDs are all mounted at the correct height (see text). nately, there is no room in the EPROM to include an initialising routine). First, select sprinkler 1, then press S2 to move the cursor to the CYCLE field. Pressing S3 or S4 will increment the cycle number, with the cycle values displayed in the fields to the right. When "1" is displayed in the CYCLE field, press S2 to move the cursor to the START HOUR and then press S3 or S4 until the display shows 00. Repeat this process for the ST ART MIN and RUN TIME fields . Return the cursor to the CYCLE position (by pressing S2) and repeat the above process for cycles 2, 3 and 4. The entire procedure should now · be repeated for the rest of sprinkler settings (ie, for sprinkler 2, sprinkler 3, sprinkler 4 and so on up to sprinkler 8). Final testing As a final check, we 'll set sprinkler 1 to operate on cycle 1. Note the current time and set the start time to five minutes before and the run time to 10 minutes. Don't forget to press S3 to toggle the red LED on, then press S1 until the default display is reached (note: the unit will default to the current time and date display if a button has not been pressed for one or two minutes). At the next interrupt (ie, within 60 seconds), the green LED should light and stay on until the "start time " + "run time" has elapsed. Now set the start time a few minutes ahead of the current time. When the start time is reached, the green LED should turn on. The other functions can also be tested to see if they work but if you've got this far, it's likely that everything is functioning properly. To test the watchdog circuit, switch the power off and on quickly. You might have to do this a few times but eventually the microprocessor will fail to reset properly. The colon will not be flashing when this happens. After a few seconds, the microprocessor should au.t omatically reset and go through the start up sequence. 12V operation Apparently, the Hardie Pope solenoids will operate on 12V DC, although this is not recommended. The environment is likely to very damp and electrolysis could become a problem, especially where the solenoid tail is joined to the cable that goes back to the controller. If you do want to operate the unit on 12V DC, delete Dl-D4, Cl and Rl, and run a link from L1 to the far end hole of Rl. Another link then has to be connected from LZ to the earth connection associated with the diode bridge. Make sure that you don't inadvertently connect the supply the wrong way around though. Finally, the case supplied is not waterproof. This means that the controller will have to be mounted in an additional waterproof box if the site chosen is not under cover. SC Ii me .,.,,. ·T - , \ < i' ··· j ! T · l{u11 l i mc ·--:--,t :1r 1 :\l :11. ~ -- -·-S,;t rt II( • • • • • • After the station has been selected, pressing button S2 moves the cursor to the cycle position. The number of cycles can then be incremented by pressing S3 or S4. Pressing button St again after station 8 (S8) has been selected brings up the TIME SETIING mode. The time & date are then set using buttons S2, S3 & S4. JULY 1992 39