ltspice models

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
Hi,
im trying to make an accurate simulation for my circuit, need to make a model for diodes.com part DSS4160V-7, they dont have this as a simulation model in their libraries, so i wonder, how do i make a model for it?
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
yes.. a little but, i dont have the spice model, so i dont know how to write the model?
and i dont quite understand where im meant to put the .include for subckt models either
sorry if im being a pain
 

SgtWookie

Joined Jul 17, 2007
22,230
Diodes Inc. doesn't have that particular model, but they have this one:
*
*DIODES_INC_SPICE_MODEL
*ORIGIN=DZSL_DPG_GM
*SIMULATOR=PSPICE
*DATE=18/01/2010
*VERSION=1
*
.MODEL DSS4160U NPN IS=5E-13 BF=650 NF=1.005 VAF=58 IKF=2 ISE=6E-14 NE=1.4 BR=25
+ NR=1 VAR=16 IKR=1 ISC=4.8E-13 NC=1.44 RE=0.035 RB=1 RC=0.035 CJE=152E-12 VJE=0.8
+ MJE=0..4 CJC=27E-12 VJC=0.5 MJC=0.42 TF=0.5E-9 TR=25E-9 RCO=1.9 GAMMA=2E-8
+ QUASIMOD=1 XTB=1.35 TRE1=0.005 TRB1=0.004 TRC1=0.005
*
*$
There are certainly differences between the 160U and the 160V.

I'm curious as to how/why you chose that particular transistor? There are plenty of other transistors that ARE already modeled.
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
size, i have to fit the whole lot on a 19mm diameter board.. i do see your point, a SOT563 isnt a huge difference from SOT23, but at half the length (ish) its very useful.
the amplifier im using is SOIC 8 and takes up a fair bit of space
 

SgtWookie

Joined Jul 17, 2007
22,230
Your LTSpice software is stored somewhere similar to:
C:\Program Files\LTC\SwCADIII
Yours probably has an LTSpiceIV instead of SwCADIII; I've had mine installed a few years.

In the lib subdirectory, you should have the following subdirectories:
cmp - This directory contains libraries of models of bjt's, capacitors, diodes, inductors, jfets, mosfets, resistors, and MOSFETs.
sub - this is where you place .SUBCKT and .MODELs that don't go in the cmp libraries
sym - this is where symbols go; the graphic items that you place in the schematic.

The .model statement I pasted in my last reply goes in standard.bjt that is in the cmp folder.
You should make a backup copy of your standard.bjt in case you goof it up.
Then edit the standard.bjt file using Notepad, and paste the model into the file in an appropriate place; then save the file and exit.

The next time you start LTSpice, the model will be available for selection when you right-click on an NPN transistor. If you're already running LTSpice, the model won't show up until you exit and run it again.

That's the way you can add .MODELs to the standard libraries.
If you want to use .SUBCKTs, that's more involved. .SUBCKT libraries go in the lib\sub subdirectory.
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
cheers sgt. i changed the .bjt file, it said on running that it can't find the definitiion of model DSS4160U?
have i missed a step?
 

SgtWookie

Joined Jul 17, 2007
22,230
Ahhh, you did edit
C:\Program Files\LTC\LTSpiceIV\lib\cmp\standard.bjt
using Notepad, and you pasted that .model statement (the entire thing, like this: )
.MODEL DSS4160U NPN IS=5E-13 BF=650 NF=1.005 VAF=58 IKF=2 ISE=6E-14 NE=1.4 BR=25
+ NR=1 VAR=16 IKR=1 ISC=4.8E-13 NC=1.44 RE=0.035 RB=1 RC=0.035 CJE=152E-12 VJE=0.8
+ MJE=0..4 CJC=27E-12 VJC=0.5 MJC=0.42 TF=0.5E-9 TR=25E-9 RCO=1.9 GAMMA=2E-8
+ QUASIMOD=1 XTB=1.35 TRE1=0.005 TRB1=0.004 TRC1=0.005
and then you saved it?

And when you right-click on Q1 in your schematic, click "Pick New Transistor", it doesn't come up in the selection list?
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
no, it comes up in the selection list, when i go to run the simulation with that model/transistor, it says it cant find the model?
 

SgtWookie

Joined Jul 17, 2007
22,230
By the way, if you change R2 to 1.1k to get the signal back in range, and plot:
(V(input)-1.43)*1.6575 vs your output, you'll still see some error at the low end.
 

SgtWookie

Joined Jul 17, 2007
22,230
Are you certain that you copied all 4 of those lines into standard.bjt?

I'm getting puzzled here.

Try copying that .model statement again, and paste it into a SPICE directive box (click the .op on the far right of the menu) in LTSpice; place that directive anywhere in the schematic out of the way.
 

SgtWookie

Joined Jul 17, 2007
22,230
You should stick with resistor values that you can actually purchase. 50k is not a standard value; neither was 40k.

You'll need to adjust the math a bit for the (v(input)-x)*y to better match your new curve.
 
Top