ltspice models

Discussion in 'General Electronics Chat' started by chrisw1990, Oct 24, 2011.

  1. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    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?
     
  2. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Last edited: Oct 24, 2011
  3. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    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
     
  4. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  5. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    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
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  7. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    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?
     
  8. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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: )
    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?
     
  9. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    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?
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  12. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    aha, placing it in an op box works =s
     
  13. chrisw1990

    Thread Starter Active Member

    Oct 22, 2011
    543
    41
    right, here we go, modifying the feedback network (40k with 10k to gnd) the pull down on the transistor can be upped to around 200..
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    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.
     
  15. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Keep an eye on how much current flow you're getting through Q1's emitter, and its' power dissipation.
     
Loading...