# NTC Measurements (part 2/2)

In the previous NTC Measurements article, was shown the basic approaches and few variations of them in order to use an NTC, by following the suggestions provided in the datasheet and taking the correct assumptions in all the temperature signal processing. These suggestions are usually not  provided,  because with a  bit of math a lot of data can be found and many manufacturers tends to be very essential.
To address this problem when dealing with other parts which are not so verbose in information, in this second part are now extracted all the information from a bare minimum datasheet. All the formulas used, when are not obvious, are obtained step by step. Are also handled non-trivial self-heating considerations.

## Looking for specifications

Generally, to measure a temperature from an NTC, it is used a Look-Up table (LUT) approach, mainly to avoid timing problems by not using time and RAM consuming mathematical routines and because today if the RAM may be not so much in an embedded system, the non-volatile memory is instead almost for free, so that the measurement is done by a simple memory access operation, making also the reading time deterministic, or in other words, real-time. With the information in this article, anyone can generate an LUT or calculate everything on the fly on any NTC, including the point-by-point tolerances or the worst case scenarios.

### Data collecting

Taking the key values from the datasheet or calculating them is the first step for generating and collecting the required data to get a temperature monitoring software up and running. In the previous article has been faced the famous $\beta$ equation briefly, used to generate an LUT or compute on run-time the temperature, in order to give the feeling on how much an NTC could fit a given application. In this article is explained the analytical approach to let the NTC user, by knowing the right characteristics, to set up a field interchangeable temperature sensor system. A good design is meant in first place to be a design in which its characteristics and limitations are known, or in other words, a good design is a known design. Quite trivial sentence.

From here on, for immediate mnemonics, when referring to a temperature, will be in °C, but in all of the formulas Kelvin are used instead, due to the theory behind the mathematical definitions. For the magnitude of the temperature tolerance, on the other hand, could be used K or °C according to the final unit chosen, since in this case the numerical value will not change due to the 1:1 proportion between K and °C. Fact: the unit is K, not °K.

Let’s start to setup a measurement system with a 3 different sensors, called Sensor A, B, C and then compare the effort needed for each of them to generate the right data, since each of them has a different datasheet. The test circuit is the one shown in figure 1.

### NTC sensor A

This is the one also used in the previous article. Is providing a very detailed information on almost anything, making it guilty to let someone think that an NTC is always handy with nice datasheets and probably making people choosing it because of its better documentation. This is the NTCLE100 series.

Its datasheet provides this nice table, representing the reading error in K intrinsic in the sensor, at a given ambient temperature:

and this basic information:

Is it useful? Is it essential? Let’s see. Consider the Curve 1 in Figure 2, for a 5% part. At 25°C, there is a maximum deviation of somewhere around 1.1K or 1.12K from the real value, according to 0.25K span on vertical axis. Other manufacturers may not have that graph, despite it can be really useful. Another nice thing that this datasheet provides is the TCR (Temperature Coefficient of Resistance), or $\alpha$, which is the variation in percentage of the temperature, expressed in Kelvin usually.

The overall temperature deviation, also shown in Figure 2, is given by the resistor tolerance, considered constant on all the temperature ranges, plus the tolerance contribution from the factor $\beta$, where its contribution (called $\left.\frac{\delta R}{R}\right \vert_{\beta toll}$) is not constant. When this quantity is related by how much steep is the resistance vs temperature plot, i.e. $\alpha$, the temperature deviation $\Delta T$ is obtained. Note that $\alpha$ is the derivative of the NTC curve in that given temperature point, which is, grahically speaking, the tangent line to such NTC curve characteristic. The datasheet provides all these variables from a table:

Let’s verify for the 25°C case highlighted above, where $\left.\frac{\delta R}{R}\right \vert_{\beta toll} = 0$, to see if the graph in Figure 2 is correct, by applying the $\Delta T$ formula explained before with only the 5% intrinsic error tolerance which is provided from the datasheet:

