thermistor STEINHART and HART calculation

in order to use NTC values in a LTspice simulation, it is required to use the ".op" mode. so that the simulation will run with a temperature scale.

then we need 3 temp reference resistance points (celsius/ohms)

T1 / R1
T2 / R2
T3 / R3

the celcius convert to kelvin (+273.15)
the ohms math into natural log

LR1 = LN(R1) , etc
K1 = T1 + 273.15, etc

then

A1 = LR1-LR2
A2 = LR1-LR3
A3 = 1/K1 - 1/K2
A4 = 1/K1 - 1/K3
AA = =1/K1-CC*LR1^3-BB*LR1
BB = (A3-CC*(LR1^3-LR2^3))/A1
CC =(A3-A1*A4/A2)/((LR1^3-LR2^3)-A1*(LR1^3-LR3^3)/A2)

then to find the instance of resistance at temperature Ki, (= celcius + 273.15 again)

AP =(AA-(1/Ki))/CC
BP =((BB/(3*CC))^3+(AP^2)/4)^0.5
R(ohms) @ temp Ki = EXP((BP-(AP/2))^(1/3)-(BP+(AP/2))^(1/3))

in LTspice, the above will look something like

.TEMP xx
* where xx = temp in celcius
.param K = TEMP + 273.15
* 4500K murata 150K (A1~A3 are the AA~CC already pre-done from spreadsheet)
.param A1=0.0009099102
.param A2=0.0001948926
.param A3=0.0000000717
.param A33=-1/{K}
* A4 = alpha/AP
.param A4 = ({A1}+{A33})/{A3}
.param A44 = ({A2}/(3*{A3}))**3
* A5 = beta/BP
.param A5 = ({A44}+(({A4}**2)/4))**0.5
.param A6 = ({A5}-({A4}/2))**0.33333
.param A7 = (abs({A5}+({A4}/2)))**0.33333
*and the NTC resistance

.param NTCR = EXP(A6-A7)

Comments

Popular Posts