Yet another controller for JBC T210/T245 - Page 1
Forum section: electronics / projects

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 21, 2020, 04:56:51 pm
content: This is a long overdue thread. This project was completed over a year ago, but I just didn't get to creating a thread about it until now... (now that most of us spend a lot more time inside...)I had talked about it in a couple previous threads about JBC controllers, so here it is. Sorry for the pictures, I think they don't really do justice to the OLED display I used (which looks great in person).Main features:DC controlled (12V to 24V)Can handle both C210 and C245 tips (with their corresponding handles), detected automaticallyOLED display (256x64, 16 grayscale levels - looks nice as it can display reasonably antialiased bitmaps/fonts)Small unit using external DC adaptersAuto standby (goes to 175°C after 5 min, and shuts down after 15 min, settable)Very fast time from ambient to set temperature (under 2 s for a C210 cartridge)Isolated UART interfaceI've actually used it almost exclusively for SMD work for about a year now.Design-wise, the heater control part is done with a H-bridge controller (TLE9201SG), which contains various protections, current limiting, and detection of open load and short-circuit, which is handy. The H-bridge serves a purpose: it allows to deal with both T210 and T245 handles with the same connector (turns out the wiring for the heater is different.)The thermocouple sensing is designed around an AD8223 instrumentation amp and an ADS1115 16-bit ADC.The MCU is an STM32L433RCT6.Isolation for the UART interface around an ADuM2201.Disclaimer: the whole controller could have been designed with cheaper parts. Cost was not a concern on this.The temperature control algorithm is a take-back-half algorithm that I improved for faster reaction (JBC cartridges, especially the C210 ones, react extremely fast!)You can see there for the basic idea:https://www.electronicdesign.com/technologies/analog/article/21773207/take-back-half-a-novel-integrating-temperaturecontrol-algorithmIt works very well and was a lot easier to tune than a classic PID.I remember there was one question about driving the heaters with DC instead of AC, and how it could possibly damage the tips much faster. I haven't noticed that in practice, but I don't use it heavily either (just for prototyping, not for any kind of production work of course!), so this is not a definite answer on this point. I can just say that it works fine for my use.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 21, 2020, 07:31:06 pm
content: For anyone curious about the regulation algorithm, I had worked on some simulations before implementing this in the firmware. I'll attach the respective graphs. For the heater, I used a simple model, and simulated heat dissipation (which you can guess on the graphs) to simulate soldering joints. Although just simulation, the PID version took much longer to "tune" than the TBH algorithm, and this was the best I could come up with.Although the PID looks more than adequate, the ITBH controller just performed better, so what the heck, that's what I implemented in the firmware. I didn't implement a PID to compare both on real hardware, but it peformed close to what I simulated so to me that was a win. Due to a simple model for the simulation, it's possible that a regular PID would have performed just the same, but my ITBH algorithm was not requiring any more computing time so I didn't bother. That was an opportunity to try something a bit different.

author: hugo
author_rank: Regular Contributor
timestamp: March 25, 2020, 03:01:20 am
content: So even though is a long overdue thread you're still not going to show us the schematic ...

author: digsys
author_rank: Unknown
timestamp: March 25, 2020, 04:18:21 am
content: yeah <ugly crowd forming at the door> show us the schematic !Serious, will you be making your design available? Selling it?

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 25, 2020, 02:31:47 pm
content: I may make this available, or open-source it. Not completely decided yet.I've also considered just giving away the schematic and not the firmware, as an option. I'll see. I don't think creating a thread in this section about a project automatically means you're going to share the full design. If there's enough interest, I may reconsider it though. Just giving the main parts I used and the regulation algorithm as I did is already enough to get a good idea of how it's designed IMO.Meanwhile, I can answer any specific question. And we'll see how things go.

author: sorin
author_rank: Frequent Contributor
timestamp: March 26, 2020, 02:25:51 am
content: Sorry but if you don't give the firmware the entire post is useless in my opinion.The schematic for a soldering iron is very simple, anybody can design it in 10 minutes. The difficult part is the PID tuning.Its ok if you don't give your schematic or firmware but at last you should give some useful infos, but nothing ... "ps. Even the link that you provided don't work properly (the images are not displayed).

