Temperature regulation is essential for mamalian organisms as well as culture of cells and tissues. The physiologic temperature range is narrow with about
Temperature can be measured using thermoelectric effect using thermo couples. Most common is the use thermistors which change their resistance based on temperature either in negative or positive direction. The negative thermistor with room temperature resistance specified at
For medical applications the sensor is encapsulated and electrically isolated so that it can be exposed to body fluids and disinfected.
For accurate readings, a Wheatstone bridge is needed to record the resistance of a thermistor. This is a full bridge with 4 resistors. Such bridge will be insensitive to temperature changes at the location of R1, R2 and R3 as long as they are kept close to each other.
made with https://www.circuit-diagram.org/editor
The thermistor resitance is
Where
To implement the formula above to caculate the thermistor resistance with integer mathematics we need to use 64 bit math because resistors are 10,000 (Ohms) and
int32_t R_thermistor = int32_t ( ( uint64_t(R3) * uint64_t(Vin*R2 - Vdiff*(R1+R2)) ) / uint64_t(Vin*R1 + Vdiff*(R1+R2)) );
The equation provides a formula to model the resistance of the thermistor based on 3 calibration values A, B and C. These are manufacturer provided and material constants but they vary for each type of thermistor. The equation is an approximation of the semiconductors resistance model.
To solve the Steinhart-Hart Equation we need to use floats as we have to compute a logarithm. We will provide integer result in
float lnR = log(float(R_thermistor)); // natural logarithm
float Temp = 1.0/(A + B * lnR + C * (lnR*lnR*lnR));
Temp = (Temp-273.15); // Kelvin to Centigrade
return int16_t(Temp*100.0); // convert temperature e.g. 29.12 to 2912
When high precision measurements are needed we can use a differential AD converter:
Product LTC2473 has LTC2473 data sheet and example Arduino Software.
This converter is an inexpensive 16 bit 800 samples per second converter.