Silicon ChipFull Wave, 230V Universal Motor Speed Controller - March 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Got a project idea? There'll be a badly designed app for that!
  4. Project: Arduino-based Earthquake Early Warning Alarm by Allan Linton-Smith and Nicholas Vinen
  5. Feature: Generation IV Nuclear Power – making their own fuel by Dr David Maddison & Dr Mark Ho
  6. Project: Full Wave, 230V Universal Motor Speed Controller by John Clarke
  7. Product Showcase
  8. Serviceman's Log: Squeezing an elephant through the eye of a needle by Dave Thompson
  9. Project: An AM Radio Transmitter to build by Nicholas Vinen & Jim Rowe
  10. Feature: El Cheapo Modules 14: Logarithmic RF Detector by Jim Rowe
  11. Project: Analog Audio/Video Modulator for Vintage TV sets by Ian Robertson
  12. Vintage Radio: Philips 1953 portable 5-valve model 148C radio by Associate Professor Graham Parslow
  13. PartShop
  14. Market Centre
  15. Advertising Index
  16. Notes & Errata: Lath-e-Boy / Touchscreen Altimeter and Weather Station / High-Power DC Fan Controller / Arduino Mega Box Music Player / SC200 Audio Amplifier
  17. Outer Back Cover: Microchip Embedded GUI Design

This is only a preview of the March 2018 issue of Silicon Chip.

You can view 37 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 "Arduino-based Earthquake Early Warning Alarm":
  • Arduino sketch (.ino) file and library for the Arduino Earthquake Early Warning system (Software, Free)
Items relevant to "Full Wave, 230V Universal Motor Speed Controller":
  • Triac-based Full Wave 230V Universal Motor Speed Controller PCB [10102181] (AUD $10.00)
  • PIC12F675-I/P programmed for the Triac-based Full Wave 230V Universal Motor Speed Controller [1010218B.hex] (Programmed Microcontroller, AUD $10.00)
  • Firmware (HEX and ASM) files for the Full-wave 230V Universal Motor Speed Controller [1010218B.HEX] (Software, Free)
  • Triac-based Full Wave 230V Universal Motor Speed Controller PCB pattern (PDF download) [10102181] (Free)
  • Triac-based Full Wave 230V Universal Motor Speed Controller lid panel artwork (PDF download) (Free)