$\Delta T = \frac{\frac{\delta R}{R}}{\alpha} = \frac{5 \%}{4.38} = 1.14 K$     (1)

Quite close to the reading on the graph. According to which unit is used, the error estimation unit shall be K or °C, where in the example is in K since from the table is used a TCR of %/K. The graph in figure 2 includes also the $\beta$ contribution in R tolerance and this is taken into account by the following general equation, again provided from this particular datasheet:

$\Delta T = \frac{\frac{\delta R}{R}+\left.\frac{\delta R}{R}\right \vert_{\beta toll}}{\alpha}$     (2)

Now, what about the actual temperature? It can be done just from the $\beta$ definition, if the precision required is enough. This is what will be used, due to the goal to achieve a field interchangeable sensor, without calibration.

From the $\beta$  definition of this datasheet, the $\beta$ value is found at the standard points of 25°C and 85°C (more on how to find this formula later):

$\beta = \frac{ln \left ( \frac{R_{85}}{R_{25}} \right )}{\frac{1}{T_{85}} - \frac{1}{T_{25}} }$    (3)

Now, manipulating it to obtain the temperature, but with instead of 85°C having an unknown temperature x°C  and keeping the original $\beta$ found from the equation (3), it is obtained a temperature in function of the resistance:

$T_x = \left ( \frac{ln \left ( \frac{R_x}{R_{25}} \right )}{\beta}+ \frac{1}{T_{25}} \right )^{-1}$     (4)

this form is useful when actually has to be made the conversion to temperature from resistance reading (i.e. in an MCU system without using the LUT approach), by implementing such formula in the software. But if an LUT must be used instead, can be generated from this equation, which is the eq. (4) rearranged for $R_x$:

$R_x = R_{25} \cdot e^{\beta \cdot \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}$     (5)

The eq. (5) can be iterated for any temperature desired, with a density of LUT entries as tight as needed to cover the required intervals. Since in the datasheet it is generated with 5°C granularity, there may be the need, when possible, also to have a smaller granularity and so a more precise LUT. As example, in a worst case scenario between 0°C and +40°C there is a temperature deviation up to 1.5°C and can be safely generated an LUT with density improved with steps as low as the deviation. But this just in theory, since the tolerances of the acquisition chain must also be included (see practical application later).

To conclude, the graph in Figure 2 is useful, but not essential. With the LUT in Figure 4 and the graph in Figure 2, there is not even the need to use the basic electrical data in Figure 3. This tolerance will need to be summed up with all the acquisition chain error contribution (more later and the previous article), but at least is the starting point below which we cannot go without calibration, setting also a lower bound in case of a replacement of the sensor. Now let’s try to change the thermistor to another similar from the same manufacturer and see what differs.

### NTC Sensor B

With the same manufacturer, with a slight different part (now NTCLE413 series), there is already a different environment. Is it a problem? They are stating only few parameters, like the resistance at 25°C, the value $\beta$ and their relative tolerances:

But a LUT is also present, with apparently a different dataset:

Here, as for in Figure 4, there’s still the $\alpha$ (i.e. TCR), the overall $\Delta T = \frac{\frac{\Delta R}{R}}{TCR}$, but in table in Figure 6 there is no difference between the resistance error and the $\beta$ error, since it is already took in to consideration. Now to generate a LUT it can be easily applied the eq. (5) for the resistance and temperature correlation, as did for the sensor A.

In the end, with this data, nothing has substantially changed and seems to be a quite complete datasheet, in which the sensor data can be easily manipulated and interpreted with the right math, while the worst case error can be easily interpolated from the values of table in Figure 6, by using the eq. (1) and eq. (5).

### NTC Sensor C

One could think to stay with the same manufacturer, maybe to avoid unknowns and rely on the same good communication. But then in the NTCLE203 series, still from Vishay, things are different.

