The Steinhart-Hart equation is used to describe the relationship between resistance and temperature of semiconductor devices. The original publication from Steinhart and Hart is:
J. S. Steinhart and S. R. Hart. Calibration curves for thermistors. In Deep Sea Research and Oceanographic Abstracts, volume 15, pages 497–503. Elsevier, 1968.
This project was created to quickly convert between the resistance and temperature of thermistors packaged in semiconductor lasers.
Simply include the steinhart_hart.py
file in your
project. Refer to the file for usage — the module itself is very short
and well documented.
The steinhart_hart.py
file can be executed. Some
examples:
$ python3 steinhart_hart.py 25
25.000 °C -> 10021.351 Ω
$ python3 steinhart_hart.py 298 -K
298.000 K -> 10087.532 Ω
$ python3 steinhart_hart.py 10000
10000.000 Ω -> 25.049 °C
By default, the argument is assumed to be a temperature in °C if it is less
than 1000 and a resistance in Ω if it is greater than or equal to 1000. The
argument can be forced to a temperature by specifying -T
or resistance with
-R
. The temperature units can be made °C with -C
and K with -K
.
Run with the --help
option to see the full usage options.