Building a reflow oven from KMarts Mini Oven $35AU Appliance
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
So the last bit of time i've been working on the web interface. Alot of things around how to code a profile and store them and all that.
But I got bored and really wanted to do a quick test run. I've got all my calibration data, but i've not written the code to then set the duty cycle based on those values, so I wrote a very lazy duty cycle calculation algorithm. Basically we calculate our target temperature and when the actual temperature is below the target temperature we add 15% to the duty cycle for every degree below the target temp.
This is what we call the "rubbish" algorithm, which of course behaved like rubbish, but it wasn't that terrible.
Graph of target temperature vs actual temperature, though for some reason my profile isnt right (obviously some calculation error in that part of the code, but still for a "rubbish" algorithm shows the oven has promise)
And after fixing the profile it isn't half bad:
Unfortunately it doesn't appear It can hit the ramp-up rate at the higher temperatures, but still, its good enough and a few adjustments to the dcycle calculation seems to have improved it slightly:
Looking forward to making a much better temperature algorithm.....
So, in alot of cases like this, the GO-TO temperature control method is PID. In part its because its very commonly used in industry, its been around for a very very long time and you can get fairly generic modules from a lot of sources with a wide range of capability... and they're cheap!... and alot of other reasons.
In 3d printing, PID has been the mainstay of most FDM printers for controlling temperature in the head and the bed and there's good reasons for that. The premise is that you measure the temperature, check against your target, then use a simple bit of math to figure out how much extra power you need to send to your heating element to get there. I wont go into all the components of what the three bits of PID actually mean, but they're reasonably straight forward and easy enough to implement on even the smallest of MCU's and that was true even 50 years or so back.
However, there are other mechanisms for hitting a temperature that can be a little more solid if you know all the variables. Lets take the example of the 3d printer head and we're trying to hit a temperature of 250c. The variables working against us here are fairly easy to define:
Point is, there's quite a few variables, BUT if you can map them out you can predict in advance exactly what power you need to send to the heater element in order to keep it exactly at temperature. It means doing a tonne of calibration (and would only cover the materials you are using) but its doable.
Our little heated box has fewer variables, which makes them much easier to predict and map against. To begin with its a little sealed box and nothing is in motion, so alot of the variables are gone.
In reality, for the temperatures we're dealing with here and the fact that most people would be using it inside, this is easy enough to ignore.
In my previous life i was chemical engineer in research and keeping things at temperature was often pretty critical to whatever we were doing, PID controllers were too general, we had a lot of computing power available (relatively speaking), we had much better control over the local variables and all the time in the world to calibrate. There were quite a few options on how you then control temperature but one we had invented ourselves was called delta curve tracking with delay compensation. In essence, you go through as many heat-up ramping cycles as you can with as many different power levels as you can. Say for example you start at 10%, you end up with a temperature curve over time like so (and you do it for as many power levels as you can):
The second step is you then take this curve and start at 10%. At the mid-point you change to 20% and you end up with a curve that accelerates slightly, again, you do this for as many points as you can. Ultimately you end up with a situation where you can measure temperature change over time for any given power or current temperature and you also have your power reaction delay for as many points as possible and ultimately you end with a map of power vs temperature vs time and it would look something like this (not my actual plot, just an example)
But, its also alot more CPU intensive compared to a PID algorithm, however...
Read more »After sending my board off to OSHPark to be created, I decided to build a small prototype board:
Which is when I discovered the fatal flaw in my board design. Primarily i'll be controlling this thing over wifi and I dont really need the display beyond telling me what the temperature in the oven actually is, whether its on and how much power im sending it (maybe some more data later) and even that is optional. Originally I was aiming at the ESP32-S module because I have quite a few, and the lilygo t-display is based on the same chip, but It has one problem I was not aware of, it has 2 ADC's, the second ADC Isn't usable when WiFi is enabled (works fine with ESP32-S2 and later modules, but not the -S). In my "real" board, I have 3 thermistors all tied to ADC2. In reality I can put in a bodge wire, but its a small cheap board so i'll design a new one. I mean its only 3 thermisters and a few GPIO outputs, so its not exactly rocket surgery.
On another note I was originally using the same circuitry for my board that you might find on the majority of 3d Printer boards for the thermistor's (4.7k resister + 10uf cap), which would be good enough in reality, but probably isn't quite accurate enough at the high end. I was willing to live with that because adapting the Marlin PID/temperature routines in the source might have been easy enough (my original plan was to actually adapt the 3d Printer ESP code stream of marlin and modify it to my liking). However, It's been a while since i've looked at the marlin code base and now its a lot harder to isolate that particular section of the code away from the rest. Plus, lets face it, I'm doing this project not cause I really need a reflow oven but because it looked fun to build something from scratch and green-fields.
Ultimately, that's going to change my plans and i'll implement my own PID controller code (after all there are some subtle but very important differences between how you control the temp on a hotend and inside an oven). I'll also probably change the resister out for something in the 1k to 2k range (or perhaps even have each thermistor with slightly different range capabilities (1k/2k/3k perhaps).
I still want to stick with the 3d printer NTC 100k's because the goal of this project is CHEAP! There's no real point building something like this if the price of building it gets close to the cost of the cheap reflow ovens on AliExpress.
... so back to the KiCad Drawing Board
I designed a quick board for use with the lilygo t-display board that im currently prototyping with, looks good so far and really only has 3 thermistor inputs, the SSR output and some breakouts for other pins that might be useful in the future. The board itself is a simple 2-layer board.
Kicad's 3d Renders:
Bottom
Top
And, i've already sent this version off to oshpark for printing, this first version is quite simple:
Doing a quick test of the PWM control, I can see a nice Linear temperature profile. This was just a quick test with giving the oven about 5 minutes to stabilize at each point.
The small blip in the graph at the bottom is probably because the door was more or less open. Only went to 40% but the results are nice and encouraging. I've also made a few updates to the code and one of the things I plan on adding later is a test cycle that tries to see what the thermal profile and curve will be for many temperature variants.
I would also love to add a servo to control the door so it can be opened and closed by the control board for temperature control.
I have alot of options for choosing a control board and wanted something ESP based because I want it to be wifi-controlled.
Originally I was planning on using an ESP32-S board and developing my own board, but a couple of other options include the E4 3d printer board and a lilygo T-display board.
The E4 is an ESP32 board, and already has two themistor connectors but its a bit large so It might be ok for testing, but ultimately will be replaced.
The lilygo t-display is nice cause its has a nice display and two buttons that I can program, and the ESP32-S is nice as well because either way I have to make some form of custom board.
Providing power to all of this will prove challenging. There are simple mains to 5v/3.3v transformers that will fit in the space, but i'd prefer to drive the electronics from an external power source for now and just have 2 power plugs for it I think.
I've started coding something for the lily go board and i'll probably push that up to github soon.
Taking it apart has been fun, the outside case was held together with screws, but the internals are largely held together with bend tabs (which break easy). The only part I really want to take off that has the build tabs is where the timer is. Looks like a perfect place for some of the electronics.
Eventually got the timer out and thankfully didnt really have to bend too many bend tabs, most of the electrics connect with spade lugs, but for some reason they soldered one of the spade lugs on the timer.
But, I was going to crimp on some new lugs anyway so it didnt matter a whole lot
And an SSR fits nicely on the inside of the timer cover
The cavity here seems a decent size, even still i'll be putting the electronics on the outside just on the front of this timer cover. Probably with some thermal shielding because the wall of the oven is thin piece of tin just on the other side.
Measuring the temperature has proven difficult.
Originally the thermal camera reports the surfaces in the oven get to 200c in about 16 seconds, but finding anything else that agrees is hard. The heaters in the oven (one top and one bottom) are radiant heaters which makes it a little trickier.
Throwing a pair of thermocouples in there, they were very far off (took 5 minutes for them to register 180c) and one of them was a MAX6675.
Grabbing a spare 3d printer board and using a 3d printer thermistor was a bit more encouraging, getting to 200c in about 2 minutes.
Trying the MLX90614 IR temperature sensor seems closer to the thermal camera and has some adjustability but seems a little expensive for this project so im sticking with the thermistor for this project.
Testing with a board was nice and interesting. Put a sacracial board in with some solder paste, 0.5mm solder and 3mm solder to see how quickly it could melt.
Ended up being around 90 seconds for the solder paste and the 0.5mm solder, 100 seconds for the 3mm solder (nice and quick).
(solder paste on the left, 0.5mm solder on the three pads next to it and 3mm solder on the two single pads).
Leaving it for a little while longer, took 3 minutes to completely destroy the board
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates