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.
I tried to simulate a NTC thermistor with Orcad Pspice lit.
following some models found on the web, I replaced the NTC by a VCCS with gain depending on TEMP.
Netlist is joined but simulation result does not seem to variate in function of temp. I must have done something wrong but what?
I have never had luck simulating sensors like thermistors. I have taken to replacing them with a potentiometer, or a combination of a fixed and a variable resistor, to mimic the minimum value (fixed resistor value with pot at 0 ohms) and the maximum value (fixed resistor + pot set to max) of the thermistor.
It is all about using either an exponential function or the Stienhart-Hart equation or some other analytical expression to model the resistance of the thermistor vs temperature. LTSpice has a couple of ways to make a resistance that is a function of some parameter, or of a node voltage or branch current.
I recently needed a thermistor to include in a temperature measurement system. I looked at the US Sensor 104JG1F thermistor sold by Digikey. They have the resistance vs temperature data for that thermistor as an Excel file (see the .xls file under Datasheets) . I got the data, and used Excel's curve fitting (trendline) to get a fifth-order polynomial that fits the resistance vs temperature data for the temperature range I am interested in.
I put that polynomial into a variable resistance in LTSpice, and was able to model the behavior of a more complex circuit that had the simulated thermistor in it. R3 is the thermistor. Note how I vary it using the parameter Rt.
I have attached the LTSpice sim for you. Note that the independent variable of the simulation is the temperature in degC (.step param C 94 240 5). I convert that to degF, because my thermistor model is written in terms of F (.param F= (C*9/5) + 32).
The .param Rt = -1.46778E-08*F**5 +... expression is the polynomial I fit through the supplied RvsF data I got from the maker.
LTSpice and PSpice have common roots, so everything I show here should work there. Note I plot the thermistor resistance,:the expression (V(d)-V(b))/I(R3) = Rt is in Ohms, and is plotted vs degC.
The current in R12 is what this circuit varies with temperature. Not interesting to you, but it was to me...
Thanks. Nice to see other ways of simulation. PSPICE has also the imbedded feature to let change R value with temp. but only until the second order T^2. The PSPICE simulation with GAIN = f(TEMP) has a big advantage and it is that it's exact (in my simulation, I did it very rough but I can add several Steinhart and Hart coefficients with powers of 1/TEMP to fit completely the data of manufacturer). My problem remains that , even if the gain changes strongly with TEMP, the voltage remains flat.......WHY????? I've seen the exact same simulation on the web and V(probe) changes exponentially.
I think you are missing the .step TEMP directive. Look at what I did in LTSpice to make it work:
If you want to vary only a thermistor, define your own parameter (F or C) like I did in my earlier examples. That way, the transistors in the circuit will not be varying with F or C, only if you use TEMP. The default value for TEMP=25 (degrees C).
I attached the LTSpice generated netlist. You might be able to run that in your simulator.
Thanks to the precious help of CB distribution (NL) for cadence products of ORCAD Pspice, I could be able to solve my problem. The VCCS i had used, was introduced with -place -Pspice part - source -VCCS.For this kind of source, the parameter TEMP cannot be used in the Gain. I had to select another library (ABM); then select Gvalue and for this source, the gain is an expression when TEMP takes the temperature parametric value. Thanks a lot anyway.
>for thermistors, I came to the conclusion thatthe principal market leader has developped PSPICE and I'm thus forced to go that way. When this will be done, I might explore the LTSPICE direction but I must make the breakthrough in PSPICE first. I'm new to all this so on the point of view of the user, can you convert one SPICE model to the other SPICE model????
Most of the time. Depends on how the model was originally written. I have been able to take models developed in PSpice and use them in LTSpice with about 99% success. You just found an example which might not work going the other way.
I used PSpice and Berkley Spice years ago, but about 10 years ago, I started using LTSpice, and have never looked back...
Look at what I arrived with Orcad Pspice. These are typical V(I) curves for NTC thermistors with self heating with ambient temperature as parameters.
If a specialist has arrived to the same result with LT spice, I would be keen to have some address for proper user model of a model so that I could build the same kind of curve with it. Thanks.
I know this article but , when I read it, it deals about PSPICE, my question is can you do the same in LT spice? I'm a beginner and i'm learning about all this. Seeing is believing.....there is a big difference between "It could be done" and " here is the concrete result". It took me 1 min to see all these articles as well but it took me hours to get the concrete result. maybe you're a big brain in spice.....I try to grab some concrete info.....
two questions about LT spice: when i simulate a thermistor in PSPICE i really need a VCCS G device (ABM) whose gain is an expression fuction of the variable TEMP. 1)Is there the possibilty now in LT SPICE to use conditional function of the type (if TEMP < 25, blah blah , other blah blah) 2) is the expression of the G device in LT SPICE limited to 132 characters? The functions defining the r-T curve of thermistors can be complex. Thank you in advance.
Read the LTSpice Help file entry for Behavioral Voltage/Current Source. The expression can contain math functions, Booleans, conditionals, node voltages and branch currents, etc.
I am not aware of a length restriction for the string...