NTC thermistor error sources - Page 1
Forum section: electronics / projects

author: thexeno
author_rank: Regular Contributor
timestamp: September 25, 2015, 11:25:07 pm
content: Hi!I'm designing a thermometer based on an NTC. It uses a microcontroller plus a voltage divider, composed by one resistor and the other is the NTC. I'm try to consider all the errors in my system, starting from the component and ending up in the firmware related errors.For now, I've find that provided the B factor and its tolerance, the NTC resistance at 25°C, its tolerance and the slope of the R(T) curve called Alpha (obtained from the Steinhart equation in a given sample point), all of these values are used to find an intrinsic deltaT of the NTC (seehttp://product.tdk.com/en/techjournal/tfl/sensor_actuator/NTCG2/images/001e_p1_gla.gif).And this is one error source which is intrinsic and can be compensated by an offset (from point to point).Absolutely not! Is this avoidable? The Vishay datasheet provides a complete look-up table and a method to calculate this error, which seems to be not adjustable. Here the example datasheet in which is explained how to devise this errorhttp://www.farnell.com/datasheets/1784420.pdf] http://www.farnell.com/datasheets/1784420.pdf.What I'm wondering, is that this error need to be summed, at a given temperature, with the error of the voltage divider which is composed by the resistor's error and NTC error (which is different from 25°C, and can be calculated).Then there will be the interpolation errors and others, but I will handle them later.

author: sarepairman2
author_rank: Frequent Contributor
timestamp: September 26, 2015, 01:14:06 am
content: you will also have thermal hysteresis errors,

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 26, 2015, 02:27:13 am
content: The error bands shown, I think, are for any random off-the-shelf part. You are guaranteed to get a part, of so-and-so grade, to land within this range of values.To tighten that up, you can do a one-point calibration, in which case the vertical resistance error goes away (the spread in the narrowest vertical line of points), but the B error remains (so the cone shaped error is there).Or you can do a two-point calibration, compensating for, e.g., B(85/25), in which case the cone shaped spread drops to a more lumpy sort of shape.At that point, you have a variety of errors remaining:- The curve isn't a single ideal inverse-exponential curve, but a series of different resistors in parallel, of differing weights (how much effect on the total resistance they have), temperature thresholds and curve rates. So the ideal curve isn't the published formula: it may be accurate enough for the stated tolerance, but you'll need that many more calibration points, with a more general formula (at this point, probably just a polynomial best-fit) to be reasonably confident in its actual response.- And it's not obvious if they publish the measured values, tabulated; or if those values are generated from the best-fit B(85/25) formula, or whatever. In other words, is the table true to the parts, or was it generated from the formula for people too lazy to use it? One would hope it's as-measured, but who knows?- Repeatability, like hysteresis as mentioned. There may be state-dependent effects, like hysteresis, and age- or use- or charge-related effects where the coefficients gradually drift.- Noise, especially 1/f noise. It's my understanding that this is exaggerated in thermistors, hence their high gain (tempco) comes at a price. No free lunch, right? Apparently RTDs are pretty good (they can suffer from non-ideal resistance effects too, like 1/f noise), and thermocouples are quite good (despite the microscopically small output voltage). For serious accuracy (< mK resolution and stability), I think they're nearly tied.Regarding voltage dividers into MCUs, I wrote a pretty peppy routine for AVR that converts a 12 bit ADC sample into a temperature of similar accuracy, using a polynomial best-fit (to the tabulated data, applied in a voltage divider circuit), with a fitness of about 10 times better precision (i.e., 10 times more precise from computation to data, than data to actual device is expected).Tim

author: thexeno
author_rank: Regular Contributor
timestamp: September 26, 2015, 09:59:21 am
content: Quote from: T3sl4co1l on September 26, 2015, 02:27:13 amFor the cone did you mean the graph that I linked?QuoteCan I be referred to a source that explain how to do this calibration? I mean that I can calibrate 2 points, but then, how do use these masurements to correct the error?QuoteThose errors I think that are order of magnitude lower than the precision that I would like to have. Moreover, obtaining a precision of 0.1 or 0.5°C by knowing from what are generated these uncertainties, it would be a great success. Having a more precise system but not knowing what I did, it will vanishes the satisfaction.For what concerns the S-H equation, it is stated to achieve 15mK of precision, so it is far more precise than my goal. I assume that I can work on this. To this, B-tolerance and R25 tolerance are used to add uncertainty, if I understand well.QuoteIt is public? Can I study what you did?

author: thexeno
author_rank: Regular Contributor
timestamp: September 26, 2015, 11:08:27 am
content: I need to provide an additional information on how I decided to proceed.From an LUT devised using the S-H equation (which has 15mK of error) I may interpolate the intermediate values, and is reasonable to assume that if the LUT have steps of 1°C, between two readings I have 0.5°C if the intermediate value is used as discriminant. So 24.5°C or 25°C all of them at +-0.5°C should be ok, for a reading between 24°C and 25°C corresponding to a real 24.6°C. In this case I am able to understand if I am over the 0.5 threshold by reading the value of the resistance from an ADC.Then, to this error I will add the 15mK and the tolerance of the voltage divider, which in the worst case is the sum of the tolerances of the two resistors (where one is the NTC). The error of the resistance of the NTC varies with temperature, and is provided an equation to devise it, and can be made a point to point evaluation or taking the worst case.Here there is an another problem: the resistance deviation of the NTC divided by the temperature coefficient provides the temperature error. This is what is also stated in the DS.Here the dummy questions:But, if I am using a voltage divider, this deviation should be of the total voltage divider and not only the NTC?Can I calibrate this error? (once calculated the real error obtained, it is constant over the whole range?)Seems not to be trivial to obtain an error less than 1°C, using an LUT devised from S-H even at 0.1°C resolution, when the thermistorhave a B value error at 0.75% and its Rref at 25°C is at 5%.

