Pspice Tutorial
Pspice Tutorial
Pspice Tutorial
2.
3. 4. 5.
6.
Give the project a descriptive name (spaces can be included). Select ANALOG OR MIXED A/D. You will not be able to simulate your project if the schematic button is selected. Specify a location where the project is to be stored a) Click Browse and to change the location the files will be stored b) For lab computers use a removable drive with a directory specifically for PSpice files. Click OK. The following window appears:
7.
Select CREATE A BLANK PROJECT and click OK. The following window appears:
Across the top are tabs to select the Start Page, the Project Page and the Schematic Page. Toolbars are across the top and down the right side. These toolbars and menus will change depending on which window is selected. Be sure the Schematic Page Tab (likely named Page1) is selected. You are now ready to begin creating a circuit for simulation.
2. 3.
4. 5. 6. 7. 8.
9.
The PLACE GROUND window appears with only ground nodes available for selection. The SOURCE library MUST be listed in the LIBRARIES window. Always select 0/SOURCE for the ground node of an analog circuit every analog circuit must contain at least one 0 ground. 10. To change component values that are displayed Double click the displayed value Change the desired value in the dialog box that appears. 11. To change component values that are not displayed Select the part (a box is drawn around the entire part when it is selected) Double click the part or Right click and select EDIT PROPERTIES A Property Editor database screen appears in a new tab. Scroll right until the desired value is seen on the top line. Click the property (second line) you wish to change. Type in the new value. Right click on the tab and select CLOSE to close the tab.
4. 5. 6.
Select the ANALYSIS TYPE from the pull down menu. Set the pertinent parameters. Click OK.
AC Sweep
Use an AC sweep when you want to plot a voltage, current, or power as a function of frequency. This type of simulation is typically used for determining the frequency response of a circuit. The sources in this type of analysis will typically be VAC and IAC sources. 1. Create a new simulation profile called ac sweep (or whatever you want). 2. Under ANALYSIS Tab, select an ANALYSIS TYPE of AC SWEEP/NOISE. 3. Enter the appropriate variables in the AC SWEEP TYPE Section. You will typically want to do a logarithmic frequency sweep. 4. Click OK. 5. Determine the variables of interest to be plotted in Probe. 6. Simulate the circuit (See below).
Transient Analysis
Use a transient analysis when you want to plot a voltage, current, or power as a function of time. The sources used in this type of analysis will be any voltage or current source that varies with time; examples include VSIN, VPULSE, ISIN, and VRAMP. 1. Create a new simulation profile called transient (or whatever you want). 2. Under ANALYSIS Tab, select an ANALYSIS TYPE of TIME DOMAIN (TRANSIENT). 3. Enter the stop time (TSTOP) for the simulation in the RUN TO TIME box. 4. Enter the maximum step size in the TRANSIENT OPTIONS section making this variable ~TSTOP/1000 will help ensure that the traces in Probe are relatively smooth. 5. Click OK. 6. Determine the variables of interest to be plotted in Probe. 7. Simulate the circuit (See below).
2. 3.
Place the PARAM part (located in the SPECIAL library) somewhere on the schematic (it does not connect to anything). Double Click on the PARAM part and the property editor tab will be displayed.
4.
Click the NEW COLUMN Button. The dialog box shown below will appear:
5. 6. 7. 8. 9. 10.
Type the name of the variable specified in Step 1 (No curly Braces). Supply a default value (this is the value PSpice uses to compute the bias point before any sweep is done). Click OK. The variable will appear in the database screen. With the variable still highlighted, click the DISPLAY button. Under the DISPLAY FORMAT section check NAME AND VALUE. Click OK and close the property editor window. The schematic should look something like this now:
Set up a DC Sweep as described above In the SWEEP VARIABLE section, check the GLOBAL PARAMETER box. Enter the variable name in the PARAMETER NAME box. Select an appropriate sweep type. Click OK. Simulate the circuit (See below).
To Simulate Circuit
1. Place voltage, voltage differential, current, and power markers from the toolbar where needed Voltage Markers can be placed on any wire and they will give the voltage at that node with relation to ground. Current Markers must be placed at one of the terminals of a device and they will give the current entering that pin. Power markers must be placed directly on the part and they will give the power dissipated by that device (thus a negative value means the part is supplying power).
2. 3.
Click the run icon on the toolbar. Probe will be open with the marked values displayed on one graph
4. 5. 6.
7.
To add a new y-axes in Probe select PLOT ADD Y AXIS To add a new plot window in Probe select PLOT ADD PLOT TO W INDOW To move a trace to the new axis/window: Click on the trace name to be moved (it should turn red when selected) and select EDIT CUT Click on the axis/window to move the trace to (it should have a >> at the bottom when selected) and select EDIT PASTE To add a new trace select TRACE ADD NEW TRACE and select the variable to plot. Algebraic expressions can also be entered here using the operators in the right hand side of the add trace window.
Common Mistakes
These are the most common problems I see students make when using PSpice. - Not having a 0 Ground. If you are getting errors that say you have a bunch of floating nodes, check to be sure that the ground you have is indeed named 0! - Not selecting Analog A/D when setting up the project. If you can draw the schematic but then do not have an option to set up a simulation profile, you selected Schematic instead of Analog A/D. To fix this, select the entire schematic, copy it, restart PSpice, create a new project with a new name (selecting Analog A/D, of course), and paste the schematic into this project. - Not having the correct libraries included. Only the components in the PSpice library will simulate correctly. You must have these libraries and no others included. - Using the wrong sources. DC sources (VDC, IDC) for bias and DC analysis, AC sources (VAC, IAC) for AC analysis, and time varying sources (VSIN, VPULSE) for transient analysis. Do not use VSIN for a frequency response or VAC for a transient analysis! - Having a zero-impedance path from a voltage source to ground. Before PSpice does any kind of analysis, it always does a DC bias point analysis first. If it finds a voltage directly across an inductor, it cannot compute the bias point. This can be solved by placing a very small resistance in series with the inductor. If you are getting an error that tells you that you have a voltage-inductor loop, you have this problem. This can also result from a direct short across a voltage source. - SI prefix confusion. PSpice is not case sensitive and you can use SI prefixes. They are as follows: o a atto: 10-18 o f fempto: 10-15 o p pico: 10-12 o n nano: 10-9 o u micro: 10-6 o m milli: 10-3 o k kilo: 103 o MEG mega: 106 o G giga: 109 o T terra: 1012 Note that PSpice will not know the difference between m and M, so if you want a 10M resistor, you need to put 10meg, not 10M. 10M will be interpreted as 10m ! PSpice will ignore anything after the SI prefix, so if you want to put 10uF, the F will be ignored. But be careful, because 10F will be interpreted as a 10fF (10 fempto-farad) capacitor.