Introduction: How to Use a Manufacturer Supplied Model in LTspice
LTspice does come with its own libraries of models. It is quite extensive and unsurprisingly, it contains a great deal of Linear Technologies components (as it is somehow “sponsored” by LT). The idea is to describe a model for an operational amplifier with a schematic symbol for that particular model and how to use the symbol (together with the associated model) in a simulation. As an example, the circuit that will be simulated will be a simple repeater, based on the LMV321 opamp from Texas Instruments.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Spice Model
The first step which needs to be performed is to get the SPICE model for this particular component. Fortunately, it is available here. You should copy the text available at that location and then paste it in an empty text file on your computer. Once you do that, save the new text file under the name of “custom.lib” at the following location: C:\Program Files\LTC\LTspiceIV\lib\sub\custom.lib. Of course, this assumes you have installed the LTspice program under the default path, in the C:\Program Files folder.
Step 2: Symbol (1)
Once you have successfully created and saved the new library, the next step is to create the symbol for the operational amplifier. Fortunately, LTspice provides the means for doing this, and what you need to do is to choose the correct option: File->New Symbol.
Step 3: Symbol (2)
A new workspace is open where you may now draw the new symbol. The main tool used to draw a symbol is the “Line” tool, which you can access from the top menu: Draw->Line. After successfully selecting the “Line” tool, you should draw the symbol of an opamp like in the picture
Step 4: Add Pins & Texts
Once the shape of the symbol is completed, you need to add the pins. You access the “Pin/Port” by pressing the “P” key. This brings up the “Pin/Port Properties” message box, where you can edit the attributes of the pin you will be placing. Once the pins are placed, you should also add some text that will indicate the function of each pin when you place the symbol on the schematic. You can easily access the “Text” tool by pressing the “T” key. At this stage, the symbol is pretty much ready.
Step 5: Attributes (1)
Everything else you need to do is to edit its other significant attributes and to associate it with the subcircuit description form the custom.lib library file which you have created earlier. To access the attributes of the symbol, you need to choose from the top menu: Edit->Attributes-Edit Attributes. This will bring on the screen the “Symbol Attribute Editor” message box, where you should fill in the values of the attributes as shown in figure.
Step 6: Attributes (2)
Once you have filled in the attributes as explained, all you need to do before the symbol is ready is to indicate LTspice which attributes you want to make visible on the symbol by choosing from the top menu: Edit-Attributes->Attribute Window. This will pop up the “Attribute Window to Add”, where you have a list of
the attributes of the symbols which may be displayed in the schematic.
Step 7: Symbol Is Done! Start With Simulation
That’s it now! The new symbol and the associated model description are ready to be used in a new schematic. You should save it under: C:\Program Files\LTC\LTspiceIV\lib\sym\Opamps\LMV321.asy. Now, we will simulate a simple repeater circuit built around the LMV321 symbol which have just created. Before proceeding, close the LTspice application and then open it again, in order to allow it to update and refresh its internal list of symbols and models. Once done that, create a new schematic and draw this circuit. The symbol for the LMV321 may be found under the OPAMPS subfolder of the library folders
Step 8: Simulation!
The circuit will be simulated for 1000us, with a time step of 10ns. Once run the simulation you should plot the signals at the output of the opamp and the signal at its non-inverting input. As described in this article, there are a few necessary steps required in order to integrate a manufacturer defined model in your LTspice simulation. This method, however, only refers to models which are defined by the “.SUBCKT” directive. A different way of using a manufacturer defined model for transistors and diodes can be used. A full documentation is available on the following link http://dev.emcelettronica.com/how-to-use-a-manufacturer-supplied-model-in-ltspice.