author: TheHolyHorse
author_rank: Regular Contributor
timestamp: March 26, 2020, 12:41:36 pm
content: Quote from: sorin on March 26, 2020, 02:25:51 amHe just wanted to share what he's been working on, doesn't mean he's obligated to give you everything. Don't expect others to do the work for you.Also the link works just fine, that's a problem on your end.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 26, 2020, 02:36:05 pm
content: Quote from: TheHolyHorse on March 26, 2020, 12:41:36 pmYep. This sections' description is "Show off your projects or other stuff you are working on." I think some people are confusing the EEVBlog forum with an open-source repository doubled with a free design service.Some people also don't seem to realize that some of us may not be allowed to completely share a design depending on a number of factors. Just realize that unless we have decided to open-source a design, or put it in the public domain, sharing it without any kind of license is an issue that we don't necessarily want to deal with.Quote from: sorin on March 26, 2020, 02:25:51 amHaving actually worked on that as shown, instead of just talking about it randomly, I do think the opposite. PID controllers are textbook stuff. You can find them anywhere. Tuning can be a bit lenghty but it's not hard, and obviously it entirely depends not only on the iron (/cartridges) itself, but also on all the driving electronics, so it's completely linked to the schematic as well.The schematic is the "hard" part IMO, not that it is really hard per se, but just because we are dealing here with basically undocumented stuff. A few other people have reverse-engineered those JBC cartridges, not all with complete exactness though - so getting it right is the tricky part. Thermocouple sensing is also not trivial, especially here where you have to deal with the heater that is basically in series with the thermocouple.Quote from: sorin on March 26, 2020, 02:25:51 amI thought you just said above that without the firmware it was useless. Looks like your are already changing your mind a couple sentences later.I gave minimal info so far, but I think enough to get people who'd be interested to look for more info by themselves (talked about the TBH algorithm, you can find a handful of links about it online, talked about the main ICs I used...)Quote from: sorin on March 26, 2020, 02:25:51 amThose are all forum-attached pictures, no reason they wouldn't work. Sometimes they are a bit slow to appear when you want to see the full size though - depends on the server and your connection obviously.Anyway, parentheses closed. If anyone has specific questions, I'll gladly answer them. I can also post parts of the design that I think would help the most without disclosing the full thing (like how the handle is wired exactly, how the thermocouple sensing is implemented, and the regulation algorithm as pseudocode.

author: sorin
author_rank: Frequent Contributor
timestamp: March 26, 2020, 04:02:30 pm
content: Quote from: TheHolyHorse on March 26, 2020, 12:41:36 pmYou dont even have read it. Try to open (Fig. 1) or (Fig. 2) and see what happen.I have worked with PID controllers 3-4 Years ago, and of course they are not rocket science but if you want to implement a good Soldering iron a simple PID is not enough. You need more, for example, you can detect the thermal mass of what you are trying to solder from dT of the temperature and change the pid parameters, you can also detect from the software if the iron is not used and automatically put it on stand by.Quote from: SiliconWizard on March 26, 2020, 02:36:05 pmTo me don't seems so complicated, all the soldering irons use the same principle Resistance + Temperature sensor (Thermocuple, PTC or the resistance is used as temp sensor). In your case i thing that is Thermocuple so just turn off the power for breef period of time and measure the temp.Sorry if I have offendet you, is is not my intention.

author: TheHolyHorse
author_rank: Regular Contributor
timestamp: March 26, 2020, 04:38:57 pm
content: Quote from: sorin on March 26, 2020, 04:02:30 pmI did open the link, but you're correct I never clicked the Fig1 and 2. But "the images are not displayed" isn't very descriptive, I opened the link and images were showing.Anyway enough of this it doesn't matter

author: Anyzis
author_rank: Contributor
timestamp: April 09, 2020, 07:21:47 pm
content: I have a question, how do you detect which handle is connected to the controller? Do you rely on the extra pin in C210 connector or some sort of pulse probing for the heater?

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 10, 2020, 01:55:08 pm
content: Quote from: Anyzis on April 09, 2020, 07:21:47 pmYes, it relies on pin 6 of the RPC1 connector. In T210 handles, pin 6 is connected to the tip, in T245 handles, it's left open.Attached is the connector pin-out from my schematic.

author: wizard69
author_rank: Super Contributor
timestamp: April 10, 2020, 07:50:57 pm
content: High SiliconWizard,Thanks for this post. I've take an interest in DIY soldering stations and the various solution seen there. Your post is extremely valuable if for nothing else because of the link to the "take back half" algorithm. I haven't seen this before so it is good even if a new soldering station doesn't happen.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 10, 2020, 08:20:34 pm
content: Quote from: wizard69 on April 10, 2020, 07:50:57 pmMy "improved" version reintroduces a derivative term, whereas it's not there in the basic TBH algorithm. It allows decreasing under/overshoot significantly while still being relatively simple. You can say it's then close to a classic PID, except that the "TBH" step is a nice way of dealing with integral windup, and effectively makes tuning coefficients much easier.

author: Ozan Bayram oglu
author_rank: Newbie
timestamp: May 04, 2020, 05:32:27 pm
content: HiCan you share super project, schematic and software?

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 04, 2020, 05:57:51 pm
content: Quote from: Ozan Bayram oglu on May 04, 2020, 05:32:27 pmHi, as I said earlier, I was not ready to do this. But I will definitely consider it. I'll let people know if/when I do.

author: pebcac
author_rank: Contributor
timestamp: May 20, 2020, 10:37:14 pm
content: Glad I found this post.Can you give more details regarding the H-bridge and how it's driving the C210 cartridge? Does the heater current go through the C210's thermocouple?Why are you using an ADS1115 instead of the STM32L4's internal ADC?

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2020, 01:51:02 pm
content: Quote from: pebcac on May 20, 2020, 10:37:14 pmGo from the schematic extract I posted for the connector pinout. (RPC1 connector - Hirose, relatively easy to source, I highly suggest using that instead of butchering existing handles for no good reason IMO.)* For T210:- Heater on state: RPC1_HEATER+ to Vsupply, RPC1_HEATER- to ground- Heater off state: RPC1_HEATER+ and RPC1_HEATER- : both high-Z* For T245:- Heater on state: RPC1_HEATER- to Vsupply, RPC1_HEATER+ to ground- Heater off state: RPC1_HEATER- and RPC1_HEATER+ : both high-ZFor both handles, the thermocouple sensing is between RPC1_HEATER+ and ground.Quote from: pebcac on May 20, 2020, 10:37:14 pmThermocouples generate very low voltages. The sensing stage is as follows: input protection, then an AD8223, set with a gain of ~25, and a voltage ref of 1.2V (to avoid having to generate negative voltages.) Then the ADS1115 is set as differential input (between AD8223's output and REF), with a further programmable gain (internal). The goal was to get an approximate resolution of 0.5°C or better.You may manage to get something workable with a simpler approach and the internal ADC of the MCU, but I didn't want to bother. I would probably have had to use a much higher gain with the front amp, which would have led to other issues.And whatever you do, the thermocouple sensing can only be done when the heater is OFF (with this DC design).

author: shangaoren
author_rank: Regular Contributor
timestamp: May 21, 2020, 09:42:48 pm
content: Are you sure about the heater beeing in series with thermocouple? i have a fried tips that no longer heats but i still can have the thermocouple value between body and one of the pins

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 21, 2020, 09:55:25 pm
content: Quote from: shangaoren on May 21, 2020, 09:42:48 pmWell, given there are exactly 3 pins, yes. I don't see how they could be wired otherwise, and I think there are a couple JBC patents that show this. If they were independant, there would be 4 pins. If they were in parallel, there would be 2 pins. I don't see any other possible configuration?But you can drive the heater bypassing the thermocouple.

author: pebcac
author_rank: Contributor
timestamp: May 22, 2020, 03:45:36 am
content: Quote from: SiliconWizard on May 21, 2020, 01:51:02 pmMakes sense. For T210, HEATER+ and GND are used to both power the heater and measure the thermocouple voltage. Not at the same time, of course.Since they're in series, the heater current is going through the TC. It's interesting that the TC can handle amps of current.Are you limiting the T210 heater voltage (24V down to ~7V) in any way, or just relying on the current limiting feature of the H-bridge?Quote from: SiliconWizard on May 21, 2020, 01:51:02 pmFor T245, the heater polarity is swapped because the cartridge wiring is different and the heater can be powered directly without going through the TC. Got it.Quote from: SiliconWizard on May 21, 2020, 01:51:02 pmDo you remember the tempco for the thermocouples?I've seen posts that suggest 15.7uV/C for the C245 and <10uV/C for the C210.Quote from: shangaoren on May 21, 2020, 09:42:48 pmFor C210 the heater current seems to flow through the thermocouple and for C245 the heater can be powered separately.The C210 schematic is from Xyphro's Nanosolder.C245 pinout:The cartridge you fried, was it a C210 or a C245?

author: shangaoren
author_rank: Regular Contributor
timestamp: May 22, 2020, 08:17:42 am
content: Quote from: SiliconWizard on May 21, 2020, 09:55:25 pmSorry i should have been more precise, i meant // with common point on tip body, we're saying the same thingQuote from: pebcac on May 22, 2020, 03:45:36 amI fried a C245, i found the same wiring as the one you linked (thermocouple from top pin to body and heater from middle pin to body)Is there a reason to power heater throught thermocouple ?

author: pebcac
author_rank: Contributor
timestamp: May 22, 2020, 01:27:01 pm
content: Quote from: shangaoren on May 22, 2020, 08:17:42 amFor the C245, no.For C210, the internal wiring is a bit different, and the heater and the TC are in series without a tap in the middle, so there is no way to power the heater without passing current through the TC.

author: shangaoren
author_rank: Regular Contributor
timestamp: May 22, 2020, 01:31:02 pm
content: This is a patented technology : using the thermocouple as an additionnal heaterQuote from: pebcac on May 22, 2020, 01:27:01 pm

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2020, 01:33:04 pm
content: Quote from: pebcac on May 22, 2020, 01:27:01 pmNote that this isn't a problem - the thermocouple is an integral part of the cartridge's construction, and not a separate, discrete part inside of it. It can handle the current just fine.The base patent:https://patents.google.com/patent/EP1086772A2/en

author: shangaoren
author_rank: Regular Contributor
timestamp: May 22, 2020, 01:34:29 pm
content: Quote from: SiliconWizard on May 22, 2020, 01:33:04 pmThat explains why this is not a standard thermocouple

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2020, 02:28:01 pm
content: Quote from: shangaoren on May 22, 2020, 01:34:29 pmIt's definitely not. And it also explains why the temp coefficients are different in C210 and C245 cartridges.

author: shangaoren
author_rank: Regular Contributor
timestamp: May 22, 2020, 02:40:35 pm
content: how do you proceed to measure characteristic of thermocouple?i used the reading of an another thermocouple to know the aproximate value of voltage vs temperature,i was thinking about ploting voltage vs temperature to avoid some non linearity

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 22, 2020, 03:20:51 pm
content: Thermocouples usually give low voltages (so beware of any noise), but OTOH they are fairly linear. I've used only linear equations. That's adequate IMO for this kind of application.Well, you'll need a reference temperature to do this of course.One way to proceed is to use another soldering iron, and a separate thermometer (probably based on a thermocouple as well). Set the other iron to a few distinct temperatures over the range of interest. Measure the tip temperature with your thermometer (wet the tip with a blob of solder first to improve heat transfer). Then put the thermocouple you want to characterize (here the tip of the cartridge) against the tip of the other iron, both wetted by solder, let it stabilize, and measure the thermocouple voltage. Rinse and repeat.From memory, the C210 has a coeff. of a bit under 10µV/°C. For the C245, I think it's ~40µV/°C, but I'd have to check that back.

author: 1sciguy
author_rank: Contributor
timestamp: May 22, 2020, 08:05:03 pm
content: Interesting.. I am wanting to do the complete opposite. I have a JBC station, but I want to make a cable that goes to a cheap TS100 "handle" and utilize the cheap TS100 type tips. Was posting to ask if anyone knew the connector type, but now I see you have it listed in this thread. JBC tips are WAY too expensive, but I consider the controller to be the finest soldering station I have ever used.

author: Ribster
author_rank: Frequent Contributor
timestamp: May 23, 2020, 08:48:42 pm
content: Quote from: 1sciguy on May 22, 2020, 08:05:03 pmThe controller is only as good so long it has a good working element.Since the 2 handles have different V/C specifications, and the controller auto detects between the different handle types, it will be a challenge to get your calibrated temperature right

author: Hydron
author_rank: Super Contributor
timestamp: June 22, 2020, 09:35:46 pm
content: Quote from: pebcac on May 22, 2020, 03:45:36 amI've been fooling around with my JBC station (the cheapie BT-2BWA) looking at how I might make an add-on box to autoswitch between the T210 and T245 irons I have (you can actually buy one but I already feel bad enough about buying the station instead of DIYing it), and have made some notes on the way it works and how the tips are wired that may be of interest:First of all I can confirm the quoted diagram is accurate - you can measure the thermocouple voltage between C1 and C3 (otherwise a dead short) and the heater between C2 and either of the other connections (with C3 showing the TC voltage in series also). This is despite some images of actual JBC tips being ground down suggesting otherwise (possibly due to them being older 2245 series tips, though I have one of those too and it also matches the diagram!).The C210 tip on the other hand has the same connections as shown for C2 and C3, but C1 is a dead short with no TC voltage to C2. I assume this is for physical construction reasons - these things are tiny!The station itself uses C2 as it's internal common ground connection (via a current shunt), and applies the AC heater voltage via phase angle control between this pin and C3. The full heater current flows via the thermocouple in both C210 and C245 cartridges! C1 is only used for sensing and there is no substantial current path possible (other than to mains earth, to which it is hard bonded in this station).Heater current is sensed by a 0.05R shunt, rectified by an op-amp based ideal diode bridge and then amplified before going into an ADC. The station will reject any cartridge with more than ~10-20% lower resistance than expected (didn't test properly with higher).TC voltage sense is done between C3 and C1 using a OP07 precision op-amp at a gain of -370 (appropriate for the 5V micro used - 3V3 based stations use more like x245 gain). There is clamping on the output (opamp is running on dual rails outside the microcontroller ones) but I can't see anything other than 4k7/2k7 resistors protecting the input from the heater voltage, which seems a bit rough on both the opamp and the 0805 resistors (assuming there is some clamping to supply rails going on inside the OP07).There is also a 100x gain OP07 amplifier between C3 and ground (i.e. effectively C3), again going to an ADC input - this saturates during heating operation and I haven't worked out exactly what it is used for.There is some other sensing stuff going on with C3 and C1 - C1 has 1M ohms to 9VAC, C1 has 100k to ground and between them there are some more high value resistors and a multi-transistor circuit I couldn't be bothered tracing heading off to a digital I/O pin.Finally there is some zero crossing detection stuff and inputs for tip-change, sleep and T210 detection (all with 10k pullup to +5V and 10k in series with the GPIO input).Hope these rambling notes make some sense and are of use confirming how JBC themselves do things (also see a much better effort, albeit with possibly incorrect cartridge diagram, here:https://www.eevblog.com/forum/testgear/jbc-soldering-station-cd-2bc-complete-schematic-analysis/)Edit: maybe the C245 cartridge can be wired in a couple of different ways - series and separate TC depending on where the heater wire terminates. I don't think it would make a big difference in operation and would explain the tip teardown I saw and some notes on the Unisolder project saying "series or separate TC".I will also join those expressing interest in the OP's implementation of the ITBH algorithm - I need to build a Weller micro-tweezer controller and working out a control algorithm that deals well with the small-mass tips is one of the things I have to look at.

author: dreamcat4
author_rank: Frequent Contributor
timestamp: June 23, 2020, 11:40:40 am
content: Quote from: SiliconWizard on March 21, 2020, 04:56:51 pmHello. I am just wondering today, that since you have an H bridge, if it could be useful for a different purpose: To be swapping around the polarity of the heater. Between the inner pin and the middle pin. So as to avoid electromigration.But you are using the H bridge in a different way. Which is meant for other reasons and not this reason. I would normally suggest "well then we could just add another H bridge". However the part seems pretty expensive to source. Just for 1 of them. Let alone 2.Nevertheless the general idea of reversing the polarity every so often... it makes some sense to me (for DC driving). I mean - if it is indeed actually an issue, for the electromigration. I really don't know.[edited - added]The effect of reversing polarity, is described in more detail onpage 18of this PDF (section 2.4.3), of chapter 2 pdf:https://www.ifte.de/books/em/em_chap2.pdfEntire book:https://www.ifte.de/books/em/What is useful (from that page 18) is that they explain how "Tao et al. " were in fact using arectangularsquare wave (notAC). And it yielded a 500x reduction over a DC waveform.So indeed - it would appear true (my guess) that AC was not in fact required to reduce electromigration. You might get it even lower with AC. However instead of that, merely switching round the polarity of the pulsed DC is can also be of a significant benefit.The reference they citedwas from this other research paper: J. Tao, N.W. Cheung, C. Hu, Metal electromigration damage healing underbidirectional current stress. IEEE Electron Device Lett. 14(12), 554–556 (1993).https://doi.org/10.1109/55.260787Which seems to be behind either a free or paid paywall. However presumably in that source paper, it may go into further details, to explain whichspecific frequency rangeis best. From the states "10hz upwards".So then my question is can the H-bridge (or something else) do the switching at a rate faster than 10Hz? Is that a capability which we can actually design into the circuit, in a way that is simpler than doing AC ?Another constraint (for choosing DC instead of AC) is that because cannot use AC on a portable battery operated version. So maybe this method of reversing the DC can be used there too eh?===Perhaps another (completely different) reason why AC is preferred over DC is a lower noise. Which may be desirable in a lab environment. When soldering on live electronics.

author: thm_w
author_rank: Super Contributor
timestamp: June 23, 2020, 09:13:30 pm
content: You don't solder live electronics, or if you are crazy and still feel the need to do that, the device must be isolated as the iron tip is grounded. Then AC or DC does not matter.The tip will die from plating wearing through before electromigration is an issue, afaik:https://www.eevblog.com/forum/projects/diy-jbc-nano/msg1469445/#msg1469445AC is simply used because its cheaper.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 24, 2020, 01:03:56 am
content: Quote from: dreamcat4 on June 23, 2020, 11:40:40 amNot possible easily using DC IMO unless you go for an isolated design, because of the ground problem. The tip of the cartridge is grounded. I wanted to keep things simple.Electromigration may be an issue, but IMHO, oxidation will be a dominant issue in the lifetime of a soldering tip rather than electromigration, especially when frequently using lead-free solder.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 24, 2020, 01:07:23 am
content: Quote from: dreamcat4 on June 23, 2020, 11:40:40 amOf course. I'm switching @100Hz. It could easily switch at a faster rate, but I don't see any benefit? And since I'm doing a TC measurement every cycle, there is a hard limit on the switching frequency anyway (properly measuring the TC requires some time to stabilize.)

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 24, 2020, 01:08:26 am
content: Quote from: Hydron on June 22, 2020, 09:35:46 pmAlright. I'll probably post that soon.

author: dreamcat4
author_rank: Frequent Contributor
timestamp: June 24, 2020, 09:37:15 am
content: Quote from: SiliconWizard on June 24, 2020, 01:03:56 amYes thank you both for answering my questions about this matter. It has set my concerns to rest about electromigration and using DC being an acceptable solution. Actually I am very happy not to have to worry about those aspect anymore. And very grateful for that.I also understand now, it's really up to the PSU whether or not it is going to be floating. So for it to be a nicely behaved piece of lab equipment. Then ideally it is in fact desirable for the PSU to be floating DC +24v. However with clearly marked external bar of bridging metal on the front that is a removable ground link. So for those fewer situations where working on something live is required (exceptions). Then that grounding bar can be removed just for that specific job only.To be clear the metal housing of the main unit would always be grounded. However the PSU inside would be floating, as would the C245 cartridge. Unless that removable ground link was in place. Which it would normally be. I suppose this then also means that the PSU board must be properly isolated from the case. Which is an extra consideration not to use metal standoffs for it, whilst remaining mechanically strong etc.In addition, (when in floating mode), isn't it nevertheless still remain desirable to maintain a 1w 1mohm resistor to GND. For the purpose of anti static grounding?Or instead of being permanently wired that way... should I instead make that another optional external feature of my device? Because I do have here some 'proper' anti static grounding points. Which I already include a 1mohm resistor inside them. Well that is all the are really. Could have just made some myself had I known that.Sorry because my questions perhaps not unique to dealing with these C245 cartridge. However mentally it will help me to move past those concerns. An to know 'how to wire up the op-amp', when it's thermocouple input is potentially either floating or grounded. As the signal is only a few micro volts. Unfortunately none of my own equipment is good enough to measure that source signal. I would have to rely on checking what is on the output of the op-amp.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 26, 2020, 05:45:43 pm
content: So here is the code for the regulation algorithm. Cleaned-up (the original functions contain more code and TempControl_t structure contains more fields to handle temperature control in general, I left only what was necessary for the regulation algorithm here.)Code:typedef struct{float fSetTemperature;// Set Temperature (°C)float fActualTemperature;// Actual (measured) Tip Temperature (°C)// Improved Take-Back-Half algorithm.float fGamma;float fBeta1;float fBeta2;float fTimeStep;float fTemperaturePrev;float fTemperatureErrorPrevZC;float fHeaterControl;float fHeaterControlPrevZC;}TempControl_t;void TempControl_Init(TempControl_t *pTC){pTC->fTemperaturePrev = pTC->fActualTemperature;pTC->fTemperatureErrorPrevZC = pTC->fSetTemperature - pTC->fActualTemperature;pTC->fHeaterControl = 0.0;pTC->fHeaterControlPrevZC = 0.0;}// One step: Improved Take-Back-Half algorithm.//void TempControl_ImprovedTakeBackHalf(TempControl_t *pTC){float fTemperatureError, fTemperatureDeriv;fTemperatureError = pTC->fSetTemperature - pTC->fActualTemperature;fTemperatureDeriv = (pTC->fActualTemperature - pTC->fTemperaturePrev) / pTC->fTimeStep;pTC->fTemperaturePrev = pTC->fActualTemperature;// Integral term.pTC->fHeaterControl += (pTC->fGamma * fTemperatureError);// Improvement: use derivative to minimize overshoot/undershoot.if ((fTemperatureError > 0.0) && (fTemperatureDeriv < 0.0))pTC->fHeaterControl -= pTC->fBeta1 * fTemperatureDeriv;else if ((fTemperatureError < 0.0) && (fTemperatureDeriv > 0.0))pTC->fHeaterControl -= pTC->fBeta2 * fTemperatureDeriv;// Output variable clipping.if (pTC->fHeaterControl < 0.0)pTC->fHeaterControl = 0.0;else if (pTC->fHeaterControl > 100.0)pTC->fHeaterControl = 100.0;// Take-Back Half.if ((fTemperatureError * pTC->fTemperatureErrorPrevZC) < 0.0){pTC->fHeaterControl = 0.5 * (pTC->fHeaterControl + pTC->fHeaterControlPrevZC);pTC->fTemperatureErrorPrevZC = fTemperatureError;pTC->fHeaterControlPrevZC = pTC->fHeaterControl;}}Key fields:* fSetTemperature must be set before starting the controller (target temperature in °C - you can use °F as well, the coefficients will probably have to be adjusted);* fActualTemperature must be set at each iteration before calling TempControl_ImprovedTakeBackHalf();* fGamma, fBeta1 and fBeta2 are the algorithm coefficients (must be set before starting the controller);* fTimeStep is the time step in s (period between each iteration - 10 ms in my case, thus 10.e-3) (must be set before starting the controller).Operation:* After setting the proper fields, and making a first tip temperature measurement, and assigning it to the fActualTemperature field, call TempControl_Init() to initialize the controller;* At each iteration (period must be fixed and correspond to the value set in the dTimeStep field): measure tip temperature, set fActualTemperature to it, and call TempControl_ImprovedTakeBackHalf(). After it returns, you can use the fHeaterControl field to control the heater PWM (fHeaterControl will be between 0.0 and 100.0, representing 0% to 100%);The coefficients I used for C210 cartridges: fGamma = 1.0, fBeta1 = 0.2 and fBeta2 = 0.4. Keep in mind it's for temperatures in °C and a DC voltage (for the heater) of 12V.

author: dreamcat4
author_rank: Frequent Contributor
timestamp: June 26, 2020, 07:41:29 pm
content: Quote from: SiliconWizard on June 26, 2020, 05:45:43 pmWe appreciate this! It's pretty helpful. Can this bit of code (and it's accompanying commentary / explanation) be considered as public domain? Because we have existing open source projects and hardware. Reading online it would seem that a public domain work should be compatible with all other licenses. The GPL ones in particular can be really annoying like that. It would be sad not using it because of a license incompatibility. Thank you for considering this matter.To be clear: I am asking for the PT Dreamer firmware (open source). Because I already have 2 controller PCBs for flashing it. Of course they have their own specific issues, those hardware. And require modification. At least it's not doing everything from 0.Elsewhere I also see some new open source projects, they are often struggling with the performance. So having your algorithm be freely usable for any of them. It would be a great help. I say that because some of those specific hardware designs are different from each other. And have different types of usage.For example one is very small, and it's designed for portable use, and can run from USB PD. Like a competitor to the TS-80. While yet another one (also for T245)... is over engineered to the maximum. Making it a really powerful unit, for 2 irons simultaneous at once. AKA "dual wielding".Wheras mine are these pre-made 'STM32 T12 OLED' pcb. Which is a more mainstream solution. Somewhere in the middle. So I believe this is best use for my own time. To see how far I can improve them.

author: SiliconWizard
author_rank: Super Contributor
timestamp: June 26, 2020, 10:42:11 pm
content: Well, feel free to evaluate this for your project and report back if you can. I'll be glad to see if this works fine for others. I was not completely decided about putting this in the public domain or open sourcing it - but I guess you can consider it is made so though by posting it here without any specific mention. The algorithm itself, apart from the derivative term (which helps quite a bit!), is public, and the implementation is nothing special.I was happy with this control algorithm though, as it was definitely much easier to tune than a regular PID, while giving equivalent or better results.So all in all, feel free to include this in your project, don't bother with the license, but don't forget to chime in if you do!

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 08, 2020, 03:45:14 am
content: Hi, can you confirm the TC voltage?40uV/°C for C245 and 10uV for T210?

author: DEHiCKA
author_rank: Contributor
timestamp: March 20, 2021, 07:11:03 am
content: Quote from: Hydron on June 22, 2020, 09:35:46 pmDid you succeed? TEC relay module can only do it for T115 and T210. T210 and T245 switching does not work.

author: Hydron
author_rank: Super Contributor
timestamp: March 21, 2021, 12:20:24 am
content: Quote from: DEHiCKA on March 20, 2021, 07:11:03 amI have not finished it yet (have obtained a second holder, connectors, case and drew up a state machine plan, need to CAD up a PCB now), but I see no reason why it couldn't work if you simulated a complete iron disconnection when swapping between T210 and T245 - no different than unplugging one handle and plugging the other. There is an extra pin in the T210 connector jumpered to one of the others to signal a T210 iron - this would obviously need to be handled as well to make detection work.

author: Jesus
author_rank: Newbie
timestamp: April 30, 2021, 01:17:21 pm
content: How does this iron work?https://github.com/Jan--Henrik/Otter-Iron-PRO

author: dreamcat4
author_rank: Frequent Contributor
timestamp: April 30, 2021, 01:35:17 pm
content: check the issues tracker on github

author: hatte
author_rank: Contributor
timestamp: March 25, 2023, 05:22:53 pm
content: Quote from: SiliconWizard on April 10, 2020, 01:55:08 pmI know I am reviving a very old thread, but I am working on designing a (low cost) alternative to your controller with handle auto-sense, which I expect will be running a modified version ofhttps://github.com/deividAlfa/stm32_soldering_iron_controller.Would you, by chance, recall the pinout of the JBC Microtweezer in the Hirose RPC1-12P-6x connector, so I can accommodate that option in addition to Hakko T12, JBC T210, JBC T245 and possibly even JBC NT115.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 25, 2023, 11:56:53 pm
content: Quote from: hatte on March 25, 2023, 05:22:53 pmI only ever supported the T210 and T245, so unfortunately I don't know much about the JBC Microtweezer. Do you mean the PA120 model?

author: dtmf
author_rank: Newbie
timestamp: September 08, 2023, 06:46:59 pm
content: 2 EURO JBC C245 controller

author: djones
author_rank: Newbie
timestamp: January 30, 2024, 10:43:44 am
content: Quote from: boneDragon on September 09, 2023, 06:39:33 amHi can you please tell exact values for C210,your provided values are bit confusing. i wanted to build one for c210.C2 to 10..33nF => is it 10nf or 33nf ?R5 to 15..30K => is it 15k or 30k ?R17 to 2..4.7M => is it 2m or 4.7m ?i am confused for above values.Thanls.

author: hlj.pycad
author_rank: Contributor
timestamp: November 28, 2024, 05:31:12 pm
content: Quote from: SiliconWizard on May 22, 2020, 01:33:04 pmDoes this patent address only C210? I mean, does C245 power go thru the thermocouple as well?

author: eev_masked
author_rank: Newbie
timestamp: March 17, 2025, 04:57:36 pm
content: Thank you for sharing the code!I also want to thank eevblog for providing a platform to discuss and share ideas.I'm not sure if replying to content from a long time ago is inappropriate, please forgive me.I applied this code to a controller, but the results... have been less than ideal.The overshoot is extremely large, even when I set fGamma to a very small value. I don't know where the problem might be.After the temperature converges, it continues to oscillate between +2°C and -1°C.I've also tried adjusting the fBeta1 and fBeta2 parameters, but it either doesn't help or makes the performance worse.

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 17, 2025, 06:13:15 pm
content: And what's the problem with +-2°C? Don't get obsessed.Do you think any soldering station has that degree of accuracy?

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 17, 2025, 07:04:11 pm
content: Hi, I suppose this is with the code I posted. As DavidAlfa said, your results are not bad at all, you should compare that with several different commercial soldering irons and see what you get!The small temperature oscillations are normal and nothing much to get bothered with. Those are pretty small oscillations. The way you measure the temperature, and its bandwidth, from the thermocouple may also play a role in those.With that being said, I think I can help tame the overshoots, but as you can see from your graph, the temperature rises extremely fast when some power is applied to the heater. Is this with a C210 or C245 cartridge? The algorithm coefficients will largely depend on the output stage which drives the heater. In my implementations, I drove a MOSFET via PWM and limited the duty cycle to max 80%. The voltage I used was 12V for a C210. I don't recommend using any higher than 12V (unless you limit the current, which will anyway mean a lower voltage across the heater): on the C210, the heater's resistance is very low (about 2 ohm IIRC) and so, with 12V directly switched with no limiter, you get 6A through it (72W) which is OK for peaks but the duty cycle must definitely be limited already with 12V (a permanent 12V across the heater will make the tip glow orange in a matter of seconds and will destroy it after a couple minutes). So, if you're using any higher voltage than 12V, that's something you need to reconsider first thing! If you use a C245, you can go higher, as the resistance is significantly higher, and it also withstands much higher power. I used 24V for C245 cartridges.Once that point is checked/settled on your side, I'll have a look back at my work and will let you know which parameter(s) you can change (and in which direction) to limit the overshooting.

author: eev_masked
author_rank: Newbie
timestamp: March 18, 2025, 01:33:27 pm
content: First of all, I wasn't complaining about the oscillation around the set temperature; I was just objectively describing the actual performance of the temperature control. Even with PID, it can maintain an oscillation within ±1°C.This isn't the issue; the problem is the uncontrollable temperature overshoot. Setting 200°C results in an overshoot to 250-270°C. For this reason, I could only revert to using PID.Regarding the accusations imposed by the previous individual, I cannot accept them nor do I wish to engage. I am open to and appreciate constructive technical discussions! However, encountering some less friendly individuals is inevitable, which I understand.Aside from the significant overshoot and the not-so-apparent effects of parameter adjustments, the performance in other aspects has been excellent.Yes, I'm using a C245 with a 24V supply.Thank you again for introducing me to the TBH algorithm.I've also tried searching for more information on the TBH algorithm on Google. Perhaps, with more discussion and improvements, it will become even better!

author: balcol
author_rank: Newbie
timestamp: July 28, 2025, 11:50:07 pm
content: Hi folks,I realise I'm a bit late to this particular party but am having a go with an official JBC245 (in the post) handle and a simple DIY controller. (Haven't settled on which of the many good ideas out there yet)My question is, is there a modern replacement for the (RPC1 connector - Hirose) available, as I've been unable to find one. Farnell, Radionics, Digikey, Mouser and even Hirosehttps://www.hirose.com/product/p/CL0113-0001-8-72#have it as obsolete, unavailable, no longer manufactured, and in general unobtanium.I'm tempted to think that JBC may have made some exclusive deal with Hirose to "discourage" this kind of thing?!Any pointers would be very appreciated.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: July 29, 2025, 06:15:34 pm
content: I can understand buying a "real" JBC handle, and even real JBC tips. But I would not worry about the connector. Just cut it off and replace it with one of the plugs that is commonly used for the Chinese clones. They are cheap, of reasonable quality and easy to replace when needed.And those thermocouple things for soldering iron calibration seem nice, but how do you know your thermocouple is still OK? I also do not see the point in very accurate temperature calibration, and of spending the money on a thermometer especially for this, unless you have a factory with 100+ workers and want to calibrate all those irons.A very simple and cheap DIY method is to simply adjust the iron to the melting point of the solder. Any decent solder type has a datasheet with it's melting point, so you can even calibrate at a few temperatures: leaded, unleaded, and the low temp bismuth alloys.Apparently the thermocouple properties of the JBC tips are a bit different from the chinese clones. If you have a JBC tip, you can easily verify this with the solder melting method.And if you can reprogram the firmware, you can also automate this:Heat up the iron, solder a wire to it.Let the iron cool and keep the wire attached.Start calibration:Calibration slowly heats the iron until the solder melts, and the wire falls of (use a weight, spring, whatever)The iron uses the current temperature to adjust it's thermocouple setting.(Or simpler) it just logs and shows the melting temperature of your solder.With this simple method you can check variations between different tips, or whether the thermocouple of your iron drifts over time. But keep a keen eye on the solder you use. If you use different solder types, clean the iron thorougly so you do not create an alloy of unknown melting point properties.

author: elektryk
author_rank: Regular Contributor
timestamp: July 30, 2025, 08:35:04 am
content: Quote from: balcol on July 28, 2025, 11:50:07 pmIt seems that those connectors are still available on Ali, just type "t245 connector".

author: balcol
author_rank: Newbie
timestamp: July 30, 2025, 07:37:48 pm
content: Thanks a mill elektryk, it seems that my grey hair is affecting my eyesight as well as my patience!!!For anyone else looking.... it still took a bit of digging, I found ithttps://www.aliexpress.com/item/1005003491399334.html<--here as a sub item,Jyrkior C245 C210 T245 T210 T470 Soldering Station Handle 6-core Replacement Component Male/Female Socket/Wire