0% found this document useful (0 votes)
64 views25 pages

PSpice9.1 Tutorial

This document provides instructions for installing and using PSpice A/D simulation software. It guides the reader through drawing a DC circuit schematic in PSpice, setting component attributes, running a DC operating point analysis, and using the results to determine the Thevenin equivalent resistance of the network and the load resistance needed for an output voltage of 1.5V. The document contains detailed steps and screenshots to illustrate how to use PSpice's schematic capture, simulation, and results visualization features.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
64 views25 pages

PSpice9.1 Tutorial

This document provides instructions for installing and using PSpice A/D simulation software. It guides the reader through drawing a DC circuit schematic in PSpice, setting component attributes, running a DC operating point analysis, and using the results to determine the Thevenin equivalent resistance of the network and the load resistance needed for an output voltage of 1.5V. The document contains detailed steps and screenshots to illustrate how to use PSpice's schematic capture, simulation, and results visualization features.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 25

-1-

PSpice A/D Manual and Examples


Install PSpice A/D on your computer. CD-ROMs with the installation software are
available from the instrument room. A word of warning: the compact installation takes
about 36 MB. Since this is a new version of the program we have not determined which
specific modules you need yet and it should be possible to cut the installed size down
considerably. The text only version (Version 6 and earlier) is MUCH smaller - for
example, Version 6.0 for the Macintosh is only 3.7 MB - BUT YOU HAVE TO
PROGRAM THE CIRCUIT AND ANALYSIS OF THE DATA.
Once you install Microsim PSpice A/D on your machine all you need to do is select
PSpice Student / Pspice Design Manager from the Programs Menu as shown below.
Figure 1. Starting PSpice.
If PSpice was correctly installed you should get a window similar to the image shown
below. This is Orcad's Design Manager from which you can enter schematics and
simulate circuits.
Figure 2. Design Manager Window.
-2-
To enter a circuit you must start the schematic capture program, PSpice Schematics. This
is done by clicking on the icon of a pencil drawing a circuit. This is the top yellow icon on
the left side of the Design Manager window.
The window shows a standard engineering drawing. You can zoom in and out using the
View menu, or you can use the commands CTRL+I to zoom in and CTRL-O to zoom out.
Note that you need to click on a point in the drawing for the program to zoom about.
Figure 3. Typical PSpice Schematics Entry Screen.
The function of the schematics program is to present an interface for you, the user, to draw
a circuit on the screen and translate it into a form called a netlist which can be used for
detailed circuit analysis. This method of entering your circuit is called schematic capture.
We will consider two example circuits: (1) the output characteristics of a DC network with
multiple sources; and (2) the DC transfer function of an operational amplifier circuit.
-3-
V
b
=5V
+
-
R
3
=3.9k R
4
=1.1k
R
5
=1.1k
a
=12V
+
-
R
6
=8.2k
R
1
=16k
R
2
=16k
A B
C
D
Figure 4. DC Network for PSpice Simulation
Figure 4 shows the DC circuit you will enter. The first thing you have to do is draw the
circuit in the PSpice Schematic capture program. You typically begin a project by
entering components . Go to the draw menu and select Get New Part. You will then see
the Parts Browser dialog box as shown below.
Figure 5. Get New Part command. Figure 6. Parts Browser dialog box.
-4-
You can select any of a great variety of predefined parts to enter using the Parts Browser.
In this case we will start by scrolling the component window on the left down until we see
the part "r". Select it using the left mouse button and you will then see a description of this
part in the Description pane. In this case, the description is resistor. If you already know
the name of your part you can simply enter the name under part name. We will now place
the part on the schematic. Wherever you place your mouse and click you will get a
horizontal resistor. PSpice automatically numbers them in the order they are placed.
What I have done is entered 6 resistors in approximately the same positions as they are in
Figure 4 as shown in Figure 7. Note that PSpice automatically assigns initial values as
well as component labels.
Figure 7. Initial Placement of Resistors
-5-
Lets place the voltage sources next. You
are using DC voltage sources which
PSpice calls VDC. Again go to the Draw
menu, select Get New Part and select
VDC in the Parts Browser Window as
shown in Figure 8. Note that PSpice
labeled the sources as V1 and V2 as you
entered them. A note on using PSpice.
You will continue to insert parts with each
mouse click until you perform a right
mouse click.
If you get more components than you
need you can simply hold down the
mouse and drag a box to select a
component(s). Selected components
show up in red on the screen. As we
shall see later selected components can be
moved, changed or deleted. To delete a
selected component simply go to the Edit
menu and select the Delete command.
Alternatively, you can just press the delete
key to remove a selected component.
Figure 8. DC Voltage Source in Parts
Browser
Figure 9. Circuit With All Elements
-6-
Now we need to orient resistors R2, R5 and R6 vertically and draw the electrical
connections in the circuit. Select resistor R6 as shown in Figure 9 and go to the Edit
Menu. Select Rotate as shown in Figure 10.
Figure 10. Rotating a selected component Figure 11. Rotated Components
All that remains is to draw the connections between the electrical components, i.e., the
wiring. Go to the Draw menu and select Wire. This produces a small pencil icon (which
refused to show in my screen dump routine). As long as the pencil icon is showing you
can connect any two components by moving the pencil to the wire at the end of a
component, clicking the left mouse button once, and moving the pencil to the wire at the
end of the other component to which you want the wire to be connected. This process is
shown schematically in Figure 12 and Figure 13. Note that you can connect a component
to a wire and that PSpice will automatically show a connection of multiple wires by
inserting a prominent dot.
Figure 12. Inserting A Wire Between R2
and R4.
Figure 13. Inserting a wire between R6 and
the R2-R4 connection.
-7-
You can do this for all the components in the circuit to give Figure 14.
Figure 14. Completed Circuit Showing All Electrical Connections
To simulate the circuit we need to
change all the default component
values to those actually shown in
Figure 4. The value of any
component can be changed using the
Attributes Dialog Box under the Edit
menu.
Figure 15. Changing the Attributes of An
Electrical Component
-8-
Figure 16. Typical Resistor Attributes Figure 17. Select Attribute to Change
Figure 18. Attribute Value to Be Edited Figure 19. Attribute Value Being Edited
If you dont like the placement of the component label or value you can move them. Select
the component by clicking on its label or value box and dragging the box as shown below.
Figure 20. Selecting Component Value Box Figure 21. Dragged Component Value Box.
Save your file as shown below. The name will have the extension .sch appended by
PSpice.
-9-
Figure 22. Saving A Schematic File
Figure 23. Select AGND Using Parts
Browser
Figure 24. Connect Analog Ground to
Circuit
-10-
As drawn the previous circuit looks fine but will NOT run correctly. YOU MUST HAVE
AN ANALOG GROUND IN YOUR CIRCUIT!!! Otherwise you will get an error
message when you try to simulate the operation of the circuit. Use the Get New Part
command and select AGND in the dialog box as shown in Figure 23 and Figure 24.
You have actually produced a schematic diagram in the form of an engineering drawing.
This is readily apparent if you zoom out to see the entire drawing.
Figure 25. Complete Engineering Drawing
Figure 25 shows a labeled border which can be used to identify parts placement on a
complex drawing. For this class you should change the title block shown in the lower left
of Figure 25 and Figure 26 in greater detail .
Figure 26. Drawing Title Block
-11-
The title block is just
another component
whose components can
be edited. Select the title
block and use the
Edit/Attribute command
to get the dialog box
shown in Figure 27.
Edit the attributes to get
the title box shown in
Figure 28 for any
drawing you do for
EEAP 245.
Figure 27. Edit Attributes Dialog Box for Title Block
At this point you are
ready to do some
calculations. Click on
the simulate button (the
yellow button to the left
of none in the menu
bar shown in Figure.
This will bring up a
PSpice calculation
window as shown in
Figure 29.
Figure 28. Title Block To Be Used For EEAP 245
Figure 29. Calculating DC Operating Point of Circuit
-12-
You can examine your results in many ways. For DC values I like placing the values of
voltages and currents right on the wires as shown in Figure 30. You can get this option by
selecting Analysis/Display Results on Schematics and enabling the appropriate display as
shown in Figure 30. The figure shows both voltage and current display enabled.
Figure 30. Displaying DC Voltages and Currents on Schematic
One of the neat things we can do is use PSpice's sweeping and graphical capabilities to
solve engineering problems. Assume you have been asked to determine the Thevenin
equivalent resistance of this network and to then design the load resistance which gives an
output voltage of 1.5 volts.
Our approach will be to add a load resistor R7 in parallel with resistor R1. Then we will
compute the current through resistor R7 as a function of the voltage across resistor R7.
This has to be done in several steps:
1) define the resistor R7 as a PSpice variable;
2) define this variable as a parameter which is to be varied during the simulation;
3) set the simulation to vary this parameter;
4) run the simulation;
5) use Probe to plot the current through R7 as a function of the voltage across R7
6) use the cursor to measure the short circuit current and open circuit voltage to get the
Thevenin resistance;
7) use the cursor to determine the current through R7 when the output voltage equals 1.5
volts to compute the design load
This is a fairly complex procedure but once you see it a few times it will really become
pretty easy.
-13-
R7 can be added just as we have done before. Get a resistor part, place it above R1, and
connect it to the appropriate wires as shown in Figure 31.
Figure 31. Circuit With A-B Load Resistor
To define R7 as a PSpice variable we need to edit its attributes. Rather than go through the
detailed menus to edit its attributes you can just double click on the part value box. A
double left mouse click will generate the dialog box shown in Figure 32.
Figure 32. Changing R7s Value To A Variable
Change the attribute value to a variable by selecting the variable name, in this case I chose
RVAL, and type it in the value window being sure to enclose it in curly brackets, i.e.
{RVAL}. The curly brackets are essential. This should give the following change in the
circuit schematic.
-14-
Figure 33. R7s Value Declared To Be A PSpice Variable
Now you need to define the variable RVAL as a parameter which gets varied during
simulation. Go to the Draw menu and Get a new part. Using the Parts Browser select the
part called PARAM and insert it anywhere on the circuit diagram as shown.
Figure 34. Specifying The PARAM Block
Double click on the PARAMETERS: name in your circuit diagram to get the PARAM
dialog box. Set the NAME1 to PARAM as shown in Figure 35. You should also give it a
default value for VALUE1. The exact value is not critical in this case and I picked a value
of 1k rather arbitrarily as shown in Figure 36
-15-
Figure 35. Putting A Name In A Parameter Statement
Figure 36. Setting The Default Value For A PSpice Variable
You should then get a
schematic something
like that shown in
Figure 37. It is
important to note that
the PARAMETER
block MUST show
both the variable and its
default value in or else
you will get an error
when you attempt to
simulate the circuit.
Figure 37. Schematic with PARAMETER statement.
-16-
You finally need to identify the variable to vary during the simulation. This is done by
using the Analysis/Setup.. dialog box as shown in Figure 38.
Figure 38. Setting Up The Simulation
You should choose a DC sweep and identify RVAL as the variable to be swept as shown in
Figure 39.
Figure 39. Setting the Type of Sweep
Before you can actually run a simulation you need to identify the type of sweep. This is
done in the DC Sweep dialog box. The variable to sweep is RVAL. To make the
simulation graph come out looking good without computing too many points I am going to
use a decade sweep with 10 points per decade. This means that there will be ten points for
every power of ten. Since my sweep variable runs from 0.1 to 10k the sweep will cover 5
decades and a total of 50 points will be computed.
-17-
Figure 40. Setting Sweep Parameters
Run the simulation and you should get something like Figure 41.
Figure 41. Results from a DC Sweep
-18-
The simulation should result in a multi-paned window with a summary of your simulation
as shown in Figure 41. The default is to put the sweep variable along the horizontal axis.
However, in this case we want to plot R7s current against the voltage across R7. You can
set the axes in PSpice to be anything you want by using the Plot dialog box to change the
X Axis settings as shown in Figure 42.
Figure 42. Invoking X-Axis Setting Dialog Box
To change the X-Axis variable click on the Axis Variable to get the complex dialog box
shown in Figure 44.
Figure 43. Initial X-Axis Setting
-19-
PSpice allows you to compute axis variables. In this case we want the voltage ACROSS
R7 which is the voltage at the left side of R7 minus the voltage on the right side of R7.
This is V(R7:1)-V(R7:2). To do this click on Axis Variable to get the following window.
Note that you construct the Trace Expression by alternately selecting variables from the left
menu and operators from the right menu.
Figure 44. Set Horizontal Axis To Computed Voltage Across R7
As soon as you enter this expression and close the dialog boxes you will get the new
PSpice plot shown in Figure 45. The horizontal axis now goes from 0-2.4 volts. This was
automatically determined by PSpice. We will change it later.
-20-
Figure 45. Change the horizontal axis to computed Voltage
Because I dont like my plots with odd values on the horizontal axis, I open the Axis
Setting dialog box in the Plot menu again. The initial setting is AutoRange as shown in
Figure 46. I click on user defined and change the axis range from 0 to 2.5 volts as shown
in Figure 47.
-21-
Figure 46. Default X-Axis Settings
Figure 47. User Defined X-Axis Settings
-22-
At this point I have the horizontal axis I want but nothing on the vertical axis. The
procedure of selecting something to plot is called adding a trace. Select the Trace menu
and choose the Add Trace... option as shown in Figure 48.
Figure 48. Adding A Trace to the Vertical Axis
This brings up a dialog box similar to that for the X Axis as shown in Figure 49.
Figure 49. Choosing the Y-Axis Variable
The result is the useful graph shown in Figure 50 which shows a plot of the current
through R7 versus the voltage across R7.
-23-
Figure 50. Plot Of R7 Current vs. R7 Voltage
To get useful numbers from the graph we will use the cursor to read out the values on
points on the curve. To do this use the Tools\Cursor... menu as shown in Figure 51.
Figure 51. Turn On Cursor For Graphical Measurement
-24-
We are interested in three parameters :
the short circuit current,
the open circuit voltage, and
the load resistance that results in the desired output voltage of 1.5 volts.
Figure 52. Measuring Voltage, Current At Desired Operating Point
I can move the cursor using the mouse and clicking at the appropriate position. I can also
move the cursor left and right by using the keyboards left and right arrow keys.
Figure 52 shows the cursor positioned for an output (R7) voltage of 1.499 volts. The
corresponding output (R7) current from Figure 52 is 265.327A. The calculated R7 for a
output voltage of 1.5 volts is then
R7
(for 1.5 volts)
=1.5volts/265.327A = 5650
I cannot use this range of RVAL to estimate the open circuit voltage since there is always a
current flowing through R7 (See Figure 52 and Figure 53). However, Figure 31 shows the
DC voltages on either side of R1 with no R7 (i.e., an open circuit condition corresponding
to an infinite R7). The voltage across R7 is then 12.00-11.60=0.40 Volts. The short
circuit current can be estimated using the cursor and simply positioning it as far to left
(near zero) as PSpice will let me. The value of the cursor is then read off the window as
447 microamperes at a voltage of 44.8 microvolts. Since the voltage is nearly zero this
current is a good approximation of the short circuit voltage.
Using these values the corresponding Thevenin resistance is approximately given as
R
th
=V
oc
/I
sc
= 0.4/447.34A=894
-25-
Figure 53. Cursor Positioned At Minimum Current

You might also like