Pspice 325 Class

25
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 1

description

rtrgrtrry

Transcript of Pspice 325 Class

Page 1: Pspice 325 Class

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 CISDemo 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 projecta) 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 projectd) Make sure to select Analog or Mixed A/D, otherwise you will not be able to simulatee) Click <OK> to close the window

4) School: You will see a pop-up menu select: Create blank project

1

Page 2: Pspice 325 Class

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)

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

2

Place part icon

Add Library icon

Page 3: Pspice 325 Class

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)

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 Partsa) 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 partd) If the part was not in the design cache you will see a pop-

up 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 locationf) 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 bindkeysRotate rHorizontal flip hVertical flip v

3

Select the part vdc from the SOURCE library

click here and select <ctrl a>

Add path

Page 4: Pspice 325 Class

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 ^zCopy:

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

M 1

A M I 0 6 NW = L = . 6 u

M 2

A M I 0 6 P W =L = . 6 u

V 10 V d c

V 20 V d c

Part Name Demo and School LibrariesVdc SourceNMOS Ami06PMOS Ami06

8) Change the following part properties:a) Double click on 0Vdc and change the value of one DC voltage source to 5b) Double click on W= and change the width of the NMOS transistor to 3u h) Double click on W= and change the width of the PMOS transistor to 6u

4

Page 5: Pspice 325 Class

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.

10) Draw the wires (shown below)

a) Click your mouse at the starting position of your wireb) 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

M 1

A M I 0 6 NW = 3 uL = . 6 u

M 2

A M I 0 6 PW = 6 uL = . 6 u

V 15 V d c

V 20 V d c

5

Click mouse (starting point)move mouse

Click mouse (bend)move mouse

Click mouse (end point) Hit <esc> to end

command

Place wire icon

Page 6: Pspice 325 Class

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 connected2) To simulate a PSpice schematic there needs to be a net named 0 (zero)

6

Page 7: Pspice 325 Class

11) Naming wiresa) 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 Vind) Hit <esc> to end the place net alias command

Name the wires (Vin, Vo, Vdd) on your schematic as follows

M 1

A M I 0 6 NW = 3 uL = . 6 u

M 2

A M I 0 6 PW = 6 uL = . 6 u

V 15 V d c

V 20 V d c

V d d

V inV d d

V d d

V oV in

7

Place net alias icon

Place text icon

Note these wires have the same name and are connected

Page 8: Pspice 325 Class

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/CAPSYMc) 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

M 1

A M I 0 6 NW = 3 uL = . 6 u

M 2

A M I 0 6 PW = 6 uL = . 6 u

V 15 V d c

V 20 V d c

V d d

V inV d d

V d d

V oV in

0

0

13) After you have created your schematic save your work Top Toolbar: File->Save

8

Page 9: Pspice 325 Class

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)

Simulating

15) To simulate from the top toolbar select Pspice->New Simulation Profile16) Enter a name 17) Click on create to close the window

9

Current probe icon

Voltage probe icon

Voltage probe

Current probe

Page 10: Pspice 325 Class

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 Files19) Select Include20) 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 it23) Click Open to close the window

24) Back in the Simulation Settings Window click on Add to Profile

10

Page 11: Pspice 325 Class

Running a DC sweep

25) Back in the Simulation Settings menu (shown below) tab to Analysis26) Select DC sweep analysis type27) Specify that you wish to sweep a voltage source28) 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

32) The simulation will run Note if your simulation fails check for errors: from top toolbar: Window->Session Log

11

Run Pspice icon

Page 12: Pspice 325 Class

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 Traces34) Click on the V(Vo) icon at the bottom left of the simulation window (as shown below)35) click <delete> to delete it

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 TraceYou will see the Add Traces pop-up menu shown below: Voltages and currents are listed on the left and functions on the right37) Enter the expression as indicated38) Select <OK> to close the window and plot the expressions

12

V(Vo) icon

Page 13: Pspice 325 Class

Using CursorsCursors 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

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

Toggle cursor oncursor point icon

Cursor X,Y data displayed here

Page 14: Pspice 325 Class

M 1

A M I 0 6 NW = 3 uL = . 6 u

M 2

A M I 0 6 PW = 6 uL = . 6 u

V 15 V d c

V d d

V inV d d

V d d

V oV in

00

V 2

TD = 2 n

TF = 1 0 0 pP W = 5 nP E R = 1 0 n

V 1 = 0

TR = 1 0 0 p

V 2 = 5

V V

IV. Performing a Transient Simulation

Applying a Digital Input Pulse

44) Return to the Schematic window45) Replace the DC voltage source connected to Vin with a Vpulse part from the Library Source46) Modify the Vpulse part properties as shown below

Note: V1 is the first voltageV2 is the second voltageTD is the delay timeTR is the rise timeTF is the fall timePW is the pulse widthPER is the period

47) Apply voltage probed to the input and output of the inverter (delete the current probe)

14

select colored icon with RIGHT mouse button to affiliate with cursor 1 select colored icon with LEFT mouse button to affiliate with cursor 2

Place cursor2 or cursor1 crosshairs by clicking on graph with left or right mouse. Drag left or right mouse to move cursor.

Cursor data displayed here

V1

V2

TD TR PW TF(delay time) (rise time) (pulse width) (fall time)

Page 15: Pspice 325 Class

Performing a Transient Simulation48) To simulate from the top toolbar select Pspice->Edit Simulation Profile49) Tab to Analysis50) Select a Time Domain (Transient) analysis type (see below)51) Specify a run time of 10n and a maximum step size of 10p52) 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 format54) 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 Window55) At the bottom of your graphed results, select the V(Vin) icon56) Hit <ctrl> x to cut

57) Click on the empty plot and hit <ctrl> v paste the Vin plot in the empty window

15

Select V(Vin) and hit <ctrl>-x

Click mouse here & hit <ctrl> v to paste