Silicon ChipTwo 230VAC Mains Timers (Cyclic Pump Timer and Period Timer) - September 2016 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Taiwan's booming electronics industry
  4. Feature: LUCAS: Bringing The Dead Back To Life by Ross Tester
  5. Feature: A Look At Military Robots by Dr David Maddison
  6. Project: Two 230VAC Mains Timers (Cyclic Pump Timer and Period Timer) by John Clarke
  7. Feature: Electronex: Electronics Design & Assembly Expo by Silicon Chip
  8. Feature: Taiwan’s Booming Electronics Industry by Leo Simpson
  9. Serviceman's Log: The unfit Fitbit that was made fit by Dave Thompson
  10. Project: 4-Input Automotive Fault Detector by Dr Hugo Holden & Greg Swain
  11. Project: Micromite Plus Explore 100 With Touchscreen, Pt.1 by Geoff Graham
  12. Project: Touchscreen Appliance Energy Meter, Pt.2 by Jim Rowe & Nicholas Vinen
  13. PartShop
  14. Vintage Radio: Astor’s M5/M6 5-transistor mantel sets by Ian Batty
  15. Market Centre
  16. Advertising Index

This is only a preview of the September 2016 issue of Silicon Chip.

You can view 54 of the 112 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 "Two 230VAC Mains Timers (Cyclic Pump Timer and Period Timer)":
  • Cyclic Timer / Mains Period Timer PCBs [10108161/2] (AUD $10.00)
  • PIC12F675-I/P programmed for the Cyclic Timer / Mains Period Timer [1010816A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Talema AC1015 Current Transformer (Component, AUD $20.00)
  • Firmware (ASM and HEX) files for the Cyclic Timer / Mains Period Timer [1010816A.HEX] (Software, Free)
  • Cyclic Timer / Mains Period Timer PCB patterns (PDF download) [10108161/2] (Free)
  • Cyclic Timer / Mains Period Timer lid panel artwork and drilling templates (PDF download) (Free)
Items relevant to "4-Input Automotive Fault Detector":
  • Automotive Fault Detector PCB [05109161] (AUD $10.00)
  • Automotive Fault Detector PCB pattern (PDF download) [05109161] (Free)
Items relevant to "Micromite Plus Explore 100 With Touchscreen, Pt.1":
  • Micromite Plus Explore 100 PCB [07109161 RevC] (AUD $15.00)
  • PIC32MX470F512L-120/PF programmed for the Micromite Plus (Programmed Microcontroller, AUD $25.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • MCP120-270GI/TO Supply Supervisor IC (TO-92) (Component, AUD $2.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Firmware (HEX) file and documents for the Micromite Mk.2 and Micromite Plus (Software, Free)
  • Micromite Plus Explore 100 PCB pattern (PDF download) [07109161 RevC] (Free)
Articles in this series:
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 With Touchscreen, Pt.1 (September 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)
  • Micromite Plus Explore 100 Module, Pt.2 (October 2016)
Items relevant to "Touchscreen Appliance Energy Meter, Pt.2":
  • Touchscreen Appliance Energy Meter PCB [04116061 RevI] (AUD $15.00)
  • PIC32MX170F256B-50I/SP programmed for the Micromite-based Touchscreen Energy Meter v1.01 [0411606A.hex] (Programmed Microcontroller, AUD $15.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (Component, AUD $5.00)
  • CP2102-based USB/TTL serial converter with microUSB socket and 6-pin right-angle header (clone version) (Component, AUD $3.00)
  • DS3231-based Real Time Clock & Calendar module with mounting hardware (Component, AUD $6.00)
  • ACS718 20A isolated current monitor (Component, AUD $15.00)
  • Firmware (HEX) file and BASIC source code for the Micromite-based Touchscreen Appliance Energy Meter [v1.01] (Software, Free)
  • Touchscreen Appliance Energy Meter PCB pettern (PDF download) [04116061 RevG] (PCB Pattern, Free)
  • Touchscreen Appliance Energy Meter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen-Controlled Energy Meter, Pt.1 (August 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.2 (September 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)
  • Touchscreen Appliance Energy Meter, Pt.3 (October 2016)

Purchase a printed copy of this issue for $10.00.

Not One . . . But Two (Your Choice!) 230VAC mains timers to build Version 1 - Cyclic Timer for Pumps and Compressors Version 2 - Period Timer to run an appliance for set time Do you have a pump or compressor which runs cyclically? Then you don’t want it to keep running if a pipe bursts, do you? To stop that happening, build the SILICON CHIP 230VAC Cyclic Pump Timer. Or perhaps you have an appliance which you want to run for a set time and then turn off. For that you need to build our 230VAC Period Timer. It can be set to run for any period up to 250 minutes and then it will turn off. T he initial impetus for these timer projects came from a reader’s suggestion. He had a pump which supplied water to his house on a farm. One day the pipe from the pump to the house burst and then the pump completely drained his rain-water tanks. And coincidentally, he also had an air compressor which again had burst a hose so the compressor ran for the entire weekend! In both of these situations, the result could have been even worse if the pump had failed from running dry or the compressor motor had burnt out because of overheating. After all, most pumps and compressors are not usually rated for continuous operation. Both of these situations could have been avoided with a suitable timer. Mind you, the total draining of water storage on a farm could also happen if a tap was inadvertently left on. 32  Silicon Chip So that was how the Cyclic Pump Timer came to be designed. It monitors when power is being used and if it runs for more than the usual cycle, for example 10 minutes, its internal heavy duty relay will switch off the power. When it switches off the power, it lights a red LED which tells you a fault condition has occurred. You can restore operation by hitting the Reset button and then determine where the fault lies. Features: • 30A switching contacts • Configurable as a safety timer or a standard timer • Timer LED indicators • Versatile timing range • Draws minimal standby power (<0.17W) Version 2 – Period Timer During the design process we realised that the proposed circuit had a wider application, as a general purpose timer, but without the current monitoring facility. So that became version 2, a straight 230VAC Timer. This could be used for any device that you might turn on and then you might forget to turn it off after you used it. So it could run for many hours or even days which would be completely undesirable. Not only does it create a fire risk, it would also chew through power, costing you $$$. With this Period Timer, you could set a reasonable time when you turn on a soldering iron, an electric iron or a battery charger etc, without its own cut-out. We are sure you’ll think of lots of other applications. Both versions of the timer use the same PCBs and both are housed in a small diecast case with an IEC mains siliconchip.com.au By JOHN CLARKE connector and fuse for the power input at one end and a 250VAC mains outlet at the other end of the box. On the lid are two pushbutton switches, a knob to set the operating period and two or three LED indicators. Their functions vary in each version of the timer. Time period The 230VAC Cyclic Pump Timer’s period can be varied from 1 to 100 minutes while the 230VAC Timer (for appliances) can be set from 2.5 to 250 minutes (a little over four hours). Now let’s have a look at the circuit which is shown in Fig.1 overleaf. This includes all the circuitry for version 1. To build the simpler 230VAC Period Timer, you leave out all the components associated with the current transformer, in the green shaded section of the circuit and one of the LED indicators. The circuit So now we will discuss the full circuit which is controlled by a PIC12F675 microprocessor. For simplicity, we’ll assume the timer is being used with a pump – compressor and any other cyclical device operation is identical. All the 230VAC mains circuitry is shown on the righthand side of the circuit, highlighted in pink. siliconchip.com.au The mains supply comes in via an IEC male connector. The Active line from the 230VAC mains passes through the core of the current transformer (T1), effectively a single-turn primary, and then through the contacts of a 30A relay (RLY1). This in turn connects to the Active (A) terminal of the 3-pin mains output socket. The secondary winding of current transformer T1 drives a bridge rectifier consisting of diodes D1 to D4. The rectified output is fed via a 1kΩ resistor to a 4.7V zener diode, which limits the maximum DC level, and is then filtered by a 10µF capacitor and connected to the AN0 input (pin 7) of the PIC12675F microprocessor. If there is no current passing in the primary of transformer T1 (ie, the pump is not turned on), it produces no voltage at its secondary. But if the current exceeds 700mA (0.7A), the resulting voltage of about 1V, detected at pin 7 of IC1, tells the microprocessor that the pump has started running. It then starts its timer function, having first read the voltage at the AN1 input, pin 6. This input monitors the wiper of potentiometer VR1 which is the timer control. VR1 can be adjusted between 0V and 5V, giving a time of one to 100 minutes, as mentioned earlier. With the pump running, green LED1 will be flashing to indicate the timer is functioning. If the pump operates normally, the timer function will be stopped when the voltage at pin 7 drops to zero, indicating that pumping has stopped. LED1 will stop flashing and will be on continuously. On the other hand, if the pump continues to run and exceeds the period set by potentiometer VR1, the GP4 out- Specifications: Input....................................230VAC 10A Power consumption.............Less than 0.17W with relay off, .less than 1.33W with relay on Time-out adjustment......... 1-100 minutes (Cyclic Pump Timer) .or 2.5-250 minutes (Period Timer) Cyclic Pump thresholds..... Above 700mA AC (approximately 160W for a resistive load) for timer start, .below 250mA AC for timer reset (around 60W) September 2016  33 µ µ µ µ µ µ   SC 2016  230VAC CYCLIC PUMP TIMER put, pin 3, goes high and switches NPN transistor Q1 on. This powers the coil of the 30A relay (RLY1) to disconnect mains power from the pump. Red LED3, also connected to pin 3 of IC1 via a 1kΩ resistor will also light up, to indicate a fault condition. A 1N4004 diode (D5) is used to quench the backEMF from the relay’s coil when Q1 is switched off. The timer is reset by pressing Reset switch S2. This pulls the MCLR input, at pin 4 of IC1, low to restart the program within IC1. MCLR is pulled high via a 10kΩ resistor while the 10µF capacitor between ground and the MCLR input ensures that IC1 is given a sufficient reset period. The capacitor keeps the input low for sufficient time for a device reset, even if S2 is only momentarily pressed. Pushbutton S1 and yellow LED2 provides an EXTEND function. This is provided to allow a pump or compressor to run for much longer than the usual operating period when it is first turned on – to allow the system to come up to operating pressure. When the pump finally turns off, 34  Silicon Chip Fig.1: the circuit for version 1, the Cyclic Pump Timer. The current through T1 when the pump, compressor, etc is in operation produces a voltage in its secondary which is sensed by the PIC micro. Power is cut if this voltage goes on for too long. LED2 will go out and then the timer is ready for the next on cycle of the pump (or compressor). Power Power for the timer circuit is provided by a Vigortronix switchmode module (REG1), which converts the incoming 230VAC into 12V DC output, to drive the 12V relay coil. Its 12V output is also fed to a 5V 3-terminal regulator (REG2) to power the microprocessor and the LEDs. The incoming 230VAC supply connects to REG1 and a metal oxide Varistor (MOV1), the latter to suppress transients, in conjunction with a 100nF X2-rated capacitor which provides a degree of hash filtering. REG1’s 12V DC output is filtered with a 4.7µH inductor and 47µF capacitor. We have used the switchmode module because it is cheaper than a conventional small mains transformer, bridge rectifier and capacitor supply and it is also very efficient. This approach results in a very low standby power of less than 0.15W. As well, the 5V regulator draws a very low quiescent current, less than 15µA, and most of the time the microprocessor is in sleep mode if it is not providing a timing function. Typically, IC1 wakes up every 2.3 seconds and checks for a DC voltage at its AN0 input, pin 7. If present, that indicates that the pump is running and timing function should be started. Note that the contacts of the relay are wired so that 230VAC is connected via the current transformer to the mains output socket when the relay is not energised. Specifically, we are using the NC (normally connected) and COMmon contacts. The relay is only energised if a fault condition is detected and that breaks the mains connection to the pump. Even then, the overall power consumption of the timer is only about 1.3W. So that describes the circuit operation of the Cyclic Pump Timer. Now let’s have a look at Fig.2 which is the circuit of the simpler 230VAC Timer. It is similar to that of Fig.1 except that all the components associated with the current transformer (in the green siliconchip.com.au shaded section of Fig.1) are omitted. This version of the circuit only has two LEDs, green LED1 and red LED2. The other important difference is the contact wiring of the relay. In this case, the relay is turned on during the selected time (as set by potentiometer VR1) and so the 230VAC passes via the NO (normally off) and COMmon contacts. So this means that when the relay is energised, the appliance connected to the mains output socket is powered and that only happens when the timer is started, by pressing switch S1. When timing is in progress, LED2 flashes and the GP4 output of IC1, pin 3, is high to turn on transistor Q1 and the relay coil. At the end of the selected time period, Q1 is turned off to de-energise the relay and LED2 stops flashing. Of course, the timing period can also be terminated by pressing S2, the Stop button. Note that both versions of the circuit, Fig.1 and Fig.2, use the same programmed microprocessor. It needs to detect which circuit it has been installed in and then it selects the correct software routine. How does it do this? In both versions of the circuit, there is a 100kΩ resistor connected between OUT As already noted, IC1 is normally in sleep mode, during which it consumes minimal power. It wakes up each time its watchdog timer times out (every 2.3 seconds) or if switch S1 is closed. For the Cyclic Pump Timer, each time IC1 is woken by the watchdog timer, it CON1 +12V IN GND 10 µF Other notes on the software REG 1 L1 4.7 µH +5V pin 7 (AN0) and 0V but in the circuit of Fig.1, a 10µF capacitor is also present (as part of the current transformer circuitry). Each time power is applied to the micro, it briefly pulls the AN0 pin high via an internal pullup resistor. After the pullup is switched off, 100 milliseconds later it measures the voltage at pin 7. If the voltage is above 200mV, that tells the micro that it is connected in the Cyclic Pump Timer circuit and it operates accordingly. On the other hand, if the voltage at pin 7 is very close to zero, that means that there is no 10µF capacitor present and the micro is in the circuit of Fig.2. By taking this approach, we can use the same microprocessor for both versions of the Timer and there is no need for the constructor to make any program selection by means of links etc. 100nF 47 µF 10 µF X2 Class1 MOV1 +5V 10k 100nF STOP K 1 4 Vdd MCLR/GP3 GP0/AN0 +12V A  LED2 10 µF S2 RLY1 30A 1k D5 1N4004 TIME VR1 10k 6 AN1/GP1 ON  100nF 8 10A 250VAC POWER OUT N A C 1k B E 5 Q1 BC 337 E CASE Vss A LED1 GP2 WARNING : WIRING & COMPONENTS IN THIS HIGHLIGHTED AREA OPERATE AT 230VAC . CONTACT COULD BE FATAL! A 7 IC1 3 2 GP5 PIC12F675 GP4 –I/P 2.2k CON2 K FUSED IEC MALE INPUT CONNECTOR START 100k S1 K SC  2016 230VAC TIMER D5 Fig.2: the general-purpose timer is simpler because it doesn’t have the current-sensing circuitry. Power to the appliance is cut when a preset time is reached. siliconchip.com.au September 2016  35 The software then checks if the GP2 pin is low, setting the extend feature for the Cyclic Pump Timer (or starting the 230VAC Timer). The GP2 output reverts to an input unless the LED is required to be driven independently of the switch being pressed. Switch S2 is the Reset for the Cyclic Pump Timer and the stop button for the 230VAC Timer. This connects to 10108162 C 2016 REV.A LED2 1k A 230VAC TIMER S1 EXTEND GND S2 VR1 10k LM2936-5 10k A 4x 10µF 26180101 TIME FAULT LED3 1k 100nF IC1 ON LED1 PIC12F675 A REG2 CON4 2.2k checks the AN0 input for a DC voltage above 200mV, as noted above. Switch S1 is the Extend button for the Cyclic Pump Timer and the Start button for the straight 230VAC Timer. When S1 is pressed, this either wakes IC1 from sleep or if it is already awake, the GP2 input is changed to a low output that drives the indicator LED (LED2). 100nF RESET (S1 & S2 MOUNT ON FRONT PANEL) D5 HEAVY DUTY MAINS TIMER 4004 4148 1k 4148 100k 4148 D4 T1 L1 1k 4.7V TO RLY1 COIL 47µF BC337 Q1 4.7µH ZD1 (1W) CON2 CON3 D1 4148 GND 10k CON1 A COIL N 100nF X2 COM C 2016 REV.A N(2) NO 4(–) 0V 3(+) +12V 12VDC 250mA MOV1 240VAC L(1) 10108161 RLY1 S-4211 REG1 COVER EXPOSED TERMINAL LUGS IN HEATSHRINK TUBING NC 30A CONTACTS 16180101 Vigortronix VTX-214-003-112 Fig.3 (above) shows the PCB layout for version 1, the Cyclic Timer. Match this with the photos below which are close to same size. 36  Silicon Chip the master clear (MCLR) input of IC1. Pressing and releasing this switch causes the software to restart, clearing the timer. Cycling timer assembly Both versions of the Timer use two PCBs. One PCB is coded 10108161 and measures 85 x 78mm. The second is coded 10108162 and measures 83 x 35.5mm. The two PCBs are housed in a diecast box measuring 119 x 94 x 57mm and connected together with a short IDC cable. As already noted, the major difference between the two versions is that the current transformer and its associated components are only used in the Cyclic Pump Timer. Fig.3 shows the two PCB overlays for the Cyclic Pump Timer. You can begin construction by installing the resistors on each PCB, using a multimeter to check the value of each one before inserting it on the PCB (and/or refer to the resistor colour code table). Then install inductor L1, diodes D1 to D5 and ZD1 (if used). Note that D5 is a 1N4004 while D1-D4 are 1N4148s. The inductor looks like a fat resistor and has four colour bands: yellow (4), violet (7), gold (decimal point 0.1) and silver, signifying a 4.7µH inductor with a tolerance of ±10%. REG2 on the smaller PCB and Q1 on the main PCB can be soldered in next. Don’t get the regulators mixed up as they look similar, apart from their type markings. REG2 needs to be installed so the top of the package is no higher than 8.5mm above the PCB. A socket can be used with IC1 on the smaller PCB if you wish. Take care to orient each with the correct polarity. We used PC stakes for the GND terminal on the main PCB, plus the connections to switches S1, S2 and potentiometer VR1 on the smaller board. Five PC stakes are used for VR1; three for the potentiometer terminal connections, one for the GND and the siliconchip.com.au FUSED IEC MALE SOCKET COVER IN SILICONE MAINS OUTLET SOCKET T1 CON1 N (LID) E A A COIL N COM N RLY1 S-4211 240VAC L(1) N(2) E A NO 4(–) 0V 3(+) +12V 12VDC 250mA CRIMP EYELETS FASTENED WITH M4 SCREW, NUT & STAR LOCKWASHER NC 30A CONTACTS 16180101 NOTE: COVER EXPOSED TERMINAL LUGS WITH HEATSHRINK TUBING Fig.4: here’s the wiring diagram for the Cyclic Timer (version 1). Remember that you are dealing with mains voltages so ensure that all cabling is fully secured with cable ties, as shown here. remaining two for connection of the potentiometer body to the PCB. Cut the shaft of VR1 so that it is 10mm long (measured from the point where the shaft enters the threaded bush) and solder it to five PCB stakes. To ensure a good connection to the potentiometer body, scrape any coating off the metal adjacent to where it will solder to the PC stake, then “tin” it with solder before actually soldering it in place. LED1 to LED3 are mounted so the tops of their lenses are 13mm above the top surface of the PCB. Make sure the longer lead of each LED (the anode) is inserted in the ‘A’ position on the PCB. LED1 is green, LED2 is yellow and LED3 is red. You can check LED colour using the diode test on a multimeter. The LED should faintly glow when the probes are connected to the correct pins. The four 10µF electrolytic capacitors are mounted so that they sit side-on and project out from the side of the PCB (see photo). This is so they don’t foul the lid of the case when the PCB is mounted. Then install the two 100nF capacitors on the same PCB. The 47µF electrolytic capacitor is installed on the main PCB next, again taking care with its polarity. Then fit the 100nF X2 class capacitor and MOV1. These are not polarised. Next, install REG1, current transformer T1 and the terminal blocks, CON1 and CON2. Note that CON1 is a 3-way terminal block with the centre terminal removed (remove the screw and prise out the terminal with a fine screwdriver). Here’s how it all fits in the diecast case. Note the 2nd PCB fitted to the lid of the case via an IDC cable, with the electrolytic capacitors mounted parallel with the PCB so they can fit. Also note the earth lug firmly secured to the case lid. siliconchip.com.au September 2016  37 Parts list – Cyclic 230VAC Timer 1 double-sided PCB coded 10108161, 85 x 78mm 1 double-sided PCB coded 10108162, 83 x 35.5mm 1 diecast box, 119 x 94 x 57mm (Jaycar HB-5064) 1 panel label, measuring 119 x 94mm 1 Australian/New Zealand standard mains socket with side wire entry (Altronics P 8241, Jaycar PS-4094) 1 IEC panel connector with fuse holder (Altronics P 8324, Jaycar PP-4004) 1 Australian/New Zealand standard 250VAC 10A mains plug to IEC socket lead 1 10A slow blow M205 fuse (F1) 1 30A SPDT 12V relay (Altronics S 4211) (RLY1) 1 4.7µH axial inductor (Altronics L 7018, Jaycar LF-1518) (L1) 1 10-way box header and matching IDC plug (Altronics P 5010 & P 5310) (CON3) 1 PCB-mounting 10-way IDC “transition plug” header (Altronics P 5160) (CON4) 1 Vigortronix VTX-214-003-112 12V 3W AC to DC converter (REG1) (element14 # 2401035) 1 AC1015 Talema 15A current transformer (T1: available from SILICON CHIP www.siliconchip.com.au/Shop/7/3438) [not required for version 2] 1 S14K275 MOV (Jaycar RN-3400, Altronics R 4408) (MOV1) 1 3-way screw terminal with 5.08mm spacing (CON1) 1 2-way screw terminal with 5.08mm spacing (CON2) 2 SPST momentary pushbutton switches (Altronics S 1405, Jaycar SP-0702) (S1,S2) 1 16mm 10kΩ linear pot with knob to suit (VR1) 1 DIL-8 IC socket 1 90mm length of 10-way ribbon cable 4 rubber feet 2 5.3mm crimp eyelets (yellow insulated) 7 M3 tapped x 9mm Nylon spacers 16 M3 x 6mm machine screws (or 7 M3 x 6mm countersunk screws and 9 M3 x 6mm machine screws) (for PCB and relay mounting) 2 M3 x 10mm countersunk or machine head screws (for IEC mounting) 2 M4 x 12mm countersunk or machine screws (securing earth eyelets) 4 M3 nuts 2 3mm inner diameter star washers (under IEC connector nuts) 2 M4 nuts with star washers 1 20mm length of 3mm diameter heatshrink tubing (relay coil terminals) 1 50mm length of 6mm diameter heatshrink tubing 1 250mm length of 10A three core mains cable (for Neutral blue wire, Active brown wire and Earth green/yellow wire) 1 60mm length of 0.7mm diameter tinned copper wire 9 PC stakes 7 100mm long cable ties Semiconductors 1 PIC12F675-I/P programmed with 1010816A.hex (IC1) 1 LM2936-5.0 ultra-low quiescent current 5V regulator (REG2) 1 BC337 NPN transistor (Q1) 4 1N4148 diodes (D1-D4) [not required for version 2] 1 1N4004 1A diode (D5) 1 4.7V 1W zener diode (ZD1) [not required for version 2] 1 5mm high intensity green LED (LED1) 1 5mm high intensity yellow LED (LED2 in Fig.1) 1 5mm high intensity red LED (LED3 in Fig.1 or LED2 in Fig.2) Panel label Capacitors 1 47µF 16V PC electrolytic 4 10µF 16V PC electrolytic [3 only for version 2] 2 100nF MKT polyester (63 or 100VDC) 1 100nF X2 class metallised polypropylene Resistors (0.25W, 1%) 1 100kΩ 2 10kΩ [1 only for version 2] 38  Silicon Chip 1 2.2kΩ The relay is mounted with the coil terminals toward CON2, using M3 x 10mm screws and M3 nuts. Wire the relay coil terminals to CON2 using 250VAC-rated wire. The terminals and soldered connections are then covered in heatshrink tubing with the two wires tied together with a cable tie. The two PCBs are connected using a 90mm length of 10-way IDC cable, with an IDC connector at each end. Use the captive header for CON4 and the box header and plug for CON3. Feed the ribbon cable through the connector and clamp it down. The clamping can be done with a G clamp and suitable pieces of wood placed on top and bottom to protect the connector. See the overlay diagram as a guide to the correct wire orientation. The next step is to drill the holes and make the cutouts in the diecast case and its lid. You will need to download the drilling template (it’s free) for this task from our website at www.siliconchip.com.au Make all the cutouts in the base of the case first and then then temporarily install the IEC connector and mains outlet socket. Then sit the main PCB in the box, positioned so it just clears the outlet. Mark out the four holes to mount the PCB on the base of the case and drill these at 3mm in diameter. Counter-bore the holes if using countersunk screws. The main PCB is mounted on tapped 9mm Nylon spacers with M3 x 6mm screws to attach the spacers to the PCB and to the box. Having drilled the lid of the case, three 9mm spacers are attached to the top side of the smaller PCB. Note that no spacer is used in the corner next to the potentiometer. Instead, the PCB is retained by the nut on the potentiometer. Fit the potentiometer and switches with lockwashers and install all three, making sure they have the correct orientation for the switch terminals. Then fit the board to the lid and use tinned copper wire to connect the switch terminals to the three pads on the PCB. 4 1kΩ [3 only for version 2] By the way, the front panel artwork is also available from the www. siliconchip.com.au website. Print off the label to suit the timer you are building. To produce a front panel label, you have several options. One is to print siliconchip.com.au Fig.5: PCB component overlay for the simpler, general purpose timer. The difference is that components for current sensing are not required. onto clear overhead projector film (using film suitable for your type of printer and as a mirror image so the printed side is protected against the lid). Attach to the lid with clear silicone sealant. Alternatively, you can print onto an A4 sized synthetic ‘Dataflex’ sticky label that is suitable for inkjet printers or a ‘Datapol’ sticky label for laser printers. Then affix the label using the sticky adhesive back. Cut out the required holes with a hobby knife. Completing the wiring Follow the diagram of Fig.4 to complete the wiring. Use 250VAC 10A insulated hookup wire for the Active (brown), Neutral (blue) and Earth (green/yellow stripe) connections. These wires can be obtained by stripping off the outer sheath of a short length of surplus 3-core 250VAC cord. The wires are soldered to the terminals of the IEC connector, with the bare terminals covered in heatshrink tubing. When soldering, make sure the wires are first passed through the terminal hole and the wires bent back onto the terminal. Ensure the terminal and wire are heated sufficiently and siliconchip.com.au SSeptember eptember 2016  39 2016  39 L1 COVER IN SILICONE FUSED IEC PLUG MAINS OUTLET (GPO) T1 CON1 N (LID) E A COIL A N COM 240VAC L(1) 10108161 RLY1 S-4211 REG1 N(2) A E NO 4(–) 0V 3(+) +12V 12VDC 250mA N 100nF X2 CRIMP EYELETS FASTENED WITH M4 SCREW, NUT & STAR LOCKWASHER NC 30A CONTACTS 16180101 C 2016 REV.A Vigortronix VTX-214-003-112 NOTE: COVER EXPOSED TERMINAL LUGS WITH HEATSHRINK TUBING Fig.6: there are slight differences in this, the general-purpose timer and the cyclic timer shown earlier. Make sure you follow this diagram when building the general purpose timer. + that the solder flows onto the terminal and wire for a good joint. The IEC connector is secured to the case using M3 screws, star washers and M3 nuts. There are two wires used for the Active and Neutral connections with one set of Active and Neutral wires going to CON1. The second neutral wire connects to the mains socket and the active wire to a relay contact. For version 1, this active wire must also pass through the current transformer. Earth wiring is done using a continuous length of wire between the IEC connector Earth terminal and the mains outlet Earth. Insulation is pared back where this is to be terminated to the crimp eyelets. Use a crimping tool to clamp the wires into the eyelet crimp connection. You can solder the wire also to the eyelet to ensure it is firmly attached. Secure each eyelet to the case and lid using an M4 screw, star washer and M4 nut. When finished, check your work carefully. Don’t forget to install the fuse in the IEC connector. Screw on the lid and apply power. No setting up is required as the microprocessor senses whether the current transformer components are installed (or not) and then uses the required program. As noted in the specifications, the 40  Silicon Chip threshold current to start the timer function is 700mA AC. If you want to increase the sensitivity, loop the Active wire through the current transformer twice for a 350mA AC threshold, or three times for 233mA AC. Note that all soldered terminals should be covered in heatshrink tubing. All other details can be noted from the internal photos. Building the 230VAC Timer If you’re not building the Cyclic Pump Timer, use the PCB overlay diagram of Fig.5 and the wiring diagram of Fig.6 instead. As already described, this simpler version of the Timer omits all the components associated with current transformer T1, with the exception of the 100kΩ resistor connected to pin 7 of IC1, plus LED3 and its 1kΩ resistor. Note also the slightly different wiring of the contacts of the relay and its 1kΩ resistor. Finally, LED2 is red (not SC yellow). 25 30 40 50 60 70 + 80 90 100 20 Power Fault 15 + + + + 10 5 SILICON CHIP 1 www.siliconchip.com.au + + Minutes + + Extend Reset + Cyclic Pump Timer 10A 230VAC + (For cyclic appliances such as household water supply pumps and air compressors) + + Power 50 Timing 35 + + SILICON CHIP 25 + 12 2.5 www.siliconchip.com.au + + + Start Stop + 65 75 + 100 125 150 175 + 200 225 250 Minutes + 230VAC 10A Timer + + + Fig.7: two different front panels are available, shown here half size. Artwork for these can be downloaded free of charge from siliconchip.com.au Resistor Colour Codes     No. Value 4-Band Code (1%) 1 100kΩ brown black yellow brown 2 10kΩ brown black orange brown 1 2.2kΩ red red red brown 4* 1kΩ brown black red brown * 2 required for version 2 5-Band Code (1%) brown black black orange brown brown black black red brown red red black brown brown brown black black brown brown siliconchip.com.au