Silicon ChipDeluxe 230VAC Fan Speed Controller - May 2014 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Planning for future disposal of your assets
  4. Feature: Android Apps For Tech-Savvy Users by Stan Swan
  5. Project: RGB LED Strip Controller/Driver by Nicholas Vinen
  6. Project: The Micromite: An Easily Programmed Microcontroller, Pt.1 by Geoff Graham
  7. Product Showcase
  8. Project: 40V Switchmode/Linear Bench Power Supply, Pt.2 by Nicholas Vinen
  9. Project: Deluxe 230VAC Fan Speed Controller by John Clarke
  10. Salvage It: What can you do with a dead UPS... or two? by Bruce Pierson
  11. Review: Tektronix MDO3054 Mixed-Domain Oscilloscope by Nicholas Vinen
  12. Vintage Radio: The AWA B30: a transistor radio just like grandma's by John Carr
  13. Subscriptions
  14. Order Form
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata
  18. Outer Back Cover

This is only a preview of the May 2014 issue of Silicon Chip.

You can view 27 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.

Items relevant to "RGB LED Strip Controller/Driver":
  • RGB LED Strip Driver PCB [16105141] (AUD $10.00)
  • ATmega48-20AU programmed for the RGB LED Strip Driver/Controller [1610514B.HEX] (Programmed Microcontroller, AUD $15.00)
  • SMD parts for the RGB LED Strip Driver (Component, AUD $20.00)
  • Firmware (C and HEX) files for the RGB LED Strip Driver [1610514B.HEX] (Software, Free)
  • RGB LED Strip Driver PCB pattern (PDF download) [16105141] (Free)
Items relevant to "The Micromite: An Easily Programmed Microcontroller, Pt.1":
  • PIC32MX170F256B-50I/SP programmed for the Micromite Mk2 plus capacitor (Programmed Microcontroller, AUD $15.00)
  • PIC32MX170F256D-50I/PT programmed for the Micromite Mk2 (44-pin) (Programmed Microcontroller, AUD $15.00)
  • CP2102-based USB/TTL serial converter with 5-pin header and 30cm jumper cable (Component, AUD $5.00)
  • Firmware (HEX) file and user manual for the Micromite (Software, Free)
  • Firmware (HEX) file and user manual for the 44-pin Micromite (Software, Free)
  • 44-pin Micromite PCB pattern (PDF download) [24108141] (Free)
  • 44-pin Micromite PCB [24108141] (AUD $5.00)
Articles in this series:
  • The Micromite: An Easily Programmed Microcontroller, Pt.1 (May 2014)
  • The Micromite: An Easily Programmed Microcontroller, Pt.2 (June 2014)
  • Micromite, Pt.3: Build An ASCII Video Display Terminal (July 2014)
  • The 44-pin Micromite Module (August 2014)
Items relevant to "40V Switchmode/Linear Bench Power Supply, Pt.2":
  • 40V/5A Hybrid Switchmode/Linear Bench Supply PCB [18104141] (AUD $20.00)
  • SMD parts for the 40V/5A Hybrid Switchmode/Linear Bench Supply (Component, AUD $50.00)
  • 40V/5A Hybrid Switchmode/Linear Bench Supply PCB pattern (PDF download) [18104141] (Free)
  • 40V/5A Hybrid Switchmode/Linear Bench Supply panel artwork (PDF download) (Free)
Articles in this series:
  • 40V Switchmode Bench Power Supply, Pt.1 (April 2014)
  • 40V Switchmode/Linear Bench Power Supply, Pt.2 (May 2014)
  • 40V Switchmode/Linear Bench Power Supply, Pt.3 (June 2014)
