Download How to use PSPICE

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Opto-isolator wikipedia , lookup

Voltage optimisation wikipedia , lookup

Stray voltage wikipedia , lookup

Alternating current wikipedia , lookup

Mains electricity wikipedia , lookup

Transcript
Before you start this tutorial download (ami06.olb and ami06.lib) from you class folder
How to use PSPICE
I.
Launching PSpice
1) Launch Cadence:
School Version: Start→ Release 16.3 → Design Entry CIS
Demo Version: Start →Cadence-→ OrCAD 16.5 Lite → OrCAD Capture CIS Lite
2) School: From the Pop-up Menu select:
Studio Selection Suite: PCB Design CIS XL,
hit <OK>
3) Create a new project
a) On the top toolbar select: File->New->Project
You will see the pop-up menu shown below
b) Select a path for your project. (If you are running the tool at school, you need to browse and
place the part in your student account on the H: drive)
c) Enter a name for your project
d) Make sure to select Analog or Mixed A/D, otherwise you will not be able to simulate
e) Click <OK> to close the window
4) School: You will see a pop-up menu select: Create blank project
1
II.
Creating a Schematic
(Note the schematic that is produced might not be appropriate for PCB layout)
Adding Libraries and Placing parts



5) To place a part:
Hit bindkey p OR
Select Place part icon (toolbar on rhs) OR
Select Place->Part (Top toolbar)
Place part
icon
The parts that you will be adding are in Libraries that need to be loaded.
6) To add a Library:
a) Select the add Library Icon in the Place Part Pop-up menu
Add Library
icon
2
b) In the Browse File pop-up menu browse to Add the library path (see below)
 Demo version path: C: OrCAD/OrCAD_16.5_Lite/tools/capture/library/Pspice
 School version path: C: Cadence/SPB_16.3/tools/capture/library/Pspice
c) Click on the blank part of the window and hit <ctrl a> to select all the libraries (see below)
d) Select Open to add the selected libraries (see below)
Add path
click here
and select
<ctrl a>
Repeat steps 6) a-d to add the ami06.olb library that you downloaded into your H: drive account
The libraries have now been added and you can place parts
7) Placing Parts
a) In the Place part pop-up menu enter the name of the part
that you wish to add (Here we have entered vdc)
b) IMPORTANT: You can find the some parts in several
libraries. Select the part Vdc from the library Source.
(Notation: VDC/SOURCE)
c) Hit <enter> to add the part
d) If the part was not in the design cache you will see a popup menu. Hit <yes> if you get this menu.
e) Move your cursor on the schematic to where you want to
place the part. Click your mouse at the location
f) You will continue to be able to place parts that are of the
type that you selected. Hit <esc> to end placing parts.
g) If you wish to rotate or flip a part as you place it use the
following bindkeys
Rotate
r
Horizontal flip h
Vertical flip
v
Select the
part vdc
from the
SOURCE
library
3
Common Editing Commands
Move parts:
 Select the part (or parts) you wish to move with your mouse
 Drag the part(s) to the new location
Undo: hit ^z
Copy:
 Select the part (or parts) you wish to copy with your mouse
 Hit ^c
 The object in now in the clipboard
 If you are writing a laboratory report this clip board is available to Microsoft products. So
you can use this command to paste entire schematics in your reports (^v).
Paste:
 Hit ^v
 Move your cursor to where you want to place the object that is in the clipboard
 Click your cursor at the desired location.
Rotate
 Select the desire part Hit bindkey r OR from the main menu: Edit-> rotate
Mirror (flip) horizontally or vertically
 Select the desire part. From the main menu: Edit-> mirror
Delete
 Select the desired portion of the circuit. Hit <delete>
