Data Acquisition (DAQ) and Control from Microstar Laboratories

DAPL Operating System | Processing Command

Module SENSORM :: THERMISTOR

Convert resistance measurements to the corresponding temperature for a thermistor device.

Syntax

THERMISTOR( RIN, VMODEL, TEMPOUT )



Parameters

RIN
Input resistance values in ohms
FLOAT PIPE
VMODEL
Coefficients for Steinhart and Hart thermistor model
FLOAT VECTOR
TEMPOUT
Output data pipe, temperatures in degrees Centigrade
FLOAT PIPE

Description

The THERMISTOR command converts resistance values received from the RIN pipe, using the device model specified by the VMODEL vector, and delivering the corresponding output temperatures in degrees C to the TEMPOUT pipe.

The device model used is the Steinhart-Hart equation. This equation is an empirical formula capable of conversion accuracy within a small fraction of a degree. There are no standardized conversion curves, but most thermistor manufacturers will provide Steinhart-Hart coefficient values that work over a suitable range with their devices.

The form of the Steinhart and Hart equation is

   T  = 1.0 / ( a + b ln(R) + c ln3(R) )

where R is the measured device resistance in ohms, and the a, b, and c terms are the model coefficients. The THERMISTOR command uses a slight variation of this

   T  = 1.0 / ( a + b ln(R) + c ln3(R) )  -  273.16

where the final 273.16 term converts the temperature units from Kelvins to degrees Centigrade. For maximum conversion accuracy, you can calibrate the curve for the individual device you are using. Measure the actual resistance at three well-selected temperature points representative of your operating range, insert these values into the Steinhart-Hart equation form, and solve for the coefficient values.

To support a very wide temperature range, the THERMISTOR command supports a multiple-piece device model. Each piece of the model is encoded into the VMODEL parameter as a break-point temperature in degrees C, followed by the three Steinhart-Hart coefficients to use at that temperature and beyond. The model pieces are encoded in order from lowest temperature range to highest temperature range. The first piece is the default that provides conversions at low temperatures, so its break-point term is ignored and can be set to zero. Most applications will use a one-piece model. Multiple-piece models only work for negative temperature coefficient thermistors, which are the ones that most applications use.

Example

  VECTOR  THERM44007 FLOAT = ( 0.0, 1.285E-3, 2.362E-4, 9.285E-8 )
  ...
  THERMISTOR(PRESIST, THERM44007, TEMPR4)

Manufacturer-provided coefficients for a model 44007 thermistor are used, and specified in the vector THERM44007. Because this is a one-piece model, the temperature breakpoint between pieces is unused, and the first term is set to 0. Measurements of the temperature-dependent thermistor device resistance in ohms are obtained from pipe PRESIST. Each resistance value is converted to the corresponding operating temperature of the thermistor using the Steinhart-Hart equation with the coefficients from the THERM44007 vector, producing the corresponding temperature results in degrees C. The temperature results are placed into pipe TEMPR4.

See also:

 DIVIDER, BRIDGE