Items relevant to "An AM Radio Transmitter to build":
  • AM Radio Transmitter PCB (RevB) [06101181] (AUD $3.75)
  • AM Radio Transmitter PCB (RevD) [06101181] (AUD $7.50)
  • IPP80P03P4L-07 high-current P-channel Mosfet (Component, AUD $2.50)
  • MC1496P double-balanced mixer IC (DIP-14) (Component, AUD $2.50)
  • AM Radio Transmitter PCB pattern (PDF download) [06101181] (Free)
  • AM Radio Transmitter lid panel artwork (PDF download) (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
Items relevant to "Analog Audio/Video Modulator for Vintage TV sets":
  • Vintage TV Analog Audio/Video Modulator PCB [02104181] (AUD $7.50)
  • MC1374P AV modulator IC (DIP-14) (Component, AUD $5.00)
  • Vintage TV Analog Audio/Video Modulator PCB pattern (PDF download) [02104181] (Free)
  • Vintage TV Analog Audio/Video Modulator panel artwork (PDF download) (Free)

Purchase a printed copy of this issue for $10.00.

Triac-based for ultra-smooth control! BY JOHN CLARKE Full-Wave, 10A Universal This relatively simple but highly effective Triac-based circuit gives smooth, full range speed control for electric drills, lawn edgers, circular saws, routers or any other appliance with universal motors (ie, brushtype), rated up to 10A. M versal Motor Speed Controller provides much improved ost SCR or Triac-based speed controllers ususpeed control because it not only uses a microcontroller to ally have very poor low-speed control and won’t provide more precise phase control of the Triac but it also let the motor reach full speed. This speed limitaemploys current feedback. tion comes about because these circuits can only switch on This is not our first full range speed control for universal every second half-wave of the 230VAC mains voltage. This motors. Our last design was featured in the February and means that they can only feed a maximum voltage of about March 2014 issues. See www.siliconchip.com.au/Series/195 160VAC to the motor. This had a complex circuit that rectified the 230VAC mains These limitations are demonstrated in the waveforms and used a rugged IGBT (insulated gate bipolar transistor) to shown in Scope1 and Scope2, which come from the Halfrapidly switch the pulsating DC waveform at 980Hz. Wave Speed Controller published in February 2009. At low speeds, very narrow Up till now it has been very pulses are applied to the motor difficult to design a Triacwhile at full speed the IGBT is based circuit which would give continually on. This technique is smooth control over a wide • Full wave motor control referred to as pulse width modurange of speeds. • Full speed range lation (PWM). Nor was it is easy to provide • 220VAC to 250VAC 50Hz/60Hz That design is still valid but due good speed regulation which to its complexity, it also meant means that the motor speed is • For “universal” motors (ie, series motors that it was (and still is), large and less likely to vary if the loadwith brushes) expensive. ing changes. • 10A 230VAC or similar nameplate rating Our new Triac-based design But our new Full Wave Uni- Features • Soft start 34 Silicon Chip Celebrating 30 Years siliconchip.com.au Motor Speed Controller also offers impressive performance but it is less complex and less costly. The Triac is phase-controlled and works similarly to a leading edge light dimmer (more on phase control later). The 600V 40A Triac is also arguably more rugged than the IGBT used in the 2014 design. For an explanation of leading and trailing edge dimmer operation, see our article in the July 2017 issue (www.siliconchip.com.au/Article/10712) By the way, our new circuit offers much better speed control than our Mk2 phase controller from February 2009 which used the same BTA41 Triac. See www.siliconchip. com.au/Article/1339 Soft start A particularly attractive feature of this new design is “soft start”. This means that regardless of speed setting, the motor speed will smoothly build up to the setting and thereby avoid any sudden kicks – an all-too-common reason for users presenting at hospital casualty rooms! The new Speed Controller can be used with a 220 to 250VAC mains supply, at 50Hz or 60Hz. This means that it can be used in any country that has a 220VAC or above. However, it is not directly suitable for use with a 110VAC mains supply; that would required some component changes. Why do you need speed control? Most power tools will do a better job if they have a speed control. For example, electric drills should be slowed down when using larger drill bits. This is particularly the case siliconchip.com.au when drilling sheet metal; using too fast a speed will result in a triangular hole. Similarly, it is useful to be able to slow down routers, jigsaws and even circular saws when cutting some materials, particularly plastics, as many plastics will melt rather than be cut if the speed is too high. The same comments apply to sanding and polishing tools and even electric lawn trimmers, where they are less likely to snap their lines when slowed down. Even if you do not want a reduced motor speed, the soft start feature of this Speed Control is handy when using large power tools such as circular saws and routers which can otherwise give a substantial kick if started at full voltage. (Some modern power tools, such as electric chainsaws, have this feature built-in). Phase control Before we continue, we should explain what we mean by phase control that is used in this new design. As you know, the mains AC voltage is a sinewave. It starts at zero, rises to a peak, falls back to zero, then does the same thing with the opposite polarity. This repeats 50 times each second for 50Hz mains and 60 times per second for 60Hz mains. We vary the speed of a motor by varying the time during each half cycle when power is applied: feed power very early in the cycle and it runs fast; delay applying power until much later in the cycle and it runs slowly. Celebrating 30 Years March 2018  35 These half-wave control waveforms are taken from our February 2009 Drill Speed Controller, for comparison with the new one . . . Scope1: the controller is set for maximum output with resistive load. The yellow waveform is essentially a half-wave rectified sinewave with a value of 161V RMS (70% of the blue 230V mains waveform) and a peak value of 341V. Phase control employs either an SCR (silicon controlled rectifier) for half-wave control or a Triac to provide full wave control, as used in “leading edge” dimmers. Scope2: the Speed Controller set for maximum output when driving an electric drill. There is considerable hash at the beginning of each positive half-cycle, caused by interaction between the drill’s commutator and the Triac. Half wave control means that only one side of the mains waveform (the positive or the negative) is applied to the motor. These devices are turned on by a trigger pulse applied to their gate electrodes and the term “phase control” comes about because the timing of the trigger pulses is varied with respect to the phase of the mains sinewave. Fig.1: The key components of the new controller circuit are the Triac and the PIC12F675 microcontroller, IC1. IC1 monitors the speed potentiometer, VR1 at pin 6. It also monitors feedback gain potentiometer VR2, at pin 3, the current feedback via current transformer T1, at pin 7 and the mains waveform via a 330kΩ resistor at pin 5. 36 Silicon Chip Celebrating 30 Years siliconchip.com.au in fact, there is no comparison in performance! Scope3: now set for a lower speed from the electric drill, the Triac is on for a shorter time and the RMS value of the waveform is considerably reduced to 45V. Note the frequency error caused by hash on the waveform. Speed regulation For a motor to have good low speed performance, the speed control circuit should compensate for any drop in motor speed as the load increases, by increasing power to the motor. Many simple SCR speed controllers rely upon the fact that a motor produces a backEMF (electromoWARNING! tive force) which is (1) This Speed Controller circuit operates proportional to its directly from the 230VAC mains supply and contact with live components is potentially speed. lethal. The circuit com(2) This circuit is not suitable for use with pensates for a drop induction motors. in back-EMF by (3) Power tools with inbuilt fans must not triggering the SCR be operated at low speeds for long periods, earlier in the mains otherwise they may overheat. half-cycle and so applying more voltage to the motor. In practice though, the backEMF generated by most appliance motors is quite weak while the SCR is not conducting. This is partly because there is no field current and the generation of voltage is only due to remnant magnetism in the motor core. Furthermore, any back-EMF that is produced tends to be too late after siliconchip.com.au the end of each half-cycle to have a worthwhile effect on the circuit triggering in the next half-cycle. Our new Speed Control uses a different method to provide good speed regulation. It monitors the motor current to sense motor speed. If it senses a drop in speed, it increases the effective voltage to the motor. From the general discussion above you can assume that our new design is significantly different to the February 2009 controller and although both use the same Triac. The 2009 design uses the Triac as an SCR and the control to the motor is only half-wave. Our new design uses the Triac to apply AC to the motor and it is triggered in both half-cycles of the mains waveform. Unfortunately, the triggering requirements for correct operation with an inductive load such as a motor cannot be provided by a simple circuit. In fact, the Triac must have multiple triggering pulses in each half-cycle and their timing is very critical. The only solution is to use a microcontroller. So let’s have a look at the full circuit in Fig.1. Circuit description The key components are the Triac and the PIC12F675 microcontroller, IC1. IC1 monitors the speed potentiometer, VR1 at pin 6. It also monitors feedback gain potentiometer VR2, at pin 3, the current feedback via current transformer T1, at pin 7 and the mains waveform via a 330kΩ resistor at pin 5. In response to all those parameters, IC1 produces a series of pulses and these drive the NPN transistor Q1 and thence the gate of the Triac. The Triac gate current flows via the 47Ω resistor connected between the 5.1V supply and the Triac’s A1 terminal, then out through the gate and to circuit ground via Q1 (ie, the gate current is negative). This method of connection places the 47Ω resistor between the 230VAC mains supply and the 5.1V supply which runs the PIC microcontroller. This arrangement has been used to avoid Triac switching noise getting into the 5.1V supply which can cause latch-up of the microcontroller. Snubber network A snubber network comprising two 220Ω 1W resistors in series and a 220nF 275VAC X2-rated capacitor connected between the A1 and A2 terminals of the Triac. This network is there avoid rapid changes in voltage being applied to the Triac which would otherwiseit turn on (dV/ dt switching) when it is supposed to be off. These rapid changes in voltage can occur then power is first applied or can come from voltage transients generated by the inductance of the motor being controlled, each time the Triac turns off. In effect, the snubber network acts to damp transients and reduce their amplitude. The DC supply for the microcontroller is derived directly from the 230VAC mains supply via a 470nF 275VAC X2 rated capacitor in series with a 1kΩ 1W resistor. The capacitor’s impedance limits the average current drawn from the mains while the 1kΩ resistor limits the surge current when power is first applied. It works in the following way. When the Neutral line is positive with respect to the Active line, current flows via the 470nF capacitor and diode D1 to the 470µF capacitor to Celebrating 30 Years March 2018  37 DRILL SPEED CONTROLLER PERFORMANCE WAVEFORMS Scope4: this shows the waveform at maximum output. There is only a very short period (<0.4ms) at the beginning of each half-cycle when the Triac is off. charge it up. On negative half-cycles, the current through the 470nF capacitor is reversed via diode D2. Zener diode ZD1 limits the voltage across the 470µF capacitor to 12V and that supply then feeds a second 470µF capacitor via a 47Ω resistor and its voltage is limited to 5.1V by zener diode ZD2. This is the supply for the microcontroller, IC1. IC1 has its MCLR input (pin 4) tied to the 5.1V supply via a 10kΩ resistor and this provides a master clear (reset) for IC1 when power is applied. The main 5.1V supply for IC1 is decoupled with a 100nF capacitor. VR1 is the speed potentiometer and it is connected across the 5.1V supply with the wiper connected to the pin 6, AN1 input. IC1 converts the voltage set by VR1 into a digital value using its internal analog to digital converter. The 100kΩ resistor from the wiper to ground holds the AN1 input at 0V, setting motor speed to zero should VR1’s Scope5: here the output is set to about half, corresponding to an RMS voltage about 180V. Scope 4, 5 and 6 are all with an incandescent lamp load. wiper go open-circuit. Trimpot VR2 is also connected across the 5.1V supply and has its wiper monitored by the AN3 input of IC1 at pin 3. This voltage sets the gain of the feedback to maintain motor speed load. It is also converted to a digital value within IC1. The 100nF capacitors at the wiper of VR1 and VR2 are there to provide a low source impedance for the analog to digital converter sample and hold input. Mains synchronisation Since the timing of the Triac’s trigger pulses are so critical to its correct operation, IC1 needs to monitor the mains voltage. This is done by the GP2 input of IC1, at pin 5. This monitors the mains Neutral via a 330kΩ resistor and the signal is filtered with a 4.7nF capacitor. An interrupt in IC1 occurs whenever the voltage chang- What motors can be controlled? We’ve noted elsewhere in this article that this controller suits the vast majority of power tools and appliances. These generally use universal motors and are series-wound motors with brushes. Incidentally, they’re called universal motors because they can operate on both AC and DC. You cannot use this Speed Control with any appliance which has an electronic speed control built in, whether part of the trigger mechanism or with a separate speed dial. This does not apply to tools such as electric drills which provide a choice of two speeds via inbuilt reduction gears. What about induction motors? We have strongly warned against using any of our previous AC speed controls with induction motors, for two reasons. First, the output of our previous designs is variable unfiltered DC – and that will not run an induction motor, which requires a variable supply frequency for its speed to be varied. 38 Silicon Chip Second, connecting an induction motor to any of our previous speed controls usually resulted in serious circuit damage as well possibly burning out the induction motor itself. That won’t happen with this new Speed Control but since it does not vary the mains frequency it cannot vary the motor speed. You are unlikely to do any damage to the Speed Control though. So how do you identify an induction motor? Most induction motors used in domestic appliances will be 2-pole or 4-pole and always operate at a fixed speed, which is typically 2850 rpm for a 2-pole or 1440 rpm for a 4-pole unit. The speed will be on the nameplate. Bench grinders typically use 2-pole induction motors. If you do need to control this type of motor, use the 1.5kW Induction Motor Controller published in April and May 2012. (www. siliconchip.com.au/Series/25). Note that there are important modifications for that project, published in December 2012. Celebrating 30 Years siliconchip.com.au This series of scope grabs (and those overleaf) shows the Triac Speed controller working with a 150 watt incandescent lamp load and a Bosch 500W 2-speed drill. In each case, the connection to the output of the speed controller is made via a 100:1 probe. The waveforms are identical to those taken with a fully isolated differential probe. Scope6: the output is set to the minimum whereby the Triac is still firing. The RMS voltage is 7.36V and the lamp filament is not even glowing. Scope7: here the output is set to maximum but the load is the 500W drill. The hash on the waveform is due to the motor’s commutator. es from a high (around 4V) to a low level (around 1V) and also from a low to a high. That interrupt level occurs when the mains voltage swings through zero volts in either direction. The interrupt tells IC1 that the voltage of the mains has just passed through 0V. That allows IC1 to synchronise gate triggering with the mains waveform. Note that the 4.7nF capacitor at pin 5 introduces a phase lag (delay), but this is compensated for within IC1’s software. Construction Current feedback By now, you are probably wondering about the function of transformer T1 and the associated bridge rectifier. This is used to monitor the load current through the Triac. T1 is a current transformer comprising a ferrite toroid with a 2-turn primary winding in series with the Triac. The secondary winding has 1000 turns and it is loaded with a 510Ω resistor. With this loading, the transformer produces a voltage of 800mV per amp of load current which is the current through the motor being controlled. This voltage is fed to the bridge rectifier consisting of four schottky diodes and the resulting DC is filtered with a 10µF capacitor. The 1kΩ series resistor provides the attack time for the resulting current feedback signal while the 10kΩ resistor provides the decay, discharging the capacitor over time. The current feedback signal is monitored at the AN0 input at pin 7 and the associated 10kΩ resistor and 100nF capacitor provide extra filtering, as well as limiting any current into the internal protection diodes at pin 7. So transformer T1 provides the current feedback signal for IC1 which gives motor speed regulation and trimpot VR2 is gain control for that function. You set VR2 to give the optimum speed regulation for the power tool you are controlling. siliconchip.com.au With the exception of VR1 (the speed control potentiometer), the Full Wave Universal Motor Speed Controller is constructed entirely on a double-sided, plated-through PCB (printed circuit board) coded 10102181 and measuring 103 x 81mm. This is mounted inside a diecast box measuring 119 x 94 x 34mm. Follow the overlay diagram shown in Fig.2. Assembly can begin by installing the resistors. The resistor colour codes are shown in a table but you should also double-check each resistor using a digital multimeter. Following this, fit the diodes, which must be orientated as shown. Be careful: there are several different diode types – 1N4004 for D1 and D2 and BAT46 for D3 to D6; zener diodes are a 12V 1W type (1N4742) for ZD1 and a 5.1V 1W type (1N4733) for ZD2. If you get any of these mixed up, the circuit will not operate. IC1 is mounted on an 8-pin DIL socket so install this socket now, taking care to orientate it correctly, with the notch facing towards the top of the PCB. Leave IC1 out for the time being though – we’ll fit it later on. Q1 can be installed now. Capacitors are placed next. The MKT capacitors and the polypropylene types usually use a code for the value. These are all shown in the capacitor code table. By contrast, electrolytic capacitors are almost always marked with their value (in µF) along with their polarity (usually the negative lead is marked with a stripe). They must be inserted with the polarity shown. The screw terminals are next. The 3-way terminal block for CON2 is installed with the lead entries toward the lower edge of the PCB. Finally (for now), install the current transformer, T1. It does not matter which way it is oriented. The Triac is fitted later. Celebrating 30 Years March 2018  39 Scope8: the output is set to about half with the 500W drill as a load. The RMS voltage is just less than 180V, the maximum you could expect with a conventional half-wave SCR speed control. Scope9: here the output is set to the minimum that will give useful smooth low speed running from the drill. Again, the severe hash on the waveform is due to the motor’s commutator. Fig.2: this combined component overlay and wiring diagram shows where everything goes and the inter-connections required. The Triac is secured to the bottom of the case (ie, underneath the PCB) with a 3mm screw and nut – the oversize hole in the PCB helps with tightening the nut. Its leads are bent up 90° and then soldered to the top side of the PCB once fitted (the holes in the PCB are all plated-through) – see the inset diagram above. Ensure all screws/nuts/etc are tightened really well and all soldered joints are exemplary! 40 Silicon Chip Celebrating 30 Years siliconchip.com.au Parts list – Full Wave Universal Motor Speed Controller Scope10: the ramp-up of the Triac triggering angle during soft startup. The full ramp-up takes more than one second. Drilling the case Further construction requires drilling holes in the diecast enclosure. A template is shown in Fig.4 for the end and side panel drilling details. The lid requires a 9.5mm diameter hole for potentiometer VR1 and a 4mm hole for the earth screw hole. The PCB is mounted on the base of the case using M3 tapped spacers that are 6.3mm (or 8mm) long. Holes are required for these mounting holes on the base of the case. The CON1 screw terminal end of the PCB sits further away from the end of the box compared to the other end. This allows space for the cable gland nuts. Position the PCB in the case to use as a template and mark out the hole positions and drill out to 3mm. Attach the 8 or 6.3mm long spacers to the PCB. Then bend the triac leads up at 90° 4mm from the body of the triac. Insert the leads into the PCB from the underside. If you are using 6.3mm spacers, the underside pigtail leads from the components must be cut short to prevent close contact with the base of the case. They should be trimmed anyway regardless of the spacer length. The PCB can be secured to the case with screws from the underside into the tapped spacers. Mark out the triac mounting hole position on the base of the case. Remove the PCB again and drill out to 4mm. Clean away any metal swarf and slightly chamfer the hole edges. Reattach the PCB and adjust the Triac lead height so the metal tab sits flush onto the flat surface. Secure the Triac with the M3 screw and nut. The metal tab is internally isolated from the leads and so does not require any further insulation between its tab and case. Solder the Triac leads on the top of the PCB and trim the leads close to the PCB. Now remove the screws to gain access to the underside of the PCB and solder the triac leads from the underside of the PCB. The four rubber feet can be attached to the base of the case now. Two holes are required in the lid – one for the speed control pot (9.5mm) and the other for the earth screw (4mm). If you use a countersunk-head earth screw and countersiliconchip.com.au 1 PCB coded 10102181, measuring 103 x 81mm 1 diecast box 119 x 94 x 34mm [Jaycar HB-5067] 1 Talema AX-1000 10A current transformer (T1) [RS Components 775-4928] 1 M205 10A safety panel mount fuse holder (F1) [Altronics S5992] 1 M205 10A fuse 1 4-way PCB mount terminal barrier (CON1) [Jaycar HM3162] 1 3-way PCB mount screw terminals with 5.08mm spacings (CON2) 2 cable glands for 5-10mm cable 1 DIL-8 IC socket 1 2m 250V 10A mains extension lead (cut in half to form mains input and output leads) 4 4mm eyelet lugs 4 8mm or 6.3mm M3 tapped Nylon standoffs 1 M3 x 10mm screw (for triac mounting) 1 M3 nut and washer 2 M4 x 10mm screws (CSK head preferred) 2 4mm ID star washers 2 M4 nuts 8 M3 x 5mm screws 4 stick-on rubber feet 1 20mm length of 12mm diameter heatshrink tubing 1 80mm length of 3mm diameter heatshrink tubing 1 25mm length of 6mm diameter green heatshrink tubing if required for chassis lugs 3 150mm lengths of 7.5A mains-rated wire for VR1 3 100mm long cable ties Semiconductors 1 PIC12F675 programmed with 1010218A.hex (IC1) 1 BTA41-600B insulated tab 40A 600V Triac (Triac1) [element14 1057288 or RS 687-1007] 1 BC337 NPN transistor (Q1) 1 12V 1W (1N4742) zener diode (ZD1) 1 5.1V 1W (1N4733) zener diode (ZD2) 2 1N4004 1A diodes (D1,D2) 4 BAT46 schottky diodes (D3-D6) Capacitors 2 470µF 16V PC electrolytic 1 10µF 16V PC electrolytic 1 470nF 275VAC X2 class 1 220nF 275VAC X2 class 4 100nF 63V or 100V MKT polyester 1 4.7nF 63V or 100V MKT polyester Resistors (0.25W, 1% unless specified) 1 330kΩ 1W carbon film 1 100kΩ 3 10kΩ 1 1kΩ 1 1kΩ 1W carbon film 1 510Ω 1 470Ω 2 220Ω 1W carbon film 2 47Ω 1 linear 10kΩ 24mm potentiometer (VR1) 1 10kΩ mini, top adjust trimpot (3386F style) (VR2) Miscellaneous 1 knob to suit VR1 Super glue, heatsink compound, solder Celebrating 30 Years March 2018  41 Scope11&12: these show how the Triac triggering varies, depending on the speed setting. At low speed settings, there is only one trigger pulse during each mains half-cycle. At higher power levels, there are multiple trigger pulses during each half-cycle to ensure that the Triac stays turned on, in spite of the lagging load current (due to the inductive motor load). sink the earth screw hole appropriately, it can be mounted under the panel label (looks neater!). Otherwise, you’ll need to cut holes in the panel label (with a sharp hobby knife) when the label is stuck on. The panel label file can be downloaded (free for subscribers) from our website (www.siliconchip.com.au). To produce a front panel label, you have several options. For a more robust label, print as a mirror image onto clear overhead projector film (using film suitable for your type of printer). Attach the label printed side down to the lid with a light coloured or clear silicone sealant. Alternatively, you can print onto a 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 back adhesive. (There’s more information on Dataflex at siliconchip.com. au/link/aabw and Datapol at siliconchip.com. au/link/aabx And there’s a few more hints on making labels for projects – see siliconchip. com.au/Help/FrontPanels). Wiring Cut the 10A extension lead into two to provide one lead with a plug on the end and another with a socket. Where the lead is cut depends on how long you prefer each lead. You may prefer a long plug cord and short socket lead so the motor appliance is located near to the controller, or the lead can be cut into two equal lengths. Before cutting make sure you have sufficient length to strip back the insulation as detailed in the next two paragraphs. Make sure the plug lead and socket lead are placed in the correct gland and wired as shown. First the socket (output) lead: you need a 100mm length of earth wire (green/yellow stripe) for the connection between the chassis and lid, so strip back the outside sheath insulation by about 200mm. Then cut the blue The lid, with front panel affixed, “opens out” from the box as shown in this photo, reproduced about three-quarter size. Make sure the wires to the speed pot are all 250VAC mains-rated (don’t use rainbow cable!) and use cable ties and heatshrink where shown above and in Fig.2. 42 Silicon Chip Celebrating 30 Years siliconchip.com.au Three holes are required in the end of the case – the two on the right are 15mm to suit the cable glands, while the hole on the left is nominally 12.5mm but is “D” shaped to hold the fuseholder in place. On the lid, a 9.5mm hole to house the speed control pot sits slightly off-centre with a 4mm hole (on the left in this photo) for the lid earthing screw. As mentioned in the text, if this hole is shaped to accept a countersunk-head screw, it can go underneath the label and so not be visible. neutral wire and brown active wires to 50mm and connect them to their respective terminals on the terminal block. You should be left with 100mm of earth wire (green/ yellow stripe) which is routed around the edge of the PCB and twists with the earth wire from the plug (input) lead to be crimped into one of the earth lugs. The spare 150mm brown wire can be used later to con- Fig.3: the same-size front panel artwork which is designed to nect from the fuse to the CON1 terminal via the trans- be glued to the case lid. It can be copied, or downloaded (free former, T1. This has two turns of the active wire looped for subscribers) from siliconchip.com.au through the transformer hole. The plug lead outside sheath insulation should be stripe) wire and the output earth wire together and crimp stripped back to expose 100mm of wire. This leaves suf- into one of the eyelet earth lugs. Cut VR1’s shaft to 12mm long and file the edges smooth. ficient lead length. All three wires are passed through the Then attach the three 100mm lengths of 7.5A mains rated cable glands and connect as shown in Fig.2. Cut the neutral wire to 50mm and strip back the insulation before connect- wire to the three VR1 terminals and cover with the 3mm heatshrink tubing. The other ends connect to CON2. ing the neutral (blue) wire to the terminal block These wires are secured using a cable tie that feeds The active (brown) wire solders direct to the fuseholder. 10mm diameter heatshrink tubing should first be placed through holes in the PCB. Attach VR1 to the lid of the case over active (brown) wire which slides up and over the fuse- – note that the potentiometer must be located as shown (ie, holder after soldering to cover the side fuseholder terminal. leads emerging from the right) so it fits between the two Similarly, 3mm diameter heatshrink tubing 3mm in di- mains rated capacitors on the PCB. Fit the knob – you may need to lift out the knob cap with ameter is used to cover the fuseholder end terminal. Once both connections are soldered, pass the heatshrink over a hobby knife and re-orient the cap so its pointer position matches the rotation marks on the panel. the join and shrink. That 100mm length of earth wire you cut off from the Now twist the ends of the input earth (green/yellow output lead can now be crimped into two eyelet lugs, which are screwed to Resistor Colour Codes the underside of the box lid and the Qty Value 4-Band Code (1%) 5-Band Code (1%) earth screw on the side of the case using  1^ 330kΩ orange orange yellow brown orange orange black orange brown  1 100kΩ brown black yellow brown brown black black orange brown Small Capacitor Codes  3 10kΩ brown black orange brown brown black black red brown  1+1^ 1kΩ brown black red brown brown black black brown brown    Qty Value/Type EIA IEC  1 510Ω green brown brown brown green brown black black brown  1 470nF X2 474 470n  1 470Ω yellow purple brown brown yellow purple black black brown  1 220nF X2 224 220n  2^ 220Ω red red brown brown red red black black brown  4 100nF MKT 104 100n  2 47Ω yellow purple black brown yellow purple black gold brown  1 4.7nF MKT 472 4n7 ^ = 1W, carbon film type siliconchip.com.au Celebrating 30 Years March 2018  43 Fig.4: drilling detail of the specified diecast box, reproduced same size. Note that the hole for the fuseholder is not circular – the D-shape keeps the fuseholder from turning when a fuse is being inserted or removed. The 3mm diameter hole for the Triac in the bottom of the box is not shown –use the PCB to locate it. M4 screws, star washers and nuts. Ensure that the nuts are fully tightened. Final assembly Apply a smear of heatsink compound to the underside of the Triac before installing the PCB inside the case. Again, the tab of the Triac is insulated, so it can contact the case with safety. The last components to inserted are IC1 (taking care it is oriented correctly), the 10A fuse into its holder and the cover for the barrier terminals (CON1) – it is simply pressed on to cover the screw terminals. Finally, rotate VR2 fully anticlockwise to initially disable feedback. Check your construction carefully and especially check that the earth wires (green/yellow striped) actually connect together the case, the lid and the earth pins on both the mains plug and socket. Check this with a multimeter set to read low ohms. The cable glands need to be tightened to hold the mains cords in place. Because these are easily undone, the thread of the glands should have a drop of super glue applied to 44 Silicon Chip the threads before tightening. This way the glands cannot be undone. Attach the lid to the case using the four screws supplied with the case (don’t be tempted to run the speed controller without the lid in place!). Testing Connect up a universal motor appliance (eg, an electric drill) to the controller, apply power and check the motor can be controlled when adjusting the speed potentiometer. Once you have verified that it works, switch off power and unplug the mains plug from the mains outlet. Then remove the lid and adjust VR2 half way. Re-attach the lid and apply power again and check the speed regulation of the motor under load. Trimpot VR2 may need further adjustment; anticlockwise if the motor speeds up under load and clockwise if the speed drops off too markedly under load. Note that any adjustment of VR2 must only be done with the power off and mains plug disconnected. This means that adjustment is a trial and error process. Power should only re-applied after the lid is re-attached. SC Celebrating 30 Years siliconchip.com.au