How to compute thermistor B value in Python using UliEngineering
You can easily compute the B value (beta parameter) of a thermistor using the UliEngineering Python library:
from UliEngineering.Electronics.Thermistors import thermistor_b_value
# Compute B value from resistance at two temperatures
# R1 = 10kΩ at 25°C, R2 = 1kΩ at 100°C
b_value = thermistor_b_value("10k", 25.0, "1k", 100.0)
print(f"B value: {b_value:.2f} K")
# Compute B value from resistance at two temperatures
# R1 = 100kΩ at 0°C, R2 = 10kΩ at 50°C
b_value = thermistor_b_value("100k", 0.0, "10k", 50.0)
print(f"B value: {b_value:.2f} K")Example output
B value: 3950.00 K
B value: 3840.00 KThe thermistor B value (also called beta parameter) characterizes the temperature-resistance relationship of an NTC (Negative Temperature Coefficient) thermistor. It represents the material’s sensitivity to temperature changes and is essential for accurate temperature calculations. A higher B value indicates greater resistance change per degree of temperature.
The B value is computed using the formula: $B = \frac{\ln(R_1/R_2)}{\frac{1}{T_1} - \frac{1}{T_2}}$, where $R_1$ and $R_2$ are the resistances at temperatures $T_1$ and $T_2$ in Kelvin. This formula is derived from the Steinhart-Hart equation simplified for two-point calibration.
Related posts
- How to compute thermistor temperature in Python using UliEngineering
- How to compute thermistor resistance in Python using UliEngineering
- How to compute power factor by phase angle in Python using UliEngineering