Items relevant to "Deluxe 230VAC Fan Speed Controller":
  • Deluxe 230VAC Fan Speed Controller PCB [10104141] (AUD $10.00)
  • AOT10N60 High-voltage Mosfet for the 230VAC Fan Speed Controllers (Component, AUD $5.00)
  • Deluxe 230VAC Fan Speed Controller PCB pattern (PDF download) [10104141] (Free)
  • Deluxe 230VAC Fan Speed Controller panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Deluxe Fan Speed Controller By John Clarke Full Range: slow to maximum speed control . . . Suits ceiling or plug-in fans . . . No mysterious fan noises in the night . . . No AM radio interference . . . Got a ceiling fan or pedestal fan? With limited speed settings they are often too fast or two slow. This non-switched controller gives you continuous speed control and as a bonus, it produces no radio interference or motor noise. It can also be used as a dimmer for desk and reading lamps up to 60W. C eiling fans usually offer just three switched speed settings: too fast, fast and not slow enough. The fast settings are probably OK during the day but even the slow setting may be too fast at night when you just want the fan to provide a gentle air movement, while you’re trying to get to sleep. So we decided to produce a controller which gives a wide range of speeds, from the maximum down to quite low, to give just the faintest of breezes. But we decided not take the obvious approach of using a phase-controlled Triac to produce the speed control because they can cause considerable interference to AM radio reception, particularly in those areas where signals are weak. Instead, our controller is based on a high-voltage Mosfet, which is effectively a variable resistor connected in series 72  Silicon Chip with the fan motor. For high fan speeds, the Mosfet resistance is low and for lower speeds, the Mosfet resistance is higher. And while we have only mentioned ceiling fans up to this point, it can also be used with pedestal or table fans. You simply plug the fan into a switched mains socket on the controller’s case lid, while the controller plugs into the mains via an IEC mains lead. If you have a ceiling fan, it may need to be wired permanently (by a licensed electrician). Because the speed control element is essentially a variable resistor, it will not be very efficient in electrical terms and that means it will dissipate some heat. But considering that most fans will draw only up to about 60W at full speed and less as speed is reduced, the dissipation can be siliconchip.com.au Features • • • • • • • Full control of motor speed from stopped to maximum For 230VAC shaded pole and capacitor-run motors Over-current limiting Over-temperature cut out Quiet operation Fused circuit Rugged case managed by using a diecast box and finned heatsink. We don’t need to dissipate anywhere near 60W because at full speed the dissipation in the controller is quite small. It’s at lower speeds that dissipation in the controller increases. But because the motor is running slower, overall power is less than at full speed. If it does get too hot, there is an over-temperature thermostat to switch the controller off. We cannot connect the highvoltage Mosfet directly in series with the 230VAC mains supply to the fan because Mosfets can only work from DC or at worst, from fluctuating DC. Any reverse current would be shunted by the Mosfet’s intrinsic internal diode – so that wouldn’t work. The solution is quite simple though; we use a bridge rectifier. That way, the Mosfet is only subjected to rectified AC (or fluctuating DC) yet it can comfortably control the AC load of the fan. Fig.1 shows the general arrangement. The Mosfet and current-sensing resistor connect between the plus and minus terminals of the bridge rectifier. When the active voltage is more positive than the neutral, current (i1) flows through the motor, diode D1 and through the Mosfet from plus to minus of the bridge, then through D3 and to neutral. When the active is more negative than the neutral, current (i2) flows from the neutral through D4 and the Mosfet from plus to minus of the bridge and then through D2 and the motor to the active. The current flow through the resisCURRENT i1 A D1 D2 Q1 + – FAN MOTOR D3 D4 D G N CURRENT i2 S i2 Fig.1: essentially, the Mosfet is a resistor in series with the i1 fan motor but will only operate on DC, hence the need to run it via a bridge rectifier. Current i1 and i2 are the two halves of the AC waveform, so the motor is still fed with AC. siliconchip.com.au tive element is therefore always from   the plus to the minus terminals of the bridge rectifier. Circuit description The circuit for the Fan Speed Controller is shown in Fig.2. It comprises just one IC, several diodes, the high voltage Mosfet, Q1, plus some resistors and capacitors. The circuit and wiring diagram are for free-standing fans (ie, those connected via a 3-pin plug). For ceiling fans, some components are not required - we’ll look at these later. Power for the circuit is derived directly from the 230VAC mains. The entire circuit floats at mains potential so is unsafe to touch whenever the circuit is connected to the mains. Additionally, the circuit ground is also floating at mains potential and is not connected to mains earth. The metal box housing the controller is connected to the mains earth. Mains power is supplied to the controller circuit via an IEC socket and fuse, F1, which is a part of the IEC input connector. Fusing protects the circuit against excessive current flow should a fault occur, such as a short across the motor. BR1 is a 6A bridge rectifier with a 400V rating. As mentioned, the bridge provides the Mosfet with the positive full-wave rectified mains voltage while the fan motor receives AC. A separate supply is provided for the low voltage circuitry. We use another bridge rectifier (BR2) and derive a low voltage supply via 220nF capacitors from the 230V mains. The capacitors are in preference to high wattage resistors since they do not dissipate significant power, therefore reducing heat dissipation inside the controller case. The circuit shows the arrangement with the separate May 2014  73 CON5 N 1A A FUSED IEC MAINS CONNECTOR BR2 W04 CON 1 GPO TO FAN CON3 230V AC  E CON 2 TH1 60°C NC 470 1W 220nF 1M 1W 250VAC X2 1M + – ~ 220nF 250VAC X2 1W ~ BR1 PW04 470 1W K 100F 25V A ZD1 VR1b 15V 10k SPEED 10k D 4 3 1k G 1M 5.1k CURRENT LIMIT 6 D1 1N4148 8 IC1b A 7 A 10F 5.1k K A W04 1nF FAN SPEED CONTROLLER +~~– Q1 G D D K PW04 – ~ ~ ~ + + SC 1W ZD1 CURRENT MONITOR 2014 K 1M 3.3k 1 5W 1N4148 – 5 10F 220k VOLTAGE MONITOR 200k VR1a 10k S Q1 FQP10N60C, AOT11N60L 1k +15V 100nF CON6 1k 1 IC1a 100 ~ 2 1W E + 10F NP IC1: LM358 N A ~ – +15V 22k CON4 ~ ALL COMPONENTS AND WIRING IN THIS CIRCUIT OPERATE AT MAINS POTENTIAL. DO NOT OPERATE WITH CASE OPEN – ANY CONTACT COULD BE FATAL! S Fig.2: the circuit for our new Fan Speed Controller shows it has two bridge rectifiers, one of which provides low voltage DC direct from the mains. This is used to power the rest of the circuitry. The second bridge (BR1) allows a power Mosfet to control the current to the AC motor over both halves of the 230V mains cycle. The Mosfet acts like a variable resistor, supplying more or less power to the fan motor depending on the setting of VR1a&b. rectifier (BR2) fed via two 220nF capacitors and series 470 resistors. The 220nF capacitors provide an impedance that limits current flow to the 15V zener diode ZD1. At 50Hz, the impedance of each 220nF capacitor is 14.5k. This impedance plus the 470 limits current to the 15V zener diode, ZD1 to about 10mA. A 100F capacitor across the resulting 15V supply smooths it to a constant DC voltage. The 470 resistors in series with the 220nF capacitors are there to limit surge current when power is first applied to the circuit. The surge current could be high should power be switched on at the peak voltage of the mains waveform. 1M resistors across the capacitors are to discharge them when the power is switched off. The 15V supply powers the LM358 dual op amp, IC1. One of these operational amplifiers, IC1a, is used to drive the gate of Mosfet Q1. This op amp is connected in a feedback control loop that monitors both a divided version of the voltage between Q1’s drain and source and the voltage provided by speed potentiometer VR1b. IC1a adjusts its output voltage at the Mosfet gate so that the divided drainsource voltage across the Mosfet matches that set by the speed potentiometer. In more detail, a 220k 1W resistor and a 5.1k resistor form a voltage divider across Q1 (ignoring the series 1 resistor). This effectively reduces the voltage across Q1 to 74  Silicon Chip about 1/44 its original value, calculated as (5.1k + 220k) ÷ 5.1k. The resulting voltage is filtered with a 10μF capacitor providing a DC voltage from the full wave rectified waveform. The resistive divider is there to produce a suitable low voltage for monitoring by IC1a. The maximum voltage needs to be several volts below the positive supply for IC1 at 15V. That’s because the op amp is designed to operate with inputs that can go down to the negative supply but not as high as the positive supply. Maximum voltage from the divider occurs when Q1 is at a high resistance. Then the full 230VAC of the mains supply is across the Mosfet. The peak of the 230V RMS waveform is 325V and after reduction by a factor of 44, brings the voltage down to 7.39V peak. This becomes 4.7V DC after filtering with the 10μF capacitor. Note that this average voltage of the full wave rectified waveform is 0.63 of the waveform peak. As the resistance of Q1 is decreased, there is more voltage across the fan motor and less across the Mosfet. The voltage from the divider is therefore also lower. VR1b is the speed control adjustment. VR1b is connected in series between a 22k resistor from the +15V supply and a 100resistor connecting to the 0V supply. With this resistor string, the voltage range for the wiper of VR1b is between 5V and 0.05V. Operation is as follows: If VR1b is set to produce, say, 2V DC at its wiper, IC1a adjusts its drive to the gate of Q1 so siliconchip.com.au Looking inside the open “IP65” case shows how easy the PCB mounts on the tapped supports inside. Note that we do not have the IEC power lead plugged in – neither should you whenever the case is open! that voltage monitored at the divide-by-44 resistors is also 2V DC. With 2V on the divider it means that there is 88V (average) across Q1. The 88V average is equivalent to 97.5V RMS. If the mains voltage is at 230VAC RMS then the voltage across the fan is 230V - 97.5V or 132.5V RMS. Note that for VR1b, the lower voltage is deliberately made to be slightly above 0V using the 100 resistor. This is to prevent IC1a from oscillation at the lowest voltage position for VR1b. The voltage feedback control ensures that voltage across the Mosfet is strictly maintained to prevent changes in the motor speed. That’s provided the mains voltage remains reasonably constant (which it usually does). Without the feedback control and just applying a fixed voltage to the gate of Q1, the fan would slow quite markedly as the Mosfet heats up. That’s because the Mosfet drain to source resistance increases with temperature. Current limit Fig. 3: SOA graph for the FQP10N60C Mosfet used in this project. The text explains how to interpret this. siliconchip.com.au Current limiting for this circuit is necessary due to the fact that while the Mosfet can happily conduct around 10A, this is only when there is a relatively low voltage between its drain and source. With a high voltage between drain and source, the current needs to be reduced to prevent internal damage to the Mosfet. Incidentally, no domestic fan (plug-in or ceiling) will demand anything like 10A. They’re much more likely to be a tiny fraction of this – most fans are rated at 10-50W, which equates to just 40-220mA! Fig.4 shows the Safe Operating Area (SOA) of the FQP10N60C Mosfet. The lower DC, SOA line shows that the device can easily supply up to 10A to the fan motor but as May 2014  75 Fig.4: combined PCB component layout and wiring diagram: follow this to the letter to ensure your safety. Do not operate without the lid in place. Q1 PCB ZD1 A E 76  Silicon Chip 200k 5.1k 100nF 3.3k N GPO the drain-to-source voltage increases above around 20V, the Mosfet current rating falls, to 800mA at 200V. The red line indicates the current limit our circuit applies to safeguard the Mosfet from exceeding the SOA. We restrict the maximum current to around 1A up to around 20V between drain and source. At this drain-to-source voltage, the fan will run at a fast speed. At lower fan speed settings, the voltage between the drain and source will be higher and we limit the current to prevent this exceeding the SOA curve. For the slowest speeds the current is limited to around 230mA. Note that this SOA curve is for the non-insulated Mosfet package. For fully insulated Mosfet packages (eg. FQPF10N60C) both the SOA curve and thermal resistance from junction to case is worse. The thermal resistance is some three times higher. It means the insulated package, while more convenient for mounting, is unsuited for this application. The Mosfet would overheat internally regardless of the amount of heatsinking. Additionally for the insulated package, for SOA, the 10A current rating is only for up to 5.5V drain to source. For these reasons we use the non-insulated Mosfet package. IC1b provides the current limit function. It monitors the 100 D1 1k 10F INSULATING COVERS OVER ALL SPADE CRIMP CONNECTORS (CASE LID) 22k 1M 1nF 5.1k 470 1W 4148 1k 10F NP GPO W04 100F BR2 10k 220k 1W N IC1 LM358 A CASE END VR1 DUAL 10k LINEAR PW04 220nF 250VAC # CON4 CON6 1M 1W 1M 1W 15V 470 1W C 2014 10104141 NYLON CABLE CLAMPS # # # 1M CON5 220nF 250VAC CON2 A CON3 + CASE END CON1 ~ A TO TH1 – ~ # ~ # N # 1k – Q1 MOUNTING DETAIL 10F 1 5W # BR1 10A FUSED MALE IEC PANEL CONNECTOR E # # SIDE OF CASE + COVER EXPOSED METAL WITH SILICONE SEALANT OR INSULATION TAPE Q1 RELLORTNOC DEEPS N AF FQP10N60C N TH1 14140101 60° C # ~ CASE EARTH VIA 10mm x M4 SCREW, CRIMP EYELET, LOCKWASHER AND NUT # M3 INSULATING SCREW WASHER INSULATING BUSH M3 NUT FAN HEATSINK SECURED TO CASE WITH 2x 12mm M4 SCREWS AND NUTS DANGER: 230V AC WIRING EARTH VIA 15mm x M4 CSK SCREW, CRIMP EYELET, LOCKWASHER AND 2 NUTS (OVER-CSK HOLES BY ~0.5mm) voltage across the 15W resistor that is in series with Q1. The 1resistor converts the fan current to a voltage. A 1A current for example will result in 1V across this resistor. IC1b is connected as an amplifier that has level shifting set by VR1a. As the voltage across the 1 resistor exceeds the voltage set at the wiper of VR1a, the IC1b output goes high and drives the input pin 2 of IC1b high via diode D1 and the 1kseries resistor. This over-rides the motor speed setting, slowing fan speed to reduce current. If the current monitor voltage from the 1 resistor is less than the voltage set at the wiper of VR1a, IC1b output is low and thus has no effect on IC1a as diode D1 is reverse biased. VR1a is connected across the 15V supply in a similar way to VR1b only the upper and lower resistors are different values. The 200k and 3.3k resistors set the VR1a current limit range to between 940mV and 235mV. Both VR1a and VR1b are physically connected to the one potentiometer shaft so adjusting fan speed will also automatically adjust the current limit. Construction With the exception of the mains input and output siliconchip.com.au sockets and thermal cutout, all components mount on a single PCB coded 10104141, measuring 93 x 79mm. It is designed to be housed in an IP65 diecast box measuring 115 x 90 x 55mm. The PCB is shaped to match the internal contours of the IP65 case and has a cutout to fit the IEC input connector. However, this case is relatively expensive – if you wish, the Fan Speed Controller can be built into a (slightly larger) economy diecast case instead. The PCB will then need to be mounted onto separate standoffs with four holes drilled in the base for these. Begin construction by checking the PCB. We do not expect that there would be any problems with PCBs as supplied by the SILICON CHIP OnlineShop or with those supplied in kits. These are of high quality and are solder masked, screen printed and shaped with the required cut outs. It is still worthwhile to check if there are problems with the PCB and look for any shorts or breaks between tracks. If there are any problems, repair these as necessary. Similarly, if the cut outs in the sides of the PCB have not been shaped, they should be cut and filed to size before any components are assembled. Check that the PCB fits into the case before starting assembly. With the IP65 case specified, the PCB conveniently mounts on the integral tapped lands provided. Follow the overlay diagram shown in Fig.4. Begin by soldering in the resistors, using the accompanying table for the colour codes. Diode D1 can be inserted next taking care to orient it correctly. IC1 can be directly mounted or you can use an IC socket. Either way, be sure to install the socket and/or the IC the correct way around with the notch facing the direction shown on the overlay. Capacitors can be installed next. The accompanying capacitor table shows the various codes that are used to indicate the capacitance values of the MKT polyester and X2 class capacitors. The electrolytic capacitors have their value directly marked and the polarised types must be oriented correctly. The NP capacitor can be mounted either way. You can use 10μF ceramic surface mount capacitors instead of the electrolytic types if you wish and provision has been made for these on of the PCB. If using these, position and tack-solder siliconchip.com.au Parts List – Deluxe Fan Speed Controller 1 PCB coded 10104141, 93 x 79mm 1 IP65 diecast box measuring 115 x 90 x 55mm (Jaycar HB5042 or equivalent)* 1 lid and side panel label 1 fan type heatsink 105 x 25.5 x 55mm (Altronics H0520, Jaycar HH-8570) 1 Architrave GPO outlet (Clipsal CLI16WE or equivalent)* 1 Male IEC mains connector with integral M205 fuseholder 1 1A M205 fuse 1 7.5A IEC mains lead 1 10A thermostat 60°C Normally Closed (Altronics S 5600, Jaycar ST-3821) 1 10k dual ganged 24mm PCB mount linear pot (VR1) 1 plastic knob to suit potentiometer shaft 6 6.35mm PCB mount male spade connectors, 5.08mm pin spacing (Altronics H 2094) (CON 1-6) 8 6.35mm insulated female spade quick connectors for 1mm wire diameter (red) 3 5.3mm ID insulated quick connect crimp eyelets for 2-5mm wire diameter (yellow) 2 M4 x 15mm countersunk screws (lid and potentiometer side earth) 3 M4 x 15mm screws (GPO and IEC end earth) 2 M4 x 10mm screws (securing heatsink when the case is M4 tapped) (use 2 M4 x 15mm screws and two extra M4 nuts when case is not M4 tapped) 8 M4 nuts 5 4mm star washers 2 M3.5 x 6mm screws (for PCB mounting) [in addition to the two supplied with case] 3 M3 x 10mm countersunk screws (for Q1 and TH1) 2 M3 x 10mm countersunk screws (for IEC connector) 5 M3 nuts 1 TO-220 Mica insulating washer 1 TO-220 insulating bush *Notes: 4 small stick on rubber feet An economy diecast box 1 200mm length of green/yellow 7.5A mains wire 119 x 94 x 57mm (Jaycar 1 200mm length of brown 7.5A main wire HB5064 or equivalent) 1 200mm length of blue 7.5A mains wire can be used instead of the 1 70mm length of 5mm heatshrink tubing IP65 case. Extra parts required 4 100mm cable ties include 4 6.3mm M3 tapped Heatsink compound standoffs & 8 M3 x 5mm Semiconductors screws. The two M3.5 x 6mm 1 LM358 DIP dual op amp (IC1) screws are not required. 1 600V 9A or more N Channel Mosfet If using the economy box, the (FQP10N60C, AOT11N60L, BUK457-600B) Architrave GPO can be replaced (Q1) by a standard sized GPO (HPM 1 15V 1W zener diode (ZD1) CDXL787WEWE or equivalent) 1 400V 6A P04 diode bridge (BR1) (this will not fit onto the IP65 1 400V 1.2A W04 diode bridge (BR2) diecast box). 1 1N4148 signal diode (D1) All the 10μF (polarised and NP types) and the 100μF Capacitors electrolytic capacitors can each 1 100F 105°C 16V PC electrolytic* be replaced by 10μF surface 1 10F 105°C 50V NP PC electrolytic* mount ceramic capacitors 2 10F 105°C C 16V PC electrolytic* (10μF 50V 3216 (metric)/ 2 220nF 250VAC X2 class 1206 (imperial)). 1 100nF 63V or 100V MKT Polyester These will provide a longer 1 1nF 63V or 100V MKT polyester service life than electrolytic Resistors capacitors. Provision has been (0.25W, 1%) made to mount these where 2 1M 1 200k 1 22k 1 10k each electrolytic capacitor 2 5.1k 1 3.3k 3 1k 1 100 would normally be positioned. Ceramic capacitors are not (1W, 5%) polarised so can be oriented 2 1M 1 220k 2 470 either way on the PCB. 1 15W May 2014  77 each in place, making sure they are aligned correctly before soldering them fully in place. The diode bridges, BR1 and BR2, can be installed taking care to orient these correctly and in the right locations. Before installing VR1, its shaft may need to be cut to length to suit the knob. The potentiometer nut is wound fully onto its thread. This nut is adjusted later to make contact with the inside of the case. Finally, install the PCB spade connectors at CON1-CON6. Mounting the hardware A marking-out guide and panel artwork are provided on the SILICON CHIP website (siliconchip.com.au). This provides the IEC connector and GPO cut outs for the end and front panels. Details are given for both the IP65 and economy box. First of all, mark out the hole position for the IEC connector and earth screw in the end wall of the case. There is about a 4mm gap from the base of the case to the bottom of the IEC connector. The hole is made by drilling a series of small holes around the perimeter of the desired shape, knocking out the piece and filing to shape. The earth screw hole is 4mm in diameter. At the opposite end of the box, holes are required for the potentiometer and for a further earth screw. We used a countersunk screw here for the earth screw so that the end panel label would cover over the screw. In fact, we slightly over-countersunk this hole to ensure the screwhead was flush with the case surface. Insert the PCB into the case. Note that the leads for Q1 must be kinked outward a little so that the metal flange of the device is parallel to and in con- Another view of the opened-out case, including the back of the architrave GPO. Note the earthing of the case lid – we don’t rely on the metal-to-metal contact. Also note that the circuit ground and the case earth are most definitely NOT connected together – the circuit ground in fact “floats” at the mains voltage. tact with the side of the case. Mark the mounting hole position for Q1. TH1 also mounts on the side of the box adjacent to Q1, with its attachment bracket is positioned so that the holes are vertical – the top hole about 7mm down from the top edge of the box. Resistor Colour Codes p p p p p p p p p p No. 4 1 1 1 1 2 1 3 2 1 Value 1MΩ 220kΩ 200kΩ 22kΩ 10kΩ 5.1kΩ 3.3kΩ 1kΩ 470Ω 100Ω 4-Band Code(1%) brown black green brown red red yellow brown red black yellow brown red red orange brown brown black orange brown green brown red brown orange orange red brown brown black red brown yellow violet brown brown brown black brown brown 78  Silicon Chip 5-Band Code (1%) brown black black yellow brown red red black orange brown red black black orange brown red red black red brown brown black black red brown green brown black brown brown orange orange black brown brown brown black black brown brown yellow violet black black brown brown black black black brown Both the TH1 mounting screws and that for Q1 are 3mm countersunk. Countersunk screws allow the heatsink to mount flat to the surface on the side of the case without too much counter boring in the heatsink where these screws sit. Note that you will find it easier to install TH1 if the M3 nuts are tack soldered to the thermostat mount- Capacitor Codes Value μF value 100nF 0.1μF 1nF .001μF IEC code 100n 1n0 EIA code 104 102 The two 220nF, 250VAC “X2” class will have values printed on them. The 10μF and 100μF electrolytics can be replaced by surface-mount ceramic types (soldered to copper side of PCB). siliconchip.com.au ing bracket. To do screw can be tightthis, place the screws Specifications ened up more. This into the thermostat Rating:.......................... 80W maximum. Fused at 1A, 230VAC. keeps the Mosfet mounting bracket Speed adjustment:....... Zero to maximum cooler. (when it is out of Current limiting:........... 235mA at low speed up to 940mA at high speed After mounting the case) and screw Temperature cut out:.... 60°C (with 40°C cut in after 60°C cut out) Q1, it is essential to on the nuts. Solder check that the metal the nuts in place by tab of the device is applying solder to the side of the nuts. sure no swarf is hiding in any of the isolated from the case by measuring The aptly-named fan type heatsink box corners! the resistance between the two with is secured to the side of the case on a multimeter. The meter should show the Q1 side, using two M4 screws Panels a very high resistance measurement that either tap into the side off the Artwork for the lid and end panels between the case and any of Q1’s leads. case or use nuts. The mounting holes can be downloaded from siliconchip. Check your meter also reads close to are placed along the centre line of com.au. Print them onto overhead pro- zero ohms with a case-to-mountingthe heatsink. The lower hole should jector film, photo paper or plain paper. screw measurement. This will test if be positioned high enough so it does We recommend overhead projector the multimeter is working and connot foul the PCB, especially if using film – if you print in reverse, when it nected correctly. nuts. The heatsink is positioned with is placed on the box the printing will The heatsink is attached using the its lower edge at the same level as the be against the case and protected by two M4 screws, with a smear of heatbottom edge of the box. the film. The printouts can be cut to sink compound between the mating The holes for Q1 and TH1 mounting shape and adhered to the case with surfaces. must be countersunk; we actually over- glue or silicone sealant. countersunk them by about 0.5mm Note that the countersunk earth Wiring to ensure that the tops of the screws screws for the lid and end panel need The complete wiring diagram is were actually lower than the surface to be placed in position and temporar- shown in Fig.4. of the case – this allowed the heatsink ily held with a nut before placing the All mains wiring must be done using to make intimate contact with the case panels on. 250VAC, 7.5A mains-rated wire. You and therefore ensure maximum heat Insert the PCB into the case by will need 200mm lengths of this wire transfer (aided by a dollop of heatsink angling it so that the potentiometer in appropriate colours – brown (Accompound). is inserted into its hole first, then po- tive), blue (Neutral) and green/yellow Holes are also required in the lid to sitioning the board onto the integral (Earth). The easiest way to get these (if secure the switched mains outlet and mounting lands inside the case. Secure you’re not building from a kit) is to cut the earth terminal. We used a counter- the PCB to the case with the two ‘sup- off a 200mm length from a spare piece sunk screw here for the earth screw so plied with the case’ screws plus the of 230V mains flex, strip off the outer that the front panel label would cover extra two M3.5 x 6mm screws. insulation and – voila! over the screw. Secure Q1 to the case with an M3 The earthing details of the case All holes must be de-burred on the screw and nut with a mica insulating are most important since D1 and the inside of the case with a countersink- washer and insulating bush as shown potentiometer are all at mains potening tool or larger drill to round off the in the inset on the wiring diagram. tial yet are attached to the case. If the sharp edge of the hole. This is espe- Apply a smear of heatsink compound insulating washer or the insulation of cially so for Q1, where the edges must on all mating surfaces before assembly. the potentiometer were to break down, be rounded to prevent punch-through We use a mica washer in preference to the case would be live (ie, at 230VAC) of the insulating washer. Run your a silicone washer since the mica has if it was not properly earthed. finger over all holes to ensure there a higher thermal conductivity (lower The potentiometer needs earthing are no sharp edges – and also make °C per Watt value) and the mounting since the screw thread does not reach Traditional (switched) fan speed controllers: how they work The circuit at right shows a typical switched-type fan speed control. The fan motor has two windings, with one winding powered at a different phase to the other to provide a rotating field. To achieve this, the “aux” winding is usually connected via a capacitor – in this case, 1.5F. For speed control, this also uses capacitors (or sometimes inductors) to reduce applied voltage to the motor “run” winding. On the Hi setting, this winding receives full 230V AC power, so operates at maximum speed. When on the medium speed setting the run winding receives power siliconchip.com.au via a 3.5F capacitor in series and via a 2F capacitor when switched to low speed. At the 50Hz mains frequency, the 3.5F capacitor has a reactance of 910so the motor runs quite a bit slower than on full power. A 2F capacitor has a reactance of about 1.6k, so the motor runs that much slower again. Note that lowering the capacitance increases the reactance (at that frequency). Most ceiling fans also have a summer/ winter switch, usually mounted on the fan itself, which simply swaps the connections to the run winding. This reverses the motor rotation, to push air in the opposite direction. OFF HI SPEED SWITCH MED Typical 3-position domestic ceiling fan controller. 3.5F LOW 2F 1.5F RUN 230V AC AUX REVERSING SWITCH* 50W FAN MOTOR *ALSO CALLED SUMMER/WINTER SWITCH May 2014  79 far enough to the outside of the box for its nut to be screwed on to hold it to the case. The potentiometer is earthed to the case by wrapping the earth wire around the location tab on the potentiometer and bending this down against the front of the pot. The earth wire is then soldered to this lug, ensuring there is sufficient heat for solder to flow onto the tab and wire – you may need to file or sand the lug first to remove any oxidation/passivation. Be certain that the solder joint on the tap is not a dry joint. The case lid is also independently earthed, as shown. The IEC connector must be wired using the correct wire colours - brown for the active, blue for the neutral and green/yellow striped wire for earth. Use insulated quick connectors for the mains wiring connection to the PCB. Wires to the IEC connector need to be insulated with heatshrink tubing covering all exposed metal terminals for the active and neutral wiring. Solder two earth wires onto the Earth pin on the IEC connector – one about 50mm long and other about 150mm. These wires should loop through the hole in the earth terminal with each wrapped back on itself so the wires are essentially captive before soldering to the terminal. Make sure the earth terminal is heated sufficiently with the soldering iron so the solder wets and adheres properly to both earth terminal and wire. Again be certain that it is not a dry solder joint. One end of the earth wire is crimped to the earth eyelet and the other to the earth eyelet on the lid and the GPO’s earth terminal. It is important to use one continuous earth wire length for the lid earth wire and GPO earth wire. Do this with just the insulation stripped back in the wire length to terminate into the crimp eyelet for the earth before running to the GPO’s earth screw terminal. The earth eyelets are secured with M4 screws, a star washer and nut. A second nut should be used as a locknut. As mentioned earlier, a countersunk screw is used for the earth on the lid and the potentiometer end panel - earth screws are placed before the labels are glued on. The IEC connector is secured with the M3 x 10mm countersunk screws, star washers and nuts. Similarly, the GPO is secured with M4 screws, star washers and nuts. Finally, wires are secured using cable ties as shown. Your speed controller is now complete – but don’t forget to place the four rubber feet on the bottom of the case if you want to avoid scratching surfaces underneath. Testing Check all of your wiring very carefully against the overlay and wiring diagram. Also check that the case, lid and potentiometer are connected to the earth pin of the power socket - use a multimeter on a low ohms scale. If you are satisfied that all is correct, you are ready to screw the lid onto the case. Note that while the case is supplied with a rubber seal that goes around a channel in the lid to ensure its IP65 Architrave GPO Cutout SILICON CHIP Fan Speed Controller For Shaded Pole Fans 80W Max. 80  Silicon Chip rating, we elected not to use this, so heat from the case can transfer to the lid for maximum dissipation. Do not be tempted to operate the fan speed controller without the lid in place and screwed in position. The easiest way to test the circuit operation is to connect a fan. First set VR1 fully anticlockwise, then plug a fan in, connect power and check that you can vary the speed with VR1. Note that the fan controller box will begin to run quite warm with extended use when driving the fan at lower than full speed. This temperature rise is normal. Troubleshooting the Fan Speed Controller If the speed controller does not work when you apply power, it’s time to do some troubleshooting. First, a reminder: all of the circuitry is at 230VAC mains potential and can be lethal. This includes any exposed metal parts on components except those that are tied to the earthed chassis of the case. Do not touch any part of the circuit when it is plugged into a mains outlet. Always remove the IEC plug from its mains connector before touching or working on any part of the circuit. Before going any further, give your PCB another thorough check. Check for incorrectly placed components and for component orientation. Again check solder joints. Unless you have placed a component incorrectly or a solder joint is not properly made, there is very little that can go wrong with the circuit. It either works or it doesn’t! So if it still doesn’t work, check component placement and soldering once again. . . . . .. . . . Slow + . . . . Fast Fig.5: top-of-case and side-of-case panel artwork. This can also be downloaded and printed, in colour if you have the facilities, on thick paper or on overhead projector film, from siliconchip.com.au siliconchip.com.au Using with Ceiling Fans While this project was originally designed as a controller for free-standing fans – ie, those that plug into a mains outlet – there is no reason why it cannot be used for permanently installed ceiling fans. Of course, this would mean that the box would have to be mounted on a wall with wiring into the ceiling fan connections installed by a licensed electrician. Any existing “hard wired” switched-type controller could be left in situ – you’d simply leave it on its maximum setting and control the speed with this project. There would obviously be no need for either the GPO on the case lid nor the IEC connector. Instead, wires would pass through cord-grip grommets or cable glands located in the side or base of the case. You’d also need to fit an M205 safety fuseholder in place of the one integrated with the IEC connector. controller at its 230VAC input. The box must be earthed with earthing to the case, lid and pot body. Note that the speed control box needs to be mounted so there is access to the control knob and so the box can keep cool (ie, you couldn’t mount it in a small wall cavity). The diagram below doesn’t show the heatsink but it must be fitted, in exactly the same way as detailed earlier. While we haven’t confirmed it, we don’t believe you could use this project and an electronic controller together – if you couldn’t remove the electronic controller, you could simply bypass it. And as a light dimmer? This circuit will also make a fine incandescent light dimmer and, as we mentioned earlier, won’t put lots of impulse noise onto your mains wiring to swamp AM radio reception. So for fancy incandescent bulbs, spotlights, etc (up to 60W) it will be fine to use as is. And if you are talking about a standard lamp that plugs into the power outlet, the unit can be constructed as detailed earlier, without changes. Permanent installation would require the wiring diagram below to be followed. However, like old-style (phase-controlled) light dimmers, it is not suitable for CFLs nor any other lights (LEDs, for example) which have electronic controllers (remember that most LEDs these days have them either inbuilt or as part of the fixture). SC Wiring Wiring details for direct connection are shown below. The 230VAC mains wires pass through grommets and the neutral connects directly to the PCB as shown. The active is connected to a separate panel-mounted safety M205 fuse holder (for the 1A fuse) that mounts on the case (or on the lid – ensure that it doesn’t touch components underneath when the lid is screwed on). We recommend using the SZ-2028 from Jaycar or the S5992 from Altronics. The active and neutral outputs from the fan controller then connect to the existing fan speed HEATSINK NOT SHOWN N FROM 230V MAINS E SUPPLY A W04 100F BR2 D1 10k 4148 1k 1M 220k 1W CON6 N 10F NP GPO 22k 1k IC1 LM358 1M 1nF 5.1k 15V ~ ZD1 – ~ + 470 1W A 470 1W CON4 – VR1 DUAL 10k LINEAR PW04 220nF 250VAC 1M 1W 1M 1W 220nF 250VAC A CON3 CON2 ~ E A N CON1 + TO TH1 CABLE GLAND ~ M205 SAFETY FUSE HOLDER 5.1k 1k BR1 COVER WITH HEATSHRINK TO EXISTING FAN CONTROLLER 10F 1 5W 200k CABLE GLAND Q1 RELLORTTH1 NOC DEEPS N AF FQP10N60C 14140160 01° C 100 CON5 N 10F 100nF 3.3k (CASE) Fig.6: here’s how to wire the controller into a permanently installed fan, such as a ceiling fan. You don’t need the IEC input socket nor the GPO but you do need to fit the heatsink, which isn’t shown here. It must be installed where air can circulate around it for cooling. siliconchip.com.au (CASE LID) LID EARTH VIA 15mm x M4 SCREW, CRIMP EYELET, LOCKWASHER AND NUT May 2014  81