There’s just $\beta$ and its tolerance, along with the resistance tolerance. Now, since this sensor is still used in the market, there must be a way to define everything we need. For the temperature values, it is still sufficient to apply the eq. (5), but when it comes to the temperature deviation estimation, things are getting a bit more complicated. It is not present the $\alpha$ to apply eq. (1) and there is not the $\left.\frac{\delta R}{R}\right \vert_{\beta toll}$ either.

#### How to find β and its contribution to resistance deviation

At this point, there is the resistance tolerance and the $\beta$ tolerance, but here the contribution to the final resistance deviation is not given, in contrast with Sensors A and B.

$\beta$ is a value provided in usually two calibration points; widely used are the points at 25°C (or 298K) and 85°C (or 358K), usually denoted with $\beta_{28/85}$. Such points are connected together with an interpolation curve which follows an exponential law, with a given proportional coefficient, herein called A:

$R_{25} = A e ^{\beta \left (\frac{1}{T_{25}}\right)}$   (6)

in the same way, the same measurement is made by the manufacturer at 85°C:

$R_{85} = A e ^{\beta \left (\frac{1}{T_{85}}\right)}$   (7)

and since the coefficient A is the same, it can be removed by finding $\beta$ with ratio of eq. (6) and (7):

$\frac{R_{85}}{R_{25}} =e^{\beta \left(\frac{1}{T_{85}}-\frac{1}{T_{25}} \right)}$   (8)

where removing the exponent and rearranging for $\beta$ is found the famous $\beta$ formula in eq. (3), mentioned at the beginning of the article and herein recalled:

$\beta = \frac{ln \left ( \frac{R_{85}}{R_{25}} \right )}{\frac{1}{T_{85}} - \frac{1}{T_{25}} }$   (eq. (3) recall)

Now the $\beta$ formula has a given tolerance, provided from the manufacturer, inherent to the NTC material deviations from the ideal values and due to the inherent approximation error of the $\beta$ curve from reality. The error contribution to the resistance at a given temperature can be found from the derivative of the resistance with respect to $\beta$.

To find such derivative at a given temperature, it must be found firstly the resistance at such temperature and then can be applied the derivative in such equation. Rearranging the $\beta$ formula shown in eq. (3) for $R_{85}$, renaming it as $R_{x}$ and instead of $T_{85}$ using the desired temperature $T_{x}$, it is obtained again the eq. (5), recalled herein:

$R_x = R_{25} \cdot e^{\beta \cdot \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}$    (eq. (5) recall)

and by applying the partial derivative of $R_x$ with respect to $latex \beta$:

$\frac{\delta R_x}{\delta \beta} = \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right) \cdot R_{25} \cdot e^{\beta \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}$    (10)

but substituting $R_x$ according to eq. (5), the eq. (10) can be rewritten as:

$\frac{\delta R_x}{\delta \beta} = \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right) \cdot R_{x}$    (11)

and since $\delta \beta = \beta_{toll} \cdot \beta$ which is an absolute value, the uncertainty of the relative quantity $\delta R_x$ became absolute when related to $R_x$ by the ratio $\frac{\delta R_x}{R_x}$, it can be obtained the contribution of $\beta$ to the resistance, called $\left. \frac{\delta R}{R} \right\vert_{\beta toll}$:

$\left. \frac{\delta R_x}{R_x}\right\vert_{\beta toll} = \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right) \cdot \beta \cdot \beta_{toll}$    (12)

which was instead just provided as is, in the datasheet of Sensor A. Only now can be found the true, intrisic resistance deviation:

$\frac{\delta R_{total}}{R_x} = \frac{\delta R_x}{R_x} + \left. \frac{\delta R_x}{R_x}\right\vert_{\beta toll}$    (13)

But this is just the half way, since to get to the temperature deviation from the resistance, there is the need of the temperature coefficient $\alpha$, or TCR.

#### How to find the temperature coefficient of resistance TCR

The TCR indicates of how much percentage (%) varies the resistance from a given temperature value if there is an infinitesimal temperature change: it is the derivative definition, it is the tangent line to the thermistor characteristic curve at a given temperature and the percentage (%) represent the slope of such tangent. In this case, it is found initially the partial derivative of the resistance shown in eq. (5) recalled herein:

$R_x = R_{25} \cdot e^{\beta \cdot \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}$    (eq. (5) recall)

and apply the partial derivative with respect to the temperature $T_x$ in K:

$\frac{\delta R_x}{\delta T_x} = -\frac{\beta R_{25} \cdot e^{\beta \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}}{T_x^2}$    (14)

Now since the eq. (14) represents a slope, to find a relation with the resistance, must be compared with the resistance at a given temperature $R_x$:

$\alpha = \frac{\frac{\delta R_x}{\delta T_x}}{R_x} \cdot 100 = -\frac{\frac{\beta R_{25} \cdot e^{\beta \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}}{T^2}}{R_x} = -\frac{\beta}{T^2}$    (15)

since $R_x = R_{25} \cdot e^{\beta \left ( \frac{1}{T_{x}}- \frac{1}{T_{25}} \right)}$.

The temperature coefficient, is expressed in %/K, where all the calculations are made with Kelvin scale. Now, the eq. (2) can finally be applied and can be found the overall deviation of the sensor.

### Still something missing: the self-heating effect

Until now has been analyzed everything by assuming that the thermistor has abosorbing no power. All datasheets are providing the dissipation constant or dissipation factor, which represents how much power is required to increase the reading of 1K or 1°C. This value is not precise and many manufacturers are providing it just as a reference. This value can also be measured, but in any case one will end up with the same quantity, i.e. power required to have a given increase in temperature, or $W/K$, usually called $\delta_t$.

This value can be considered to be the inverse of the thermal conductivity. So, at thermal equilibrium, with a given $\delta_t$, the positive shift in the temperature reading is given from the ratio of the dissipation constant $\delta_t$ and the dissipated power $P$:

$\delta T = \frac{P}{\delta_t}$

The dissipated power has its maximum when the thermistor matches the bias resistor of Figure 1 (maximum power transfer). The current flowing through it will generate some heat, increasing the temperature and thus reducing the resistance. This can be considered a worst case: when the thermistor has the same value of $R_{ref}$, it is absorbing the maximum power that can be delivered from such biasing.

As an example, if the thermistor has $10k\Omega$ at 25°C and the $R_{ref} = 10k\Omega$, the self-heating behaves in two different manners at T > 25°C and T < 25°C. See figure 7, where on the left is shown in red the power absorbed from the thermistor $P_L$, normalized to the maximum, in blue the efficiency where in this case is used as a figure of merit to indicate how much power is absorbed from the thermistor related to the bias resistor. On the right of Figure 7, is shown the NTC characteristics, where on the vertical axis is shown the resistance. The red line connecting the two plots highlights the T = 25°C, where the thermistor and bias resistor are having the same value.

##### Negative feedback area

In Figure 7, at temperature T > 25°C, the absorbed power will lead to a resistance decrease because of the heating: a resistance decrease will reduce the absorbed power, thus reducing the heat and increasing again. This will provide a negative feedback, keeping the thermistor at a balance point between the ideal temperature with zero absorbed power, $T_0$, and the $T_0 + \delta T = T_0 + \frac{P}{\delta_t}$ where the exact point is determined by how much steep is the $P_l/P_{max}$ curve in Figure 7.

##### (False) positive feedback area

But when temperature is T < 25°C, the absorbed power will lead again to a resistance decrease. Now this effect will increase the absorbed power from the thermistor, further reducing the resistance. This in theory could bring a thermal run-away down to a resistance equivalent to the one at T = 25°C. In practice, this does not happens because there is another negative feedback effect: the thermal dissipation. The increase rate of the temperature will decay since the accumulated heat will be quickly dissipated, and  the NTC will reach the balance. The only difference with the negative feedback area is that the balance point will be slightly higher that the one calculated at zero power, where in the previous case was slightly lower.

##### Net NTC feedback and power considerations

