Author Topic: LTspice - Temperature and parametric sweep at the same time (NTC problem)  (Read 2314 times)

0 Members and 1 Guest are viewing this topic.

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: 00
    • Personal resume
Guys,
I use LTspice quite a lot but today I ran in a trouble which I am not able to solve.
I have a simple resistor divider with an NTC. I'd like to see how my output changes with temperature (I am able to do this) and also how the bias resistor affects the curve.

I am able to run these two simulations independently, but I don't know how to make a plot, which puts the data together (Y-V(out), X(temp)). I tried to fiddle with .meas but with no luck.

Any tips for the magical trick?

Thanks in advance!

PS: Yes, I used google and spent significant time on this ;-) -> Wasn't lucky yet.

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3238
  • Country: gb
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #1 on: February 14, 2018, 10:09:34 am »
It doesn't make much sense to do something like this in Spice.  If you have the thermistor characteristic then it would be trivial to do what you want in Excel/Mathcad or equivalent.

EDIT:  Check the original spice models from Vishay, they come with an example circuit that does what you want.
« Last Edit: February 14, 2018, 10:17:48 am by mikerj »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #2 on: February 14, 2018, 11:12:45 am »
Your X axis is plotting Rbias.  Click it (where the cursor changes to a ruler) and enter temperature as the quantity to be plotted.

When asking about LTspice sims, please post your .asc file, and link to any extra component libraries required.  When asking about ploting problems, save the plot settings and zip up the .plt file with the .asc file.  You can also include libraries and symbols in the zip, but please don't  include the generated .raw, .net  or .log files, as .raw files especially can get very big.

I've recreated your sim using the Vishay LTspice models mikerj linked.   
 
The following users thanked this post: Warhawk

Offline orbanp

  • Regular Contributor
  • *
  • Posts: 168
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #3 on: February 15, 2018, 03:15:10 pm »
For Ian's simulation to run in LTspice IV copy "NTCS0603E3103_MT.asy" and "VISHAY_LTSPICE_Therm_MC.lib" files from the Vishay zip file into the folder where you put your simulation files from Ians's zip file.
Also add the line ".lib VISHAY_LTSPICE_Therm_MC.lib" to the schematics.

Peter
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #4 on: February 15, 2018, 04:53:57 pm »
Also add the line ".lib VISHAY_LTSPICE_Therm_MC.lib" to the schematics.
The explicit .lib statement isn't needed as the sim's thermistor U1 symbol NTCS0603E3103_MT.asy contains the attribute line
   ModelFile VISHAY_LTSPICE_Therm_MC.lib

The easiest way to get it running quickly is to unzip my files and all the Vishay model files to the same folder, though if you want to be picky, only the .lib and .asy mentioned above are actually required from the Vishay zip.
« Last Edit: February 15, 2018, 04:59:04 pm by Ian.M »
 

Offline orbanp

  • Regular Contributor
  • *
  • Posts: 168
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #5 on: February 17, 2018, 12:49:49 pm »
Quote from: Ian.M on Yesterday at 03:53:57 AM
The explicit .lib statement isn't needed as the sim's thermistor U1 symbol NTCS0603E3103_MT.asy contains the attribute line
   ModelFile VISHAY_LTSPICE_Therm_MC.lib

...
Hi Ian,

Thanks for pointing this out!
I never realized LTspice had this feature.
I guess you learn all the time...

Peter
« Last Edit: February 17, 2018, 12:56:46 pm by orbanp »
 

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: 00
    • Personal resume
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #6 on: February 17, 2018, 03:06:58 pm »
Your X axis is plotting Rbias.  Click it (where the cursor changes to a ruler) and enter temperature as the quantity to be plotted.

When asking about LTspice sims, please post your .asc file, and link to any extra component libraries required.  When asking about ploting problems, save the plot settings and zip up the .plt file with the .asc file.  You can also include libraries and symbols in the zip, but please don't  include the generated .raw, .net  or .log files, as .raw files especially can get very big.

I've recreated your sim using the Vishay LTspice models mikerj linked.

Ian.M - thanks for going to the effort and reproducing my design. I really appropriate it. Also, note taken when it comes to *asc files. This makes perfect sense. I am going to open your file right now. I was trying to change quantity to temperature/temp before I asked but I must have done something wrong. It did not work for me.

Offline WarhawkTopic starter

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: 00
    • Personal resume
Re: LTspice - Temperature and parametric sweep at the same time (NTC problem)
« Reply #7 on: February 17, 2018, 03:08:32 pm »
mikejr - I get your point but this is just a part of more complex simulation.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf