Modify the BRTRO-420 reflow oven to have an Arduino based reflow firmware, USB interface and cold junction compensation.
Adobe Portable Document Format - 1.83 MB - 09/30/2019 at 12:22
After ironing out a couple of PCB bugs, things are getting there. A trace got missed on the LCD display and the LEDs won't light up with the current rev of the board without a simple mod. But everything works now without any modifications required to the existing board (apart from putting a jumper on).
One of the buttons (back button) also managed to share the same EXTINT with the zero crossing detection circuit on the SAMC21, so the button is handled separately in the main loop instead (which can cause a missed click every now and then, but it's not that bad).
Most of the menu functions and profile modification/display features have also been created:
Now just onto the PID control and timing!
After a bit of mucking about it lives!
The SAMC21 (nor any of the SAMx2x microcontrollers) doesn't allow you to invert the hardware UART polarity, so you would have a tricky time getting a software UART working if you want to use the Arduino bootloaders (you could forego the bootloader, but where's the fun in that?). Now theoretically, you could use a UART->USB controller that had inverted logic, but most don't seem to.
So instead, there was enough free pads around the UART connectors (these were originally put in to be able to change the RX/TX orientation if necessary) to wire in some SOT-23 PNP based inverters while keeping things relatively neat (take note that the transmit LED needs a current limit resistor too otherwise you just get spikes on the UART bits as the LED starts to dim/burn out due to excess current):
As for the bootloader/core, I'm using a modified mattairtech ArduinoCore-samd (which is a modified ArduinoCore-samd) firmware which has options for the SAMC. The pinouts have changed of course, so a recompile of the bootloader is necessary to get things running.
Now to solder the board on. You want to join the existing leads to the new holes. This is made easier with a fine solder tip and feeding in the solder:
To check that pins have wetted, you can shine a light through the gaps in the PCB:
Also, pop a jumper on the W1 pins near the existing MCU (or bridge them with solder); this is the DEBUG I/F pin. This places this MCU into serial bootloader mode (MD = 0, DEBUG I/F = 0) and should effectively render it inoperable.
New 5mm headers have been placed for the thermocouples. You could reuse the existing ones if you prefer.
The boards have arrived!
And are populated and fit just fine (after straightening some pins)!
If anyone is interested in this mod, let me know as there are a few spares.
The holes on all through hole parts have been made bigger to account for slanted legs and bevels on the solder joints on the original board (so it sits relatively flushish to make soldering easier). Also added is optional zero crossing detection.
Once you are happy with the design, the best way to check for the fit is to print it out, cut any routed sections out and place it over the top:
When placing components, note that the top layer of the board is the "bottom" of the main board, so we can put things anywhere on the top, and the bottom of our board will sit flush to the original board.
To get the thermocouples re-integrated, we have to add an additional section to the board. An additional board section near the existing thermocouple connectors has been extended to account for this. Here's a first cut:
Some notes about the existing board:
So you do a few measurements of the board and you get something like this:
The headers on there join up with the through hole parts that were standard 2.54mm pitch. The great thing about these is that there is one reference point in which to take the measurement from (pin 1). You could make the holes a bit bigger for these, to get around the solder joint, but in this instance the board doesn't have to be perfectly flush and I might just clean those joints up a bit before soldering anyway.
The other holes required were non standard pitch, so you can link these with vias. The via size just needs to be a bit bigger than the original solder joint/blob.
As for the rest of the solder joints, you can just route in cutouts where these are. These don't need to be too precise, just give enough clearance for the joints.
When using ImageJ, you can draw shapes around parts, then right click the yellow shape and click Draw, which leaves a white mark where you drew the shape. This is handy when using the measurement line. Also Ctrl+m is the shortcut for taking a measurement, which also shows instantly in the results window.
Also don't stress about the thin PCB section at the bottom, the PCB needs to grow about 10mm on the bottom edge to allow for a re-routing of the thermocouple headers, as the original ones have one pin shorted to ground (which isn't suitable for the thermocouple IC that's going to be used).
How are we going to make a mod PCB without the original design files? Well here's my trick for doing so. There's possibly a better way, but this is a super simple method of getting things pretty close.
Firstly, make sure to label all the cables so things go back the way they should be before removing the PCB:
Take some images of the PCB with a ruler for reference as "square on" as possible (try to minimise rotation and perspective angles). It doesn't have to be perfect as we will confirm measurements later in development, with a printout of the final design to see if things line up. One tip is to use a long focal length and crop the image, but this isn't 100% necessary unless you have some really tight tolerances (through hole is far from tight):
Now grab a tool called ImageJ and open the image in it. Select the straight line tool and measure between two known points on the ruler:
Now goto Analyze>Set Scale...:
Change the known distance value (don't touch anything else except to optionally change the unit of length field for your reference) with the distance you have, in this case it's 10mm and we will be using a mm scale for the rest of our measurements, so set it to 10. This can be any scale you like (I could use 1 cm here too in which case you put 1 in the known distance). Just remember to use the same scale throughout when taking measurements.
Now go ahead and use any of the tools to take measurements (check the length value in the status bar for the measurement):
You can also check the Analyze>Measure tool to see more accurate measurements (the distance between those two pins is 2.54mm which sounds spot on for this part):
Now onto creating a PCB with hundreds of measurements. I usually sketch the board positions out first in CAD so you can import a DXF file into your EDA tool, but pen and paper work just fine too.
If you've followed my other project, you'll find that this machine lacks some very simple interface features. Also mentioned is the oven's use of the Cypress/Fujitsu CY96F613, an obsolete, 16bit microcontroller with an unobtainable build chain.
To overcome this, I'm going to completely replace this microcontroller with a new one. The existing microcontroller has a TQFP footprint in a pretty tight space. I did look at creating an adapter to replace the existing one with a new SAMC21 (5V capable) VQFN variant:
But, this still leaves us with the poor thermocouple interface to contend with, could be quite tricky to solder in place and would be difficult to initially program the bootloader/reprogram if something goes wrong.
So instead, we look underneath:
All of the (low voltage) components we need to connect to are through hole devices. So we can easily create a mod board that connects up to all these pins, completely populated with the SAMC21 (and ICSP interface) and a couple of MAX31855's to replace the existing thermocouple circuit. In addition to this, we'll be piggybacking on the existing optocoupled serial interface, which can be broken out into a USB interface for programming and debug.
This all removes the need to create a completely new, full sized board as all the other components are already there.