Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

model parameters in LT Spice

1,191 views
Skip to first unread message

Michael Robinson

unread,
Oct 13, 2010, 4:41:09 PM10/13/10
to
I've just started using the free version of LT Spice and haven't had a
problem doing simulations as long as the components are in the library. Now
I need to do a simulation using a component that's not in the LT Spice
library, the 1N4001 diode. Somebody sent me the model for the 1N4001, which
is great. So my question is, after you put a diode symbol in the schematic,
how do you assign parameters to it? Here is the text I received for the
1N4001:
*SRC=1N4001;DI_1N4001;Diodes;Si; 50.0V 1.00A 3.00us Diodes, Inc. diode

.MODEL DI_1N4001 D ( IS=76.9p RS=42.0m BV=50.0 IBV=5.00u

+ CJO=39.8p M=0.333 N=1.45 TT=4.32u )

Based on the text for the diode models in LTSpice, I guess I need a string
of text that looks something like:

.model 1N4001 D( IS=76.9p RS=42.0m BV=50.0 IBV=5.00u

+ CJO=39.8p M=0.333 N=1.45 TT=4.32u )

First, obviously I put a diode symbol in the schematic; then what?


Bill Sloman

unread,
Oct 13, 2010, 5:05:54 PM10/13/10
to

Select the "edit" menu, scroll down to "SPICE directive", click on it,
and paste your text into the box that will come up. Once you have
pasted in the text you want, click on OK and position the block of
(black) text, on your circuit diagram. I once screwed up by pasting
the text in as comment rather than as a SPICE directive and failed to
notice that the relevant block of text in my circuit diagram was in
blue, not black.

--
Bill Sloman, Nijmegen

John Larkin

unread,
Oct 13, 2010, 5:25:09 PM10/13/10
to

He'll also have to make sure the schematic symbol and the .model line
have the same name. Like the diode should be D1 1N4001 and the
directive should be .model 1N4001 D(....

John

Message has been deleted

Joerg

unread,
Oct 14, 2010, 4:19:30 PM10/14/10
to
Fred Abse wrote:
> Add the 1N4001 model to the end of the standard.dio file in your lib/cmp
> directory. It will then appear as one of the diode options from the
> standard symbol.
>
> You need to restart LTSpice for the change to take effect.
>

Careful. Next time you update the software it might be gone :-)

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.

Jim Thompson

unread,
Oct 14, 2010, 4:36:50 PM10/14/10
to
On Thu, 14 Oct 2010 13:19:30 -0700, Joerg <inv...@invalid.invalid>
wrote:

Yup. Learned that a long time ago. Personalized components go into a
separate libraries, mylib.lib (models) and mylib.slb (symbols), so
updates don't overwrite add-ins.

...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |

I can see November from my house :-)

Joerg

unread,
Oct 14, 2010, 4:53:47 PM10/14/10
to

What, no personalized files? thompsontrannys.lib or something?

I always keep looking in jscsupply.lib, for chocolates, but can never
find any ...

Jim Thompson

unread,
Oct 14, 2010, 5:36:17 PM10/14/10
to
On Thu, 14 Oct 2010 13:53:47 -0700, Joerg <inv...@invalid.invalid>
wrote:

Sure! That's what mylib.lib is...

98 .SUBCKT entries

142 .MODEL entries

And then there's mylib.slb, symbols, with 667 entries... I've created
many symbols to ease importing subcircuits created by others, portions
of chips designed by the customer, posts here, datasheet subcircuits,
etc.

Examples are given on the "Subcircuits & Symbols" and
"S.E.D/Schematics" pages of my website.

>
>I always keep looking in jscsupply.lib, for chocolates, but can never
>find any ...

It's nearing Halloween... my wife has to keep buying and buying and
buying... :-)

Joerg

unread,
Oct 14, 2010, 5:49:39 PM10/14/10
to
Jim Thompson wrote:
> On Thu, 14 Oct 2010 13:53:47 -0700, Joerg <inv...@invalid.invalid>
> wrote:

[...]

>> I always keep looking in jscsupply.lib, for chocolates, but can never
>> find any ...
>
> It's nearing Halloween... my wife has to keep buying and buying and
> buying... :-)
>

We always keep a stash on hand for Halloween. But it's hit or miss. One
year lots of kids come, other years none. Because we are located at a
cul-de-sac, long driveway and all uphill. Then I'll have to eat some and
we bring a big bag to church.

Jon Kirwan

unread,
Oct 14, 2010, 6:36:40 PM10/14/10
to
On Thu, 14 Oct 2010 13:19:30 -0700, Joerg
<inv...@invalid.invalid> wrote:

><snip>


>Careful. Next time you update the software it might be gone :-)

My experience with this, and yes I've done it with the BJT
file, is that the update protects additions. So that's a
good thing. Might change at any time, though. Or maybe is
already changed? Risky.

Jon

Jim Thompson

unread,
Oct 14, 2010, 6:44:45 PM10/14/10
to
On Thu, 14 Oct 2010 14:49:39 -0700, Joerg <inv...@invalid.invalid>
wrote:

>Jim Thompson wrote:
>> On Thu, 14 Oct 2010 13:53:47 -0700, Joerg <inv...@invalid.invalid>
>> wrote:
>
>[...]
>
>>> I always keep looking in jscsupply.lib, for chocolates, but can never
>>> find any ...
>>
>> It's nearing Halloween... my wife has to keep buying and buying and
>> buying... :-)
>>
>
>We always keep a stash on hand for Halloween. But it's hit or miss. One
>year lots of kids come, other years none. Because we are located at a
>cul-de-sac, long driveway and all uphill. Then I'll have to eat some and
>we bring a big bag to church.

