# A thermistor is a type of resistor whose resistance is ```A thermistor is a type of resistor whose resistance is dependent on temperature.
Thermistors are widely used as temperature sensors namely positive temperature
coefficient (PTC ) and negative temperature coefficient (NTC) in accordance with the
temperature coefficient. With PTC, resistance increases with the increase of
temperature. While with NTC, resistance decreases with the increase of temperature.
We are using a NTC thermistor whose resistance decreases with the increase of
temperature. Convert the voltage of CH0 into digital value via the ADC. And then
convert the resistance of the thermistor into centigrade temperature or Fahrenheit
degree through program processing.
Specific process:
1. Read the analog value of CH0 in the following circuit and calculate the voltage of
CH0 based on the property of ADC (refers to the voltage reference (Vref), which
is 5V and the analog reference (Aref), which is 10 bit ADC for Arduino namely
Aref=1023 and 8 bit ADC for ADC0832 namely Aref=255 )and the serial
resistance，calculate the Voltage Vr of CH0:
2. Calculate the value of Rt through the geometric relationship between voltage and
resistance.
3. Calculate the value of Kelvin temperature (Tk) of the thermistor based on the
negative temperature coefficient formula of resistance (the governing equation is
Arrhenius equation), which describes that an insulator’s resistance varies with
temperature.
4. Then convert Tk into centigrade temperature or Fahrenheit degree
The following is the specific process:
1. Build the circuit and read the analog value. If you are using a Raspberry board,
you need to use an ADC chip to read the analog value since it is not capable of
doing so. Here we take the ADC0832 for example. For Arduino, you can use
the ADC chip inside it. Connect CH0 to any pin from pin A0 to pin A5 to read the
value. Here the 𝑉𝑟𝑒𝑓 of Arduino board and ADC0832 are both 5V. ADC0832:
𝐴𝑟𝑒𝑓 = 255， Arduino: 𝐴𝑟𝑒𝑓 = 1023. Here we regard the analog value as AT.The
ratio of 𝐴 𝑇 and 𝐴𝑟𝑒𝑓 equals to that of 𝑉𝑟 and 𝑉𝑟𝑒𝑓 ( the property of ADC). That is :
𝐴𝑇
𝑉𝑟
=
𝐴𝑟𝑒𝑓 𝑉𝑟𝑒𝑓
Then
𝑉𝑟 =
𝐴 𝑇 ∙ 𝑉𝑟𝑒𝑓
𝐴𝑟𝑒𝑓
𝑉𝑟𝑒𝑓 and 𝐴𝑟𝑒𝑓 are the constants. Then the value of 𝑉𝑟 can be calculated.
2. Calculate the value of Rt according to the following equation:
𝑉𝑠
𝑉𝑟
=
𝑅𝑇 + 𝑅1 𝑅1
𝑉𝑠 refers to the power supply voltage at the left, which is 5V. 𝑅1 refers to the 10k
resistor. Therefore, the value of RT can be calculated:
𝑅𝑇 =
𝑉𝑠 ∙ 𝑅1
− 𝑅1
𝑉𝑟
That is :
𝑅𝑇 =
5𝑣 &times; 10 000𝛺
− 10 000𝛺
𝑉𝑟
3. Calculate the Kelvin temperature (Tk) based on 𝑅𝑇 :
𝐵
𝑅𝑇 = 𝐴 ∙ ℯ 𝑇𝑘
A and B are the constants. Beta (B) is NTC. For the thermistor we are using, 𝐵 =
3950.
Here 𝑒 = 2.71828 …
We use a 10k Ohm thermistor. When T0=25, 𝑅0 = 10 000𝛺
A=
𝑅𝑇
𝐵
𝑒 𝑇𝑘
∴
𝑅0
𝐵
ℯ 𝑇0
=
𝑅𝑇
𝐵
𝑒 𝑇𝑘
Then the value of 𝑇𝑘 can be calculated through the given parameters （𝑅0 ，𝐵，
ℯ，𝑇0 ， 𝑅𝑇 ）
Continue to change the equation:
𝑅𝑇 = 𝑅0 ∙ ℯ
ℯ
(−
𝐵 𝐵
(− + )
𝑇0 𝑇𝑘
𝐵 𝐵
(− + )
𝑇0 𝑇𝑘
=
𝑅𝑇
𝑅0
𝐵 𝐵
𝑅𝑇
+ ) = ln ( )
𝑇0 𝑇𝑘
𝑅0
𝐵
𝑅𝑇
𝐵
= ln ( ) +
𝑇𝑘
𝑅0
𝑇0
𝐵
𝑇𝑘 =
𝑅
𝐵
ln ( 𝑅𝑇 ) + 𝑇
0
0
Then the value of 𝑇𝑘 has been calculated.
4. Convert 𝑇𝑘 into centigrade temperature or Fahrenheit degree we are familiar with.
𝑇𝐶 = 𝑇𝑘 − 273.15

Fahrenheit Degree (𝑇𝐹 )
𝑇𝐹 = (𝑇𝑘 − 273.15) &times; 1.8000 + 32.00
The above-mentioned process can be simplified as:
1. Read the value of 𝐴 𝑇 and calculate the value of 𝑉𝑟 ：𝑉𝑟 =
2. Calculate the value of𝑅𝑇 ：𝑅𝑇 =
3. Calculate the value of 𝑇𝑘 ：𝑇𝑘 =
𝑉𝑠 &times;𝑅1
𝑉𝑟
𝐴𝑇 &times;𝑉𝑟𝑒𝑓
𝐴𝑟𝑒𝑓
− 𝑅1
𝐵
𝑅
𝐵
ln( 𝑇 )+
𝑅0
𝑇0
4. Calculate the value of 𝑇𝐶 /𝑇𝐹 ：
𝑇𝐶 = 𝑇𝑘 − 273.15
𝑇𝐹 = (𝑇𝑘 − 273.15) &times; 1.8000 + 32.00
Now, we have learned how to convert the resistance of a thermistor into centigrade
temperature or Fahrenheit degree.