Universal soldering station controller - Page 1
Forum section: electronics / projects

author: alex_grach
author_rank: Newbie
timestamp: May 09, 2017, 12:39:43 pm
content: Hi!I'm currently working on universal diy soldering station. I'm not a proffesional, so I need some help with schematics. Can you tell me what's the correct way of showing different variants of schematics? For now, I have made the main sheet in kicad with comments + different sheets for different type of MCUs. The main difficulty is that it has a looot of variants.

author: Chris56000
author_rank: Frequent Contributor
timestamp: May 10, 2017, 08:18:59 pm
content: Hi!Any one of the designs you've given here would be ideal for this project!These circuits have been very neatly and professionally laid out - the remaining parts (shown as blank blocks on your first sheet) are the ones to concentrate on next!The way to marry up the design for each variation is to decide on a text label and drawing reference number for each of the four examples you've given, then place a text label on each sheet in a prominent place with a drawing reference number, then whenever you need to draw another part of the circuit that needs to be different for each micro, place another prominent note on any other sheets "FOR USE WITH PIC87F6X7" SHEET REFERENCE NO -- ", (for example) making sure that your Module Port & Net Labels are correct and consistent throughout each part of the design.My suggestion would be to decide on which of the micro-controllers you most prefer to use out of the four examples you've given, this would depend on the compiler/programming resources you have to hand, then draught up the remaining blocks of the Controller to the point where you're ready to drop in a programmed micro-controller, and then finally post the source/hex appropriate to the MCU you've chosen when you've got a full design with PSU, LCD, front controls, Iron/motor controllers etc.I found the learning-curve for KiCAD too steep and involved to suit my needs but you've done an excellent job of mastering it!Unfortunately I don't have any experience compiling & programming MCUs as I'm employed in a repair background but I am very experienced in circuit and PCB layout so I would be able to comment/suggest on the PCB(s) and analogue parts!Please don't forget, by the way, to give details of the iron and hot-air pump(s) you use - I might well want to build one myself!This is a very promising & worthwhile-looking project and I wish you every success with it! I'm sure there'll be plenty of other interested Members along shortly to give you more encouragement and suggestions for this!Chris Williams

author: alex_grach
author_rank: Newbie
timestamp: May 10, 2017, 10:11:39 pm
content: Chris, thanks for reply.I think my task is not common for professional designs. The main goal of my soldering station controller is that it supports all mentioned MCUs. The first soldering station was made for myself. It's based on pic16f887 MCU, Nokia 1100 LCD, Solomon SL-ICMC iron, Lukey 702 hotair gun, 8-buttons control. The latest version specs:MCUs:pic16f88x/pic16f87x/pic16f87xa/pic16f7xatmega8/atmega88/atmega168/atmega328 (currently in active development)hc08, stm8 (planning)LCDs:b/w:pcf8814 (Nokia 1100... main LCD for project)pcd8544 (Nokia 3310...)ssd1828 (Motorolla C330)ssd1306 (OLED)color:l2f50 (Siemens S65...)ls020 (Siemens S65...)lph9157 (Siemens C75...)spfd54124 (Nokia 1616...)Number of channels: 1,2,4Controls: 8-buttons, 16-buttons, encoderDisplay: Single LCD, Dual LCDLanguges: Russian, EnglishFirst channel supports T12 iron tips. Thermocouples are used to control temperature. For thermoresistance schematics should be corrected...SDCC compiler is used for pic firmware, avr-gcc for atmega. I've uploaded latest sourceshereProject is completely open, so I can share sources and compiled firmwares.

author: alex_grach
author_rank: Newbie
timestamp: May 15, 2017, 05:22:58 pm
content: I have updated project atbitbucket. Now there are three folders: src for source code, firmware with prebuild firmwares and kicad for schematics.

author: Aigor
author_rank: Contributor
timestamp: May 15, 2017, 05:35:40 pm
content: Hi, out of polemics, why you build several cpu code?Is there some reason?You could design a common part with a sort of bus in which somenone could connect mcu module they wantVery interesting project

