Tom Handley says
a common method to characterize a thermistor is to use the Steinhart-Hart equation:1/T = A + [B * ln(R)] + [C * ln(R)^3]Where:
T = Degrees Kelvin R = Resistance A,B,C = Curve-fitting constants.You typically measure three data points; min(A), middle(B), and max(C). Then solve the three simultaneous equations for A, B, and C. The accuracy is related to the span. So a span of 100 degrees is more accurate than a span of 500 degrees.
In one case, I used this to characterize a common cooking temperature probe (Polder) for characterizing the thermal response of my oven between 100 to 300 deg F. I ended up writing a MathCAD sheet to simplify things. Once I had the constants, I fed them to an Excel 97 sheet to analyze and graph the data. From there you can generate a surprisingly accurate curve (again, depending on span). Then you can either implement the equation in FP or scaled fix-point math or use a lookup table.
Scott Dattalo says:
With the S-H approach {calculated "on the fly" in the processor rather than pre-calculated into a table} you have to compute these really nasty logarithms and arithmetic operations. All of that just to get 1 or 2% accuracy. However with a lookup table it only takes about 20 CPU cycles to get an answer that's accurate to with in a 0.5%. However, I found that the look up table can only give you this accuracy after the thermistor has been carefully calibrated. In other words, with the S-H equation I found my compuatations suffered from cumulative round off errors but the look-up table is accurate as the data in the table.
Interested:
Comments: