Ralim / IronOS

Open Source Soldering Iron firmware
https://ralim.github.io/IronOS/
GNU General Public License v3.0
7.27k stars 722 forks source link

allow user to input room temperature (externally measured value) for calibration #1054

Closed discip closed 3 years ago

discip commented 3 years ago

1. Issue If I recall correctly, the room temperature is taken as reference to which the tip is calibrated. (Or is it actually the internal resistance of the tip? 😅) But that (room temperature) can vary depending on geographic location and time of year, etc.

2. Potential Solution So I thought, that it would be great, if you just could dial in the temperature (external measurement) the iron sits at, before the calibration process starts.

3. Alternatives In the past there was an idea to stick the tip into boiling water and / or dip it into ice cooled water. (Not the safest of ways!) Don't know if this is actually used on other devices (TS100?)!

Ralim commented 3 years ago

Hello,

So room temperature is not used.

The way to think about this, and how the thermocouple works is that a thermocouple measures a difference only, it can't measure absolute temperature.

So a thermocouple is made up of a cold junction and a hot junction. And all it tells you is the difference between them.

In the soldering irons the hot junction is part of the tip. And the for junction is in the handle.

Since the thermocouple will only report to you the difference; the handle has a secondary temperature sensor near the child junction.

The temperature of the tip itself is basically defined as : (thermocouple reading * gain)+cold junction temperature.

In this firmware we assume a common lookup table for the gain of the tip, as generally they are close to each other. If we really wanted an accurate iron you could make this table for every tip one by one, but the variation is small (1-2C) in general.

So if the gain is known we should know all of the parts of that equation??

Ah, the but we are actually calibrating is the offset.

So, since a thermocouple measures the difference; if the tip and cold junction are equal in temp the measured value should be 0.

But, since the op-amp and stm32 are perfect devices, don't actually get 0, but usually 500-1000 uV of offset.

So when you calibrate, what the firmware is doing is calculating that offset.

So the actual equation used is:

Tip temp = (gain*[tip reading - offset])+handle temp

This is why the room temperature doesn't matter, only that the tip and the cold junction are the same temperature.

The saying room temperature is used to mean "has not been heated up, and had been left to cool down" in less words. The temperature itself doesn't matter

discip commented 3 years ago

@Ralim Thank you Sir! 👍 Precise as always! I got it! 😃

But what is it about the calibration with boiling water etc.?

Ralim commented 3 years ago

So the idea with boiling water is to replace the lookup table we use for the temperature with linear interpolation for looking up the temperature. Both are inaccurate in different ways 😂

discip commented 3 years ago

Ok I see. Thank you for answering my questions! 😃👍

If I remember correctly there are still entries somewhere in the code. Should they not be removed?