Thermistor
The Thermistor instruction is used to make a bridge measurement and from that measurement, return temperature in degrees C or resistance in Ohms.
Syntax
Thermistor ( Dest, Reps, Range, UChan, ExmV, RevEx, SettlingTime, fN1, Therm_A [optional], Therm_B [optional], Therm_C [optional] )

The following program demonstrates using the Thermistor instruction to make a measurement and return the output in degrees C.
'Declare Variables
Public PTemp, Batt_volt,TempC
'Steinhart-Hart coefficients
Const A = 1.405100e-03
Const B = 2.369000e-04
Const C = 1.019000e-07
'Define Data Tables
DataTable (Test,1,-1) 'Set table size to # of records, or -1 to autoallocate.
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,False,False)
Sample (1,PTemp,FP2)
EndTable
'Main Program
BeginProg
Scan (1,Sec,0,0)
PanelTemp (PTemp,15000)
Battery (Batt_volt)
Thermistor (TempC,1,mV5000,U1,2500,True ,0,60,A,B,C)
CallTable Test
NextScan
EndProg
Remarks
The Thermistor instruction takes advantage of the datalogger’s built in 5 kOhm resistor to make a bridge measurement. This instruction can be used to measure the thermistor for a vibrating wire separately from the VibratingWire instruction. A, B, and C are the Steinhart-Hart coefficients used to derive temperature in degrees C. These parameters are optional – if omitted, the output returned is in Ohms.
Parameters
Dest (Destination)
The Variable in which to store the results of the instruction. Right-click the parameter to display a list of defined variables.
If this instruction has a Repetitions parameter and it is greater than 1, the results are stored in an array with the variable name. The array must be dimensioned large enough to hold all of the values returned from all of the Reps.
Type: Variable or Array
Reps (Repetitions)
The number of repetitions for the measurement or instruction.
Type: Constant integer (or expression that evaluates as a constant).
For the Thermistor instruction, measurements are made on consecutive channels. If the Reps parameter is greater than 1, the Dest parameter must be a variable array.
Range
The voltage range for the measurement or input sensor. An alphanumeric code is entered. Right-click the parameter to display a list or enter the code directly.
Code | Description |
---|---|
mV5000 | +5000 mV |
mV1000 | +1000 mV |
mv200 | +200 mV |
Autorange | Datalogger tests for and uses most suitable range. |
AutorangeC | Autorange, checks for open input. |
mV5000C | +5000 mV, checks for open input, sets excitation to ~ |
mV1000C | +1000 mV, checks for open input, sets excitation to ~1250 mV. |
mV200C | +200 mV, checks for open input, sets excitation to ~1250 mV. |
Autorange increases the time to make the measurement. For signals that do not fluctuate too rapidly, AutoRange allows the datalogger to automatically choose the input voltage range. AutoRange results in two voltage measurements being performed. The first voltage measurement is done quickly at a first notch frequency (fN1) of 50 kHz, the result of which determines the input voltage range to use for the second measurement. The second measurement is then performed using the range determined from the first measurement, along with the fN1 chosen for the measurement instruction. Both measurements use the settling time chosen for the particular measurement instruction. Auto-ranging optimizes resolution but takes longer than a fixed range measurement because of the two-measurement sequence. The exception to this two-measurement sequence is if Reps are made on the same channel (Reps parameter is negative). In this instance, the test measurement is made only once. Subsequent repetitions are made with the delay between each measurement being the specified settling time. Autorange should not be used if fast measurements are required or if the analog signal could change significantly over the course of the measurement.
The C options check for an open connection on the analog input by applying a short overranging test signal to the analog input prior to making the measurement. For a voltage range of mv5000C,
The open-detect option may not work properly in the presence of external leakage (< 1 MOhm) to ground, as the overrange test signal could discharge through the external leakage during the input settling time such that an overrange condition no longer exists. In this case the measurement settling time should be minimized to minimize the discharge time of the overrange test signal.
The open circuit detection (C option) can cause measurement errors for slow responding sensors, as such sensors may not have sufficient time to recover from the applied short duration (50 microseconds) test signal. For such sensors, increasing the measurement settling time beyond the default may be necessary for sufficient sensor recovery time. If measurement speed is critical with a slow responding sensor, then it may be preferable to not use the open detect (C option).
Type: Constant
DiffChan (Differential Channel)
Specifies the
If the DiffChan number is entered as a negative value, all Reps are
performed on the same channel (burst measurement). The CR6 burst measurement sampling
Code | Description |
---|---|
U1 | Universal Terminals 1 and 2 (U1 = high/U2 = low) |
U3 | Universal Terminals 3 and 4 (U3 = high/U4 = low) |
U5 | Universal Terminals 5 and 6 (U5 = high/U6 = low) |
U7 | Universal Terminals 7 and 8 (U7 = high/U8 = low) |
U9 | Universal Terminals 9 and 10 (U9 = high/U10 = low) |
U11 | Universal Terminals 11 and 12 (U11 = high/U12 = low) |
Type: Constant
ExmV (Excitation Voltage in mV)
The excitation, in millivolts, to apply to the excitation channel. The allowable range is
Type: Constant. For ExciteV() only, this parameter can also be a Variable.
RevEx (Reverse Excitation)
Type: Constant
Settling Time
The settling time is the duration (in microseconds) to allow for signal settling after setting up a measurement (switching to the channel, setting the excitation) and before making the measurement.
Additional settling time may be necessary to allow the signal to settle with high resistance or long lead lengths (higher capacitance). The time it will take to make the measurement will include the measurement itself, the SettlingTime, fN1, and whether or not parameters are set to remove voltage offset errors. Using either RevDiff or RevEx causes two SettlingTimes to occur per channel; four SettlingTimes will occur when using both RevDiff and RevEx.
Type: Constant (or expression that evaluates as a constant)
fN1
Determines the lowest frequency that will be eliminated or notched out by the sinc filter. This filter notches out frequencies at integer multiples of fN1 by averaging for a time equal to 1/fN1;
thus, lower fN1 frequencies result in longer measurement times.
Option | Description |
---|---|
15000 | Performs a 0.0667 millisecond integration (for fast measurements) |
60 (or _60Hz) | Performs a 16.67 millisecond integration (filters 60 Hz noise) |
50 (or _50Hz) | Performs a 20 millisecond integration (filters 50 Hz noise) |
Type: Constant
Optional Parameters
Therm_A, Therm_B, Therm_C
Optional parameters used to enter the Steinhart-Hart thermistor coefficients. If one is present they must all be specified. When these coefficients are entered, the thermistor value will be returned as degrees C. If the coefficients are not entered, the result will be returned as resistance in Ohms.
Note that for the VibratingWire instruction, Therm_fN1must be specified in order for the thermistor to be measured.
Type: Constant