Author Message
 Post subject: How do I attach manufacturer Spice Model to a component?
PostPosted: 27 Feb 2016, 13:31 
Offline

Joined: 27 Feb 2016, 13:01
Posts: 2
Hi

I have installed LTspice IV and can run it ok with the Astable Flip Flop cct in "Examples" folder.

However, when I build my own schematic using the provided library, the 2N4401 has no Spice model - which I find disappointing as my other PCB software has spice models for nearly all the library components.

In the tutorial it says that the Spice model for the 2N4401 in the example cct was taken from the manufacturer's web site and applied to the component, but there is no explanation as to how this is done!

There is a "Get Spice Model from Library" button, but the downloaded (supposedly compatible) Spice Model is a .mod file, and I can find no way of getting it into a Library that DipTrace will recognise.

I have spent the best part of a day just going round in circles. Can some kind soul give me some help on this please - it's driving me mad!

Thanks,

Alan.


Top
 Profile  
 
 Post subject: Re: How do I attach manufacturer Spice Model to a component?
PostPosted: 28 Feb 2016, 11:55 
Offline
Expert

Joined: 20 Jun 2015, 14:39
Posts: 945
Since I have never done anything with Spice models, and my ignorance and inexperience regarding any subject have never stopped me from dispensing "expert advice" before, be forewarned. I hope the following sheds a little more light on the subject as it pertains to DipTrace and perhaps can be used as a jumping off point. If you are already aware of the information provided below, let me apologize in advance for wasting your time...

DipTrace example
1) Open the Component Editor and select the Components group (standard component libraries supplied with DipTrace).
2) In the library list above the Library Tools panel, click on Spice Models.
3) In the components list below the Component Tools panel, select BJT_NPN_2N5551.
4) In the Main Menu at the top of the screen select Component > Spice Settings...
5) Observe the settings and loaded data.

Loading Spice data
1) Create your own custom "Spice Models" folder in your custom library directory (hopefully not the same directory in which Diptrace resides).
2) Store your manufacturer's Spice model file in your new "Spice Models" folder. It should be some sort of ASCII text file. If DipTrace doesn't recognize it, try changing the file extension to "txt".
3) Open the Component Editor and select the User Components group (your custom component libraries).
4) Select your component (2N4401).
5) In the Main Menu at the top of the screen select Component > Spice Settings...
6) In the Spice Settings dialog window, select BJT in the Model Type drop-down list.
7) Select the Model tab and click on the [Load] button.
8) Select the appropriate Spice model file that you stored in your custom "Spice Models" folder.
9) Select OK and then resave the library file.

DipTrace Spice Help
1) In the Main Menu, select Help then Component Editor Help.
2) In the Component Editor Help window, select the Contents tab.
3) Open the topics [+]Component Editor, [+]Working with Component, then [?]Spice Settings.

For your perusal, I have attached a PSpice file that I downloaded off the web (2N2222A.zip) and loaded into my custom 2N2222A component using the [Load] button under the Model tab. Haven't tried a simulation with it, though, and the data format looks different...

Example of format seen in standard DipTrace library
.model 2n5551 NPN (Is=2.511f Xti=3 Eg=1.11 Vaf=100 Bf=242.6 Ne=1.249 Ise=2.511f Ikf=.3458 Xtb=1.5 Br=3.197 Nc=2 Isc=0 Ikr=0 Rc=1 Cjc=4.883p Mjc=.3047 Vjc=.75 Fc=.5 Cje=18.79p Mje=.3416 Vje=.75 Tr=1.202n Tf=560p Itf=50m Vtf=5 Xtf=8 Rb=10)

Example of format seen in download (PSpice)
.MODEL Q2n2222a npn
+IS=3.88184e-14 BF=929.846 NF=1.10496 VAF=16.5003
+IKF=0.019539 ISE=1.0168e-11 NE=1.94752 BR=48.4545
+NR=1.07004 VAR=40.538 IKR=0.19539 ISC=1.0168e-11
+NC=4 RB=0.1 IRB=0.1 RBM=0.1
+RE=0.0001 RC=0.426673 XTB=0.1 XTI=1
+EG=1.05 CJE=2.23677e-11 VJE=0.582701 MJE=0.63466
+TF=4.06711e-10 XTF=3.92912 VTF=17712.6 ITF=0.4334
+CJC=2.23943e-11 VJC=0.576146 MJC=0.632796 XCJC=1
+FC=0.170253 CJS=0 VJS=0.75 MJS=0.5
+TR=1e-07 PTF=0 KF=0 AF=1

If DipTrace ignores the format in the download example (PSpice), I suppose you could try adding parentheses, deleting the "+" characters and placing it all on one line to mimic the DipTrace example, like this...
.MODEL Q2n2222a npn (IS=3.88184e-14 BF=929.846 NF=1.10496 VAF=16.5003 IKF=0.019539 ISE=1.0168e-11 NE=1.94752 BR=48.4545 NR=1.07004 VAR=40.538 IKR=0.19539 SC=1.0168e-11 NC=4 RB=0.1 IRB=0.1 RBM=0.1 RE=0.0001 RC=0.426673 XTB=0.1 XTI=1 EG=1.05 CJE=2.23677e-11 VJE=0.582701 MJE=0.63466 TF=4.06711e-10 XTF=3.92912 VTF=17712.6 ITF=0.4334 CJC=2.23943e-11 VJC=0.576146 MJC=0.632796 XCJC=1 FC=0.170253 CJS=0 VJS=0.75 MJS=0.5 TR=1e-07 PTF=0 KF=0 AF=1)


You do not have the required permissions to view the files attached to this post.

_________________
Tom


Top
 Profile  
 
 Post subject: Re: How do I attach manufacturer Spice Model to a component?
PostPosted: 29 Feb 2016, 07:47 
Offline

Joined: 27 Feb 2016, 13:01
Posts: 2
Thanks Tom.

That info was enough to get me started - I have managed to get some spice models loaded and saved ok.

Unfortunately I do find the Library structure to be overly complex and awkward to work with compared to my other software - but thats a whole new story!

Your help and guidance was most useful in acheiving my current objective, for which I am most grateful.

Regards

Alan.


Top
 Profile  
 
 Post subject: Re: How do I attach manufacturer Spice Model to a component?
PostPosted: 29 Feb 2016, 11:51 
Offline
Expert

Joined: 20 Jun 2015, 14:39
Posts: 945
Hi Alan,
There is always confusion regarding the DipTrace library system. I just posted a "getting started" mini-guide to help those new to DipTrace quickly gain a basic understanding of its library structure. It is an extremely rudimentary attempt and is as accurate as my experience and "knowledge" on this subject allow. Here's the link - http://www.diptrace.com/forum/viewtopic.php?f=5&t=10937

_________________
Tom


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group