In the last post, I may have alarmed some people with my derivations of the Steinhart-Hart coefficients which seemed to show a significant amount of error. Indeed, you were right to be alarmed – the typical performance of the Steinhart-Hart model usually reaches down to the hundredths-of-a-degree range if all is well, so why did my calculations differ so much? I also take a closer look at the data provided by Molex in their drawings (which are more comprehensive than their datasheets) to see just whether the inaccuracies seen are a problem in practice. Finally, given the inspiration based on some background research on the deficiencies of the Steinhart-Hart model, I decide to (literally) take things to the fifth degree with a fifth-order polynomial fit to see just how much accuracy I can squeeze from the provided data.
Table of Contents
An Inconvenient Truth
In the previous blog posting, I noted that the models are merely approximations of the behaviour of a thermistor. The truth, as it turns out, is a bit more complex and thus is often best conveyed with accurate measurements of resistances at closely-spaced regulated temperature points.
The inconvenient truth in this case is that my reliance on these temperature-resistance tables is that the derived downstream approximations are only as accurate as the data in the tables. The key contributing factor to errors in this case is the round-off error. If the table says the resistance is 23.3kΩ, is it really exactly 23,300Ω? In reality, the truth is probably even as far out as 23,349Ω and those last few ohms can matter a lot especially when the resistance is changing quickly with respect to temperature. Further to this, the choice of the two or three points for calculating coefficients are extremely important – they are taken as “gospel”, so if they contain significant round-off/measurement errors or some uncharacteristic behaviour, then the accuracy of the approximation is significantly affected.
All of this suggests that it may well be important to make precision measurements to characterise thermistors, if high accuracy is needed. High-accuracy, high-interchangeability instrumentation thermistors are starting to approach the 0.001°C (1mK) levels of accuracy, which requires more complex approximations (e.g. Hoge-3, 5th order series) to achieve the necessary levels of accuracy. Performing such characterisations are not easy – requiring stirred water baths and precise calibrated temperature references to properly test.
But in the case of these Molex thermistors, it is not necessary to go overboard simply because of the fact that the nominal resistance tolerance is quoted as 1% or 2% with a Beta value tolerance of 1%. In that case, it can be presumed that the manufacturing tolerance would induce errors which may make a more accurate approximation a moot point.
What Does 1% or 2% Tolerance Actually Mean?
When a thermistor is specified with a 1% resistance tolerance, this means that the nominal resistance (usually resistance at 25°C) can vary by ±1%. As a result, a 10kΩ thermistor could measure between 9900Ω to 10100Ω. But does that apply outside of the nominal temperature?
By entering all the drawing data values from 10kΩ thermistors in this design challenge manually into a spreadsheet and plotting the values, it is possible to answer this with an emphatic no. In fact, the resistance tolerance actually increases the further away from the nominal temperature we go. The 2% thermistors are actually 1.5% by the data, but the tolerance increases up to about 5% at the extremes.
Understandably, such a change is not minor – but just because the resistance changes by 5% doesn’t mean the temperature measurement changes by 5% - this depends on the interaction of the change in resistance with the approximation that is used.
What About the Beta Value?
While it was a surprise to me that the tolerance value was not stable with regards to temperature, something that is more well understood is the fact the Beta value varies as a function of temperature. This is because the Beta model approximation does not contain higher-order terms necessary to correct for differences between the Beta model curve and the actual behaviour.
To see how temperature affects the Beta value, I decided to compute the “stepwise” Beta value between successive pairs of data points (e.g. 0-5°C, 5-10°C, 10-15°C, etc). The actual Beta value between each pair of points changes quite a bit over the temperature range, increasing nearly linearly at first before rocketing off the scale right at the end. I suspect by about 120°C, the thermistors may be changing their behaviour in some way or some measurement errors are starting to creep in.
Is the Beta Model Good Enough?
Knowing all of this, the Beta value is still one commonly provided by thermistor manufacturers and perhaps is still very widely used. Looking more closely at the Molex datasheets, the Beta value is provided along with the temperature range, but this is not the same for all products. The ring thermistors give Beta for 25°C-85°C while the bead thermistors give Beta for 0°C-50°C. As a result, the Beta values cannot be directly compared, and the accuracy of the approximation would be better at a different range of temperature values. This had me wondering - how accurate is it across the range using just a single Beta value?
In this case, I plotted the error in estimated temperature based on the single Beta value approximation. The error takes a shape of a paraboloid as it is a second order approximation, the extremes at the high-end of the temperature scale range about 6-12°C which is pretty significant.
The region where the error remains below 1°C range from -10°C to 60°C for the bead thermistor and -5°C to 100-105°C for the ring thermistors. Where the temperature range and level of error is acceptable, it seems that using the Beta value is a reasonable approach which is computationally simple to implement.
However, one has to consider the impact of the thermistor tolerance as well. If the model has an error of 1°C, this is an independent source of error to the error that is introduced by the manufacturing variation of thermistors. Using the Beta model and the listed tolerance boundaries, it seems the thermistor manufacturing variances contribute up to 2.5°C error at the upper extreme. Error contributions of 1°C or less are achieved for temperatures of -40°C to 70-80°C depending on the particular thermistor.
As a result, adding errors in quadrature, I would expect errors to be within 1°C using the Beta model on all three thermistors from around 8°C to 50°C, and within 1.414°C in the -5°C to 60°C range. In practice, it’s likely to be better as the error from the tolerance may not be entirely additive to the error of the approximation.
Taking Things to the Fifth Order
Having discovered that the Steinhart-Hart Equation is not the best solution to the problem, as it is based on an empirical approach that contains some mathematical errors (namely, the omission of the 2 term), better models have frequently been recommended. This includes the Hoge-3 equation (which doesn’t seem to be openly published) which also uses three terms, but is superior for accuracy, or to expand the infinite series that the Steinhart-Hart equation is based on to the fifth order. From this paper, the performance of the Hoge-3 and fifth-order equation are comparable, reaching an average error of 0.16mK! Given the tolerance of the thermistors, there is perhaps no good reason to pursue such accuracy, however, it would still be great if we could squeeze out as much error from the approximation process as possible!
A fifth-order fit can be achieved by making a polynomial fit, where Y is 1/T and X is ln(R).
Using Excel’s trend-line function, and selecting Scientific/8-significant-figures output provides significantly better accuracy. The result in all cases is a fit exceeding five-nines, but this level of agreement is arguably necessary as exponentiation will serve to magnify any fit errors dramatically.
Applying the output model, the predicted temperature errors are significantly reduced, sitting at about <0.2°C from -40°C to 115°C. Above this, it seems the thermistors may be deviating significantly from this regime and it’s important to recognise this is for the rounded-off data. This implies the fit from a fifth-order approximation is quite significantly better than the Beta model which was only capable of remaining below 1°C of error over a narrower range.
While the result is more accurate, applying it to the tolerance values for resistance at each temperature does not change the fact that the thermistors are still subject to about a 0.25°C to 2°C error from the variations in manufacturing alone. This is why thermistors for high-precision applications are often packaged differently (e.g. glass envelopes, hermetically sealed) and much higher in price.
For convenience, I also made an inverse fit – noting that the inverse fit is not going to be the same as solving the existing equation to find the R at a given T. It is, however, a simpler approach compared to trying to solve the equation from my point of view. While these equations can be used to find R given a T, I did not need to do this at this point.
Conclusion
It’s rather interesting that when one examines a seemingly simple component, there are plenty of considerations that are necessary to best utilise the component. In this case, I have only really concerned myself with the provided data from the datasheet drawings, which themselves contain round-off errors.
However, by analysing the data, it is possible to derive the expected amount of reading error due to tolerance and also from the simple one-parameter Beta model. As the last post calculated three-parameter Steinhart-Hart model coefficients, the derived accuracy fell below expectations simply because the source data contained significant round-off errors. As a result, for extreme accuracy applications, better quality data from the manufacturer or a full characterisation by a very temperature-stable, calibrated water-bath may be recommended. In the end, while these approximations are perhaps sufficient for these 1%-2% tolerance thermistors (which are more like 5% at their extremes), a better approach may just be to use a fifth-order fit, which I attempted with the provided data. While round-off errors persist in the source data, the quality of the fit seems significantly better overall, perhaps in part as it does not omit the squared polynomial term which the Steinhart-Hart equation does – a poor decision made empirically that is not supported by mathematics.
Whether it is better than the Steinhart-Hart equation approach is not something I directly evaluated, because the accuracy of the Steinhart-Hart approach requires selecting three operating points which each have their own unique amount of round-off-error from the datasheet which may outweigh everything else. Instead, I’d argue that the Beta and Steinhart-Hart approaches are valued because of their ease of use (i.e. two or three temperatures are easier to derive accurately and measure, and the process does not require curve-fitting) but the literature would indicate them to be insufficient for high-accuracy uses (i.e. those looking to approach 1mK accuracy). Given the tolerance of these thermistors, I’d say the higher-order approach may be overkill, but why not get a little more accuracy if it’s a minor change to some software and additional processing time?
If you’d like to delve deeper and play with the numbers in this particular post – my worksheet can be downloaded here: ThermisData.zip
Alas, this is not all that has to be considered … my experiments will begin soon, but some more due-diligence is due to make sure what I’m doing makes sense. See you in the next blog!
[[Characterising Thermistors Blog Index]]
- Blog #1: Characterising Thermistors - Introduction
- Blog #2: Characterising Thermistors - What's In The Box?
- Blog #3: Characterising Thermistors – A Quick Primer, Beta Value & Steinhart-Hart Coefficients
- Blog #4: Characterising Thermistors – An Inconvenient Truth, Taking Things to the Fifth Degree
- Blog #5: Characterising Thermistors – Measuring Resistance Is Not So Easy!
- Blog #6: Characterising Thermistors – Is Self-Heating a Problem or Not?
- Blog #7: Characterising Thermistors – Boiling, Freezing and Zapping the Truth Out of Them!
- Blog #8: Characterising Thermistors – Practically Running Multiple Thermistors
- Blog #9: Characterising Thermistors – Multi-T Results, Insulation R Redux, 5th Order Fits & Model Performance
- Blog #10: Characterising Thermistors – Multiple Thermistors on ESP8266
- Blog #11: Characterising Thermistors – Show Me Your Curves
- Blog #12: Characterising Thermistors – Sticking Rings on Tabs & Sinks, Absolutely Crushing It!
- Blog #13: Characterising Thermistors – Pulling Out, Overload, Response Time, Building a Flow Meter & Final Conclusion
Top Comments