Silicon ChipA DIY Reflow Oven Controller for modern soldering - April 2020 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: "Second sourcing" should be applied to more than electronics
  4. Feature: Grid-scale energy storage by Dr David Maddison
  5. Project: A DIY Reflow Oven Controller for modern soldering by Phil Prosser
  6. Review: 900MHz Touchscreen Vector Network Analyser by Allan Linton-Smith
  7. Project: Two new 7-band Audio Equalisers for hifi, PA and more! by John Clarke
  8. Serviceman's Log: It would be a waste of parts by Dave Thompson
  9. Project: Programmable Temperature Control with a Peltier, Part 2 by Tim Blythman & Nicholas Vinen
  10. Project: Frequency Reference Signal Distributor by Charles Kosina
  11. Review: Tecsun Radio’s new HF SDR Amateur Transceiver by Ross Tester
  12. Product Showcase
  13. Vintage Radio: Tecnico 1050 by Associate Professor Graham Parslow
  14. PartShop
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: AM/FM/CW Scanning HF/VHF RF Signal Generator, June-July 2019
  18. Outer Back Cover

This is only a preview of the April 2020 issue of Silicon Chip.

You can view 40 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 "A DIY Reflow Oven Controller for modern soldering":
  • DSP Crossover CPU PCB [01106193] (AUD $5.00)
  • DSP Crossover LCD Adaptor PCB [01106196] (AUD $2.50)
  • DIY Reflow Oven Controller PCB Set (AUD $12.50)
  • DSP Crossover front panel control PCB [01106195] (AUD $5.00)
  • PIC32MZ2048EFH064-I/PT programmed for the DIY Reflow Oven Controller [2910420A.HEX] (Programmed Microcontroller, AUD $30.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • 128x64 Blue LCD screen with KS0108-compatible controller (Component, AUD $30.00)
  • ST7920 driver for PIC32MZ projects (Software, Free)
  • Firmware (HEX) and source code for the DIY Oven Reflow Controller [2910420A.HEX] (Software, Free)
  • DSP Active Crossover/DDS/Reflow Oven PCB patterns (PDF download) [01106191-6] (Free)
  • DIY Solder Reflow Oven drilling, cutting and folding diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • A DIY Reflow Oven Controller for modern soldering (April 2020)
  • A DIY Reflow Oven Controller – Part 2 (May 2020)
Items relevant to "Two new 7-band Audio Equalisers for hifi, PA and more!":
  • 7-Band Mono Equaliser PCB [01104201] (AUD $7.50)
  • 7-Band Stereo Equaliser PCB [01104202] (AUD $7.50)
  • 7-Band Mono and Stereo Equaliser patterns (PDF download) [01104201-2] (PCB Pattern, Free)
Items relevant to "Programmable Temperature Control with a Peltier, Part 2":
  • Thermal Regulator Interface PCB [21109181] (AUD $5.00)
  • Thermal Regulator Peltier Driver PCB [21109182] (AUD $5.00)
  • Hard-to-get parts for the Thermal Regulator Peltier Driver shield (Component, AUD $30.00)
  • Firmware (Arduino sketch and libraries) for the Thermal Regulator (Software, Free)
  • Thermal Regulator PCB patterns (PDF download) [21106181-2] (Free)
Articles in this series:
  • Programmable Thermal Control with a Peltier (March 2020)
  • Programmable Temperature Control with a Peltier, Part 2 (April 2020)
Items relevant to "Frequency Reference Signal Distributor":
  • Reference Signal Distributor PCB [CSE200103A] (AUD $7.50)
  • Reference Signal Distributor PCB pattern (PDF download) [CSE200103] (Free)

Purchase a printed copy of this issue for $10.00.

DIY Solder ReFLow Oven by Phil Prosser with PID Control Make short work of soldering boards full of surface-mounting components with this low-cost and easy-to-build DIY solder reflow oven. It’s quite cheap to build but it runs your PCB(s) through a temperature profile much like a professional reflow setup costing thousands of dollars! It can also be used to ‘bake’ components, cure glue or paint or any other task where you need to hold something at a stable, elevated temperature for some time. Features • Self-contained controller converts a toaster oven into a reflow oven • Temperature profile follows standard reflow soldering profiles closely • Closed-loop PID (proportional-integral-differential) temperature control using thermocouple and solid-state relay • Can hold oven temperature at any point in the range of 20-230°C (eg, for ‘baking’ components or curing paint/glue) 24 Silicon Chip siliconchip.com.au T here are several reasons that SMD components are becoming so common, to the point that it’s becoming very difficult to avoid them. It is due to the need to make products ever smaller, and the lower cost of mass manufacturing these parts and the boards that use them. As a result of these and other factors, most manufacturers do not release new components in anything but surface-mount packages. If you have young eyes, a microscope or good magnifying glass and some patience, this is not such a problem. So while we are conscious that surface mount devices (SMDs) present a challenge to some, we use them where we need to. But some of the smaller packages present a real challenge, especially those with thermal pads in the middle of the device, and leadless packages to name a very annoying few! These cannot be soldered with a regular iron. If you see yourself building projects with SMD parts and especially the pesky ones that do not lend themselves to hand SMD soldering techniques, then this project is for you. Alternatively, if you are looking for a simple way to control the temperature of an electrically heated oven, this is also a very handy device for that job. Working with SMDs We have, at times, used a hot-air blower on the device, to heat it and the board until a thermal pad under an IC reflows. This generally works, but it’s a bit of a hit-and-miss method, requires quite a bit of skill, and can regrettably lead to the demise of expensive chips! Not only that, but a hot-air blower invariably tries to blow the SMDs out of position! In commercial manufacture, these devices are generally ‘reflow soldered’ in one form of oven or another. This project presents a more controlled alternative to our brute force methods. It follows in the footsteps of others who have repurposed a toaster oven as an SMD reflow oven (eg, as described in our March 2008 article on “How to solder surface-mount devices”; siliconchip.com.au/Article/1767). What is reflow soldering? Reflow soldering is a process where solder paste is applied to the pads on a PCB, the SMD components are loaded onto this paste, and the entire PCB goes into a reflow oven. This subjects the board to a temperature profile that heat soaks the components, then briefly bumps the temperature up to melt and ‘reflow’ the solder paste. The entire process in a commercial environment is automated, with robots loading the components and the reflow oven having sophisticated thermal control and the ability to ramp the temperature up and down from the reflow point very quickly. While that’s nice, you don’t need all that complicated a rig to get a good result. This project repurposes a regular toaster oven to allow you to reflow one or several boards. We are using tin/lead solder, and recommend that you use this too, due to its lower temperature requirements. It may be possible to use such a rig with lead-free solder, but we haven’t tried it. This allows you to solder pretty well any SMD to a PCB, and to handle those pesky devices with heat spreaders and LCC packages. It works just as well for your usual resistors, capacitors and semiconductors. And the great thing siliconchip.com.au This project uses hardware which was previously used in the DSP Crossover (May-July 2019: siliconchip.com.au/Series/335 siliconchip.com.au/Series/335). ). However, the firmware loaded into the PIC32 microcontroller is, naturally, quite different. Pre-programmed chips, along with the PCBs required are available from the SILICON CHIP ONLINE SHOP (siliconchip.com.au/Shop siliconchip.com.au/Shop). ). Most of the other components should be easily obtainable from your favourite parts supplier, although there are a few specialised components whose sources are shown in the parts list. What is PID? There are many ways to control a temperature. The simplest is to switch the heater on if the target is below the setpoint, otherwise, switch it off. This is sometimes called “bang-bang” control; it is either flat out or off. This works, but is subject to errors and lots of overshoot, as it does not consider how far the sensed temperature is from the setpoint, nor how fast the temperature is approaching the setpoint. A proportional/integral/differential (PID) controller addresses these shortcomings. It has parameters for: • Proportional control, ie, linearly related to the difference between the two temperatures. • Differential control, ie, how fast the temperature is changing; this affects how hard we drive the temperature. This uses the rate-of-change of temperature to minimise overshoot. • Integral control, ie, looking at how much the sensed temperature missed the target. We integrate the error in temperature and feed this into the algorithm to ‘trim’ the error out long-term. This seems complex, but don’t worry. The supplied software handles all the details, and comes with a good initial set of parameters which give you a decent starting point. The main reason we’re using PID control is to minimise temperature overshoot. The toaster oven has a lot of thermal mass, as does the heating system, so it is slow to respond. Once the element has been on for a while, after you switch it off, the temperature keeps rising for quite some time. This makes a ‘bang-bang’ controller very prone to overshoot. The differential term in the PID controller helps us tame this. Despite this, it’s likely that your oven will still experience some overshoot. This can happen for several reasons; it may be that the PID parameters used are not ideal, but the fact is that the parameters can really only be tuned properly for a single temperature. Given that it’s crucial to avoid overshoot at higher temperatures, you’re more likely to experience it at lower temperature set points. The controller’s user interface lets you adjust the PID variables to tune the controller for various ovens. Inside our controller software, we have put modifications into the PID controller settings that reduce the drive and increase the damping for temperatures below 100°C, in an attempt to mitigate the aforementioned low-temperature overshoot problem. We also disable PID control for the last ‘reflow sprint’, to get this over with as quickly as possible. The result is that the errors are relatively small; certainly, a lot less than a ‘bang bang’ controller would produce. Australia’s electronics magazine April 2020  25 PID REFLOW OVEN CONTROLLER USER INTERFACE THERMOCOUPLE AMPLIFIER ROTARY ENCODER PUSH BUTTON OVEN CONTROLLER (PIC32MZ) CON10 CON8 128 x 64 PIXEL LCD K TYPE THERMOCOUPLE TTL CONTROL CON5 9V DC SOLID STATE RELAY (OPTO ISOLATED) 230V MAINS INPUT SWITCHED 230V TOASTER OVEN Fig.1: a block diagram showing the basic operation of the DIY reflow oven. The oven temperature is sensed by a thermocouple placed within, and this is fed back to the PIC-based controller board via a thermocouple amplifier. It then controls the temperature by switching the oven element on or off via a mains-rated solid-state relay (SSR). is that you can solder many components at once; a whole board (or even a few) is possible, depending on the design. We should point out here that some board designs may not be suitable for reflow soldering. It’s generally best to have a consistent amount of copper across the PCB to use this technique. A board with a large ground plane on one side and sparse tracks on the other will not heat evenly, and so you could end up with unmelted solder paste at one end, or in the worst case, a burnt PCB at the other! Having said that, a great many SMD-populated boards can be soldered in a reflow oven. So it’s a very useful tool. The simple method With a stopwatch, a K-type thermocouple and some practise, it is possible to work out an “on/off” timing sheet that you can use to reflow SMDs manually. But this is a bit hit and miss, and if you have a moment of inattention, things can come unstuck. This project takes the guesswork out of using an oven for reflow, and the controlling computer should not have any moments of inattention! What is it? I have designed a proportional-integral-differential (PID) controller which oversees the oven heating, with user-defined heat soak and reflow temperatures. I have determined the PID coefficients that work for my test oven, but they are ‘tunable’ for your oven (you may find that my values work fine). The basic configuration of the device is shown in the block diagram, Fig.1. The control block at left is built using a PIC32MZ-based microcontroller board that we have used in two projects already (more on that later). It senses the oven temperature using a K-type thermocouple and a prebuilt thermocouple amplifier module. A solid-state mains relay controls the oven heating elements, and it’s rounded off by an LCD so you can see what’s going on, and a basic power supply. In the development process, I pulled a couple of ovens 26 Silicon Chip SC 2020 apart intending to integrate the controller into the oven itself. This is definitely possible, and experienced constructors may take this approach. But for this project, we have chosen to present a standalone controller for a few reasons. Firstly, once you are inside the oven, you are presented with a lot of exposed live parts, and every oven will be different, so it’s difficult for us to describe how to do this safely. Secondly, there is generally no insulation between the oven wall and the equipment space behind the controls. Typical PVC wiring is rated to 70°C. While some types of wire can operate at higher temperatures, they still cannot withstand the temperatures at which the oven operates. So you would have to choose carefully where to mount the controller, and insulate it thoroughly against heat. Note that the oven manufacturers utilise fibreglass-insulated wiring and crimp/weld connections exclusively. This is a good choice for an oven but not conducive to DIY modification. So we decided to leave the oven completely unmodified. One of the nice features of this controller, besides the ability to follow a reflow-soldering profile, is the ability to accurately bring the oven up to a set temperature and hold it there. Now that I have this feature, I often use it for curing paints and glues at 60°C. If you recall your chemistry lessons, for every 10°C (or 10K) increase in temperature, chemical reactions typically double in speed. I’m impatient, so using the oven to fastcure paints and glues is hard to resist! Note that many SMDs also require you to bake them at a particular temperature for a particular time before soldering if their packages have been open for more than a few hours/days/weeks. This is usually printed on the packaging. So this oven is ideal for doing that too. Limitations There are one or two limitations that we have accepted in this project: • The choice of oven limits the temperature ramp rate. Australia’s electronics magazine siliconchip.com.au This is to whet your appetites ready for next month (when we’ll assemble the various components into the case). Note that this photo was taken BEFORE the Presspahn safety shield was installed. For your continued health, it must be included! We chose a 1500W oven, and it works well. We recommend that you use an oven with a similar power rating. • Convection ovens are a touch more expensive. We tried both and found convection ovens to be a better choice, but not by enough to recommend that you spend the extra cash. One limitation of a convection oven is that, unless you modify the oven, when we switch the element off, the convection fan also switches off. • We have not built a “door opener”. At the end of the reflow cycle, professional ovens cool the board reasonably quickly. In this project, you need to open the door of the oven a crack yourself. This results in a cool-down that is remarkably close to the recommended temperature profile. One advantage that we did note when using convection ovens (which are basically toaster ovens with fans) is that they have reduced overshoot at low temperature settings. That is not a big deal for SMT reflow but makes a surprising difference if you’re running the oven at lower temperatures, like 60°C, for drying paint or curing glue faster. However, to get this benefit, you need to modify the oven so that it has a separate mains supply for the fan, to allow it to run all the time and not just when the heating element is on. Because of the safety implications of doing that, we suggest that only experienced constructors with plenty of mains wiring experience take on this job. siliconchip.com.au The overshoot on a non-convection oven going from 20°C to 60°C is about 10°C, while for a convection oven with the fan wired to run constantly, it is closer to 3°C. Setting the PID parameters to avoid this with a non-convection oven would result in super-slow heating times. Safety This project has been developed to minimise the amount of mains wiring that you need to do. The only mains wiring we need to do is to connect the solid-state relay in the controller to a dual IEC mains socket. All other parts of this project operate from a 9V plugpack, so most of the assembly work is easy and safe. Choosing an oven We bought the toaster oven shown here from Kmart. You need an oven with manual control, a mechanical timer, dual elements (top and bottom), a minimum power of 1500W, with no LCD or other electronic controls. If you can get a convection oven that matches these requirements without spending much more money, then do so. Our oven cost $59. If you feel tempted to spend much more than $100, check yourself, as you might be buying something beyond what is needed. The thermocouple Thermocouples are the ‘go-to’ device for measuring high Australia’s electronics magazine April 2020  27 Fig.2: the circuit of the control board. 32-bit microcontroller IC11 derives its internal clock from 8MHz crystal X2 and has numerous supply bypass capacitors. It runs from a regulated 3.3V supply 28 Silicon Chip Australia’s electronics magazine siliconchip.com.au provided by adjustable low-dropout regulator REG2. EEPROM IC12 is used to store the settings (PID parameters, temperatures settings etc). The graphical LCD is connected via CON8, the front panel controls via CON11 and the thermocouple and SSR via CON10. siliconchip.com.au Australia’s electronics magazine April 2020  29 4.7k R1 4.7k R2 S2 SELECT S1 EXIT TO PORTE CON20 3.3V 1 5 PS0 PS1 ROTARY ENCODER 4 B COM 2 A 3 2 2 3 4 5 6 7 8 9 10 1 RE1 (PS0 & PS1 NOT PRESENT ON ALTRONICS ENCODER) 4.7k R3 4.7k R4 22nF 22nF FOR ENCODER TYPE 1 (Simple Grey Code per click): FIT R3 & R4 FOR ENCODER TYPE 2 (One complete cycle of Grey Code per click): FIT R1 & R4 FOR ENCODER TYPE 3 (Three changes in phase per click): FIT R2 & R3 SC 20 1 9 solder reflow oven FRONT PANEL CIRCUIT temperatures. Thermocouples rely on the thermo-electric effect of two dissimilar metals in contact. A K-type thermocouple has wires made of chromel (nickel/chromium) and alumel (nickel/aluminium/manganese and silicon). These are standard and very interchangeable. They work to well over 1000°C, plenty for this application. A thermocouple amplifier interface module is also needed. It converts the tiny voltages the thermocouple generates to a higher voltage that we can measure with the PIC. It also performs ‘cold junction’ compensation. Just as the thermocouple generates a voltage from the dissimilar metal junction at its tip, it also generates a voltage where the chromel and alumel wires join our controller. The thermocouple amplifier has a built-in compensation for this (which depends on its own temperature). This meant that if you need the ultimate precision, you will need to connect the thermocouple wires straight to the thermocouple amplifier, and not use plugs as shown in our project (Jaycar also has a thermocouple without the plugs, Cat QM1823). We bought our K-type thermocouple on ebay for just over one dollar – including postage! Fig.3: the components shown here mount on a front-panel board that allows you to control the unit. Rotary encoder RE1 and pushbutton S1 connect back to the control module via CON20. S2 is only required if you use a rotary encoder without an internal switch. The capacitors debounce the rotary encoder signals. But we think this compromise is OK, as the error from using the plugs and sockets is small. Incidentally, the thermocouple amplifier we used has a purple PCB. If you search ebay or AliExpress for “AD8495”, then you should be able to find one which looks like ours. Note though that some of these devices come with the wrong reference voltage; we’ll explain later how to fix that if it happens. We want a board that uses a 1.25V offset for 0°C. If yours is 2.5V instead, it will not work. The simple fix for this is short the AD8495 reference pin (pin 2) to ground (pin 3), effectively making the reference 0V. The SSR We used an Altronics S4416A solid state relay, rated at 40A. This is ideal, although a 20A mains-rated SSR would theoretically be sufficient. The other thing to check for is to make sure that your SSR (like the Altronics one) will work with a 3.0-3.6V control voltage. Our PIC will drive it with a nominal 3.3V DC to switch it on. The controller The controller is based the same 32-bit PIC microcontroller board, LCD screen and set of controls that we used previously in a couple of projects. The front panel components (as per the circuit of Fig.3) ready for assembly into the case as seen earlier. 30 Silicon Chip Australia’s electronics magazine siliconchip.com.au Namely, these are the DSP Active Crossover and 8-channel Parametric Equaliser (May-July 2019; siliconchip.com. au/Series/335) and Low Distortion DDS Signal Generator (February 2020; siliconchip.com.au/Article/12341). The controller module is a lot more powerful than needed, but takes advantage of the graphical user interface (GUI) that I already created for those projects, along with other storage and control code. So it saved a lot of development time, and you at least get a nice user interface. To this, I added a K-type thermocouple amplifier I bought from ebay for less than $10 including delivery, along with a 40A solid state relay (SSR). With these few additions, we have ourselves the makings of a pretty capable oven controller. The CPU board circuit is shown in Fig.2. We won’t describe this in great detail, partly because we already described it in the June 2019 issue (starting on page 77) but mostly because, despite appearances, it’s relatively simple. It consists mainly of microcontroller IC11, two crystal oscillator circuits, an EEPROM chip, a simple power supply and a bunch of connectors for routing signals. The main change is in the firmware, which has been modified to implement the temperature control loop and to provide a real-time display of the temperature profile achieved. The overall function of the resulting controller is simple. In operation mode, the microcontroller reads the temperature about 10 times a second, and averages this over half a second. Every half-second, the PID control parameters are updated and the controller decides whether to switch the oven on or off. See the accompanying panel for a description on how PID temperature control works. In setup mode, you can save the settings, alter the PID 330 CON5 K 10 F The first job is to assemble the PIC32 microcontroller module. Its PCB overlay diagram is shown in Fig.4. Use this as a guide to which parts go where on the 60.5 x 62.5mm PCB, which is coded 01106193. Start with IC11, the 64-pin SMD microcontroller (it sure would be handy to have a reflow oven at this stage, DSP SPI1 LK1 8MHz LK2 470 F 1 * BOTH CAPS UNDER PCB OR LAID OVER ON TOP SIDE CON6 20 19 47 47 2 1 47 +7VDC Fig.4: use this diagram as a guide when assembling the control board. It’s easiest to fit the SMDs first, starting with the ICs. Watch the orientation of the ICs, diodes, electrolytic capacitors and regulators. Some components are not required for this application, including CON6, CON7, CON9 and CON12. siliconchip.com.au Construction V2.0, 2019-03-27 User interface PIC32MZ DSP S1 GRAPHICAL LCD LED 2 D16 + GND REG2 A 1 CON8 D14 FB12 X2 ALPHA LCD 100nF 390 10 F 1.2k 20pF GND 470 20pF 330 10 F CON23 ICSP 1 470 SD04 100nF 560VR1 10k 100nF 10 F 1 CON10 IC11 PIC32MZ 2048 EFH064 10k 100 100nF RDO X1 100nF 32768Hz 100nF REG3 PORTB 20pF100nF 20pF20pF 20pF 100nF PORTE D15 10 F –I/SN IC12 CON12 100nF 100nF 1 CON11 1 parameters, set the temperatures for heat soak and reflow, or set the thermocouple temperature coefficient and offset. Fig.3 shows what’s on the front panel control board that connects to the CPU board via a ribbon cable. Rotary encoder RE1 (with integral switch) and switch S1 allow the user to step through menus, select options and alter values. Switch S2 is only needed if an encoder is used without an internal switch. The capacitors are for debouncing while the resistors, two of which are omitted, tell the CPU what type of encoder was used. CON7 25AA256 1k 100nF SPI2/I2S JP5 1k VEE CON9 1 The assembled control board, ready for installing in the case. As noted below, some connectors are not used in this project. S2 RE2 SILICON CHIP 22nF* 22nF* 4.7k 4.7k 4.7k 4.7k R4 R2 R1 R3 1 RE1 01106195 RevB CON20 (UNDER) DSP Crossover front panel board Fig.5: the front panel PCB. Note that only one of RE1 (Jaycar SR1230) or RE2 (Altronics S3350) is fitted and in the case where RE1 is used, pushbutton S2 is redundant and may be left off. Also, if RE1 is fitted, fit resistors R2 and R3; if RE2 is fitted, fit resistors R1 and R4. SILICON CON21 Fig.6: this small adaptor board CHIP converts the SIL header on the LCD (UNDER) 1 screen to a DIL header for connecting 1 CON22 to an IDC ribbon cable. The connectors are mounted on opposite sides; make sure the pin 1 connection at both ends is at the same end, as shown. Australia’s electronics magazine April 2020  31 Parts list – Reflow Oven Conversion 1 260 x 190 x 80mm plastic instrument case [Altronics H0482] 1 200 x 115mm sheet of 1.5mm-thick aluminium 1 205 x 185mm sheet of Presspahn or similar [Jaycar HG9985] 1 K-type thermocouple with banana plugs [Jaycar QM1284] 1 AD8495-based K-type thermocouple interface with purple PCB [eBay/AliExpress] 1 populated PIC32MZ CPU board - see below 1 populated front panel control board - see below 1 128 x 64 pixel graphical LCD with 20-pin connector 1 10A dual (male/female) chassis-mount IEC power connector [Altronics P8330A] 1 9V DC 2/3A regulated plugpack with 2.1mm inner diameter plug [Altronics M8923] 1 2.1mm inner diameter chassis-mount barrel socket [Altronics P0628] 1 red binding post/banana socket [Altronics P9252, Jaycar PT0453] 1 black binding post/banana socket [Altronics P9254, Jaycar PT0454] 1 double-sided PCB, coded 01106196, 51 x 13mm 1 40A 24-240VAC solid-state relay (SSR1) [Altronics S4416A] 1 SPST, SPDT or DPDT 12V DC, 1A toggle switch (main power switch) 1 IEC C14 male to 3-pin mains socket [Jaycar PS4100] 1 IEC mains power cable [Jaycar PS4106] 1 15x2 pin header 1 20-pin header 2 20-pin IDC line plugs 3 10-pin IDC line plugs 1 small tube of neutral-cure silicone sealant 1 small tube of heatsink (thermal) paste Cables & hardware 4 M3-tapped 15mm Nylon standoffs 8 M3-tapped 10mm Nylon standoffs 25 M3 x 15mm panhead machine screws 25 M3 x 6mm panhead machine screws 25 M3 star/lock washers 10 M3 hex nuts 8 5mm red eyelet crimp connectors [Altronics H2041A] 1 20cm length of three-core 10A mains flex 1 50cm length of red light-duty hookup wire 1 30cm length of black light-duty hookup wire 1 30cm length of green light-duty hookup wire 1 25cm length of 20-way ribbon cable 2 25cm lengths of 10-way ribbon cable 1 6cm length of 40-50mm diameter clear heatshrink tubing wouldn’t it!). Make very sure that it is orientated correctly before soldering its leads. You can purchase this micro pre-programmed with the software for this project (2910420A.HEX) from the SILICON CHIP ONLINE SHOP. Otherwise, the required HEX file is available for download from our website. So if needed, you can program the PIC using a PICKit 3 programmer once the board has been assembled (see Fig.10 for the slightly unusual wiring required). Tack down a couple of pins and make sure that all of its pins are correctly located over their pads before applying 32 Silicon Chip 1 50cm length of 10mm diameter clear heatshrink tubing 1 30cm length of 8mm diameter clear heatshrink tubing cable ties as required PIC32MZ CPU board parts 1 double-sided PCB coded 01106193, 60.5 x 62.5mm 1 2-way mini terminal block, 5.08mm spacing (CON5) 5 5x2 pin headers (CON7,CON9-CON11,CON23) 1 10x2 pin header (CON8) 2 3-pin headers (LK1,LK2) 1 2-pin header (JP5) 3 shorting blocks (LK1,LK2,JP5) 1 ferrite bead (FB12) 1 32768Hz watch crystal (X1) 1 miniature 8MHz crystal (X2) OR 1 standard 8MHz crystal with insulating washer (X2) 1 10kΩ vertical trimpot (VR1) 1 TO-220 flag heatsink (for REG2) [Altronics H0630] Semiconductors 1 PIC32MZ2048EFH064-250I/PT 32-bit microcontroller programmed with 2910420A.HEX, TQFP-64 (IC11) 1 25AA256-I/SN 32KB I2C EEPROM, SOIC-8 (IC12) 1 LD1117V adjustable 800mA LDO regulator, TO-220 (REG2) 1 LM317T adjustable 1A regulator, TO-220 (REG3) 1 blue SMD LED, SMA or SMB (LED2) 3 LL5819 SMD 1A 40V schottky diodes, MELF (MLB) (D14-D16) Capacitors 1 470µF 10V electrolytic 5 10µF 50V electrolytic 11 100nF SMD 2012/0805 50V X7R 4 20pF SMD 2012/0805 50V C0G/NP0 Resistors (all SMD 2012/0805 1%) 1 10kΩ 1 1.2kΩ 2 1kΩ 2 470Ω 1 390Ω 2 330Ω 1 100Ω 3 47Ω 1 560Ω Front panel control board parts 1 double-sided PCB coded 01106195, 107.5 x 32.5mm 1 5x2 pin header (CON20) 2 4.7kΩ 1/4W through-hole resistors 2 22nF through-hole ceramic capacitors 2 PCB-mount snap-action momentary pushbuttons (S1,S2)* [Jaycar SP0721, Altronics S1096] 1 3-pin rotary encoder (RE1/RE2) [eg, Altronics S3350 or Jaycar SR1230 with integrated pushbutton] 1 knob (to suit RE1/RE2) * only one required if using Jaycar SR1230 encoder flux paste and soldering the rest. Solder bridges are almost inevitable if hand-soldering, but these can be cleaned up with the application of more flux paste and some solder wick. Follow with the other SMDs, making sure that IC12 and the diodes are orientated correctly. You don’t need to fit CON6 for this project. Next, fit the through-hole components; don’t get REG2 and REG3 mixed up and note that REG2 now has a small flag heatsink fitted. When mounting X2, if there is any chance of the bottom of its metal package shorting to components below, fit an insulating washer underneath. CON12 Australia’s electronics magazine siliconchip.com.au Dimensioned diagrams for drilling this plate, the front and rear panels and drilling/cutting the Presspahn safety shield can all be downloaded from www.siliconchip.com.au can be left off. You can now move onto building the front panel control board. Its overlay diagram is shown in Fig.5. The PCB is coded 01106195 and measures 107.5 x 32.5mm. There isn’t a lot to assembling it; if you’re using the recommended Jaycar SR1230 rotary encoder, besides that part, you just need one pushbutton (S1), two capacitors, two resistors (R2 & R3) and header CON20. The capacitors and CON20 are mounted on the underside, with the caps laid over. Now is also a good time to solder the two headers to the small board coded 01106196 which measures 51 x 13mm, shown in Fig.6. The SIL header goes on one side and the DIL header on the other. Then solder its SIL header to the LCD module, with this board mounted on the back. Next, make up the two ribbon cables. One has 20 wires, and one has 10 wires. They are the same length; see Fig.7 for details. Cut each section of the ribbon cable to length, leaving around 5cm extra in each case for crimping to the connectors. You can strip these cables out of ribbon cables with more wires, by making a small cut between two wires and then separating the sections by pulling them apart. It’s best to use a dedicated IDC crimping tool for this job, such as Altronics T1540. You can use a vice, but you have to be careful to avoid crushing and breaking the plastic IDC connectors. Each connector has three parts: the bottom part, which has the metal blades that cut into the ribbon cable; the middle part, which clamps the cable down onto these; and a locking bar at the top that holds it all together once it has been crimped. Note how, as shown in Fig.7, the cable passes between the locking bar and upper part before folding over on the outside edge and then being crimped underneath. So with this in mind, slightly separate the three pieces without actually taking them apart, and feed the ribbon cable through as shown. Ensure there is enough “meat” for the metal blades to cut into, then place it into your crimping tool or vice without allowing the cable to fall out. Clamp the three pieces together, gently at first, then more firmly. The trick is to crimp it hard enough to ensure that the blades cut fully through the insulation and make good contact with the copper wires, without pressing so hard that you break the plastic. If using a vice, it’s best to wedge a piece of cardboard between each end of the connector and the vice, to provide some cushioning. Once you’ve crimped a connector at one end of the cable, do the one at the other end, making sure that when you’re finished, the locating spigots will both be facing in the same direction. In the second and final part of this project, which will appear in our May issue, we’ll cover the steps involved in putting the controller in a case and safely checking that all is operating correctly. We’ll also have a list of troubleshooting suggestions in the unlikely even that you cannot get your controller to . . . control! But in the meantime, you can gather all the components, PCBs and everything else you need. SC Don’t forget the oven! LOCATING SPIGOT UNDER 1 0 -WAY IDC SOCKET 1 0 -WAY IDC SOCKET 1x200mm 1 0-WAY IDC RIBBON CABLE CABLE EDGE STRIPE LOCATING SPIGOT UNDER 20-WAY IDC SOCKET 20-WAY IDC SOCKET 1x200mm 20-WAY IDC RIBBON CABLE siliconchip.com.au Fig.7: you need to make two ribbon cables: one to connect the front panel to the CPU board, and the other to connect the LCD. Note the orientation of the connector tabs, so that pin 1 is aligned with the red stripe at both ends. Make sure the IDC blades are pressed down hard enough to fully pierce the insulation and make good contact, but not so hard that you crack the plastic! CABLE EDGE STRIPE Australia’s electronics magazine April 2020  33