Up to home page.
rtd.zip  Get source code and executable programs.


Thermistor Calibration Curve

The Steinhart - Hart equation
     1/T = A + B ln R + C (ln R)^3
is a commonly-used empirical approximation formula for thermistors. It relates the logarithm of the electrical resistance R to the Kelvin temperature T. For higher accuracy or a wide temperature range, a square term can be included to create a formula of Mangum:
     1/T = A + B ln R + C (ln R)^2 + D (ln R)^3
Given a set of experimental calibration points, the supplied computer programs will generate the constant coefficients A, B, C, D to make a least squares fit of these curves to the calibration points.
  • fcn.c - Function subroutines to calibrate a thermistor.
  • lmdif.c - Levenberg-Marquart least squares fitting program.
  • thcal.c - Print table of temperature versus electrical resistance
  • lmdif.exe - MS-DOS executable of the fitting program.
  • thcal.exe - MS-DOS executable of the table printing program.
  • Step 1:
    Measure the resistance of your thermistor at various known temperatures, or obtain some calibration points from the manufacturer (such as the examples in the file thermis.txt).

    Step 2:
    Insert measured temperature and resistance values into a computer text file called fcn.txt. The first value in each measurement line is the temperature, the second value is the electrical resistance. The very first line of fcn.txt should be the letter F for Fahrenheit temperature scale, the letter C for Celsius, or the letter K for Kelvin. The second line of the file should be the number of approximation coefficients desired, either 3 or 4, for the builtin formulas. If the temperature span is 50 degrees C or less, the three-coefficient formula will probably be better unless the measured data values are extremely accurate.

    Step 3:
    After editing fcn.txt, run lmdif.exe to compute the formula coefficients. The program will write the values into a text file named thcal.txt.

    Step 4:
    Finally, run thcal.exe to print a table of resistance versus temperature.

    In the Steinhart - Hart formula the coefficient A is the inverse temperature at which R = 1. Many thermistor specifications are referenced to 25 degrees Centigrade, so A = 1/(273.15 + 25) = 0.003354016... by definition. With that definition the computed value of R is the ratio of the resistance at temperature T to the resistance at 25 degrees.

    Platinum Thermometer Calibration Curves

    Industrial quality platinum resistance temperature detector (IPRT) elements can be purchased at moderate cost from commercial suppliers (See http://www.omega.com for example). They are less sensitive to small temperature change than thermistors but they are more stable and are usable over a wide temperature range.


         W = (Resistance at temperature T) / (Resistance at 0 degrees Celsius)
    the formula used for industrial quality units is Callendar's equation
         W = 1 + A T + B T^2
    where T >= 0 is given in degrees Celsisus. When T < 0 the resistance is better approximated by the Callendar - Van Dusen equation
         W = 1 + A T + B T^2 + C (T - 100)) T^3
    The supplied program prints a table of the resistance-temperature curve using standardized values of the coefficients.
  • iprt.c: Temperature-resistance curve for industrial quality platinum resistance temperature detector (IPRT)
  • Usage:
  • iprt resistance_ratio
    Displays Kelvin, Celsius, and Fahrenheit temperature for given resistance ratio value (W, above).
  • iprt total_resistance lead_wire_resistance
    Prints temperature for measured resistance after subtracting given lead wire resistance. Assumes 100 ohm element resistance at 0 C. Given resistance values are in ohms.
  • iprt t
    Print a table of resistance as a function of temperature.
  • Standard quality platinum resistance temperature detector (SPRT) devices provide the International Temperature Scale ITS-90 method of interpolating temperature measurements from the melting point of silver down to liquid hydrogen temperatures. The supplied program generates a resistance-temperature table from the adopted polynomial formula.

  • sprt.c: Temperature-resistance curve for standard quality platinum resistance temperature detector (SPRT)
  • quartic.c: Solve fourth-degree polynomials using a program by Thomas Kraska http://van-der-waals.pc.uni-koeln.de/quartic/quartic.html
    S. L. Moshier
    May, 2002


    Callendar, H. L., "On the Practical Measurement of Temperature: Experiments Made at the Cavendish Laboratory, Cambridge," Philosophical Transactions of the Royal Society of London. A. Volume 178 (1887), pp, 161-230.

    L. S. Steinhart and S. A. Hart, Deep Sea Research 15, 497 (1968)

    S. D. Wood, B. W. Mangum, J. J. Fillibenm S. B. Tillet, An investigation of the stability of thermistors, J. Res. Natl. Eur. Stand. 83, 247 (1978)

    Sostmann, Henry E., _Fundamentals of Thermometry_, manuscript available at http://www.its-90.com