Electrical – Converting analog 10-bit thermistor reading (MCP3008) to temperature

adcraspberry piresistancethermistor

I'll start by explaining my circuit:

First of all I'm using a Raspberry Pi and the MCP3008 chip on a breadboard. I have 3.3 V going to my thermistor (\$1 k\Omega\$ at \$0^{\circ}C\$) when it returns I have a \$1 k\Omega\$ resistor that goes to ground, and a wire that goes to the MCP3008 chip.

I'm reading the resistance kind of fine using the chip by using this formula:

$$R = \left(\frac{1023}{reading}-1\right) \cdot R_{0^{\circ}C}$$

e.g.

$$R = \left(\frac{1023}{510}-1\right) \cdot 1000 = 1009.82~\Omega~~at~0^{\circ}C~(ice~water)$$

I've been reading about Steinhart and Hart last night, but I simply can't get a formula that works for converting this into a temperature. I even have a spreadsheet showing values of resistance for different temperatures of the thermistor: Pt-1000 Resistance Scheme

I would really appreciate if someone could show me how this conversion is done, and also if I can get a more precise reading, that would be amazing.

Best Answer

I am just suggesting you to try this, consider the below circuit

schematic

simulate this circuit – Schematic created using CircuitLab

For example if you read 1.57 volts

from this you can calculate the resistance of the thermistor,

VR2(voltage at resistor R2) = 3.3 * R2/(R1+R2)

in this expression VR2 and R2 is know so you can compute the value of R1.

R1 = ( (3.3 * R2) - (VR2 * R2 ) ) / VR2

for this example the R1 = 1101 OHMS

From this value you can find the temperature by creating a look up table as in the datasheet you included in the link.