The figure above shows the same results as Figure 1 and Figure 2, but with two-point calibration and compensation. The first calibration temperature is 25°C and the second is 85°C. If ±1°C accuracy is required, the temperatures where the results are satisfactory range from 5°C to 95°C with three exceptions. The errors at the temperature extremes are much smaller, and the compensation gives ±3°C accuracy over the whole temperature range.
As seen in the Figure 2 above, the curve of the ADC characteristic of these devices is approximately piecewise linear.
It is possible that making the measurements at a high CPU frequency and in active mode actually makes the results more correct, if subsequent two-point calibration and compensation is applied. The Figure 3 above illustrates this. Here, the measurements are carried out in active mode at 8MHz CPU frequency. If ±1°C accuracy is needed, this approach results in satisfactory readings between the calibration points (25°C and 85°C) with no exceptions, in contrast to the measurements in the Figure 1 where three values had an error larger than ±1°C. If the second calibration point isn’t accurate, two-point calibration may actually make the results worse. Let’s say the second calibration point is ±5°C accurate. If T2 is 5°C above the actual value at 85°C, two-point calibration/compensation would result in the following results:
If T2 is 5°C smaller than the target temperature of 85°C, the results of the compensation would be like this:
The two figures above Figure 4 and Figure 5 here show that if one or both of the calibration temperatures are not accurate, there is no sense in using two-point calibration and compensation. With only one accurate calibration temperature, one-point calibration and compensation gives the best results.