LT Spice supplies default libraries for devices produced by its own company i.e. Linear Technology. However we can add models of other (third party) devices for example the DB3 Diac, MOC3021optocoupler, etc. For including these in an LTspice schematic, one needs to download a Spice model for that particular component, usually available on the manufacturer’s site, and include it in the schematic.
Getting the LTSpiceIV
You can get the LTspiceIV software from the link:
http://www.linear.com/designtools/software/#LTspice
Add Spice Library To Ltspice
In this tutorial video I look at the various ways in which simulation libraries and component models can be imported to the LTspice simulator, one of which i.
Ltspice Add Library
If you have installed LT Spice, it can be found in the folder:
Computer-> C -> Program Files ->LTC -> LTspiceIV
The component libraries will be found in “lib” folder under the LTspiceIV folder. The “lib” folder contains the “cmp” folder, the “sub” folder which holds the .sub or .lib files, and the “sym” folder.
Hi can anyone point me to the link for 180nm nmos/pmos model for LTSpice. I am trying to simulate an inverter for 180nm technology and I cant find the 180nm library anywhere. Have a look at the link below for more information on importing 3rd party spice models. Personally I do not import them into the standard library. If I ever have to reinstall LTSpice, I believe the standard library (hence all your models) gets deleted. I keep all the models in a separate directory.
An ICAP/4 product update. All current library files in the part database are shown in the list on the left of the New Model dialog. To save to a new library file, type a unique library name, then press the OK button. You can select an existing library file and keep on adding new models to the same library file. This is the process I have used to add.LIB files from ONsemi and.SPI files from IRF into my LTSPICE program. In case of SPI file just rename it to a LIB file. Then place the LIB file in /SPICE/LIB/sub directory. Select a component file (with extension.asy) that looks like your new one from lib sym. Lets say nmos.asy.
• The “cmp” folder contains standard model data for passive components, diodes, transistors, FET's etc.
• The “sub” folder contains Files are ASCII text with ‘.mod’ ‘.sub’ or ‘.lib’ file extensions. These files are actually sub-circuit files that contain models of different components created for Spice domain.
• The “sym” folder contains the circuit symbols in ‘.asy’ format. These are the files that contain the symbol, which is shown in the schematic, for the added component.
Types of Components in Spice
Before starting with the methods to include new components into a schematic, it is essential to understand that there are two kinds of components that can be added:
• Intrinsic Components that are simple or commonly used components like resistors, diodes, MOSFETs, etc.
• Extrinsic Components representing complex components like OpAmps, Triacs, etc.
To add an intrinsic component, a ‘.model’ file needs to be saved in the LTCLTspiceIVlibsub directory and for an extrinsic component, a ‘.subckt’ file needs to be added.
Steps to include new device/ component models into an LT Spice schematic:
METHOD 1:
1) Firstly, one needs to download the required device model having a .lib extension. For example, the URL for downloading the lib file for the Sensitive gate Triac MAC08MT1 is:
http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&category=826
2) Then, open the downloaded file using Notepad. The model file can be seen.
3) In the Spice schematic where the component needs to be added, place a component having the same configuration (structure/functionality) as the required component. For example, in case of adding Triac MAC08MT1, the TRIAC.asy symbol in the LTCLTspiceIVlibsymMisc folder may be used.
4) After adding the component symbol, press Ctrl key and right click on the symbol and change the ‘Value’ attribute of the component and enter the name that appears in the .subckt (for extrinsic devices) or .model (for intrinsic devices) statement of the opened notepad file of the required component. For example:
.SUBCKT MAC08MT1 MT2 gate MT1 PARAMS:
Note: In case an extrinsic component, like Triac here, is to be added, then, after pressing Ctrl+Right click on the symbol change the prefix attribute to X which means that this is not an intrinsic device like a diode, or transistor, etc.
5) Now a Spice directive has to be added by clicking on the ‘.op’ tab on the right most corner of the toolbar. In the dialog box that opens select Spice Directive and include the file in the schematic by prefixing the filename by '.inc' . For example:
.inc MAC08MT1.lib
This will add the component to the schematic and it may now be simulated.
METHOD 2:
1) Once the downloaded file is opened using notepad, one can copy the entire model into the simulation file.
2) For this, open the spice Directive by clicking on ‘.op’. Select the ‘comment’ option and paste the entire text of the model file in the space provided. Using this method one can safely port the schematic file to another system since the entire model of the added component lies in the schematic itself.
Note: Name of the file in the .inc directive should match the actual filename of the downloaded model, while the Value attribute of the added device should be that specified in the .subckt or .model statement in the downloaded file.
Creating a new symbol while adding a component:
1) To give a new symbol for the component that is being added to the schematic, open the file in notepad.
2) In the file, place the cursor on the .subckt statement (from where you had copied the name for your device i.e. Value), right click on it and click on ‘Create Symbol’. A default symbol will be generated.
3) You may edit the symbol shape according to your requirement and save it.
4) This device symbol will now be available in the component library under the [AutoGenerated] section. If this auto generated symbol is used in your file, you do not need to put a .inc or .lib statement in your schematic.
It is possible in LTspice IV to create a new symbol from scratch for a third-party model but who has the time? Follow these easy steps to generate a new symbol for a third-party model defined in a subcircuit (.SUBCKT statement).
- Open the netlist file that contains the subcircuit definitions in LTspice (File > Open or drag file into LTspice)
- Right-click the line containing the name of the subcircuit, and select Create Symbol:
- Edit the symbol if needed and save.
To use the new symbol (and associated third party model) in a schematic, select the symbol from the AutoGenerated directory in the component library (F2) and place it in your schematic:
By using the automatic symbol generation you can focus on your simulations, not creating new symbols. For a more information on how to import third party models that use intrinsic SPICE device (.MODEL statement) see the video at www.linear.com/solutions/1083.