Using the common editing commands to place the following parts on the schematic
M2
AMI06P
V1
0Vdc
W=
L = .6u
V2
0Vdc
M1
AMI06N
W=
L = .6u
Part Name
Demo and School Libraries
Vdc
Source
NMOS
Ami06
PMOS
Ami06
8) Change the following part properties:
a) Double click on 0Vdc and change the value of one DC voltage source to 5
b) Double click on W= and change the width of the NMOS transistor to 3u
c) Double click on W= and change the width of the PMOS transistor to 6u
4
Connecting parts with wires
After placing the parts you will need to connect them with wires (also called nets).
Adding wires:
9) Select the Place wire icon (toolbar on rhs) OR use bindkey w.
Place wire
icon
10) Draw the wires (shown below)
a) Click your mouse at the starting position of your wire
b) Move (do not drag) your mouse to the location where you want a bend. Click your mouse. (you
may repeat this step for multiple bends)
c) Move (do not drag) your mouse to the end location click again.
d) Hit the <esc> key to exit the place wire command.
Add wires to create the following connectivity
M2
AMI06P
V1
5Vdc
Click mouse (starting point)
move mouse
Click mouse (bend)
move mouse
Click mouse (end point)
Hit <esc> to end
command
W = 6u
L = .6u
V2
0Vdc
M1
AMI06N
W = 3u
L = .6u
5
Naming wires:
It is much easier to maintain a design if you name the wires (nets) on your schematic. Try to create schematics
that are readable and less cluttered with wires
Below are two equivalent schematics. Which is more readable/maintainable?
Two IMPORTANT ideas
1) If wires have the same name (net alias) they are viewed as being connected
2) To simulate a PSpice schematic there needs to be a net named 0 (zero)
6
11) Naming wires
a) To name a wire begin by:
 Selecting bindkey n OR
 Selecting the place net alias icon (rhs toolbar) OR
 Selecting the Place->net alias (top toolbar)
