Silicon ChipTimer For Fans And Lights - August 2012 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Australians' knowledge of science is abysmal
  4. Review: We Drive Nissan’s Leaf Electric Car by Ross Tester
  5. Feature: Multi-Rotor Helicopters by Bob Young
  6. Review: Flying The Parrot AR Drone 2 Quadcopter by Nicholas Vinen
  7. Feature: RPAs: Designing, Building & Using Them For Business by Ross Tester
  8. Project: The Driveway Sentry Mk.2 by Jim Rowe
  9. Project: Timer For Fans And Lights by Nicholas Vinen
  10. Project: Isolated High-Current Adaptor For Scopes & DMMs by Nicholas Vinen
  11. Project: Wideband Oxygen Sensor Controller Mk.2, Pt.3 by John Clarke
  12. Vintage Radio: The Dutch Philips BX373A 4-valve receiver by Rodney Champness
  13. PartShop
  14. Order Form
  15. Subscriptions
  16. Book Store
  17. Advertising Index
  18. Outer Back Cover

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

You can view 30 of the 104 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:
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Articles in this series:
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Articles in this series:
  • Radio Control (November 1996)
  • Radio Control (February 1997)
  • Radio Control (March 1997)
  • Radio Control (May 1997)
  • Radio Control (June 1997)
  • Radio Control (July 1997)
  • Radio Control (November 1997)
  • Radio Control (December 1997)
  • Autopilots For Radio-Controlled Model Aircraft (April 1999)
  • Model Plane Flies The Atlantic (May 1999)
  • Tiny, Tiny Spy Planes (July 1999)
  • 2.4GHz DSS Radio Control Systems (February 2009)
  • Unmanned Aerial Vehicles: An Australian Perspective (June 2010)
  • RPAs: Designing, Building & Using Them For Business (August 2012)
  • Multi-Rotor Helicopters (August 2012)
  • Flying The Parrot AR Drone 2 Quadcopter (August 2012)
  • Electric Remotely Piloted Aircraft . . . With Wings (October 2012)
Items relevant to "The Driveway Sentry Mk.2":
  • Driveway Sentry Mk.2 PCB [03107121] (AUD $15.00)
  • Driveway Sentry Mk.2 PCB pattern (PDF download) [03107121] (Free)
  • Driveway Sentry Mk.2 panel artwork (PDF download) (Free)
Items relevant to "Timer For Fans And Lights":
  • Mains Timer PCB [10108121] (AUD $10.00)
  • Mains Timer PCB pattern (PDF download) [10108121] (Free)
  • Mains Timer panel artwork (PDF download) (Free)
Items relevant to "Isolated High-Current Adaptor For Scopes & DMMs":
  • High Current Adaptor For Scopes And DMMs PCB [04108121] (AUD $15.00)
  • Isolated High Current Adaptor for Scopes and DMMs PCB pattern (PDF download) [04108121] (Free)
