### Author Topic: EEVblog #301 - LTspice Temperature Sweep Tutorial  (Read 10889 times)

0 Members and 1 Guest are viewing this topic.

#### EEVblog

• Posts: 32026
• Country:
##### EEVblog #301 - LTspice Temperature Sweep Tutorial
« on: June 28, 2012, 08:10:13 am »

Dave.

#### jahonen

• Super Contributor
• Posts: 1046
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #1 on: June 28, 2012, 10:32:01 am »
One thing that should be noticed, not all component models have temperature effects modeled. Even for resistors, you must put temperature coefficient in by yourself. So instead of 10k, you put something like "10k tc=100e-6" to have 10k 100PPM resistor.

Regards,
Janne

#### Stephen Hill

• Regular Contributor
• Posts: 178
• Country:
• M3VXY
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #2 on: June 28, 2012, 11:52:48 am »
One thing that should be noticed, not all component models have temperature effects modeled. Even for resistors, you must put temperature coefficient in by yourself. So instead of 10k, you put something like "10k tc=100e-6" to have 10k 100PPM resistor.

Regards,
Janne

Good tip

#### Stephen Hill

• Regular Contributor
• Posts: 178
• Country:
• M3VXY
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #3 on: June 28, 2012, 11:55:34 am »
On that very last oscillator circuit it was interesting to see that temperature not only affected the amplitude but also the phase of the sine wave.

#### EEVblog

• Posts: 32026
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #4 on: June 28, 2012, 12:00:26 pm »
One thing that should be noticed, not all component models have temperature effects modeled. Even for resistors, you must put temperature coefficient in by yourself. So instead of 10k, you put something like "10k tc=100e-6" to have 10k 100PPM resistor.

Yes, good point. Should have mentioned that.

Dave.

#### nitro2k01

• Frequent Contributor
• Posts: 844
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #5 on: June 29, 2012, 03:45:38 pm »
One minor complaint. In the two transistor circuit, you're probing the current through R1. What you should have done is place a dummy load at the collector of Q1 and measure the current through that resistor. (I believe that's where you'd typically place the load in this type of constant current circuit.) Currently a tiny bit of current will escape through the base of Q2, which might distort the values you're after when you're comparing tenths of milliamps. I know it's a tiny detail, but what do you call it, "a trap for young players."
Whoa! How the hell did Dave know that Bob is my uncle? Amazing!

#### codeboy2k

• Super Contributor
• Posts: 1838
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #6 on: July 01, 2012, 12:06:49 pm »
There's many unknown things about LTSPICE.

You can easily step the values of resistors, capacitors, voltages and other numeric quantities.
The .STEP spice command only takes a numeric list.

But you can also alias a number to a spice model using the ako: notation (A Kind Of)
then you can step the list of numbers if you wanted to step a transistor over 4 different values.

So in Dave's 2-transistor current source, he could set the transistor value to {Qx}

.model 2222 ako:2n2222
.model 3904 ako:2n3904
.model 4124 ako:2n4124
.model 849   ako:ztx849
.step param Qx list 2222 3904 4124 849

and you would see the effects of changing transistors.

You can also have multiple .step spice commands, it will run them all, so you can step temperature over each transistor change.

#### Bored@Work

• Super Contributor
• Posts: 3932
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #7 on: July 01, 2012, 12:25:52 pm »
There's many unknown things about LTSPICE.

Like all the stuff listed here http://ltwiki.org/index.php5?title=Undocumented_LTspice ?

Quote
You can easily step the values of resistors, capacitors, voltages and other numeric quantities.

Like  http://ltwiki.org/index.php5?title=Undocumented_LTspice#Stepping_a_Model ?
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List

#### codeboy2k

• Super Contributor
• Posts: 1838
• Country:
##### Re: EEVblog #301 - LTspice Temperature Sweep Tutorial
« Reply #8 on: July 01, 2012, 01:14:38 pm »
Wow! there's lots more.  I'm reading.

I learned that stepping transistors trick from a guy at work. I thought it was pretty cool.  I've used it for stepping diodes too.

Smf