This PSpice tutorial demonstrates how to create parts from a spice model. After you complete this demonstration, you will be able to:
- Use spice .lib files to create parts
- Match parts with symbols
- Place parts into a schematic
- Run a simulation
Many manufacturers have spice models for parts on their websites. If there is a specific part that you want to test, you can often create your own PSpice models to simulate the behavior of the said part in your circuit.
First open Model Editor, which is a separate tool included in your Capture suite. To open this tool, enter Model Editor into your Windows Start search field.
A pop up dialog opens prompting you to select the design entry tool you want to use. When creating a PSpice Model, select the Capture radio button. Then click the Done button to open the PSpice Model Editor.
To begin creating your part, go to the main Model Editor menu and select File > Model Import Wizard [Capture]…
The Model Import Wizard window will pop up. Click the Browse button next to Enter Input Model Library and select the .lib file that you downloaded from the manufacturer’s website. If this file is not a .lib file, make sure to save it as a .lib file as that is the only file type that the Model Import Wizard is able to recognize.
The field, Enter Destination Symbol Library automatically populates with the location of the .lib file.
Select the Next button to continue. At this stage there a couple options available: you can manually assign a symbol to your part; or you can let the Model Editor automatically assign a symbol. If the Model Editor is unable to recognize the part type from the .lib file, it creates a rectangular part with the correct number of ports.
If you want to manually assign a symbol to the part, click the Associate Symbol button. Click the Ellipsis button to select the library where your symbols are located. You can then choose a symbol that looks similar to the part you are creating and has the correct number of pins.
Once you find a symbol that is satisfactory, assign model pin connections to your symbol pin connections. If you are unsure which pins go where you can click view model and use the model connections from your model file to correctly assign the pins.
You can then save your symbol and finish your part. A log file will appear and you can close the PSpice Model Editor.
Return to Capture and choose either the Place > Part menu or click the Place Part icon that is located in the Pspice toolbar. The Place Part window opens on the right side on the screen.
We need to add our new library to the Place Part screen.
Click the Add Library icon.
Go to the location of your new part (it will be located where ever you saved your original .lib file). In the folder is an .olb file with the name of your part. Select it and click Open.
Verify the .olb file you select matches the name of your .lib file.
To add your part to your schematic, double click the name of your part then click a location on your schematic.
There is one additional step you need to complete after your part is wired into your schematic and you are ready to run a simulation. Select the PSpice > Edit Simulation Profile menu. Then select the Configuration Files tab.
Go to the Library category and browse for the .lib file you used to create the part. Then open it and choose Add as Global. This adds the simulation profile for the part globally so it will be configured going forward anytime you use the part. You may also elect to add it just to this design or simulation profile, however, you will then need to configure the library file again when you want to use it in a different design or simulation.
The part you created is now ready to use in this and any future designs.