Items relevant to "Wideband Oxygen Sensor Controller Mk.2, Pt.3":
  • Wideband Oxygen Controller Mk.2 Display PCB [05106122] (AUD $7.50)
  • Wideband Oxygen Controller Mk.2 PCB [05106121] (AUD $15.00)
  • PIC16F1507-I/P programmed for the Wideband Oxygen Sensor Controller Mk2 [0510612A.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F88-E/P programmed for the Wideband Oxygen Sensor Controller Mk2 Display [0510612B.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware (ASM and HEX) files for the Wideband Oxygen Sensor Controller Mk2 [0510612A/B] (Software, Free)
  • Wideband Oxygen Controller Mk.2 Display PCB pattern (PDF download) [05106122] (Free)
  • Wideband Oxygen Controller Mk.2 PCB pattern (PDF download) [05106121] (Free)
  • Wideband Oxygen Controller Mk.2 panel artwork (PDF download) (Free)
Articles in this series:
  • Wideband Oxygen Sensor Controller Mk.2, Pt.1 (June 2012)
  • Wideband Oxygen Sensor Controller Mk.2, Pt.2 (July 2012)
  • Wideband Oxygen Sensor Controller Mk.2, Pt.3 (August 2012)

Purchase a printed copy of this issue for $10.00.

By NICHOLAS VINEN Timer for Fans or Lights This simple circuit provides a turn-off delay for a 230VAC light or a fan. It can be used to make a bathroom fan run for a set period after the switch has been turned off or it can be used with a pushbutton to turn a light on for a specific time. The timer circuit consumes no standby power when the load is off. B ATHROOMS AND toilets need an exhaust fan to vent humid air or odours outside. It’s a good idea to have the fan running while you shower and then for a little while afterwards, to prevent condensation and mould. This unit makes it easy, by automatically running the fan for a preset period after the wall switch has been turned off and then switching itself off. And while this timer was designed specifically with bathroom or toilet fans in mind, it is equally applicable to exhaust fans in kitchens where cooking odours need to vented outside. Of course, cooking also produces large amounts of water vapour so a fan is 64  Silicon Chip desirable to avoid condensation on the walls which can lead to mould. It has other applications too. For example, many apartment buildings have lights in the foyer or stairwell with pushbuttons to turn them on. This allows people on any level to turn the lights on for long enough to get into or out of the building without the possibility of them being left on for long periods. This unit can perform that task too, when combined with mains-rated momentary pushbuttons or spring-loaded switches. Or do you forget to turn off outdoor lights after visitors have departed? This timer will avoid that problem. You can easily set the time-out from five seconds to one hour by changing an on-board link and possibly a capacitor. The whole thing fits in a standard junction box (Arlec 9071 or equivalent) for ease of installation. And as noted above, it has no standby power so it’s quite “green” (well, the PCB is anyway). Commercial units to do these jobs are available but can be hard to get and expensive. This SILICON CHIP design has relatively few parts and it can handle loads of up to 5A/1250VA. Improvements We published a similar mains timer siliconchip.com.au SWITCH A A A Aperm SWITCH Asw A Aload FAN TIMER Asw A FAN N N Aperm SWITCH N LAMP FAN FAN TIMER Aload A FAN N N N N N (a) (b) (c) Fig.1(a) at left shows how a fan (or light) is normally connected, while Fig.1(b) shows how the wiring is changed so the Timer controls the fan, in conjunction with the switch. Fig.1(c) shows the circuit with the ceiling light in place, where the light and the fan share a common switch. for fans in the October 2005 issue. That design used a PIC16F88 microcontroller and a Triac to control the fan. While it had some fancy features, its standby power was several watts which is something of a drawback these days. As well, its use of a Triac makes it incompatible with some compact fluorescent lamps (CFLs). This new design dispenses with the need for a micro, so there is no need for programming. Instead, it is based on a cheap and commonly available CMOS oscillator/counter IC. There is no Triac either, as the load switching is done by a mains-rated relay. Connections The Mains Timer is designed to be added to an existing fan or light installation with minimal fuss. Fig.1(a) shows how a typical fan is wired up (this also applies to lights). The 3-core mains cable is normally run in the ceiling cavity with the Active line splitting out to run down to the power switch, mounted on the architrave or wall below. The switched Active line then runs back up into the ceiling to connect to the fan. Neutral and possibly Earth are permanently connected to it. Fig.1(b) shows how the Mains Timer would be connected into the circuit. As before, Neutral and Earth wires run straight to the fan. The timer is connected in-line with the switched Active, with the wire from the switch going to its “Asw” terminal and the wire to the fan coming from its “Aload” terminal. Two additional wires, “Aperm” and “N”, are run back to the Active and Neutral supply. For the sake of convenience, the junction of the two Neutral lines may be made on the siliconchip.com.au Mains Timer PCB if desired. The additional Active line (Aperm) is necessary to power the fan or light after the mains switch has been turned off. The Neutral line is used to power the timer circuitry without affecting the voltage delivered to the load. Finally, Fig.1(c) shows how you can add an exhaust fan to a room which only has a light switch, using the one switch to turn on the both the fan and the light. When the switch is turned off, the light goes off immediately but the fan runs for the preset time before it too goes off. All you have to do is run the switched Active line from the light to the Asw terminal on the timer and then run the Active, Neutral and load (fan) wires as shown. Circuit description Fig.2 is a simplified diagram of the S1 (OFF BOARD) K Timer, showing how its power supply works. This configuration allows it to have zero standby power. Initially, the mains switch (S1) is off and so is D1 D3 A 10M 1W K K D5 A A K K D4 330nF X2 K K A NEUTRAL This circuit is directly connected to the mains and all parts operate at 230VAC. As such, contact with ANY part of the circuit could be fatal! DO NOT operate this circuit unless it is fully enclosed in the specified junction box and DO NOT touch any part of the circuit while it is connected to the mains. Note that, in most states, a licensed electrician must be used to connect this unit to fixed electrical wiring. RELAY 1 MAINS ACTIVE ACTIVE TO LOAD Warning! ZD1 24V 220F TIMER (IC1) A A A D6 D2 470 1W Fig.2: simplified circuit of the timer power supply. The mains is rectified by diodes D3-D6, filtered with a 220µF capacitor and regulated by 24V zener diode ZD1. A 220nF X2 capacitor in the Neutral leg limits the mains current. Diodes D1-D2 work in conjunction with Relay1 to supply power for the circuit after switch S1 is turned off, until the off-timer period expires. August 2012  65 +24V +24V INSTALL ONE LINK ONLY 16 Vdd 100nF* 9 Ctc O14 O13 O12 1M 10 O10 Rtc 3.3M 11 12 LK1 2 LK2 1 LK3 15 LK4 3.3M 20min RS O6 O5 Vss 8 O4 B Q1 BC557 Q2 BC557 K C D5 C 5min K K A A D1 D3 A RELAY1 K 1min D7 CON1 A 6 A 4 D9 5 7 K K 1 A 2 K 470 A +12V 22nF X2 22k 220F 35V ZD1 24V 1W K K 330nF X2 A A K 10M 1W D2 D6 SC 2012 * VALUE MAY BE CHANGED FOR DIFFERENT DELAYS (SEE TEXT) D4 A BC557 B D1-D8: 1N4004 A MAINS TIMER FOR LIGHTS & FANS K A K N K A D9: 1N4148 Asw 4 1W 0V WARNING: ALL PARTS AND WIRING IN THIS CIRCUIT MAY BE AT 230V AC POTENTIAL WHEN OPERATING. CONTACT COULD BE FATAL! Aload 3 D8 1nF Aperm 0V ZD2 12V 1W 220nF 10k 100k E 10min 13 E B O9 IC1 4060B O8 14 O7 MR 3 1M E C ZD1, ZD2 A K Fig.3: the full circuit of the Mains Timer. IC1 is a 4060 CMOS oscillator/counter which provides the time delay. It controls Relay1 to switch power to the load as well as the circuit’s power supply (refer to Fig.2). Diode D8 allows the timer to sense when the mains switch is turned off; while it is on, the timer is held in reset as IC1’s MR input (master reset, pin 12) is held high. Relay1. So the circuit has no Active connection until switch S1 is closed. When S1 is closed, the mains voltage is applied across the bridge rectifier formed by diodes D3-D6. The output is limited to 24V DC by zener diode ZD1 and filtered by a 220µF capacitor. The mains input current is limited in the Neutral leg by a series 330nF X2 capacitor with a parallel 10MΩ bleed resistor and a series 470Ω resistor for in-rush current limiting. Once the 220µF capacitor has charged up, the timer circuitry energises the coil of Relay1 and its contacts switch over. The incoming mains Active is then connected to the junction of diodes D1 and D2 via the relay and these are effectively in parallel with diodes D3 and D4 in the bridge rectifier. But when switch S1 is turned off, the circuit remains powered, via the relay contacts and the bridge rectifier formed by D1, D2, D5 & D6. The circuit remains powered until the timer runs its course, at which point Relay1 is switched off and the 24V supply collapses, bringing it back 66  Silicon Chip to the initial state, where it is not consuming any power. Note that the circuit is powered directly from the 230VAC mains and floats at or near mains Active potential so it must be considered as hazardous (lethal) once it has been connected. Also note that zener diode ZD1 dissipates little power as the 330nF X2 capacitor value has been chosen to limit the mains current to a value very close to that drawn by the relay. Details Now take a look at Fig.3 which shows the full circuit diagram. Besides showing the details of the timing circuitry (at left), this also reveals an additional diode (D8) which is connected to mains Active via switch S1 (off board). This diode allows the timer to sense when S1 is turned off and this is the reason we didn’t simply arrange for Relay1’s contacts to short out the switch when it turns on. If we had, there would have been no way to sense when S1 is switched off. While switch S1 is on, D8 is for- ward-biased and so at the peak of each mains cycle, current can flow through it and its series 10kΩ current-limiting resistor to charge the 1nF capacitor between the MR (master reset, pin 12) and Vss (negative supply, pin 8) terminals of timer IC1. While S1 is on, MR is kept high and this holds the timer in its reset state, with its oscillator inhibited and its 13-bit counter reset to zero. While the counter is zero, all its outputs (O4-O10 and O12-O14) remain low. Depending on how the timer is configured, one of the four outputs O10 or O12-O14 is connected to the base of PNP transistor Q1 via a 3.3MΩ resistor. That output being low, it sinks current from the base of Q1, turning it on. It in turn drives PNP transistor Q2, which energises Relay1’s coil, turning it on. One of its set of contacts supplies mains power to the load and the other connects the mains to this circuit, as described earlier. Note that Q1 and Q2 are in a PNP Darlington configuration. The 1MΩ resistor between Q2’s base and emitter siliconchip.com.au shunts any leakage current from Q1, preventing a false turn-on. When switch S1 is turned off, current can no longer flow through D8 and so the 1nF capacitor is discharged by its parallel 100kΩ bleeder resistor. The 22nF X2 capacitor at the anode of D8 is necessary to suppress capacitively-coupled electrical noise and leakage current through S1 from keeping the MR pin high even when S1 is off. When MR goes low, IC1’s internal oscillator starts running and incrementing the counter. Oscillator frequency The oscillator’s frequency is set by the combination of the 100nF capacitor and 1MΩ resistor between pins 9 & 10 of IC1. The formula in the 4060 data sheet gives us 4Hz for these values but we measured 7Hz on two different prototypes so we use this measured value and assume that the formula must be inaccurate when such a high resistor value is used (even though it is within the specified range). So IC1’s internal counter is incremented seven times per second. The 3.3MΩ resistor minimises frequency variation with supply voltage by isolating the input capacitance of pin 11. IC1’s O10 output goes high after 512 (29) oscillations or 512 ÷ 7Hz = 73 seconds. Similarly, the O12 output goes high after 5 minutes, O13 after 10 minutes and O14 after 20 minutes. So depending on which of links LK1-LK4 is installed, after the selected delay, Q1 and Q2 switch off. This de-energises the coil of Relay1 and diode D7 absorbs the resulting back-EMF. This cuts power to the load and the Timer also powers down as the 220µF capacitor discharges. If the mains switch is turned back on before the time-out (ie, while the load is still energised), the MR input of IC1 is pulled high and so the timer is reset. When the switch is turned off, the timer again starts counting from zero. We need 24V to drive the relay coil but IC1 has a maximum rating of 15V so the supply from the 220µF capacitor is fed via a 22kΩ resistor to the 12V zener diode, ZD2. This limits the supply for IC2 to +12V. So while it might not be immediately apparent from the circuit of Fig.3, the Mains Timer has two supply rails: +24V and +12V. Note, however, that IC1 (4060B) is actually connected siliconchip.com.au between the +24V and +12V rails. Don’t be fooled by those low DC voltages though – as stated, this whole circuit “floats” at mains potential (230V AC) and is potentially lethal. The 220nF capacitor and 22kΩ resistor also form a low-pass RC filter to remove much of the 100Hz ripple from IC1’s supply. You might be wondering about the purpose of diode D9. It stops the timer from running once the relay switches off. Normally, this isn’t an issue since the power supply then collapses. But without D9, if the delay was set short enough, it’s possible the relay could come back on while the mains switch remained off. Other uses Up to now we have been describing how the timer circuit is used with a standard wall switch and in that case, the timer provides an off-delay, ie, the load is powered while ever the switch is on as well as for the preset period after it is switched off. But this is no good if you want to use the Timer to prevent the load from being accidentally left on after use, which can be a concern for both fans and lights. If that’s your aim, you simply need to change the mains switch to either a momentary push-button or a spring-loaded momentary switch. These are available from electrical suppliers in the standard Keystone format to clip into a wall-plate. They may be sold as a bell-press button or similar. Parts List 1 PCB, code 10108121, 60 x 76mm 1 4-way PCB-mount (screw fix) terminal barrier (CON1) (Jaycar HM3162, Altronics P2103) 1 5A 24V DC coil DPDT or DPST relay (Altronics S4195D or equivalent) 1 junction box (eg, Arlec 9071) 2 M3 x 15mm machine screws and nuts 4 M3 shakeproof washers 4 No.4 x 9mm self-tapping screws Semiconductors 1 4060B oscillator/counter (IC1) 2 BC557 PNP transistors (Q1,Q2) 1 24V 1W zener diode (ZD1) 1 12V 1W zener diode (ZD2) 8 1N4004 1A diodes (D1-D8) 1 1N4148 small signal diode (D9) Capacitors 1 220µF 35V/50V electrolytic 1 330nF 250VAC X2 MKT/MKP (Element14 Part No. 1215460; Altronics Cat. R3129) 1 220nF MKT polyester 1 100nF MKT polyester (see panel below) 1 22nF 250VAC X2 MKT/MKP 1 1nF MKT polyester Resistors (1%, 0.25W unless stated) 1 10MΩ 1W 5% 1 22kΩ 2 3.3MΩ 1 10kΩ 2 1MΩ 1 470Ω 1W 5% 1 100kΩ 1 0Ω Changing The Switch-Off Time Delay Four time delay options are available by default: one minute, five minutes, 10 minutes and 20 minutes. These are selected by installing one of links LK1, LK2, LK3 or LK4 respectively. If none of these suit, you can change the value of the 100nF MKT capacitor to give other time delays as shown in Table 1 below. Simply select the appropriate value and then install the corresponding link to give the desired delay. Note that these times are approximate and can vary by about ±20%, due to component tolerances and rounding errors. Table 1: Setting The Timing C1 330nF 220nF 150nF 100nF 22nF 15nF 4.7nF LK1 1 hour 45 minutes 30 minutes 20 minutes 4 minutes 3 minutes 1 minute LK2 30 minutes 20 minutes 15 minutes 10 minutes 2 minutes 1.5 minutes 30 seconds LK3 15 minutes 10 minutes 7.5 minutes 5 minutes 1 minute 45 seconds 15 seconds LK4 4 minutes 2.5 minutes 2 minutes 1 minute 15 seconds 10 seconds 5 seconds August 2012  67 D6 N 4004 IC1 4060B 100nF* 1nF (LK4) 3 .3M 100k 10k (LK3) LK1 + 12V 1M 3 .3M D5 C 2012 10M 1W 470 1W 4004 MAINS NEUTRAL D8 35V D9 Mains Timer 4004 1W ZD2 D4 22k 4004 22nF X2 N 220F 4004 24V SW D2 1W ZD1 L LOAD (FAN OR LIGHT) N E (if present) D3 Asw D1 4004 4004 A 220nF 1M A Aperm Aload MAINS EARTH Q1 BC557 4148 (S4195D) SWITCH BC557 Q2 RELAY1 (LK2) MAINS ACTIVE D7 4004 remiT 1210108121 180101 330nF X2 WARNING: ALL PARTS ON THIS PCB OPERATE AT MAINS POTENTIAL (230VAC). CONTACT COULD BE FATAL. Fig.4: follow this layout and wiring diagram to assemble the timer board. Take care with the orientation of the diodes, the 220µF capacitor and IC1. Note that only one link (LK1-LK4) is installed, giving four time options (see text and panel for details on selecting the appropriate link). The completed PCB fits into a junction box. It’s shown here mounted on the base. So if you swap the switch over to a momentary pushbutton and wire in the timer as shown above, the load will then turn on for the chosen period when the button is pressed and then automatically turn off again. The button can also be pressed any time the load is on, to reset the timer and keep it on for the preset period. Construction The Mains Timer is built on a PCB 68  Silicon Chip coded 10108121 (60 x 76mm). This fits in a standard junction box (eg, Arlec 9071). But note that not all junction boxes are the same and you will need to check that the one you are purchasing has mounting holes in the same positions as those of the PCB. The PCB is available from the SILICON CHIP Partshop. While it is notionally a single-sided design, we have made it double-sided and added parallel tracks on the top to improve its mains current-carrying capability. In the absence of a kit being available, we recommend you build the timer using one of our boards since they have a solder mask which greatly reduces the chance of leakage paths developing and causing flash-over. Referring to the PCB overlay diagram (Fig.4), start by installing all the small resistors. Use a DMM to check each as you go, since the colour codes can be hard to read accurately. The 0Ω resistor is used for one of LK1LK4 and you must only install one of these. Refer to Table 1 and select your desired time-out, then fit the link (0Ω resistor or tinned copper wire) in the appropriate position. Follow with the diodes, being careful with the orientation, and make sure the smaller 1N4148 diode goes in the top-right corner. Note that the orientation of diodes D1-D6 and D8 alternates as you go down the board. Install the two zener diodes (ZD1 & ZD2) also. These are in a larger glassencapsulated package and both are orientated with the cathode stripe towards the top of the PCB. Solder IC1 in place next, with the pin 1 notch or dot towards the top of the board as shown. Follow with the two 1W resistors – don’t get them mixed up. You can then fit the smaller MKT capacitors. The 100nF capacitor can be a different value if you want to adjust the timing – see Table 1. Now install the two transistors, bending their pins with a small pair of pliers to fit the pads provided. The flat faces are orientated as shown on the overlay diagram. You can then solder the electrolytic capacitor in place, with the longer (+) lead towards the top of the board. Follow with the two X2 capacitors. Note that the larger X2 capacitor can have one of several lead pitches so multiple pads have been provided to suit them all; its left-most lead should go in the left-most hole provided and the other into the best fitting position. After that, solder the relay in place. The terminal barrier is attached to the PCB using two 15mm M3 machine screws with a star washer under each screw head and nut. Check that the connector is straight and do the screws up tight before soldering the four pins. Use a hot iron to ensure that the solder joints form proper fillets. Finally, attach the PCB to the junction box baseplate using four small siliconchip.com.au self-tapping screws and you are ready to test it. Testing If you have a bench supply and would like to test the PCB before it is installed and connected to the mains, you can do so. Connect a DC supply, set to slightly less than 24V, across ZD1, with the positive lead to its cathode (striped end). The circuit should draw about 30mA so if it draws much more than this, switch off and check for faults. The relay may or may not switch on initially; if it does not, apply 24V to the SW terminal of CON1 and it should turn on. After the delay you have selected, it should turn off again. Assuming it does, the unit is working correctly and you can power it down. Otherwise, carefully check the component orientation, component values and solder joints. Installation Note that, in most states, this unit should be connected to the house wiring by a licensed electrician only. Note also that all parts on this circuit operate at mains potential (230VAC), so do not touch any part of the circuit when power is applied. It’s a matter of following the wiring diagram (Fig.4) to make the connections. You must switch off the circuit before you start working on it and check that it really is off before starting work. Ensure that the junction box baseplate is securely anchored to a joist or ceiling batten using the supplied screws before doing the wiring. Note that you will need to knock out one or two panels in the junction box housing to allow the wiring to pass through. The mains cables must be clipped or clamped to convenient beams or joists once you have finished. This keeps the ceiling space (or wherever the unit SILICON CHIP Fig.5: front panel label for the Mains Timer. Print this out, laminate it and glue it to the lid of the junction box (eg, using silicone sealant) for future reference. MAINS TIMER MAINS ACTIVE SWITCH Aperm Aload MAINS EARTH Asw A E (if present) N LOAD (FAN OR LIGHT) PC BOARD N MAINS NEUTRAL WARNING: ALL PARTS INSIDE OPERATE AT 230VAC. DISCONNECT FROM MAINS BEFORE SERVICING. is installed) neat and prevents wires from being tripped over, accidentally yanked, etc. It also makes it easier to trace the wires to see where they go. In some cases, you may wish to use a single switch to control both a light and a fan – see Fig.1(c) for wiring details. Now, both the light and the fan will come on when the switch is turned on but when it is turned off, the light will go off immediately while the fan will continue to run for the programmed period before turning off. If the fan has an existing earth connection, this should be left intact. Fans with a metal housing will tend to have an earth wire while those with a plastic housing may not. If the earth wire has to be cut, it can be re-joined using a double-screw BP connector. Once everything is hooked up, check that all the terminal barrier screws are tight and there are no stray strands of copper from any of the wires that might short to something else. You can then clip the terminal barrier covering in place, fit the junction box cover, turn the power circuit back on and check that everything is working as expected. Fans with 3-pin plugs Many existing ceiling fans and all new fans these days come fitted with a lead complete with 3-pin mains plug. This simply plugs into an adjacent mains socket in the roof space. In that case, a better idea may be to ditch the junction box and install the Mains Timer PCB in an IP65 sealed box. This can then be fitted with a socket, so that the fan can be plugged into it. Short delay Finally, note that in operation, you may notice a short delay between flicking the switch and the load coming on. This is usually only a couple of hundred milliseconds and is due to the power supply capacitors charging to the relay’s operating voltage. It’s short enough that it should not present a problem, especially when used with fans, which take some time to spin SC up anyway. Table 3: Capacitor Codes Value 330nF 220nF 100nF 22nF 1nF µF Value IEC Code EIA Code 0.33µF 330n 334 0.22µF 220n 224 0.1µF 100n 104 .022µF   22n 223 .001µF    1n 102 Table 2: Resistor Colour Codes o o o o o o o o o siliconchip.com.au No.   1   2   2   1   1   1   1   1 Value 10MΩ 3.3MΩ 1MΩ 100kΩ 22kΩ 10kΩ 470Ω 0Ω 4-Band Code (1%) brown black blue brown orange orange green brown brown black green brown brown black yellow brown red red orange brown brown black orange brown yellow violet brown brown single black stripe 5-Band Code (1%) brown black black green brown orange orange black yellow brown brown black black yellow brown brown black black orange brown red red black red brown brown black black red brown yellow violet black black brown single black stripe August 2012  69