Pretty much the same here. End of cul-de-sac, uphill, no youngsters
on the block. Used to be bus-loads of Hispanics, but none in recent
years.

Michael A. Terrell

unread,
Oct 14, 2010, 7:20:03 PM10/14/10
to

Joerg wrote:
>
> We always keep a stash on hand for Halloween. But it's hit or miss. One
> year lots of kids come, other years none. Because we are located at a
> cul-de-sac, long driveway and all uphill. Then I'll have to eat some and
> we bring a big bag to church.


Being diabetic, I don't buy any candy.

I've lived here 11 years and never had one 'Trick or treater' so
apparently the stores I spread about the dangerous, crazy old man at the
end of the street is still working! ;-)


--
Politicians should only get paid if the budget is balanced, and there is
enough left over to pay them.

Joerg

unread,
Oct 14, 2010, 9:57:13 PM10/14/10
to

Yup. That's like not backing up anything and then one sunny day ... poof
... gone.

Michael Robinson

unread,
Oct 15, 2010, 1:37:27 PM10/15/10
to

"Michael Robinson" <nos...@billburg.com> wrote in message
news:nPoto.5183$0R7....@newsfe09.iad...
Thanks for the answers, all.


Message has been deleted
Message has been deleted

Joerg

unread,
Oct 15, 2010, 3:21:28 PM10/15/10
to
Fred Abse wrote:
> From the manual:
>
> "Component databases are merged in
> the update process so if you've added devices to your
> installation, those additions won't be lost when you run
> the automatic update utility."
>
> I'd still keep backups, though.
>
> I don't update very often (IIABDFI). Running apps under wine, I'm leery of
> changes.
>

I found that the update function never worked here. So when I update
it's a clean slate re-install and that wipes just about everything. Even
if it didn't I wold not take that risk. Losing a large number of SPICE
models can throw an engineer a real curve.

Charles

unread,
Oct 15, 2010, 6:37:40 PM10/15/10
to

Rich Grise

unread,
Oct 15, 2010, 6:38:26 PM10/15/10
to
On Thu, 14 Oct 2010 14:49:39 -0700, Joerg wrote:
> Jim Thompson wrote:
>> On Thu, 14 Oct 2010 13:53:47 -0700, Joerg <inv...@invalid.invalid>
>> wrote:
> [...]
>>> I always keep looking in jscsupply.lib, for chocolates, but can never
>>> find any ...
>>
>> It's nearing Halloween... my wife has to keep buying and buying and
>> buying... :-)
>>
> We always keep a stash on hand for Halloween. But it's hit or miss. One
> year lots of kids come, other years none. Because we are located at a
> cul-de-sac, long driveway and all uphill. Then I'll have to eat some and
> we bring a big bag to church.

I had a neighbor once who said that he'd just put a bowl out there with
a sign: "One candy per kid!"

I asked, "How do you be sure some kid doesn't take them all?"

He said, "Oh, you don't put any candy in it - just the bowl and the sign."
(the premise being that they'll all assume the previous kids got it all.)
;-)

Cheers!
Rich

Phil Hobbs

unread,
Oct 15, 2010, 11:57:50 PM10/15/10
to
On 10/14/2010 11:45 AM, Fred Abse wrote:
> On Wed, 13 Oct 2010 16:41:09 -0400, Michael Robinson wrote:
>
> Add the 1N4001 model to the end of the standard.dio file in your lib/cmp
> directory. It will then appear as one of the diode options from the
> standard symbol.
>
> You need to restart LTSpice for the change to take effect.
>

It's worth keeping file with all your additions to each of the standard
ones, because otherwise the next update will wipe you out.

Also I've recently learned the hard way that it's even more helpful to
include all the models explicitly, and keep the ones you're using in the
same directory as the simulation--one directory per project, or maybe more.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net

Jim Thompson

unread,
Oct 16, 2010, 12:33:25 PM10/16/10
to

I have at least 90 different device libraries... each provided by a
foundry.

MANY have NMOS/PMOS as device names or other such replications.

So I don't automatically load anything but garden variety components,
generic resistors, capacitor, etc... and my PSpice
gimmicks-for-ease-of-measuring tool sets.

Each test schematic has one or more .LIB calls to libraries needed for
that particular project only. This approach also makes it easier to
swap between typical and worst-case versions of libraries.

I certainly believe in one directory per project... at the top level,
then sub-directories for each cell (chip design).

But I don't keep my device libraries there. After all the .LIB
statement _can_ contain path information :-)

If there's a fear of a huge library... not-to-worry. PSpice provides
a compression technique that contains only the components used... to
pass a schematic along to an associate.

qrk

unread,
Oct 16, 2010, 4:33:52 PM10/16/10
to
On Thu, 14 Oct 2010 13:19:30 -0700, Joerg <inv...@invalid.invalid>
wrote:

>Fred Abse wrote:

LTspice seems to be friendly about keeping your additions, even after
updating.
--
Mark

Joerg

unread,
Oct 16, 2010, 8:46:09 PM10/16/10
to


On my PCs the update never worked. It requires a clean re-install every
time. Always has :-(

Probably some firewall action.

0 new messages