EMA Academy

Quick How-Tos

Home > EMA Academy > How-Tos > How to Assign 3rd Party Simulation Models in PSpice

How to Assign 3rd Party Simulation Models in PSpice

While the model libraries included in OrCAD PSpice are extensive, they don’t evolve with the introduction of new electrical components. To keep up with these new additions, many manufacturers provide models for their components so an accurate circuit simulation can be produced. Easily import 3rd party models and generate the required format for simulation with PSpice.

This how-to will provide step-by-step instructions for importing 3rd party simulation models in text file format and .lib file format.

To follow along, download the provided files above the table of contents.

Simulation Models in .lib Format

This section of the how-to will provide instructions on importing a .lib model file into PSpice for simulation.

Opening a PSpice Library

Step 1: Open the provided design, SineAmp.dsn, in OrCAD PSpice Designer.

ThirdParty1 Step2
Opening a PSpice Library

Step 2: Select File > Open > PSpice Library from the menu.

Step 3: Navigate to the 2STR1215.lib file included in the provided files and open it.

Note: Any .lib files downloaded from outside sources must be modified and configured for PSpice. Therefore, the 2STR1215.lib file must be modified as well to be usable.

Using PSpice Model Editor

ThirdParty1 Step4

Step 4: The PSpice Model Editor will open as well as the Select Design Entry Tool window. Select Capture and choose Done.

ThirdParty1 Step5
Selecting a Model in PSpice Model Editor

Step 5: From the Models List on the left, select 2STR1215.

Step 6: The SPICE model file will open. To the right of .MODEL is the name of the part. Change it to ST_2STR1215.

Note: PSpice will not run the simulation if the part name starts with a number.

Step 7: Save the file and close the Model Editor. Return to Capture.

Associating a PSpice Model

ThirdParty1 Step8
Defining PSpice Models for Components in OrCAD

Step 8: Select transistor Q1.

ThirdParty1 Step9
Associating PSpice Models in OrCAD

Step 9: Right-click and select Associate PSpice Model.

ThirdParty1 Step10

Step 10: A prompt will appear. Select Yes to overwrite the existing model and open the Associate PSpice Model window.

ThirdParty1 Step11

Step 11: To the right of the Model Library drop-down, select Browse.

Step 12: Browse to the location of 2STR1215.lib. Select and open the file.

Note: ST_2STR1215 will be selected automatically.

ThirdParty1 Step13
Mapping Symbol Pins to Model Terminals in PSpice

Step 13: In the Model Mapping table, confirm that symbol pins b, c, and e match with model terminals B, C, and E.

Note: If model terminals are not mapped correctly, modify the mapping with the drop-down selection.

Step 14: Select Update Selected to update the part.

ThirdParty1 Step15

Step 15: A message will appear saying that the model association was successful. Click OK.

Creating a PSpice Simulation Profile

ThirdParty1 Step16
Creating a New Simulation in PSpice

Step 16: Select PSpice > New Simulation Profile from the menu.

ThirdParty1 Step17
Creating a Transient Simulation in PSpice

Step 17: Name the simulation SINE_AMP_TRANS. Set Inherit From to none and click Create.

ThirdParty1 Step18
Configuring a Transient Simulation in PSpice

Step 18: Set the Run To Time to 10ms and the Maximum Step Size to 10us.

Associating the PSpice Model Library

Step 19: Select Configuration Files from the sidebar.

Step 20: Select Library under Category.

ThirdParty1 Step21
Adding Configuring Files in PSpice

Step 21: Confirm that the 2STR1215.lib file exists in the Configured Files list.

Note: If only the nom.lib file is shown, perform the following steps.

ThirdParty1 Step21Note3

  1. Select Browse.
  2. Browse to the location of 2STR1215.lib. Select the file.
  3. Select Add to Design.

Step 22: Click OK to save the simulation profile.

Performing a PSpice Simulation

ThirdParty1 Step23 edited
Measuring Voltage in PSpice Simulations

Step 23: Select the Voltage/Level Marker button from the toolbar to place a probe.

ThirdParty1 Step24
Placing Voltage Probes in PSpice

Step 24: Click to place a probe on the SINE_IN net and another on the SINE_OUT net. Right-click and select End Mode.

ThirdParty1 Step25
Running a Simulation in PSpice

Step 25: Select PSpice > Run from the menu or the Run button on the toolbar.

ThirdParty1 Step26
Viewing Waveform Results in PSpice

Step 26: View the simulation results.

Simulation Models in .txt Format

3rd party simulation models can be sources from many manufacturers. These models are often provide in various formats. This section of the how-to will provide instructions on how to import a .txt model file for simulation in PSpice.

