On Sat, 17 Apr 2010 08:58:58 -0700, Jim Thompson
[snip]
*********************************************************
* NTC resistor using the Steinhart-Hart equation: *
* 1/T = A + B*ln(R) + C*ln(R)**3 (ugly solution for R) *
* Requires equation coefficients which can be *
* set in this subcircuit or passed thru the *
* X instantiation. e.g. *
* X1 1 0 THERMISTORntcS PARAMS: A=8.215E-4 B=2.111E-4 C=6.716E-8 *
* See Thermistor_Calculator.mcd for coefficient gen *
* Schematics component: RntcS *
* By: Mark 26 March 2003 *
*********************************************************
* +-------------------NTC resistor terminals
* | +------+------+- equation coeffs
coefficients
.SUBCKT THERMISTORntcS 1 2 PARAMS: A=8E-4 B=2E-4 C=7E-8
.PARAM D={ ((1/(TEMP+273.15))-A)/(2*C) }
.PARAM E={ (B/(3*C))**3 }
.PARAM F={ SQRT(D**2+E) }
.PARAM G={ EXP(PWRS(D-F,1/3)+PWRS(D+F,1/3)) }
ETHERM 1 3 VALUE={ I(VSENSE)*G }
VSENSE 3 2 DC 0
.ENDS THERMISTORntcS
Regards,
Mark
Hi Mark,
Saturday morning, time to muse over adding your thermistor equation to
my symbol and model libraries, and studying the Steinhart-Hart
equations for "R", I wondered why you needed to use "PWRS"?
They way I read those equations, "x" is always greater than "y/2", so
simply PWR, or even **(1/3) should suffice.
Or am I overlooking a trap (like, can B/3C be negative ?
Thanks!
...Jim Thompson
And it looks like "standard" data is resistance versus temperature
tables, rather than specifying A, B & C. Is that typical, or am I not
looking in the right places?