The thermistors are sensors that vary its resistance according to the temperature to which they are subjected. Those of type NTC lowering its resistance as the temperature increases, while the PTC increases. Unfortunately, these sensors are not completely linear so do not just learn a simple proportion to their temperature depending on the resistor, but you must have some parameters and equations. In this article we use the equation with the B parameter. The formula is the following:

Where R0 is the resistance at the T0 temperature (usually 25 ° C = 298.15 K), B is the beta coefficient , whereas R is the resistance value of the thermistor at the T temperature that we want to detect. The temperatures are expressed in Kelvin degrees . At this point the only data that we are missing is the value of R, which will we will find thanks to a voltage divider.