Silicon ChipDIY Solder ReFLow Oven with PID Control - May 2021 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Subscriptions: PE Subscription
  4. Subscriptions: PicoLog Cloud
  5. Back Issues: PICOLOG
  6. Publisher's Letter
  7. Feature: The Fox Report by Barry Fox
  8. Feature: Techno Talk by Mark Nelson
  9. Feature: Net Work by Alan Winstanley
  10. Project: 7-Band Mono or Stereo Equaliser by John Clarke
  11. Project: Touchscreen car altimeter by Peter Bennett
  12. Project: DIY Solder ReFLow Oven with PID Control by Phil Prosser
  13. Feature: Max’s Cool Beans by Max the Magnificent
  14. Feature: Make it with Micromite by Phil Boyce
  15. Feature: PICn’Mix by Mike Hibbett
  16. Feature: AUDIO OUT by Jake Rothman
  17. Feature: Circuit Surgery by Ian Bell
  18. Feature: Practically Speaking by Jake Rothman
  19. PCB Order Form
  20. Advertising Index: Max’s Cool Beans cunning coding tips and tricks

This is only a preview of the May 2021 issue of Practical Electronics.

You can view 0 of the 72 pages in the full issue.

Articles in this series:
  • (November 2020)
  • Techno Talk (December 2020)
  • Techno Talk (January 2021)
  • Techno Talk (February 2021)
  • Techno Talk (March 2021)
  • Techno Talk (April 2021)
  • Techno Talk (May 2021)
  • Techno Talk (June 2021)
  • Techno Talk (July 2021)
  • Techno Talk (August 2021)
  • Techno Talk (September 2021)
  • Techno Talk (October 2021)
  • Techno Talk (November 2021)
  • Techno Talk (December 2021)
  • Communing with nature (January 2022)
  • Should we be worried? (February 2022)
  • How resilient is your lifeline? (March 2022)
  • Go eco, get ethical! (April 2022)
  • From nano to bio (May 2022)
  • Positivity follows the gloom (June 2022)
  • Mixed menu (July 2022)
  • Time for a total rethink? (August 2022)
  • What’s in a name? (September 2022)
  • Forget leaves on the line! (October 2022)
  • Giant Boost for Batteries (December 2022)
  • Raudive Voices Revisited (January 2023)
  • A thousand words (February 2023)
  • It’s handover time (March 2023)
  • AI, Robots, Horticulture and Agriculture (April 2023)
  • Prophecy can be perplexing (May 2023)
  • Technology comes in different shapes and sizes (June 2023)
  • AI and robots – what could possibly go wrong? (July 2023)
  • How long until we’re all out of work? (August 2023)
  • We both have truths, are mine the same as yours? (September 2023)
  • Holy Spheres, Batman! (October 2023)
  • Where’s my pneumatic car? (November 2023)
  • Good grief! (December 2023)
  • Cheeky chiplets (January 2024)
  • Cheeky chiplets (February 2024)
  • The Wibbly-Wobbly World of Quantum (March 2024)
  • Techno Talk - Wait! What? Really? (April 2024)
  • Techno Talk - One step closer to a dystopian abyss? (May 2024)
  • Techno Talk - Program that! (June 2024)
  • Techno Talk (July 2024)
  • Techno Talk - That makes so much sense! (August 2024)
  • Techno Talk - I don’t want to be a Norbert... (September 2024)
  • Techno Talk - Sticking the landing (October 2024)
  • Techno Talk (November 2024)
  • Techno Talk (December 2024)
  • Techno Talk (January 2025)
  • Techno Talk (February 2025)
  • Techno Talk (March 2025)
  • Techno Talk (April 2025)
  • Techno Talk (May 2025)
  • Techno Talk (June 2025)