Note: do NOT use the place text icon. PSpice text offers no functionality. It is, however, helpful for
annotating schematics with comments.
b) A pop-up menu will appear. In the menu enter the name you(Vin for this example)
c) Click your mouse on the net that you wish to name Vin
d) Hit <esc> to end the place net alias command
Place net
alias icon
Place text
icon
Name the wires (Vin, Vo, Vdd) on your schematic as follows
Note these wires have the same
name and are connected
Vdd
M2
Vdd
AMI06P
Vdd
Vin
V1
5Vdc
W = 6u
L = .6u
Vin
Vo
V2
0Vdc
M1
AMI06N
W = 3u
L = .6u
7
Adding Ground
Again, to simulate a schematic there needs to be a net named 0 (zero). Using the place wire alias you can name
a wire zero, or you can place a part that will do the same thing
12) Add a ground:
a) Selecting bindkey G OR place ground icon (toolbar on rhs)
b) In the resulting place Ground pop-up menu - Select: 0/CAPSYM
c) Hit <OK> to start placing parts
d) On your schematic add ground parts as shown.
e) Hit : <esc>to end the place ground part command
Vdd
M2
Vdd
AMI06P
Vdd
Vin
V1
W = 6u
L = .6u
Vin
Vo
V2
5Vdc
0Vdc
M1
AMI06N
W = 3u
L = .6u
0
0
13) After you have created your schematic save your work Top Toolbar: File->Save
8
III.
Running a DC Sweep
Placing Probes
To automatically plot results when a simulation is complete place probes. Voltage probes plot
voltages and current probes, currents.
14) Place a voltage probe and current probe as shown below. Note current probes must be
placed on the pins of devices (the very end)
Current probe icon
Voltage probe icon
Voltage probe
Current probe
Simulating
15) To simulate from the top toolbar select Pspice->New Simulation Profile
16) Enter a name
17) Click on create to close the window
9
Adding a model file
The behavior of transistors is defined in a model file which needs to be added
18) In the Simulation Settings Window tab to Configuration Files
19) Select Include
20) Click on Browse
21) At the bottom of the resulting window (see below) select All Files (*)
22) Find the ami06.lib file that you previously downloaded and select it
23) Click Open to close the window
24) Back in the Simulation Settings Window click on Add to Profile
10
Running a DC sweep
25) Back in the Simulation Settings menu (shown below) tab to Analysis
26) Select DC sweep analysis type
27) Specify that you wish to sweep a voltage source
28) Specify the voltage source that you wish to sweep (V2 – or the one connected to Vin)
29) Specify the Start and stop voltages as well as the voltage increment
Note: Spice understands m to be 10-3
30) Click on <OK> to close the window
31) To simulate click on the run Pspice icon at the top of the schematic
Run Pspice
icon
32) The simulation will run
Note if your simulation fails check for errors: from top toolbar: Window->Session Log
11
33) If your simulation runs successfully the voltage and current will be plotted as shown below
(the current is so small in comparison to the voltage it will appear to be zero)
We will delete the voltage trace and add another trace using a different technique
Deleting Traces
34) Click on the V(Vo) icon at the bottom left of the simulation window (as shown below)
35) click <delete> to delete it
V(Vo)
icon
Plotting Expressions
In this example you will plot the static power dissipation of the CMOS inverter
36) In the top toolbar of the Allegro AMS Simulator window select: Trace->Add Trace
You will see the Add Traces pop-up menu shown below: Voltages and currents are listed on
the left and functions on the right
37) Enter the expression as indicated
38) Select <OK> to close the window and plot the expressions
12
Using Cursors
Cursors can be used to determine precise simulation values.
39) To activate the cursors click on the toggle cursor on icon at the top of the Simulation
window
40) Click on the cursor point icon
cursor point icon
Toggle cursor on
Cursor X,Y data
displayed here
There are two cursors CURSOR 1 and CURSOR 2. CURSOR 2 is controlled with the left mouse and
CURSOR 2 with the right.
41) Affiliate cursor 1 with the trace of ID(M1) by clicking on its icon with the LEFT mouse button
(see below)
42) Affiliate cursor 2 with the trace of Vdd by clicking on its icon with the RIGHT mouse button
(see below)
43) Click on the simulation result with the RIGHT mouse button to define the position of cursor
1. Crosshairs will be shown. X and Y values for this trace at the position of the cross hairs
are displayed at the bottom of the graph. The crosshairs can be moved by dragging the
mouse with the right button.
Note: The position of the cursor 2 is similarly controlled with the left mouse button
13
Place cursor2 or cursor1 crosshairs by clicking on graph with
left or right mouse. Drag left or right mouse to move cursor.
select colored icon with RIGHT mouse button to affiliate with cursor 1
select colored icon with LEFT mouse button to affiliate with cursor 2
Cursor data displayed here
IV.
Performing a Transient Simulation
Applying a Digital Input Pulse
44) Return to the Schematic window
45) Replace the DC voltage source connected to Vin with a Vpulse part from the Library Source
46) Modify the Vpulse part properties as shown below
Vdd
Note: V1 is the first voltage
M2
Vdd
V2 is the second voltage
TD is the delay time
W = 6u
AMI06P
L = .6u
TR is the rise time
Vdd
Vin
Vin
Vo
TF is the fall time
V1
V
V
PW is the pulse width
5Vdc
M1
V2
V1 = 0
V2
=
5
PER is the period
TD = 2n
47) Apply voltage probed to the input and output
of the inverter (delete the current probe)
TR = 100p
TF = 100p
PW = 5n
PER = 10n
0
AMI06N
W = 3u
L = .6u
0
V2
V1
TD
(delay time)
TR
(rise time)
PW
(pulse width)
TF
(fall time)
14
Performing a Transient Simulation
48) To simulate from the top toolbar select Pspice->Edit Simulation Profile
49) Tab to Analysis
50) Select a Time Domain (Transient) analysis type (see below)
51) Specify a run time of 10n and a maximum step size of 10p
52) Click on <OK> to close the window
53) Click on the run PSPICE icon to run the simulation<OK> To close the window
Plotting using a strip chart format
54) After the simulation has run and the result have been plotted. In the top toolbar of the
SCHEMATIC – sim window select Plot-> Add Plot to Window
55) At the bottom of your graphed results, select the V(Vin) icon
56) Hit <ctrl> x to cut
Select V(Vin) and
hit <ctrl>-x
57) Click on the empty plot and hit <ctrl> v paste the Vin plot in the empty window
Click mouse here &
hit <ctrl> v to paste
15