Note: This process can be completed for any simulation model format.

Renaming the 3rd Party File

Step 1: Right-click on the MCP6547.txt file from the provided files and select Rename.

ThirdParty2 Step2 edited 1
Changing the Model File Extension for Import into PSpice

Step 2: Change the extension to .lib.

Note: The extension must be written in lowercase letters to be able to run in PSpice. PSpice will not recognize .LIB.

Creating a PSpice Model

Step 3: Open the PSpice Model Editor. To do so, open the Start menu and select Cadence PCB Utilities 17.4-2019 > PSpice Model Editor 17.4.

ThirdParty2 Step3Note

Note: If the Model Editor Product Choices window opens, select OrCAD PSpice Designer and click OK.

ThirdParty2 Step4

Step 4: The Select Design Entry Tool window will open. Select Capture and choose Done.

Using Model Import Wizard

ThirdParty2 Step5
Opening the Model Import Wizard in PSpice

Step 5: Select File > Model Import Wizard [Capture] from the menu.

ThirdParty2 Step6
Selecting the Model Library

Step 6: The Model Import Wizard will open. Select Browse next to Enter Import Model Library.

Step 7: Navigate to the MCP6547.lib file, select it and click Open.

Note: The Destination Symbol Library path will be filled out automatically. To save the file elsewhere, click Browse and browse to the desired location to save the symbol library file.

ThirdParty2 Step8

Step 8: Select Next. This will open the Associate/Replace Symbol table. There is no symbol associated this model.

Note: If no symbol is selected, the schematic symbol will be a rectangular symbol with pins organized in columns. To learn how to create a custom schematic symbol for a new PSpice model, view the blog instructions here.

ThirdParty2 Step9

Step 9: Select Finish. A prompt will appear asking to attach the default rectangular symbol to models without an associated symbol. Select Yes.

ThirdParty2 Step10

Step 10: A log file will open with any errors that may have occurred. Click OK. Close the Model Editor.

Placing a New PSpice Model

Step 11: Open the provided design, SineAmp2.dsn, in OrCAD PSpice Designer.

Step 12: Select the existing op-amp U2 and press Delete on the keyboard.

ThirdParty2 Step13
Placing Parts in a PSpice Schematic

Step 13: Select Place > Part from the menu or click the Place Part button on the toolbar.

ThirdParty2 Step14
Adding Part Libraries in PSpice

Step 14: Select the Add Library button.

Step 15: Browse to the saved symbol library. Select it and click Open.

ThirdParty2 Step16

Step 16: In the Libraries table, scroll down and select MCP6547. The newly-created part will appear in the Part List.

ThirdParty2 Step17
Placing Parts on a Schematic in PSpice

Step 17: Select the part and click Place Part. Click to place the part in the schematic canvas. Right-click and select End Mode.

Simulation with 3rd Party Models

ThirdParty2 Step18
Wiring in PSpice

Step 18: Select Place > Wire from the menu, the Wire button on the toolbar, or press W on the keyboard.

ThirdParty2 Step19
Creating a Circuit in PSpice

Step 19: Wire the connections to each pin of the comparator as shown above. Press Escape on the keyboard when finished.

Step 20: Select the Voltage/Level Marker button from the toolbar.

Step 21: Click to place a probe on the SQUARE_OUT net. Right-click and select End Mode.

ThirdParty2 Step22
Editing Simulation Settings in PSpice

Step 22: Select PSpice > Edit Simulation Profile from the menu.

Step 23: Select Configuration Files from the sidebar.

ThirdParty2 Step24
Adding Configuring Files in PSpice Simulations

Step 24: Select Library under Category.

Step 25: Select Browse. Navigate to the MCP6547.lib file, select it and click Open.

ThirdParty2 Step26

Step 26: Select Add to Design.

Note: If libraries are not configured, the simulation will not run. Select Add to Global to configure the file for all future simulations.

Step 27: Click OK to save the simulation settings and close the window.

Step 28: Select PSpice > Run from the menu.

ThirdParty2 Step29
Viewing Waveform Results in PSpice

Step 29: View the simulation results.

Wrap Up & Next Steps

Many manufacturers provide simulation models for components, but file formats often vary. Quickly import and configure models from manufacturers to perform accurate analysis of circuit behavior with the Model Editor in OrCAD PSpice. Learn more about the functionality included in OrCAD PSpice and test them out yourself with a free trial.

Follow Along, Download the Pre-Packaged Design Files

Current Offers

Get access to the latest and greatest CAD tools today.

Table of Contents

How To was created with:
Share:
LinkedIn
Email
EMA Design Automation