• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Spice simulation models

Status
Not open for further replies.

alec_t

Well-Known Member
Most Helpful Member
When running spice simulations, while helping on other threads, I found it convenient to have models of thermistors and resistors whose values could be changed on-the-fly.
In case they would be useful to others I offer them here.
 

Attachments

MrAl

Well-Known Member
Most Helpful Member
Hello there alec,

That looks interesting.

If you would like to model the thermistor with the curve we usually see on the data sheets, you can incorporate this formula:
Rx=Ro*e^(B/(Tc+273)-B/(To+273))

This is the standard curve for a thermistor without the extra 'C' constant which is usually not necessary. This will generate the same curve as seen on data sheets.

In the above, Ro is the resistance as measured at temperature To, and To is that temperature in degrees C.
B is a constant for the particular part number of the thermistor as given by the manufacturer, or can be calculated from a test of the thermistor.
Tc is the actual temperature of the thermistor also in degrees C.
Rx is the calculated resistance at temperature Tc.
Of course e=2.718281828459.

So for example with a typical B of 4000 and resistance at 20 degrees C of 10k, we have:
Rx=10000*e^(4000/(Tc+273)-4000/(20+273))

and so at the new temperature Tc=30 degrees C we get:
Rx=10000*e^(4000/(30+273)-4000/(20+273))

so:
Rx=6372.73090938 Ohms.

You'll have to make three user parameters:
Ro, B, and To

so that users can change their thermistors to match the data sheet of the particular thermistor.
 

alec_t

Well-Known Member
Most Helpful Member
Thanks Mr Al. That's a more elegant solution than mine. I only needed a rough-and-ready model, but I appreciate others may want a more realistic one. I'll rework the model and post it in due course.
 

alec_t

Well-Known Member
Most Helpful Member
Thanks Eric.
Here's the revised NTC thermistor model (.asc, .asy and a Test .asc)
 

Attachments

MrAl

Well-Known Member
Most Helpful Member
Hello again,

Eric:
Yes that's interesting too, and you'll notice i left off the 'C' constant because it is usually not needed, but even more to the point is it rarely shows up on data sheets for thermistors. So i figure the shorter version is just as good :)
Also makes solving for the constants a little easier.

Alec:
You're welcome, and if your users cant find the data for their thermistor (the two constants Ro and B) they can be calculated from two measurements taken at two different temperatures Tc1 and Tc2 (which yield two resistances Rx1 and Rx2):

B=((Tc1+273)*(To+273)*(ln(Rx1)-lnRo))/(To-Tc1)

(To is usually taken to be 20 or 25 degrees C)

and:

lnRo=((ln(Rx2)*Tc2-ln(Rx1)*Tc1+273*ln(Rx2)-273*ln(Rx1))*To+
((ln(Rx1)-ln(Rx2))*Tc1+273*ln(Rx1))*Tc2-273*ln(Rx2)*Tc1)/((Tc2-Tc1)*To+
273*Tc2-273*Tc1)

and so:
Ro=e^(lnRo)

The formula for lnRo is much simpler if we use Kelvin and ln(R) for all the resistances instead of just R:
lnRo=-(((R2-R1)*T1-R2*To)*T2+R1*To*T1)/(To*T2-To*T1)

where R1 and R2 are in units of natural log Ohms, and T1, T2, and To are in Kelvin,

but probably nobody likes doing it that way :)
 
Last edited:
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading

 
Top