Importing a model or a sub-circuit into LTSpice #026


 In LTSpice a model is used for : resistors, capacitors, inductors, ferrite beads, diodes, bipolar transistors, J-FETs, and MOS-FETs.
 A sub-circuit model is used  to combine models and its used for ICs like op-amps.


example of a model using transistor BC638

 The page "http://ltwiki.org/index.php?title=Components_Library_and_Circuits"  contains an expanded version of the files "(...)Documents\LTspiceXVII\lib\cmp\*.*" named Standard.zip, inside the file standard.bjt  contains more models for standard bipolar junction transistors.
 Either extract all files into the LTSpice \lib\cmp\ folder or, open standard.bjt with a text editor, and copy the line containing the model.

 for this example, the following line will be copied :

.MODEL BC638 PNP(... ... ...)

and placed at the end of the standard.bjt

Now after creating a new schematic and adding a pnp component, the option to add BC638 appears:








example of a sub-circuit model using darlington transistor TIP126

first find the spice model to download using google or :

 http://ltwiki.org/
 https://www.onsemi.com/support/design-resources/models








example of a sub-circuit using Operation Amplifier LM358

do a web(google) search for the TI(Texas Instruments) part, and go to TI web page, in this case :

https://www.ti.com/product/LM358/toolssoftware

the PSpice Model available includes LM358 and LM904, in fact bolth these parts numbers share the same datasheet and are considered general purpose amplifiers.

the .zip file contains the file LMx58_LM2904.CIR, extract the file to the same folder where the simulation file is.

Open LTSpice, create a new schematic and to include  the file : Edit >  SPICE Directives, and type:
.include LMx58_LM2904.CIR


the .CIR file is a text file and it contains a line with: .subckt LMX58_LM2904 (...), the text after .subckt must be the name of the component that will use the simulation file, example :




To permanently add the PSPice model to LTSpice, open the .CIR file with LTSpice > File > Open, select the line containing .subckt AAAbbbCCC, right click and select Create Symbol:


answer yes to automatically create symbol (...) and the PSPice model is now available for all schematics as an component:



Adding a new transistor


Comments