@sparkybg I have a question regarding the firmware. My friend chaolun has notice that the ID recognition for JBC 245 is not that accurate (for example it shows 1805 normally but randomly changes to 1905 or 1806 etc.) He dig into the code and found something interesting. I was wondering when @sparkybg is calculating IDHash, did you use 3.3v (instead of 3.0v from REF3030) as your reference voltage? I discussed with chaolun and Catear but I did not have an answer to whether this is intentional or you used wrong reference voltage?
Below is the example of pseudo code Suppose R=150ohm, ADC readout “w” = 1024*3.3*150/((1000+150)*3.0) = 146.92. int w = 146. for i = 5, w<IDHash143 == false; continue; for i = 6, w=146<IDHash161 == true; break; CID.v = i; ，which is 6.
if it shows 511, then something is wrong with signal path or reference. In order for MCU to detect "sensor open/no instrument" condition, the ADC should go to it's maximum value of 1023. 511 on screen means that it does not go to 1023, but to a value less than this. This means that either the current sources, the amplifiers, the reference, or the power supply is not functioning properly.
The power supply at the MCU pins should be 3.3V, and the reference should be 3.0V. Then, on C210, when no cartridge is connected, the SENSEA should be around 1.5 - 2V, far beyond the threshold of full ADC 1023 digits after the amplification.
I don't know about other chips, but forget about fake PIC32 - there's no such thing for the moment. There are some fakes from the lower class PICs (PIC16/18), but no one reported about fake PIC32s, and I think noone can produce these at fair price.
I am compiling a database of JBC handles and cartridges. As this database should contain tc and heater data, I'm currently sifting through the internet to find such data. The iron.c seems to have a fair amount of data on JBC handles and I guess i could calculate the tc and heater resistance from this data. Can someone quickly tell me how I can calculate these two data from the iron.c array values?
Thanks very much!
1. You cannot calculate the resistance from the iron.c You can measure it with a multimeter. 2. The C1 parameter on the profiles is millivolts to degrees Celcius coefficient for TC sensor, or resistance (in omhs) to temperature coefficient for resistive sensor, if it is linear. In other words, if the TC is giving for example 1.5mV, and C1 is 123, the temperature is 1.5*123=184.5 degrees Celsius above the cold junction (room) temperature. C0 is the offset - it is usually 0 for TC sensors.
For profiles with many coefficients, it is a polynomial instead, so C1 does not give the complete picture. The temperature is calculated this way:
t = c0 + (x^1)*c1 + (x^2)*c2 + (x^3)* c3.....
, where t is the temperature in degrees Celsius, and x is either millivolts fom the TC or ohms from resistive sensor. The coefficients are either given for a specific senssor from it's manufactuurer, or calculated by polynomial regression tool from measured or provided data for resistance or TC voltages at different temperatures. Here's pretty nice online tool for polynomial regression calculation from given data: https://arachnoid.com/polysolve/
In my unisolder build I'm using an E-I transformer to step down 120VAC mains to 24VAC to supply the PCB. Based on the available documentation it looks to me like the secondary of the transformer is intended to be floating, though I've not seen that stated explicitly anywhere.
Is that indeed the intention, or should the secondary be ground-referenced? If it should be floating, what'd be the failure mode to expect if isolation between primary and secondary was to fail for some reason?
Yes, this is intentional. The EARTH from tha mains must be only connected at iron's connector to the outer shell and some of the power lines of the heater, be it - or +. On two heater devices (tweezers etc) it is even connected arbitrarily to the heater 1 - or heater 2 -. This is why some SMPS are no good for this project if you want EARTH on your tips.
For example, the TC signal on C245 is connected in a way that gives negative voltage in respect to earth. It sould be connected also to give a positive signal (like C210), but when connected to give positive, the sensor appears like in series with heater and all the noises from heater power switching penetrate the measurement which the firmware must filter afterwards - look at the PC software ADC graphs on C245 and C210 - on C245 it is has almost no noises on it, and on C210 there are nasty peaks that have to be fighted by software filtering. This is fundamental difference between C245 and all other integrated heater tips with series thermocoule. On my controller, C245 has the best possible regulation exactly because there's no noise on the TC signal.
And the failure mode - the box, if metallic, is connected to earth, and the iron, if connected properly, is connected to the earth also. So there aren't safety isuues with earthing. The iron's stand should also be connected to the earth/enclosure if made out of conductive material. The controller itself is not connected to the earth - that's why there's separate pads for the mountung bolts on the PCBs, which are not connected to the rest of the PCBs.
Changing gain won't do anything. It is just an opamp paremeter. It, along with the offset parameter, just regulates the amplifier so that it gives 0-3V to the MCU's ADC. This gain and offset are then excluded from the calculations, and we get millivolts->temperature or resistance->temperature transformation.
I used the original T210 in the original firmware, which is 30 degrees lower, so I can only modify the firmware parameters. But maybe the T210 made in China is 30 degrees higher than the original version, so your temperature is accurate in the original firmware, but by what standard, at least my friends around me got the same result as me. Use the original 210, the original firmware is 30 degrees lower. This firmware can have C1 parameter in IRON CFG under the menu, and C1 can be adjusted to get the desired effect
You are either using fake tip/handle/whatever or you have a hardware/power/earth/calibration problem. As I said before my 4 C210 tips and maybe 8 C245 tips are tested on at least 7 controllers, 5 of which are not made by me. Discrepancy is less than 5 degrees celsius. The only common thing is the enclosure, the transformer, and myself testing and calibrating them, NOT using thremometer but eutectic 63/37 (183C melting point) alloy and pure lead (327.5C melting point). I explained several times already why measuring a small tips (as C210 and smaller) with thermometer is not accurate - it loads the tip. measuring with alloy with known temperature on the tip is the only "home" method with 100% accuracy. Another method is using heat-insulated thermometer, but these are pretty expensive.
I am consideting an option for temperature overload, depending on the current power of the tip, because when the tip is thermally loaded, there will always be a difference between the measured temperature where the sensor is, and the real temperature of the tip where the solder is. The more power transferred - the larger the difference will be. Although this is highly dependant from tip-s geometry and phisical dimensions, when tuned properly it will bring us close to the real temperature of the tip. Unfortunately, this involves correcting the iron profiles again, most notably the PID coefficients in order for the regulation to remain stable.
Trimmer MUST be set to show as close to 10 ohms as possible, when calibrating. When it is away, the amplifier gain is not set properly. Also, you must test the current sources. For surrent of 128 in the calibration menu, the current between SenseA/SenseB and Vout- shoud be as close to 382.8125uA. If it is off by more than 1% (ideally if shoud be within 0.1%, if the voltage reference and the resistors are the correct one with 0.1% tolerances and the current source mosfets and opamp are not fake ones), then the current sources themselves are not sunctioning propery.
Although the current sources are not that important for thermocouple measurement (maybe 1-5 degrees), they directly impact the resistive sensor measurement and along with amplifier gain setting the end result can be way off.
What is wrong to be changed C1 in that case and to measure the Temp at the working point at the same time. What is unpredictable here?
The behavior ot the polynomial is unpredictable, because tha C1 is just a small part of it. It is 100% predictable if only C0 and C1 are used.
I spent pretty much time playing with polynomial regression for K type TC and NTC - for example only changing the polynimial's order not only changes the coefficients by a huge amount, but also changes their sign. That's why it is unpredictable - for example, a polyonomial with generally positive slope may have negative C1 and vice-versa.
Providing a temperature gain and offset (not the profile one but after the temperature is already calculated) whould be a better approach, because this is usually what is needed - either the temperature is more or less by a same amount, ot it is more ot less by a percent. So gain setting of 80-120% and of offset setting of +/- 50 degrees celsius is all thet is needed and with 100% predictable results. Much safer too. Although, there are several ocasions that even this approach would mask a hardware problems. All my irons on all my controllers give around +/- 5 degrees celsius maximum discrepancy. And the controllers I have in the moment are both hand made by me with all the parts from the original BOM with 100% original parts, and 4 Tindie boards (5.2B and 5.2C) with both AD and chinese OPAmps, so I am pretty confident that the iron profiles are correct. The cause for the offsets and gain errors must come from elsewhere.
Just the opposite. C1 is the coefficient with power 1. It just provides linear slope, but it may be even negative/opposite direction of what is expected, because it works in tandem with the other coefficients. Although it is true that higher coefficients tend to be much more "aggressive" when changed, the fact that C1 may even be the least signicican of them all in many cases still remains.
The gain, offset and C0 are in fact the parameters that must be considered - these are always linear, and the result is predictable.
Modifying only C1 can roughly adjust the temperature to a close temperature. If there is no special forced need, just modify C1.
Modifying C1 on a profile that has many coefficients (thermocouple or PTC), may produce highly unexpected results, since it is a non-linear polynomial. Just bear in mind. My intention as these coefficients to be changed and saved in windows software, but... as I said several times, I am very short of time and I don't know when this will happen.