JBC - relatedI'm convinced that many developers of such controllers get the C245 pinout wrong (including SparkyBG). My experiments show that the common point between the heater and TC is actually the outer shell. If anyone wants to check - measure resistances between all pins, then voltages at cold and at hot tip.
From a practical standpoint - there are perfectly good JBC stand knockoffs and handles on Aliexpress, the only genuine thing you need is the actual cartridge. It can be difficult to discern between genuine and fake ones but I found out I had two fake ones in my assortment by measuring - more on that later. The cable holder is made from a spring steel element from a windshield wiper.
In principle this station could power any TC/heater combination and for powering T12 and C210 I would only need to adjust detection algorithm in software, as their heaters have significantly different resistances. For other cases one would need an ID mechanism (ala Unisolder) or a menu setting, both of which can be added easily but I simply have no need for them.
SoftwareFor LCD I used u8x8 library. It's text-only but supports larger fonts and with some clever glyph manipulation I was able to draw power bars as well. Still, each element in the display takes 1-3ms, so I had to break up the display routine into a state machine and draw elements in small chunks by calling the routine with each cycle.
Now control is where things get interesting because I settled for a PD algorithm, not PI or PID. I term is there but is only active when error is <5%. Reasoning being that in C245 cartridge heater and TC are so tightly coupled that there is almost no inertia and for any reasonable load only P correction is enough and D is there only to damp overshoot.
This is also where knockoffs rear their head - they have more thermal inertia between heater and TC, therefore inevitably generate some overshoot. I have 2 such cartridges out of 12. All others behave more or less identically, regardless of tip size:
Since I have the ability to measure actual power of each tip, I found that limiting the output power to 150W or so evens out the performance across different tips and only barely affects heat-up times.
Another revelation was when I started monitoring dT (effectively temperature climbing rates), which is a function of heater power and thermal mass of the tip. Turns out most tips average at 100 degC/s, with peaks above 120. Then it occurred to me that I can adjust PID in relation to that as well and implemented an output throttling mechanism to limit the climbing rate (sort of second inverse I term, measuring the derivative). Here's an example with 80 degrees per second target rate:
Again, the slowdown is barely noticeable in practice but probably improves tip life and also serves as a safeguard against stupid mistakes like plugging in a C105 tip.
Serial control and menus were initially planned but I don't think I'll add them because it works perfectly fine as is, there is simply nothing to adjust once tuned.
The controller should be fully dual-channel, I tested everything on dummy resistors but didn't check with a real cartridge. The power window of each PWM cycle is split between channels, favoring the one with less power. If both require more than 50%, then the power is simply split in half. PWM is done in software (16bit timer with two ISRs) because of low frequency and high precision required.
And that's it, please let me know if you have any questions. I can release Eagle files but my source code is a mess and I'd be hesitant to make it public, at least for now.
Oh, and I made a video of it in action:
https://youtu.be/v5FK_rFDtts