author: kripton2035
author_rank: Super Contributor
timestamp: September 26, 2015, 11:32:36 am
content: reading of interests attached

author: ralphd
author_rank: Frequent Contributor
timestamp: September 26, 2015, 01:02:21 pm
content: You could ditch the ntc and use a diode. The variation of Vf with temperature is very close to linear. Around -2mV/C at 1mA is typical.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: September 26, 2015, 04:18:45 pm
content: Quote from: thexeno on September 26, 2015, 09:59:21 amYes, the way the curves spread out away from 25C. "Bowtie" may be a better word than "cone".QuoteIf you are using the function that uses B, then you can substitute into the function at two different points (preferably the temperatures used for the B value, i.e., B(85/25) is done at 85C and 25C) and solve for the R(25) and B(85/25) values. A solution of simultaneous equations in two unknowns.This will get you the R and B values that are "correct" for the component, but won't solve for other errors in the component itself -- that is, the way that it isn't correctly described by that equation.QuoteI don't have everything handy at the moment... here's the spreadsheet I used to generate the coefficients. Rather messy, not made for being handy...Data input is the left two columns (published table for the thermistor), and circuit/constants on top (series resistor, Vref/ADC bits/counts). a-f (and the columns they control) are the sum-of-reciprocals method I mentioned. PWL is the piecewise-linear solution that gives the best similar results (the series is a fine-tuned subset of the original data, so it's minimax error). As you can see, it takes more coefficients, like I said. The later a-h and T0-T7 are the coefficients for the polynomial best-fit. Tn is a Chebychev polynomial, which gives better convergence than raw polynomial coefficients. The rightmost columns are simulating the equations on a typical fixed-point platform, including rounding, and giving the best (rounded) coefficients for a MAC (multiply-accumulate) computation. (Along the way, error calculations are used to drive the solver and check the answers. The graph shows all the solution curves, which appear in the same place, so the accuracy is good. The magnified curve shows error of the fixed-point polynomial solution.)Tim

author: thexeno
author_rank: Regular Contributor
timestamp: September 26, 2015, 04:54:27 pm
content: Thanks, very useful. In the meantime I started with a method that I will verify if it is correct, if I realize that it is correct.So a question comes out, I'd like to see if someone agree with me: these NTC have also the Alpha coefficient in %/mK, the temperature coefficient. From the Beta tolerance is possible to see how the relative error of the NTC resistance vary along with the temperature range. This relative error over the temp coefficient provides the temperature deviation (dR/R)/(Alpha)=dT.My problem isto understand if in the dR/R I should include the relative error of the whole voltage divider, rather than the NTC resistance error itself (because the resistance reading is not "direct" but saw from a voltage divider with another resistance with a given precision). Moreover, I didn't understand if this error can be filtered out, so if it is more or less constant ONCE I've actually measured it at one temperature and compared with a more precise sample thermometer.

author: thexeno
author_rank: Regular Contributor
timestamp: October 03, 2015, 02:06:26 pm
content: Alright, I discovered by reading better around that the error of the thermistor must be combined with the error of the voltage divider. So, if I have 5% resistors, NTC included (its tolerance vary in the temperature range, so can be considered the worst case, for example) I may have at worst case 10% of error (5% using resistors with the same nominal value).Once my system is set-up and I can start reading the measurement, can I remove this error by reading the temperature in a melting ice? The NTCs have an error like this:I was wondering if this can be offset properly if measuring somthing "sure", like 0°C of the melting ice.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 03, 2015, 09:14:09 pm
content: Melting ice (assuming very pure water) would be a single point calibration; two points are necessary to calibrate a linear approximation (or any two-parameter equation, like the R25 and B85/25 equation). You need at least three points to accommodate error in the divider resistor as well, and more for higher order equations (including C and D coefficients).Tim

author: thexeno
author_rank: Regular Contributor
timestamp: October 04, 2015, 04:20:23 pm
content: Quote from: T3sl4co1l on October 03, 2015, 09:14:09 pmYeah, I was aware of that. Three points, three equations and you can devise the right coefficients if I want to use third order S-H, with a precision dependent on the thermometer used to make the calibration.My question was quite dumb, since was just see if I can discover an offset, maybe introduced by the resistor in the voltage divider or anything like that.I was thinking that if I measure (with an infinite precisione) a constant resistor of 10K+- 5%, I may find that is it 10.1KOmhs. Now my resistor is 10.1K +-0%. In this way I can remove this 0.1K offset.The question was related to the capability of measure this error (in °C) and compensate. But this is based on the assumption that the mismatched value due to the tolerances remains constant over the temperature range, like could be apporox considered for a normal constant resistor. But I see that the non linearity brings a "different" offset at different temperatures, therefore the usage of 2, 3 or 4 calibrations values. Which I can not do.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: October 04, 2015, 09:33:06 pm
content: Yeah, like I said, to discover a different resistance is the same as solving for a different R25 in the equations. So you need 4 points to solve for 3rd order S-H (B, C, D, R25).Tim

author: thexeno
author_rank: Regular Contributor
timestamp: October 04, 2015, 10:23:25 pm
content: I learn a lot. Thank you.