convert pspice models to be used in LTspice?

Thread Starter

ak52

Joined Oct 15, 2014
230
Hello everyone,

Is there anyway to convert a pspice model so that i can use it in LTspice?
I current have an instrumentation amplifier INA2128U ,and i want to simulate it in LTspice.
I downloaded the spice model from TI website.
 

Attachments

kubeek

Joined Sep 20, 2005
5,795
Do you need to simulate exactly this model? You could use the E component (a voltage dependent voltage source) to mimic the functionality of a differential amplifier, but you need to be careful about the boundary conditions like input common mode range and output range.
 

crutschow

Joined Mar 14, 2008
34,427
Attached are the two files you need for LTspice.
I modified an appropriate LTspice .asy symbol file to access the 1N2128 .lib file.

Put the .lib file in C:\Program Files (x86)\LTC\LTspiceIV\lib\sub directory.
Put the .asy file in C:\Program Files (x86)\LTC\LTspiceIV\lib\sym\Opamps directory

Make a backup copy of both those directories first.

Close and open LTspice to make the new device available.

Here's a demo of the IC for a gain of six:

Edited 4/12/17 to correct error in the symbol modification explanation.
Added dummy pins were not needed.


upload_2017-4-11_13-57-14.png
 

Attachments

Last edited:

Thread Starter

ak52

Joined Oct 15, 2014
230
Thanks for the files :)
Could you please tell me how to make my own components in LTspice,where do i start,is there any refernce material to go through?

I have a few more ICs(optocouplers,ADCs,DACs,serial converters..etc) which i need to simulate

Many thanks again,
AK
 

Bordodynov

Joined May 20, 2015
3,179
As it is spoken: do not let's him fish, but give fishing rod!
HELP==>
Automatic Symbol Generation

A symbol can be automatically generated in two situations.

When editing a schematic, you can execute menu item Hierarchy=>Open this Sheet's Symbol. When no symbol is found, LTspice will ask if you would like one automatically generated. This symbol then can be used to call this sheet of circuitry in some higher level schematic.

Also, when editing an ASCII netlist that contains subcircuit definitions, you place the cursor on the line containing the name of the subcircuit, right click, and execute context menu item "Create Symbol." For most users, this is the only method you should consider for adding third-party models defined as subcircuits since all the details are handled for you.
 

crutschow

Joined Mar 14, 2008
34,427
My approach is to find a schematic symbol .asy file in the C:\Program Files (x86)\LTC\LTspiceIV\lib\sym directories and then click to edit it in the LTspice editor, changing it to match the .lib file you have.
Here's an example symbol in the edit window:
upload_2017-4-11_23-45-47.png

Right-click on each pin to edit it's name and netlist number.
The number must correspond to the netlist connections in the .lib/.sub file as shown here:

upload_2017-4-11_23-51-28.png

The symbol netlist number corresponds to the position of the connections in the .lib/.sub file starting with number 1 on the left.
Thus, for example, symbol Netlist pin 3 corresponds to node 99 in the LM324.lib file.

You also go to the Symbol Attribute Editor to add the .lib/.sub file it should connect to as well as the part designation and description:
upload_2017-4-11_23-55-31.png

When you've make the needed changes you do a Save As with he new symbol name corresponding to the IC designation.
The .lib/.sub files go in the C:\Program Files (x86)\LTC\LTspiceIV\lib\sub directory.
The .asy file goes in the appropriate C:\Program Files (x86)\LTC\LTspiceIV\lib\sym directory.

Note that most standard .lib Spice files will work but some use unique characters or designations that will give an error and you may have to do some sleuthing to correct the problem.
 
Last edited:
Top