The way how the net feedback will remain negative avoiding the thermal runaway, can be seen in the equation 16, where each step $[x_t, x_{t-1}, x_{t-2}, ...]$ is the time in which the self-heating is estimated. Each step is arranged to bring the relative increase  of the temperature with respect to the previous one, in which the new temperature (i.e. the new resistance) is sampled and the new resistance is recursively used for the next step. The $\Delta T$ term represents, at a given initial temperature, what is the temperature increase due to self-heating of the NTC. $R_{ref}$, $R_{th-x}$ and $V$ are referred to Figure 1 where $R_{th-x}$ is the $R_{th}$ at the x moment, in which is decreased due to the new generated heat. $P_{t-x}$ is the power dissipated at the step x and $\Theta_{ja}$ is the thermal resistance junction to ambient of the sensor.

$\Delta T = x_t + x_{t-1} + x_{t-2} + ...$    (16)

where:

$x_t = P_t \cdot \Theta_{ja} = \left ( \frac{V}{R + R_{th-0}} \right ) ^2 \cdot R_{th-0} \cdot \Theta_{ja}$;

$x_{t-1} = P_{t-1} \cdot \Theta_{ja} - x_t = \left ( \frac{V}{R + R_{th-1}} \right ) ^2 \cdot R_{th-1} \cdot \Theta_{ja} - x_t$;

$x_{t-2} = P_{t-2} \cdot \Theta_{ja} - x_{t-1} = \left ( \frac{V}{R + R_{th-2}} \right ) ^2 \cdot R_{th-2} \cdot \Theta_{ja} - x_{t-1}$;

The calculation of the thermal resistance is made by using the eq. 5. By issuing more than 3 or 4 steps, the increase became so little that will be completely dissipated away. This balance point calculation from eq. 16 can be applied at any temperature of the thermistor, no matter what if it is above or below the maximum power transfer temperature.

While considering the power derating, the NTC is slightly different from a fixed resistor despite the resistive behavior, most probably due to the physics of the used materials. At very low temperature, considering the Figure 8, to keep the sensor reliable, a power derating shall be applied for temperatures below 0°C, while a normal thermal derating shall be applied at values higher than 55°C as well like a normal resistor. This is just an indication on what are the absolute maximum ratings, since normally it is used with very low power, minimizing the temperature shift calculated from equation 16.

There are many techniques to allow reducing thermal effect, but the important thing is to have a very low power dissipated, for which as a rule of thumb, shall be small compared to the dissipation factor $\delta_t$ provided in the datasheet.

## In this analog world bits counts – an application example

Knowing all the uncertainties on the sensor is not yet the end of the journey, since this analog value must be processed and the sensor itself must be biased somehow. As an example, it is used an MCU with a LUT approach in order to see the error contribution in the whole signal processing chain. After picking one sensor, like the Sensor C, the goal is to estimate the minimum error that can be present in the NTC sensor and adding to it the contribution of other possible error sources. The range chosen is from -10°C to 90°C.

The sensor has a 1% resistance precision: let’s find the worst/edge cases, translating the temperatures in Kelvin:

$\left. \frac{\delta R_{(-10)}}{R_{(-10)}}\right\vert_{\beta toll} = \left ( \frac{1}{263K}- \frac{1}{298K} \right) \cdot 3977K \cdot 0.75\% = 1.33\%$

and with the baseline error of 1%, the total one will be 2.33%. Now on the other hand, at 90°C:

$\left. \frac{\delta R_{90}}{R_{90}}\right\vert_{\beta toll} = \left ( \frac{1}{363K}- \frac{1}{298K} \right) \cdot 3977K \cdot 0.75\% = 1.79\%$

with a total of 2.79%. By finding $\alpha$ at those different values:

$\alpha_{(-10)} = \frac{3977K}{(263K)^2} = 5.75 \%/K$
$\alpha_{90} = \frac{3977K}{(363K)^2} = 3.02 \%/K$

the worst case temperature deviation can be found:

$\Delta T_{(-10)} = \frac{2.33\%}{5.75\%/K} = 0.4K$
$\Delta T_{90} = \frac{2.79\%}{3.02\%/K} = 0.92K$

One last thing is missing: before claiming the precision to be tighter than 1°C, there is the need to take a look at the additional error introduced by the signal acquisition chain which is composed by an additional resistor, an ADC and since the thermistor needs a current, the effect of the self heating.

In this example can be used a 10 bit ADC, with a reference voltage of 5V. The NTC will be biased with a 1% resistor at the same value of the NTC at 25°C. The value of the bias resistor can be eventually changed to shift the analog signal more in the center of the ADC dynamics. Despite is not a realistic case, the worst case scenario can be 1% of additional error due to the bias resistor:

$\Delta T_{(-10)} = \frac{2.33\%+1\%}{5.75\%/K} = 0.58K$
$\Delta T_{90} = \frac{2.79\%+1\%}{3.02\%/K} = 1.25K$

Then, a LSB of the ADC is 4.88mV, or around 5 mV. The worst case here is to relate this minimum quantization to the less steep part of the NTC curve, because a little voltage variation will provide a lot of error. So, 5 mV on a voltage divider composed by R bias of 10kΩ and the NTC which is from eq. (5) of 916Ω at 90°C, means a voltage forwarded to the ADC of 0.4196V. So the unknown value is how much resistance change in the NTC is needed to achieve 5mV from the standpoint of 90°C on the ADC input and then translate it in the temperature change:

$5V \frac{R_{NTC}}{10k\Omega+R_{NTC}} = 0.4196V+0.005V$

finding an $R_{NTC} = 928\Omega$. This value correspond to the minimum temperature change that can be detected from the ADC, which from eq. (4) is around 89.45°C and it is a step of 0.55°C from 90°C. Summing all the errors, is achieved the worst case deviation:

$\Delta T = 0.55^{\circ}C + 1.25^{\circ}C = 1.8^{\circ}C$

This allow us to generate a LUT of a step density of 2°C, with an overall size of 50 entries. This is not that bad considering the range, and can be also changed the precision on lower temperatures by estimating the error on lower ranges, or even punctually run-time error estimation if the platform allow such computation. The maximum thermal shift due to the dissipation constant will be calculated at the maximum power transfer, where both resistors (bias and NTC) are at 10kΩ:

$P_{therm} = \frac{5V}{20k\Omega}\cdot 2.5V = 0.625mW$

which, with a $\delta_t = 2.2mW/K$:

$\delta T = \frac{P_{therm}}{\delta_t} = 0.28K$

In the worst case, like at 90°C, the effect of the dissipation constant will be way less than 0.28K (or 0.28°C). At 25°C, where this value apply due to the maximum power dissipated, the overall reading deviation is much more better than 1.8°C. Let’s verify if it is true: at 25°C the real error (not the worst case) is, by applying eq. (15) and eq. (1) and including the error of the bias resistor as did previously, $\Delta T = 0.44K$ where the $\beta$ tolerance is null because this temperature is the mathematical reference point of $\beta$. With the thermal contribution of 0.28K, the total error will be less than 1K. Conversely, at 90°C where $\Delta T = 1.8K$, the NTC is absorbing 0.192mW and thermal effect will be $\frac{0.192mW}{2.2mW/K} = 0.088K$, keeping the precision within 2°C.

This analysis shows how the overall the tolerances are compensating each other since the worst cases are mismatching and how a temperature precision, in the worst case, of $\pm 2^{\circ}C$ can be achieved on a temperature span of 100°C. Further improvement would be to use a better bias resistor. Also an ADC of 12bit could be used instead, with little to no increase in the cost, so that the step of the ADC would be now reduced from 0.55°C to 0.1°C giving an overall error of around 1.5°C. Bit counts.

Annunci

## Un pensiero su “NTC Measurements (part 2/2)”

1. Itreally a great and useful piece of information. I glad that you shared this useful information with us. Please keep us up to date like this. Thanks for sharing.

Piace a 1 persona