DIY Solder ReFLow Oven Part 2 by Phil Prosser with PID Control When we left off last month, we’d finished assembling the PCBs and the hardware. Now it’s time to put it all together – and get cooking! J ust in case you missed this project’s first instalment last month, let’s briefly recap. We’re taking a bog-standard ‘toaster oven’ and making a controller for it, which allows it to be turned into a reflow oven for soldering PCBs with lots of (or even a few) SMD components. We do this without any modifications to the toaster oven at all – in fact, there is only minimal mains wiring to be done within the controller. What’s more, we’ve made it very safe to use. If you want more details than that, we suggest you look up the first part in the April 2021 issue. Now, let’s get on with the show! Putting it together Everything mounts inside a commercial plastic case, with the components mounted on a baseplate made from 1.5mm-thick aluminium. Cut it to 200 × 115mm and drill all the required holes, as shown in Fig.8. Deburr all the holes and clean it up. 32 We haven’t shown a cutting/drilling diagram for this simply because of its size but we have prepared one; it can be downloaded from the May 2021 page of the PE website and printed out at 1:1 size. Covering the panel with masking tape before cutting out the display window has two benefits: (a) you can much more easily mark the position on the tape (along with other hole locations) and (b) it tends to make the waste stay in place, resulting in less mess! Practical Electronics | May | 2021 We previewed the completed controller last month. Here it is again showing where everything goes. Again, this shot was taken before the Presspahn shield was fitted to cover exposed mains. Similarly, drilling diagrams for the front and rear panels, along with a cutting and drilling diagram for the Presspahn safety shield can also be downloaded in a single PDF document. Now would be a good time to get those diagrams and cut/drill the components. We applied masking tape to the front and rear panels and marked cuts and holes on this. For the LCD and the IEC connector, we used a Dremel with a cut-off wheel to cut just inside the marked cut lines, then used a file to tidy the holes. This gave a neat result. Use the aluminium plate as a template in the bottom of the case to mark out and drill the holes which will be used to attach the plate to the base. Be careful to leave a minimum of 40mm of room to the front panel for the LCD connector. Now you can start to fit the components to the baseplate. Apply a small dollop of heatsink paste under the solid-state relay before mounting it. Mount the PIC32MZ PCB using 15mm nylon standoffs. These ensure that the board is well insulated, with sufficient creepage distance from the base plate. Do not substitute metal standoffs. You can then attach the metal plate to the bottom of the instrument case and move on to the front and rear panels. For the rear panel, attach the dual IEC connector, binding posts and DC socket securely. We can solder wires to these in situ later. It is now time to mount the LCD screen and front panel PCB. We used glue (actually, silicone sealant) to avoid messy screws through the front panel, and to make it bombproof. You just need to be a bit careful in application. Start with the LCD. If your cut-out leaves a gap around the LCD screen, you may be able to see the white of the backlight assem- To avoid screw heads protruding from the front panel, we decided to glue the LCD to the rear of the panel using silicone sealant. The masking tape showed us where the glue was to go. Once you’ve drilled out the baseplate (download the PDF from the May 2021 page of the PE website) it can be used as a template for drilling the four required holes in the case (these align with four of the pillars moulded into the case). Practical Electronics | May | 2021 33 DUAL IEC MAINS INPUT PLUG & OUTPUT SOCKET EARTH PINS ARE LINKED 9V DC INPUT THERMOCOUPLE AMPLIFIER MODULE CJMCU GND OUT GND VCC 1 10 8 6 4– INPUT – + CON10 9 10 SOLI STATE SOL SOLID RELAY (230V/40A) 1 2 9 10 10-WAY IDC RIBBON CON11 2 LO O LOAD CON5 1 7 (DOTTED LINES SHOW PRESSPAHN BOX FOLDED OVER SSR AND MAINS WIRING, HELD DOWN BY THREE MOUNTING SCREWS) 3+ 1 2 7 CON8 6 1 2 20-WAY IDC RIBBON CABLE 19 20 USER INTERFACE 128 x 64 LCD MODULE Fig.11: this wiring diagram shows you which wires need to go where to complete the controller. Besides making sure that the ribbon cables have the red wires going to pin 1 of the plug and socket at both ends, and that the IDC connectors are correctly crimped, the main thing to note is the way the 10-wire ribbon cable from CON10 is split up and routed to two places. Only five wires in this cable are used; the other five should be cut short. When finished, use cable ties to tie all the bundles of wires together, so nothing can move around, and don’t forget to add the Presspahn barrier. bly through the gap. Use a black marker to colour in the white backlight around the edges of the LCD panel before mounting it. Put masking tape across the front panel cut-out and temporarily mount the LCD, making sure that the connectors are on the bottom. The tape should hold the LCD pretty well flush with the front panel. Also, apply masking tape around the LCD edges to facilitate tidying up the silicone after you have applied it. Refer to the accompanying photo. Next, attach the front panel control board. Put one nut (or several washers) over the rotary encoder shaft to set a minimum depth, then mount it to the front panel using the supplied nut. Check the pushbuttons operate properly and do not get stuck on the front panel. If they do, carefully file the holes a bit larger with a round file. Once it is all good, tighten up the nut on the rotary encoder and check that everything is sitting neatly. Adjust if necessary. Then, using a matchstick or small timber offcut, build up a dollop of silicone at either corner of the LCD. Do the same with the control board, at the end far from the rotary encoder. Watch out for the pushbutton; do not get silicone onto this, or it will stop it working. You do not need to use a lot of silicone – a ‘dollop’ at either corner is more than enough. (We used far more than necessary!) 34 Once the silicone has set, attach the on/off toggle switch in the usual manner, and push a knob onto the rotary encoder. You are now ready to start the wiring. Wiring it up Fig.11 shows the wiring that’s needed to finish the controller. As you do the wiring, keep in mind that twisting pairs or bundles of wires together and/or covering them in heatshrink tubing will keep the whole thing neat. It’s important to note that this also contributes to safety, as it stops wires that might break off from moving around and contacting other parts of the circuit. See our photos for an idea of what it should look like when you’ve finished. Start by running light-duty red hookup wire from the middle pin of the barrel connector to the front panel on/off switch, then from the other terminal of the on/off switch to the + power input of the PIC32MZ controller board. Run lightduty black wire from the DC socket ground (outer connector, as shown in the photo) to the PIC32MZ’s GND power input. Twist these together and use heatshrink to make the connections tidy. Then plug in the two ribbon cables you made earlier, one from the CON11 on the CPU board to CON2 on the front panel, and the other from CON8 on the CPU board to the DIL header on the back of the LCD adaptor board. In each case, make sure the red stripe side of the cable goes towards the pin 1 side on the connector. Practical Electronics | May | 2021 1.2k 100nF CON GND CON10 The code for programing is available in the download package from the May 2021 page of the PE website. CON9 BACK OF PICKIT 4 8 7 6 (PGEC) 5 (PGED) 4 (GND) 3 (VDD) 2 (MCLR) 1 SPI2/I2S 1 BACK OF PICKIT 4 8 7 6 (PGEC) 5 (PGED) 4 (GND) 3 (VDD) 2 (MCLR) 1 JP5 1k 100nF 1 100nF 1 CON23 ICSP Fig.12: When programming a blank PIC32 or there is a firmware update, this is how to connect a PICkit 3/4 or similar to the board to reflash the chip. 10k D15 REG3 PORTB 1 390 1.2k 100nF Thermocouple input wiring The two binding posts are mounted 20mm apart, allowing the Jaycar QM1284 thermocouple to be plugged straight in. This provides a professional-looking solution. However, CON as mentioned earlier, if you run the thermocouple wire through a grommet in the rear panel and connect them directly to the screw connectors on the thermocouple amplifier board, the temperature readings will be more accurate. The downside is that you now have a captive thermocouple wire, so changing the thermocouple is a tedious job. The thermocouple and also the solid-state relay signals BACK connect to CON10 (PORTB) on the PIC32MZ board. We OF 8 connector onto one end of suggest that you crimp an PICKIT 4 IDC 7 a length of 10-way ribbon cable. This can then be plugged 6 (PGEC) into CON10 and the wires at 5the other end separated and (PGED) 4 stripped to make the required connections. Make sure (GND) 3 (VDD) 2to the IDC terminal marked that the red striped wire (MCLR) goes 1 as pin 1. With this cable, some fiddling is required. We couldn’t think of an easier way for this short of adding a PCB, which seemed over the top. Pull the wires apart to separate out wires 1 (red), 6 and 7 (together), 8 and 10. Snip the other wires off short as they are not needed. Mark wires 7 and 8 as ‘–’ with some heatshrink or colour it with a permanent marker. Connect wire 6 to the solid-state relay input + terminal, and wire 7 to the SSR – input. These can be wedged under the screw terminals; do them up tight. Connect wire 1 to the ‘Out’ connection of the thermocouple amplifier, wire 8 to its ground and wire 10 to the positive power input on the thermocouple amplifier. We arranged the cable lengths so that it is possible to encapsulate the thermocouple amplifier in heatshrink tubing and zip tie it to the binding posts. This places the thermocouple amplifier in reasonable contact with the thermocouple plugs. Remember that this amplifier has correction circuitry that accounts for the temperature of the thermocouple plug, so the closer it is to this plug, the better. If you purchased the recommended thermocouple amplifier with a purple PCB, there will be a mounting hole. You can use this to mount it to the rear panel with a nylon machine screw and nut, close to the binding posts/banana sockets. GND Hopefully, when you soldered the LCD adaptor to the LCD screen earlier, you connected pin 1 on that board to pin 1 on the LCD. If not, rotate the IDC connector plugging into the LCD adaptor by 180° to compensate. The specified dual male and female IEC connector allows a conventional IEC mains power cord to supply power to the unit, and also makes it easy to connect up to the oven. Strip out a length of 10A mains flex or an unused 10Arated mains power cord to get the brown, light blue and green/yellow striped wire that you will need to wire this up to the SSR. For the following mains wiring, keep all the wires as short as possible to maximise safety (the earth wire is less critical, but it’s still better to keep it short if possible.) Use a short length of the light blue wire to join the two neutral connectors on the socket together. These are both marked with an ‘N’. Then crimp an eyelet lug onto one end of a short length of green/yellow striped wire, solder the free end to the earth connector on the mains socket and attach the eyelet to the baseplate using a machine screw, a shakeproof washer (under the eyelet) and two nuts. Cut two lengths of brown wire and crimp eyelets to one end of each, then solder the free ends to the incoming and outgoing Live terminals on the mains connectors. It doesn’t matter which wire goes to which load terminal on the SSR - this is AC after all, so current must be able to flow in both directions. Note that you could connect to the SSR using bare wires rather than eyelet lugs, but we feel that using a crimped connector makes it a bit tidier. Just make sure they are securely crimped. Apply insulation to all of these connections, and double-check them, then cable tie them all together, so that if one comes loose, it can’t go anywhere. CON10 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. A view of the rear panel connections – again, this is before the Presspahn insulation barrier is installed. Don’t forget it! Practical Electronics | May | 2021 35 A male-IEC-plug-to-female mains socket (such as this one from CPC Farnell, part number PL15014) means no modifications are required for the toaster oven. The Presspahn barrier is essential for your safety – there are exposed mains voltages inside the case which must be covered. Tidying it up Once you’ve finished all the wiring, use cable ties to tie each bundle of wires together. This is especially important for the mains wiring, which must all be tied together securely, and also the red and black wires from the DC socket to the front panel on/off switch and to CON4 on the control board. Make sure that these wires are tied so that they can’t move around inside the case (eg, by tying them to the nearby ribbon cables) and that if one breaks off at either end, it can’t go anywhere. Now is also a good time to attach the Presspahn insulation barrier to the bottom plate using machine screws, shakeproof washers and nuts. Refer to the photos to see where it goes. Once the lid is on the case, it should isolate the mains section from the rest of the controller. Initial testing For the following tests, do not connect the mains lead. Use only the 9V plugpack. Make sure that jumper JP5 on the CPU board is inserted. There must also be a jumper on LK2 in the position shown in Fig.4. You don’t need a jumper on LK1; if there is one there, it doesn’t matter which position it is on. Now switch the device on and check the LCD. Adjust the LCD bias voltage using trimpot VR1. This may require some experimentation; the LCD will initially show no image or a washed-out image. Adjust the bias from one end toward the other until you get a good image. Next, check that the user controls work by pressing the right-hand button (EXIT); a screen with four boxes should appear. Rotate the encoder knob; you should see each of the four quadrants be highlighted in turn. Now we set the initial PID coefficients. Press the lefthand button/rotary encoder knob (SEL) when the ‘adjust PID settings’ screen is highlighted. You will be presented with a screen asking if you are sure. Rotate the dial to ‘Yes’ and click SEL. Enter 100 for P, 0.5 for I and 670 for D. This configuration is super critical – if you do not do this, the thing will most likely show 0°C, and definitely not work. Next, set the reflow settings by pressing SEL when the ‘Setpoints’ screen is highlighted. You will be presented with a screen asking if you are sure. Rotate the dial to ‘Yes’ and click SEL. Enter 150C for Preheat Temp and 225C for Reflow Temp. Then set the Sensor TEMPCO settings by pressing the left button (SEL) when the ‘Tempco and Offset’ screen is highlighted. You will be presented with a screen asking if you are sure. Rotate the dial to ‘Yes’ and click SEL. Enter 0 for OFFSET (this is in °C), and 0.161 for TEMPCO. Check that the home screen now shows approximately the right ambient temperature. Boil a jug of water, insert the thermocouple and check that the home screen shows something close to 100°C. Remember that thermocouples are not super-precise devices, and an error of a few degrees is OK. To check that the SSR drive is working, use the following steps: 1. Reset the system by cycling the power 2. Set the target temperature a bit above the ambient temperature 3. Watch the LED on the solid-state relay (it is next to the input). This should light up every few seconds, in time with the lightning bolt on the screen going from an outline to a full lightning bolt 4. Turn the set temperature down to around 20°C, and hold the tip of the thermocouple between your fingers, so the measured temperature is above the set temperature 5. Check that after a few seconds, the lightning bolt and red LED on the solid-state relay stop lighting. Four holes must be drilled in the front panel (follow the drilling diagrams in the downlod package from the May 2021 page of the PE website) but there is also a cutout required for the display. We used a Dremel to cut out the rough hole then finished it off with a fine file. The same approach can used for the IEC mains socket cutout on the rear panel. 36 Practical Electronics | May | 2021 Pin 1 6 7 8 10 Role Analog input Heater control GND GND +3.3V Connect to Thermocouple amplifier output SSR input 3+ SSR input 4Thermocouple amplifier GND Thermocouple amplifier power supply Table 1 – CON10/PORTB connections (other pins not used) Note that with a PID controller, there can be a lag in its response to changes in temperature and settings. Live testing You can now switch off the power and connect the oven to the IEC mains output socket on the controller via the IEC/mains socket adaptor. Before connecting the mains input IEC lead, doublecheck your wiring, and ideally have a friend triple check it. Check that: n No stray wires are poking out of crimps, terminals or the insulation n There are no wires stripped too far, leaving lots of exposed copper that could contact with something n The IEC ‘N’ connector goes to the other IEC ‘N’, diagonally across the connector n The earth connector is solidly connected to the baseplate n One wire from each of the IEC live pins goes to one SSR ‘LOAD’ terminal. Close the case and securely screw it together; make sure there are no exposed mains wires. Turn the oven to its maximum temperature setting, and then switch on all elements. Dial the timer for 20 minutes or so, plug the oven into the controller, power up the controller and set the temperature to 20°C. Plug the controller into the mains and switch it on. The oven should not be on yet, unless your house is particularly cold. Turn the dial on the controller for a setting of 40°C. You should soon see the lightning bolt on the controller coloured in, indicating the heater is on. If your oven is like ours, you should see a light on the oven indicate it is switched on. After a few seconds, you should see the measured temperature start to creep up. The thermal inertia of the oven will cause a delay of 20 seconds or so; the temperature will likely overshoot the Above: the board used during reflow test, showing solder paste applied to pads. The amount shown here is more than enough! Below: some sample boards during reflow test. target. As explained above, our controller is optimised for high temperatures, and you will see overshoot in the order of 15°C or so at low temperatures. Just watch to see that heating switches off before it reaches the target temperature. Try setting the controller to 60°C, and watch the controller switching on and off. Once heated, the oven takes quite a while to cool down. Remember that when reflowing, you must open the door at the end of the cycle. Reflowing We reflow soldered a couple of boards with SMD components to demonstrate the operation of the oven. As shown in the pictures below, if you are applying solder paste by hand, use a syringe and put less than you think it will take! The biggest mistake most people make when reflow soldering parts is to add too much solder paste. We stuck the thermocouple to the edge of the oven using tape, and fiddled it until the thermocouple was close The rear panel sports the 9V DC input socket (left) with the polarised thermocouple terminals alongside. At the right end is the twin IEC mains output/input socket which is the raison d’etre for this project: mains comes in to the right-hand (male) socket; controlled mains to the toaster oven comes out of the left-hand (female) socket. Practical Electronics | May | 2021 37 Help, it’s not working! Nothing on the LCD screen • Check that the LCD bias pot is set correctly. Turn it fully anticlockwise, then slowly turn it clockwise until you see something on the display • Check that the microcontroller is running • Check your parts and soldering, especially look for bridges across the microcontroller pins • Check the output of the 5V and 3.3V regulators. Reflow display showing target and actual temperature profiles. to the test PCBs. You need the sensor to be as close as possible to the boards (maybe even touching), to ensure the temperature profile achieved is right in the vicinity of your board. The temperature profile that the oven ran is shown above. You can see that the temperature fell after we opened the door a crack. We left it like that for about 20 seconds, then opened it fully to allow the board to cool. Don’t move the board until it cools, as the solder will still be liquid for a while! At about 180°C, the flux activates and the solder starts to reflow. By the time the oven hit 225°C, and we opened the door, the board had fully reflowed and settled down. Ideally, you should give your oven a trial run on a noncritical PCB before soldering anything really expensive. But if you have a hot air rework station, you can probably fix anything that goes awry on the first couple of tries, until you get it fully dialled in. eptsoft Directory of Education, Lifestyle and Leisure Suppliers Sell online to half a million Teachers, friends and family with hobbies and interests outside of school. Through our membership of the British Education Suppliers Association and LendED for Home Schooling, connect to parents and teachers in all UK educational establishments. eptsoft publishes a Directory of Education, Lifestyle and Leisure Suppliers into educational establishments through membership of British Education Suppliers Association, Free Interactive Software & eTextbooks. www.eptsoft.com My oven is going crazy • Have you used an oven with a smart controller? This project won’t work with it! The temperature readings are very wrong • Is the thermocouple connected backwards • Are the tempco and offset in the software right for your amplifier • Use a DVM to check the voltage on the thermocouple amplifier output. It should be about 1.25V. If not, read the panel on thermocouple amplifiers • Put the thermocouple tip in a cup of hot water. Watch to see if the voltage increases. The temperature readings are slightly wrong • Is your thermocouple in the oven next to your workpiece • Check the thermocouple tempco and offset is correct for your thermocouple • Try putting the sensor tip in iced water and boiling water. If the readings are off by more than a few degrees, check for construction errors. The oven won’t heat • Ummm – you did check that the oven worked normally before making any modifications, didn’t you?! • Check that your oven’s temperature is set to maximum and that it is switched on and both heating elements are selected. • Is the thermocouple reading the right temperature? • Set the temperature on the controller for say 100°C and watch the SSR. It has a red LED that indicates when it is on • Watch your oven power light. Is it switching on in unison with the SSR light? The oven is running too hot when set for fixed temperatures • At low temperatures, even with the optimisations we made, the thermal mass of the oven means that there is still a lot of overshoot. Also, the thermal mass of the elements and oven means it takes a long time to cool down • Try starting it up in advance and give it time to settle before using it. Settings are lost at power-off • Use the save option after making changes. • Check the PIC microcontroller pins for shorts on the side close to the EEPROM • Check the orientation and soldering of the EEPROM chip. 38 epts oft.indd 1 Reproduced by arrangement with SILICON CHIP magazine 2021. www.siliconchip.com.au Practical Electronics | May | 2021 04/02/2021 12:00