author: DBecker
author_rank: Frequent Contributor
timestamp: May 15, 2017, 10:24:44 pm
content: I'm curious why you selected a PID control loop?That seems to be the go-to control solution for people that don't understand the problem. "We'll fix it later by tuning the parameters."You have a smart controller, and know the problem domain. Use that knowledge. Build an implicit thermal model. Better, a self-tuning adaptive one.For instance, just after power is turned on, you can check the temperature. If it's about room temperature, you are in a normal warm-up phase. You need to put a specific amount of energy into the heater to bring it up to the target temperature. You can express this as joules or watt-seconds. Since the power is effectively constant, we can simplify it to seconds or internal ticks. Just turn the heater on full for that number of ticks. The controller might do an occasional temperature sample to check for faults, but the duty cycle should be essentially 100% for this phase.If your thermal model is accurate, the heater sensor should be in a moderate over-temperature condition at the end of warm up. This is good. It's exactly what we want. The tip surface temperature will still be colder than target, and it's the surface temperature that is what we want to control. It's a key difference in model-based control rather than blindly implementing threshold feedback or PID.Once at the target temperature, switch immediately to tracking mode. Use a previously estimated duty cycle to the heater, and watch the response curve. If the response curve is stable, use it to refine the duty cycle needed to maintain tip temperature and increase the confidence in the current thermal loss estimate. If it changes, switch to an currently-in-use mode. Immediately apply full power that would bring the unloaded surface temperature up a specific number of degrees. Then measure the actual temperature, comparing it against the expected value. Continue doing this, monitoring both the additional power and time of use. Use these parameters to develop a use profile. If the user is quickly soldering small joints, they should get matching modest bursts of power. If they are soldering heavy wires, they should get more energy even if the thermocouple response isn't fast. A microcontroller can trivially track state -- use that ability!

author: alex_grach
author_rank: Newbie
timestamp: May 16, 2017, 06:59:51 am
content: The first station was build on 887 MCU. Later I've decided to share it. Schematics was reworked to suite both pic16f886 and pic16f887 MCUs. After that someone asked if it could be ported to 876a. So I've added pic16f87x(a) too. The same was with LCD support... A sort of build your own SS from the trash you have. pic16f76 was $3 for 10 pcs, so I've added it. There is no EEPROM in pic16f7x and it could not save set temperature, but it's almost free. Atmega is popular add cheap. It's my way of study, I think...Everybody like PID because it sound coool. I'm still using simple On/Off for my station and it works just fine for me. I was just curious how it works and if it could be realized in pic. My implementation is not the true one, i think, it uses unsigned int and shifts for calculations, but it's fast and does the business... Anyway, thanks for you idea, I'll try it.

author: KL27x
author_rank: Super Contributor
timestamp: May 16, 2017, 07:06:07 am
content: QuoteThis is as far as I can get, trying to understand why anyone would try to put PID into a soldering station. I imagine this is something ordained by management. "The other station has PID control... we need to add PID control." Engineer: sure, boss. As long as you're paying.PID works when you know the thermal mass..... unless your iron can detect the thermal mass and temp of the joint... then... what is PID doing? Dwell time is controlled by the user and not the iron, anyhow.... good thing because the user has eyes and a brain and the user knows "the future" that the iron can't even guess. Like when I'm about to feed a half inch of 0.05" solderwire onto the joint. The goal isn't to gently reach X temp and then hold it there. It's to get a flowy joint exactly as fast as practically possible, after which the iron is removed/moved and the temp/overshoot? doesn't matter anymore.QuoteIf my station is this "smart," it is going to cause more problems than it will solve. Overshoot? Undershoot? Yes... that is part of how my iron works. It is perfectly ok. Gimme PID control on my wave solder machine, not my soldering iron.

