Bangin' Soldering Iron Controller - Page 1
Forum section: electronics / projects

author: seancsnm
author_rank: Regular Contributor
timestamp: December 20, 2015, 01:50:36 am
content: So you've no doubt seen DIY soldering iron drivers/controllers out there. The most prominent one seems to be the SID driver(http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=2457]http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=2457](http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=2457). But seeing as I'm going to be a real engineer one day, I wanted to try my hand at designing a driver myself.The results are somewhat mixed. I think the design is overall simpler in concept but with the drawback of being much less accurate and versatile. This thread will detail some of the design, analysis, and test results of the project, as well as possible areas for improvement (that's where you guys come in the most - helping understand things a bit better and possible ways to make improvements. So here we go:1) The DriverAs the thread title implies, the controller uses a bang-bang control scheme with a Hakko 907 wand. The heart of the circuit is given by Figure 1 (attached). The power source is a ~36 V transformer (25 V under load, 40 V at no load) which is not regulated at its input to the soldering iron, but is regulated with a 7812 and 7805 for the op amps and logic. The zener diode is used to step the voltage down a bit to reduce the thermal load on the linear regulators. The two legs of the wheatstone bridge are the temperature set pot (left) and the thermistor (right). The set pot voltage is sent to a buffer (lm741) then to a comparator (2301bda) with an adjustable hysteresis loop. The other input of the comparator is fed in from the thermistor.The output of the comparator is sent to a MOSFET (IRF510 or IRF640) through a low-pass filter(?). The MOSFET is connected directly to the the iron heating element. The purpose of the aforementioned hysteresis loop is to prevent the inevitable situation where the comparator switches on/off at a frequency that causes the MOSFET to effectively be in the triode region. The MOSFET will burn up if it's sitting in the triode region (and a lot of power will be wasted) so this is obviously something that should be prevented. However, what I found in practice was that the hysteresis loop itself wasn't enough to prevent the MOSFET from getting stuck in the triode region - the low-pass filter I mentioned also had to be added. I don't understand why though. I can speculate and I am going to do a bit of analysis to try to figure it out but if anyone can see the answer, please speak up!Another strange thing is that when they system doesn't have its negative line grounded to earth ground, the MOSFET gets stuck in the triode region without fail. It gets really, really hot (I think it started to melt solder at one point when I wasn't paying attention). This is most bewildering to me - any ideas as to why this is?This setup works quite well. The iron heats up to a decent operating temperature in about 20 seconds which is comparable to much more expensive irons. I've been using it for months to do some pretty complex circuits and so far I can say it's awesome for amateur use.2) The DisplayThe next question is how hot it gets. I recently (as in the last week or so) tried to answer the question by implementing a temperature display. What I did to determine the temperature revealed a few things.To get a temperature, my approach was to use amplifiers to convert the thermistor and potentiometer voltages at the comparator to something that roughly goes through the ADC voltage range to maximize the use of the ADC. I was using an atmega328 to do the ADC conversion, transfer function, and display so my working range was 0-5V. I used the TL072 dual op amp to implement an amplifier that shifts and amplifies the voltage.The microcontroller and display implementation is pretty inconsequential. At some point before soldering the post-amplifier circuit to the protoboard I ran a few tests to correlate the output voltage to a temperature. To get the temperature reading, I used a K-type thermocouple with an amplifier similar to that used in Figure 3. The thermocouple was put on the tip of the soldering iron but I did not have any thermal adhesive so I just used wire to wrap the thermocouple to the tip of the iron as shown by image 833. I also wrapped the tip of the iron with aluminum foil so the tip of the iron/thermocouple would be much closer to the same temperature than the they otherwise would be. I set up an Arduino Uno to take conversions from the thermocouple and thermistor roughly every 100 ms (the time between samples was slightly higher because I was just using delays and wasn't accounting for function run time, but close enough). The result can be seen by the Ftemperature_data4_plot_big attached image. The red lines represent the ADC readings and the blue lines represent temperatures. The plot has some post-processing applied. The thermocouple transfer function was assumed to be known but the thermistor transfer function was not yet known. I found the thermistor transfer function by taking the value of the thermistor ADC reading and the computed temperature of the thermocouple at the same point in time. To ensure the temperatures were essentially the same, I set a target value using the potentiometer on the driver itself and waited a few minutes, assuming the two would reach steady state by then. I then increased the potentiometer value and waited a few more minutes. The result was a stair-step like increase in temperature and values, with the thermocouple slowly reaching a steady temperature after each temperature jump.After I did this a few times, I took the data points just before each time I ramped up the temperature and used excel to fit a 2nd order polynomial through them. The result is seen in Ftemperature_data4b_plot with the blue clumps being the data points and the red line being the line fit through them.After doing all this I got a transfer function I was happy with. So I proceeded to solder everything to the board. However in my sloppiness I believe some resistor values may have changed slightly (same "value" but different resistor, so different actual value). So, I may have to do this temperature corellation again. Or come up with a better way of calibrating the system.Issues With The SystemFor display purposes, the values for the potentiometer and soldering iron both used the same transfer function, even though they used slightly different resistors and other hardware. The result is a set temperature that will always be displayed as a different value than the iron temperature. I think I should be able to fix this through some sort of calibration scheme. I just haven't worked that part out yet (ideas welcome).Another issue is that I'm effectively getting the temperature of the thermistor, not the tip of the soldering iron. I don't know how I can get around this. I could take the temperature of the tip of the iron at a bunch of different temperatures and do another corellation with no effort going into insulating the system. However, there will always be some drop in temperature at the tip that cannot be easily compensated for because the difference in temperature between the thermistor and tip of the iron depends on time as well as how much heat is transferred from the tip of the iron to something else. For example, using a huge amount of solder at once or heating up a huge copper mass will result in a much less consistent temperature at the tip than using tiny amount of solder at a time on small components.Part of this drawback is the soldering wand/handpiece itself - I believe I paid about $6 for it shipped so it's just not going to be the same as a $200 wand. But what I really want to know is, given that I will have to compromise somehow, what is the best compromise to make in terms of temperature compensation?Another point that I'd like to make is that even though the controller is very much a "bang-bang" controller, it achieves and maintains a target temperature within 3-5 degrees C except for when it just is hitting its target temp. At the point where it initially hits its target temp it overshoots as much as 10 degrees C but it reaches equilibrium after a few seconds. Once it reaches equilibrium though, it turns off for about 1 second, then on for about 1/2 second and continues blipping like that until the set temperature is changed. I've never done any soldering where I know for a fact that I need a very precise, very consistent temperature. 10-20 C is plenty adequate for me. What applications require much better temperature control? It would be nice to get really accurate, precise, consistent control but how good is practical? I have used Weller soldering stations like this one (http://www.ebay.com/itm/Weller-WES51-Analog-Soldering-Station-110-120-Volt-50-Watt-Iron-Output-Power-/161250545833?hash=item258b4810a9:g:VA0AAOxy~dNTJMd~) and it "blips" on 2-4 times more rapidly than mine. I have no idea what kind of control scheme it uses, but I suspect that it is a "bang-bang" scheme because of the way it blips. It also over-shoots the target temperature for a couple seconds once it initially reaches it.Conclusion and Ideas For ImprovementSo when it's all said and done I am somewhat proud of the design but it's by no means finished, just good enough to use. And use it I do - it's been worlds better than my 35 watt Weller single-temperature iron. It heats up quicker than the aforementioned adjustable Weller and otherwise I don't notice the difference between using mine and using it. And now I've got a readout to give me an idea of what temperature I'm at.I've attached a couple images of the project in its current state. The power wiring looks like it will hold up for a good while but this project really needs to move to a dedicated PCB. The protoboard is over-populated (trust me, you don't want to see the bottom) and it's a spaghetti mess. I've made multiple mistakes and have had to do some reworking. Sometimes the display goes wonky and sometimes wierd things happen if I don't wiggle the wires just right.Finally, here's what I can think of in terms of improvements:-PCB (I said that already)-Create calibration procedure (maybe using resistors of known values that plug in where the thermistor would)-Correctly corellate temperature between the thermistor and the tip of the iron-Possibly switch some of the control over to the microcontroller to reduce number of required components and increase functionality-Protect ADC inputs of microcontroller from over-voltage (These atmegas have some great built-in protection, but right now I have op amp outputs directly connected to the ADC inputs:O)-Improve temperature stability (the question is, how?)-Create switching power supply (this is the one thing DIY controllers never have, but it would allow for a more stand-alone design. It may or may not be cheaper than buying a separate PSU.)Thanks for taking a look!Edit: I also have to give credit to the designer of this driver: (http://www.edn.com/design/analog/4420659/Soldering-iron-driver-bridge-controls-temperature). I heavily referenced this design for my own.

author: seancsnm
author_rank: Regular Contributor
timestamp: December 20, 2015, 01:51:59 am
content: Just adding the rest of the images. This site ought to have a web hosting service for members...

author: timofonic
author_rank: Frequent Contributor
timestamp: January 04, 2016, 10:15:22 pm
content: Nice stuff. I missed it!TheReally universal soldering controllerseems quite powerful and with a flexible design, but a very complex one too.I don't know why in a detailed way, but even this guy used a toroidal transformer. It seems many people dislike SMPS for soldering iron stations because of noise or something like that.I've seen teardowns of high end soldering iron stations and they use big transformers, toroidals or not.

author: dom0
author_rank: Super Contributor
timestamp: January 04, 2016, 10:29:35 pm
content: Filtering the rectified AC is not necessary and only reduces power factor and requires a larger transformer.@Transformers: Even at just 100 VA it's very hard to make a SMPS that's more efficient than a toroidal transformer (which has ~95 % or so at 100 VA), cheaper and more reliable at the same time. Since you also don't need nice, steady DC for the heater but can just do fine with AC or rectified,unfilteredAC there is really no reason to use a SMPS.

author: timofonic
author_rank: Frequent Contributor
timestamp: January 04, 2016, 11:15:03 pm
content: Quote from: dom0 on January 04, 2016, 10:29:35 pm95% a toroidal? Damn! I'm impressed!

author: pmbrunelle
author_rank: Regular Contributor
timestamp: January 05, 2016, 01:26:12 am
content: You need to get better thermal coupling between the temperature sensor and the tip. You can weld (oxy-acetylene?) a thermocouple to the soldering iron. Just don't weld to the actual tip that needs replacing, but rather the shank. Obviously, soldering won't work, because it will melt.The easiest way to protect your ADC from overvoltage is to use rail-to-rail input/output opamps/comparators powered by the 5V rail... no matter how hard your opamp output is saturated, it won't fry your ADC. Do everything based on 5V; I don't see the need for two supply voltages, unless you want to stick with a 741As you hinted, it's silly to include a microcontroller just for the thermometer function. Since it has an ADC in it already, it would be stupid not to do the comparator and hysteresis loop function in software.You could still use trimpot adjustments; just wire them as voltage dividers going to the ADC inputs, then do some software magic.Why would you worry about the smoothness of the heating power supply when you're going to crudely on/off control it with a bang-bang thermostat? Anyway, the input variable (I2R heating power) is going through a 1st-order "RC" low-pass filter, where the "R" is the thermal resistance of the soldering tip to the environment, and where "C" is the thermal mass of the soldering tip and heating resistor, and the output variable is the tip temperature.It could be dV/dt together with the gate-source capacitance which is making the gate become partly charged. With the parallel capacitor, the gate voltage is held by a much tighter leash.

author: amyk
author_rank: Super Contributor
timestamp: January 05, 2016, 04:03:50 am
content: Quote from: seancsnm on December 20, 2015, 01:50:36 amThe Hakko 936 is "bang-bang" too,if I'm reading the schematic correctly. On the other hand, some of the cheap Chinese clones (like this $14 Yihua) seem to use some sort of PWM/phase-angle control since you can see the LED dimming before it goes out. That type has a schematic like this:http://img.photobucket.com/albums/v476/minerva2/temp.gifWhat I haven't seen anyone do is a DIY soldering iron controller with analogue temperature gauge...

author: timofonic
author_rank: Frequent Contributor
timestamp: January 05, 2016, 07:24:31 pm
content: @pmbrunelleWhat do you think about the schematic of theReally Universal Soldering Iron Controllerproject by sparkybg? I understand you might be too busy to analyze such complex design, but I see you have enough knowledge for it. As a novice like me, it seems a very interesting design and I would love to understand better why it requires so many components.

author: tautech
author_rank: Super Contributor
timestamp: January 05, 2016, 07:47:02 pm
content: Here's the schematics of one I found yesterday:http://bee.mif.pg.gda.pl/ciasteczkowypotwor/Atten/

author: RobertBG
author_rank: Regular Contributor
timestamp: January 05, 2016, 07:57:58 pm
content: Quote from: amyk on January 05, 2016, 04:03:50 am

author: seancsnm
author_rank: Regular Contributor
timestamp: January 05, 2016, 08:02:04 pm
content: Quote from: timofonic on January 04, 2016, 10:15:22 pmThanks for linking that in. Obviously the designer put some serious time and effort into making it versatile.Quote from: dom0 on January 04, 2016, 10:29:35 pmI had no idea you could get that kind of efficiency with a standard transformer. Also, the reasoning behind the effort I put into rectifying and smoothing the circuit was simple. First, I didn't have a triac handy. Second, it was the default thing for me to do without thinking too much about whether it was necessary. Third, not smoothing the output might have pushed the LM voltage regulator I was using a bit too far. But I can definitely see the appeal to not adding extra circuitry if it doesn't add any benefit.Quote from: pmbrunelle on January 05, 2016, 01:26:12 amFirst, I agree on needing a better thermal connection to the tip of the iron. Welding I suppose would work, I'd just need to take the time to seek out a welder.Second, I haven't tried using a microcontroller to handle the on/off control yet. I will someday though.Third, I think there was a couple reasons for the instability, which I found after my OP. First, the common/ground coupling between the MOSFET and the comparator needed to be better. The small resistance between the two points was enough to throw things off. Second, I think the system was starting to go into racing conditions under the right conditions. Even with the hysteresis loop in place, the finite amount of time it took for the MOSFET to turn fully on and the finite amount of time it took for the comparator to switch states caused the comparator to turn off before it had fully turned on. The hysteresis is dependent on the assumption that the comparator is going to turn fully on before kicking in. I haven't pinned down exactly what triggers this, but I think it may just be an unstable design. Which is a bit of a shame because it required very few components.Quote from: amyk on January 05, 2016, 04:03:50 amOne day I'll take the time to really understand what is going on with those controllers you linked. It'd be good to really understand a few other ways to achieve the same task after I've already gone through the design process. I agree that an analog temperature gauge would be pretty awesome. The problem is that gauges with appropriate markings on them aren't usually something you have lying around in the spare parts bin. It would make for a great microcontroller-free readout solution though.Lastly, a little update: I ended up trying a new 4 op-amp design that seems to work pretty well - a proportional-driven PWM controller. It's all on or all off until the temperature gets close to what it needs to be, then PWM kicks in. It works quite well but because there is no integral term being fed back in, the set temperature is never quite achieved. I think this can be compensated for in software though when it comes to doing a readout. Or I could do the smart thing and implement true PI or PID using an actual microcontroller, thereby eliminating 4 op-amps.Attached is the schematic for the controller (at least the controller part of it)

author: rdl
author_rank: Super Contributor
timestamp: January 05, 2016, 08:45:24 pm
content: Quote from: amyk on January 05, 2016, 04:03:50 amIf that's a diy project, thenIf not, where can I get one?

author: Marco
author_rank: Super Contributor
timestamp: January 05, 2016, 09:43:31 pm
content: Quote from: pmbrunelle on January 05, 2016, 01:26:12 amThe Hakko/Xytronic/Kingsom/Bakon/Atten/etc high frequency wands and tips really have a big advantage here, they let the thermocouple come up through the middle to right near the tip.