diogoc wrote:why the 25V dc is not filtered? you can save some components in the back.
It does not have to be filtered. The iron's heater does not care about it. And to filter it, the capacitor for 70W iron would be pretty big.
Moreover, everything in this controller is synchronised with the mains voltage. When the voltage of the secondary winding of the power transformer falls under 4V, the MOSFET turns off by itself for about 1 millisecond. After MOSFET is turned off, the MCU waits for about 500-600 microseconds and measures the voltage of the thermocouple. Very little power would be delivered to the iron heater when this voltage is under 4 volts, even if the power was not turned off, so the MCU can make a measurement of the thermocouple voltage on every mains half period without sacrificing the delivered power to the iron. Then, the PID algorithm is synchronized with the mains voltage also. So, on every mains period (every second half period in order not to destabilize the power transformer), the MCU makes measurement of the thermocouple, and makes the PID calculation. The PWM itself (actually fixed on-time and variable off-time) is also synchronized with the mains voltage.
This way the noise from the mains voltage is greatly reduced and does not penetrate the measurement of the thermocouple voltage.
diogoc wrote:I have seen that the T12 tips have a N type thermocouple. Do try to verify if it fits with the N type tables?
From my measurements I cannot tell if it is a K type or N type thermocouple. I will try to measure the voltage again and to make some calculations. As far as I remember, the voltage at 450 degrees celsius is around 9mV, which is around 20uV per degree.
diogoc wrote:The C9 should not be greater due to the large noise that should be when the voltage is turned off?
C9 is there only to prevent high frequency noise to penetrate in the measurement of the thermocouple voltage. It should be small enough in order to be able to discharge in less than 500 microseconds after the power to the heater is turned off (the heater resistance is around 10 ohms when cold and around 20 ohms when hot), and large enough to filter the high frequency noise. 10n does the job. The controller works even without this capacitor.
diogoc wrote:I don't see a ambient temperature sensor. How do you compensate the TC cold junction?
In fact I don't. I am using 22 degrees celsius for room temperature. I have made a measurements of the real temperature several hours after turning the controller on, and the drift is no more than 2-4 degrees. Of course, a small temeprature sensor can be added, but it will not be too precise anyway - where you should measure the temperature? At T12 terminals? At iron connector terminals? At PCB connector terminals? At opamp legs? What if the temperature in the controller box is higher than ambient? What if the temperature at the T12 terminals is higher than ambient?
diogoc wrote:About the sleep sensor, I think there is no need to complicate :)
It can be replaced with a simple switch - it just sends 0 or 5V to the mcu. I decided to make it optical in order to incorporate it more easily into my iron stand with minimum mechanical work. And it works great. The price of the parts is low (5 dollars max). T12 tips heats up very quickly and as soon as I put the iron on the stand, it can lower the temperature of the tip to the desired temperature. Some seconds/minutes later it lowers it even more. After several minutes/hours it goes to sleep and turns the iron off. This way you never have a oxidized solder on the tip, and the tip life is much longer. The temperatures and time-outs are configurable and this function can be turned off if desired. The controller can work without this sensor if someone does not like it or does not need sensor at all.
For example, If I work at 350 degrees, when I put the iron in the stand, the temperature is immedieately lowered to 300 degrees, and say 20 seconds later it is lowered to 250 degrees. The iron can stay at 250 degrees for a long time, and there will not be any oxidation on the solder surface and the tip will live much longer. When you remove the iron from the stand, a T12 tip will heat up from 250 to 350 degrees in 5-7 seconds.
About calibration - the controller can be easily calibrated using 63/37 solder. The melting point of this solder is exactly 183 degrees celsius, and the controller can be calibrated to melt the solder at 184 degrees and do not melt it at 182 degrees. Because self-zeroing opamps are used, there is not offset voltage present, and once calibrated at 183 degrees, the temperature measurement is linear and correct in the whole range from 150 to 450 degrees. I have made measurements with real thermometer and confirmed this.
For example, LM358 have 2mv(typycal) offset voltage, there is also temperature drift on this voltage. This is pretty big offset for measuring a thermocouple, so there should be software or hardware offset compensation. Self-zeroing opamps doesn't need such compensation. 2uV offset is around 0.1 degrees error. That's why calibration at 183 degrees assures correct readings in the whole range from 150 to 450 degrees.