author: aandrew
author_rank: Frequent Contributor
timestamp: May 17, 2017, 02:02:17 am
content: QuoteSounds like a set of PID parameters with some logic to switch states to me. (cold start, warm-start, tracking mode). You talk about "use profile" and "refine the duty cycle needed" -- what do you use to estimate the response? a PI (I wouldn't use D myself) model of course.

author: DBecker
author_rank: Frequent Contributor
timestamp: May 17, 2017, 06:01:46 am
content: Quote from: aandrew on May 17, 2017, 02:02:17 amIt's not PID. Although expanding PID to include saturating values and different states allows you to call pretty much any control 'PID'. The tracking mode is roughly PI, because the controller is trying to match the target value. But once there is an excursion the controller operates in adaptive bang-bang mode.As has been noted by KL27x and others, we aren't trying to get smooth control in a gently changing system. We are trying to get the fastest warm-up time, then trying to emulate infinite thermal mass and thermal conductivity with the discontinuous load while actively soldering. A limited temperature overshoot when we remove the iron from the joint is fine, and is the expected result of trying to hold the surface temperature constant.

author: KL27x
author_rank: Super Contributor
timestamp: May 17, 2017, 06:07:19 am
content: QuoteI won't pretend to understand the other parts of what you stated.But warm-up time? Simple thermostatic control will dump 100% full power into the heater until the set point is reached. How do you make decrease the warm-up time through programming magic?

author: DBecker
author_rank: Frequent Contributor
timestamp: May 18, 2017, 11:28:27 am
content: Quote from: KL27x on May 17, 2017, 06:07:19 amThermostatic control will apply 100% power until the temperature sensor reaches the set point, not until the tip surface reaches that temperature. During warm-up the optimal control strategy is overshoot at the sensor.The difference is minor if the sensor is thermally close to the tip surface, but the sensor is buried in the ceramic heater on the inexpensive irons.You can carefully tune PID parameters to achieve the proper warm-up overshoot, but you'll want different parameters during regular operation. Or a manual correction during warm-up, or an explicit limit on the terms. "PID with fix-ups" isn't really PID.Tuning the PID parameters for optimal overshoot is itself a non-trivial exercise. In this case you don't have the advantage of a consistent plant -- the user will have a different iron with a different tip. If it's a 'universal' controller, it might be very different. Giving the user a way to modify the PID parameters isn't actually solving the problem, pretty much everyone will have to trust the defaults.

author: perieanuo
author_rank: Frequent Contributor
timestamp: May 18, 2017, 12:24:54 pm
content: Quote from: KL27x on May 16, 2017, 07:06:07 amYou really don't understand PID.it didn't give a sh..t about mass it tracks error which follows temp degrading rate dependant of variable thermal mass.too complicated ?PID is the way to go.and I have used pid thermoregulators in research for medical stuff every professional does this.So let us use our pid nonsenseRegards,PierreEnvoyé de mon iPad en utilisant Tapatalk

author: Kalvin
author_rank: Super Contributor
timestamp: May 18, 2017, 01:13:05 pm
content: By measuring the tip's temperature response to the heating control the controller should be able to adjust automagically the PID parameters so that the tip will heat rapidly with minimal overshoot (adaptive PID).Changing the tip will need re-training of the PID controller. However, It is possible to store a set of trained coefficients for different tips and the controller may be able to detect which tip type is attached by monitoring the tip's thermal response when heating the tip - and the controller may be able to select the best known coefficients so that the controller will perform optimally even after tip change.Over-engineering? Probably. Cool? Definitely.

author: stj
author_rank: Super Contributor
timestamp: May 18, 2017, 02:45:49 pm
content: go read sparkydebug's stuff.http://dangerousprototypes.com/forum/viewtopic.php?f=56&t=7218&p=61175#p61175none of the processors you listed are powerfull enough for the math required to avoid thermal overshoot.i would use an ARM mcu - they are dirt cheap now too.

author: KL27x
author_rank: Super Contributor
timestamp: May 19, 2017, 06:46:45 am
content: QuoteYes.Practically does this mean that:IF the user keeps the tip on the joint... the PID can correct and raise the sensor temp a little to correct for the thermal difference between tip and sensor? Without PID, the thermal gap will be larger, and the tip temp will actually be a tad lower than when it is not in contact with anything?It reduces over/undershoot?It warms up a (really) little bit faster?It is cool?Please don't read in any extra attitude from this post. I say a lot of stupid things.When I do, it's usually because I'm hoping someone will explain it to me. But whatever you said doesn't enlighten me, unfortunately. It's obvious you understand the math and the programming, and I do not. I only got a 37 on the MCAT.I feel like I understand the problems in thermostatic control, and I don't see them as much. I had an iron advertised with PID control and a Samsung chip in it 65W, and it had no practical benefit or observable difference in performance from my 888 of the same wattage. I did some basic testing on large heatsinks and warmup time and other basic stuff.Do you think PID could be sensitive enough to make an iron operate like a metcal? When the "tracking error which follows temp degrading rate dependant of thermal mass" indicates that the tip is in contact with a joint, can it recognize this fast enough to instantly raise the set temp by 25 degrees, akin to a metcal (maybe I have this wrong, too, but go with it for a second)? Or is that asking too much? (cuz that would be cool; way cooler than making the temp a little more accurate and stable)

author: alex_grach
author_rank: Newbie
timestamp: May 19, 2017, 07:34:39 am
content: Quote from: stj on May 18, 2017, 02:45:49 pmIt looks great, but it would be really difficult to make such controller at home.ARM MCUs are really powerful, but almost any 8-bit MCU can do the job. I don't think that temperate should be that stable. +/- 5 degrees or even +/- 10 degrees accuracy is more then just enough.

author: KL27x
author_rank: Super Contributor
timestamp: May 19, 2017, 07:49:16 am
content: QuoteWhen I hear things like this, this is why I feel like PID soldering iron "improvements" are full of marketing BS. It is impossible that PID control will make the tip heat FASTER than thermostatic control. Will it heat to a more accurate/higher temp? Yeah, I can see how it can do that by correcting offset. But 50W is 50W. When the thermostatically controlled tip is not at set point... like very shortly after you touch it to a large room temperature thermal mass... it gives her all she's got.If you remove this part of your sentence, you're left with.... minimal overshoot....?

author: alex_grach
author_rank: Newbie
timestamp: May 19, 2017, 07:57:40 am
content: Everybody likes to see the temperature is stable, when a soldering iron stays on the stand

author: perieanuo
author_rank: Frequent Contributor
timestamp: May 19, 2017, 08:02:40 am
content: Quote from: KL27x on May 19, 2017, 06:46:45 amHello ,I take absolutely no offense,it's just math.In fact pid don't follow thermal mass explicitly but the error between the target temp and temp from sensor,error which depends of course of thermal mass of the heating element and the object he heats,so all the thermal masses are involved in error so they are already in pid equation.I don't say it is simple to tune the pid parameters but it is really the best approach.You can limit overshot with good parameters,don't rush with big P and careful with I,it is a non-convergent setup in my opinion but i'm not really expert.Haven't seen the metcal iron schematics what I can say hotair metcal 5000 series it's sure pid controlled and I think the irons from them,the best in the world imho are also pid at least the powerful one ,the one about 1000 euros a piece.Best regardsEnvoyé de mon iPad en utilisant Tapatalk

author: KL27x
author_rank: Super Contributor
timestamp: May 19, 2017, 08:17:54 am
content: perieanuo, thanks for not taking offense. And thanks for the more detailed explanation (slash homework assignment). You are obviously a hardcore engineer, lol. I'm going to chew on this for a bit.Quote+- 10 degrees is the spec listed for my $50.00 "ZD-9xx" rebrand station. I don't remember if it's C or F. But yeah, I think this is close enough, myself. When I made my own controller for it, the smallest increment the user can make to adjust it was 10C, even, lol.QuoteI got one better for you. Xtronic temp-controlled station. With PID. You turn this thing on, and you watch the LED readout climb incredibly quickly and linearly all the way to 350C in about 10 seconds, whereupon is stops dead. The little heater icon will thereupon start flashing incredibly quickly but asymmetrically as if it's carefully keeping the temp stable. Then about 10 seconds later, it will melt solder. Then when you put the tip onto a computer heatsink? Still reads 350, and the little heater icon is still flashing same as it always does once it "reaches the set temp."I imagine this is an example of what Chinese engineers think of their boss asking for PID control.

author: Kalvin
author_rank: Super Contributor
timestamp: May 19, 2017, 08:19:09 am
content: Quote from: KL27x on May 19, 2017, 07:49:16 amYou missed the essence here, marked with red. If you stop heating when the tip reaches the set temperature, you are already late and the temperature will overshoot due to the thermal mass of the tip. So, you need to stop heating just before the tip has reached the set temperature and the thermal energy stored in the thermal mass will then heat the tip to the desired temperature.

author: alex_grach
author_rank: Newbie
timestamp: May 19, 2017, 08:41:06 am
content: Main and configuration menus (96x64 nokia lcd example):

author: DBecker
author_rank: Frequent Contributor
timestamp: May 19, 2017, 01:43:00 pm
content: Quote from: Kalvin on May 19, 2017, 08:19:09 amYou have that backwards.The temperature sensor of most soldering irons (e.g. the overwhelmingly popular 907 type) is buried in the heating element. The result is over-damped response, rather than over-shoot.The switch to integrated tip/sensor/heater assemblies (e.g. T7/T12/T15) was to reduce the problem. These put the sensor closer to the tip with the heating element "behind". If you use the same basic control for these tips you will get over-shoot.Since each tip has a different sensor response and thermal mass, the next improvement was barcodes or electrical identifiers to match the control to the tip (sometimes including precise calibration). Few DIY controllers support this, nor is it really a requirement. A commercial vendor needs to support dozens of tip types, and customers expect them to work immediately fresh from the package. An enthusiast controller is allowed take a few minutes to characterize a new tip, and only needs to save the parameters for a few.

author: Kalvin
author_rank: Super Contributor
timestamp: May 19, 2017, 03:52:34 pm
content: Quote from: DBecker on May 19, 2017, 01:43:00 pmYes, you are absolutely right that the over-shoot or under-shoot depends on the tip and heater construction. For my excuse, I have T12 soldering handles

author: KL27x
author_rank: Super Contributor
timestamp: May 19, 2017, 06:10:19 pm
content: OK. "Tip heats (more) rapidly". Ahh, ok. I think what you meant is that PID allows the tip to drop less in temp upon initial contact because it starts to heat with less latency (on average). PID is improving performance thru this, and thru the correction of temp differential btn sensor and tip.I apparently have to answer my own questions because I'm the only one not bridging the obvious gaps. I'm sure this post doesn't even make sense to anyone. But something clicked (which might even be correct), and this discussion has been helpful, in any case.

author: Kalvin
author_rank: Super Contributor
timestamp: May 19, 2017, 06:43:45 pm
content: Here is a nice animation on how the parameters of the PID change the performance of the control loop:https://en.wikipedia.org/wiki/PID_controller#Manual_tuning

author: KL27x
author_rank: Super Contributor
timestamp: May 19, 2017, 07:38:55 pm
content: The part that wasn't clicking before was in the practical application as regarding the iron.What I am connecting, now, is that the undershoot of the non PID iron is almost always going to happen when you first touch the joint. This is because the nonPID iron essentially lives in the "over" area for over 90% of the time while the tip is not touching anything. Tip slowly cools, heater goes on for just an instant. Tip goes back to slowly cooling. Slowly cooling in the "over" is the usual state.So when you touch the joint, the first dip/undershoot is going to be larger than it could be with PID. Of course the blind squirrel could find the nut... and the heater could be just about to come on at the same time as you touch the joint... so that the oscillation is minimized by chance. But this is not going to be the norm.So minimizing undershoot is one of the two key improvements in my current understanding (which is subject to change). The other being the correction for difference in temp between tip and sensor... which amounts to temperature droop that increases with thermal load, if I understand correctly. These are the two things I would be focusing on with an algorithm for a soldering iron. Overshoot I'm ok with. I'm going to focus on quickest response and err on more heat. Once the iron is in action, I want the tip to respond faster to retain more heat/temp and then continue on to hot or hotter and either one is fine.

author: OGESON
author_rank: Newbie
timestamp: May 20, 2017, 07:50:59 pm
content: What? After reading these posts about the soldering station I am at a loss as too why you don't just spend $50.00 and buy a hot air and iron station combo on EBay. I have two and they work fine. Now you can have fun building all the other projects you have in your bucket list.My projects are Tube ( VALVE ) Amps for audio. I left PID at work when I retired as an Industrial Electrical Maintenance Tech.Keep up the good work Guys. I love all this stuff.Jim OGESON

author: DBecker
author_rank: Frequent Contributor
timestamp: May 23, 2017, 12:52:04 am
content: Quote from: OGESON on May 20, 2017, 07:50:59 pmI have one of those inexpensive soldering stations.They are far better than old-style fixed wattage soldering iron, but still fall short of what is possible. They are clearly cheating on their heat-up time and stability. The display counts up to the set temperature, and stays perfectly stable at that temperature. Even while the tip clearly takes longer to heat, and is slow to respond to thermal load.

author: stj
author_rank: Super Contributor
timestamp: May 23, 2017, 01:10:23 am
content: this is what to aim for!https://www.youtube.com/watch?v=u588sh-4thg&feature=youtu.be