CIS Capture Instructions (Aug.2009) Pg. 1 of 26 N. Abbasi, 2006 (updated by A. Pereira)
ORCAD 16.2 Tutorial Document Modified – August, 2009 Note :- This document serves as a tutorial for OrCAD 16.2, the version being used in the 2009 PHYS333 and PHYS334 courses. Please read carefully before you come to the labs using simulation.
CIS Capture Instructions (Aug.2009) Pg. 2 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Table of Contents
ORCAD 16.2 Tutorial.................................................................................................. 1 Objectives of the tutorial and Introduction................................................................ 4 Creating a New Project and Schematic Diagram....................................................... 5 Selecting circuit components connecting them together, setting component values and properties AND saving the schematic diagram................................................... 6 Instructions on setting up a circuit ............................................................................. 6 Creating a New Simulation Profile and setting up the simulation .......................... 11 Simulating the circuit and observing the simulation results ................................... 14 Use of the Probe Cursors in PSpice AD.................................................................... 17 Opening a Saved Project ........................................................................................... 18 Retrieving saved simulation graphs.......................................................................... 19 Appendix B – Suggested Project Storage ................................................................. 21 Appendix C -- dB and Phase Markers for Bode Plots ............................................. 22 Appendix D – Capture CIS and PSpice AD Toolbars ............................................. 23
CIS Capture Instructions (Aug.2009) Pg. 3 of 26 N. Abbasi, 2006 (updated by A. Pereira)
List of Tables Table 1 : Commonly used short cut keys................................................................................. 8 Table 2: Unit Symbols ............................................................................................................ 9 Table 3: Simulation short cut keys......................................................................................... 14 Table 4: Libraries and Components....................................................................................... 20 List of Figures Figure 1: New Project Start Window........................................................................................ 5 Figure 2: Create PSpice Project Window ................................................................................ 5 Figure 3: Schematic window.................................................................................................... 6 Figure 4: Place Part Menu and Place Part Dialog Box and Add Library Window .................... 7 Figure 5: Obtain “Zero-Ground” ............................................................................................... 8 Figure 6: Changing component values .................................................................................... 9 Figure 7: Circuit diagram – R-C circuit................................................................................... 10 Figure 8: PSpice menu .......................................................................................................... 11 Figure 9 : New simulation profile ........................................................................................... 11 Figure 10 : Analysis TAB ....................................................................................................... 12 Figure 11 : Options TAB ........................................................................................................ 13 Figure 12: Simulation results ................................................................................................. 14 Figure 13: Expanded PSpice A/D window ............................................................................. 15 Figure 14: PSpice A/D graph from printer.............................................................................. 16 Figure 15: Probe Cursor in PSpice AD .................................................................................. 17 Figure 16: Project Folder Windows........................................................................................ 18 Figure 17: Path to PSpice xxx.dat files .................................................................................. 19 Figure 18: Retrieving and Displaying xxx.dat files ................................................................. 19
CIS Capture Instructions (Aug.2009) Pg. 4 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Objectives of the tutorial and Introduction In this laboratory experiment you will Become familiar with the simulation software Learn to use schematic capture Setup parameters, simulate and analyze the waveforms obtained If you are in the LAB the software is already installed on the LAB computers. If you are at home, download and install OrCAD (Demo Version 16.2 OrCAD) There are FOUR main steps involved in circuit simulation using PSpice. They are:
1. Creating a New Project and Schematic Diagram 2. Selecting circuit components, connecting them together and setting component values
and properties AND saving the schematic diagram 3. Creating a New Simulation Profile and setting up the simulation 4. Simulating the circuit and observing the simulation results
CIS Capture Instructions (Aug.2009) Pg. 5 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Creating a New Project and Schematic Diagram Start ORCAD 16.2 StartAll ProgramsOrCAD 16.2 Demo Capture CIS Demo Create a New Project
File New Project Enter Project Name Select Analog or Mixed A/D Create a folder for the project (See
App. B below for suggested folder location)
Click OK
Figure 1: New Project Start Window
Figure 2: Create PSpice Project Window
Select “Create a blank project” and Click OK You should now see a blank schematic diagram.
CIS Capture Instructions (Aug.2009) Pg. 6 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Figure 3: Schematic window
Selecting circuit components connecting them togeth er, setting component values and properties AND saving the sche matic diagram You will be working essentially with two screens, the Capture CIS screen ad the PSPice AD Demo screen. These have various toolbars associated with them, but all the icons will not be used by you. The information in App. D shows the toolbars and the particular icons of interest. Instructions on setting up a circuit To obtain a part, click on “Place” on the top menu bar to get the drop down menu shown on the left below, and then click on “Part” to get the Place Part dialogue box shown below. OR Click on the “Place Part” icon in the DRAW toolbar to get the dialogue box. Three icons should be noted:-
To the right of the “Part” heading is the Place Part icon – once a part is selected, either hit <Enter> or click on this icon to transfer the part to the schematic, where it may be place and modified.
To the right of the “Libraries” heading is the “Add Library” icon. This opens up the library list from which libraries may be selected.
CIS Capture Instructions (Aug.2009) Pg. 7 of 26 N. Abbasi, 2006 (updated by A. Pereira)
The “X” icon to the far right is used to remove libraries from the list.
Figure 4: Place Part Menu and Place Part Dialog Box and Add L ibrary Window
When starting from scratch, libraries will have to be added. So, if necessary, click on the “Add Library” icon to get the “Browse File” folder, Select the appropriate folder (.olb) and click on OPEN, to add the library to the list. Select the part required, and the diagram is shown in the “Packaging” window. Now hit <Enter>, or click on the Place Part icon (top right of dialogue box) to transfer the part to the schematic, and then place it by moving the mouse cursor and left clicking when the desired location is reached. Note that copies of a part may be placed in the schematic (subject to the limitations of the Demo version) by moving the cursor and Left Clicking. When the required number of parts has been placed, Right Click, and then Left Click in the pop-up window on “End Mode”, or press the <Esc> key. To rotate or mirror parts – Left Click to select the part, and then Right Click to get a pop-up window, which has options for rotate or mirror. Note the libraries you will be using:- SOURCE -- DigClock, VAC, VDC, VPULSE, VSIN ANALOG -- R, L & C components
CIS Capture Instructions (Aug.2009) Pg. 8 of 26 N. Abbasi, 2006 (updated by A. Pereira)
7400 -- Digital logic circuits, e.g. Gates, Counters, Shift Registers OPAMP -- Op-amps used in course -- µA 741, LF411 ABM -- the GAIN function DIODE -- Diodes, e.g. 1N400x series, 1N914
For the Analog circuits used, the “Zero-Ground” part is critical. This is a necessary part to use, since without it the circuit will not work. To obtain it, click
on the Place Ground icon in the DRAW toolbar, and select the Zero-Ground. Note the “0” associated with the Ground symbol. Note that many Analog parts have default preset values, e.g. Resistors – 1k, for 1 kΩ, Capacitors – 1n for 1 nF, VDC – 0Vdc for 0 VDC. These may be changed to the desired values, as explained below.
Figure 5: Obtain “Zero-Ground”
Table 1 : Commonly used short cut keys
Short cut keys Operation P Place Part W Place Wire F Power G Ground T Text N Net name or alias I Zoom IN O Zoom OUT Control+F Find Control+C Copy Control+V Paste Control+X Cut Del Delete Control+A Select All Control+Z UnDo R Rotate Component H Mirror Horizontally V Mirror Vertically
CIS Capture Instructions (Aug.2009) Pg. 9 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Once parts have been placed, use Place/Wire, or click on the “wire” icon to allow you to wire the circuit. The cursor changes to a crosshair, which may be used to connect between valid connection points. Hold the left mouse button as you move the cursor to the other connection point, and then release it. If the “wire” continues beyond the intended termination point when you move the cursor away, return the crosshair to the termination point and left-click the mouse. To change the direction of a wire, left-click at the point where the direction is to change. This is useful when you wish to get around awkward corners, or to make the circuit more presentable. Components come with preset values, which may be changed easily. Resistors -- 1k for 1 kΩ Capacitors -- 1n for 1 nF DCPower -- 0Vdc
To change the values, double click on the value itself (not on the component), and in the resulting window, alter the value, e.g. in the value window, change the 0 to 5 (for 5Vdc).
Figure 6: Changing component values
Standard “electronic” values are written using actual value, the symbol or the exponential form according to the table below.
Table 2: Unit Symbols
Unit Name Symbol Exponential Form Value
Femto F (or f) 1E-15 10-15 Pico P (or p) 1E-12 10-12 Nano N (or n) 1E-9 10-9 Micro (µ) U (or u) 1E-6 10-6 Milli M (or m) 1E-3 10-3 Kilo K (or k) 1E3 103 Meg MEG (or meg) 1E6 106 Giga G (or g) 1E9 109 Tera T (or t) 1E12 1012
CIS Capture Instructions (Aug.2009) Pg. 10 of 26 N. Abbasi, 2006 (updated by A. Pereira)
• Example: to denote 7.8 ×1012, you can enter 7.8T instead of 7.8E12. • To enter the resistance value of 1kΩ, you can enter 1000, 1E3, 1K or 1k. • Enter the attributes for all three resistors and the DC voltage source. • Note: you do not have to include the units when entering the values. • Caution – the scale symbols are not case-sensitive; M means milli, not Mega.
[Ref: PSpice Tutorial by David Lay – for Table and Example above]
Sample Simulation Set-up and Run Draw and complete the circuit shown and save it.
Figure 7: Circuit diagram – R-C circuit
Use the VSIN source and set the values VOFF = 0, VAMPL = 1 V and FREQ = 1kHz Place Net Names (Vin, Vout) -- Short cut key is N
Place Voltage/Level Markers
Save the schematic
CIS Capture Instructions (Aug.2009) Pg. 11 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Creating a New Simulation Profile and setting up th e simulation
Figure 8: PSpice menu
PSpiceNew Simulation Profile
Figure 9 : New simulation profile
Give the New Simulation Profile a name and click Create
CIS Capture Instructions (Aug.2009) Pg. 12 of 26 N. Abbasi, 2006 (updated by A. Pereira)
ANALYSIS TAB Select analysis Type: Time Domain (Transient) Run to time: Set the simulation stop time here Change the “Run to Time” to the desired time (say 5 ms in this case)
Figure 10 : Analysis TAB
CIS Capture Instructions (Aug.2009) Pg. 13 of 26 N. Abbasi, 2006 (updated by A. Pereira)
OPTIONS TAB – Required for Digital circuits, NOT for Analogue Circuits Category: Gate-level Simulation Timing Mode: Typical Initialize all flip flops to “0”
Figure 11 : Options TAB
Apply and click OK
CIS Capture Instructions (Aug.2009) Pg. 14 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Simulating the circuit and observing the simulation results
Table 3: Simulation short cut keys
F11 Run Simulation F12 View Simulation Results
Run the simulation by using F11 or clicking on the Run icon
Figure 12: Simulation results
CIS Capture Instructions (Aug.2009) Pg. 15 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Alternate ExpandedSimulation Display Window
Figure 13: Expanded PSpice A/D window
CIS Capture Instructions (Aug.2009) Pg. 16 of 26 N. Abbasi, 2006 (updated by A. Pereira)
If the PSpice A/D screen output is sent to the printer, the black & white output appears as:-
Figure 14: PSpice A/D graph from printer
CIS Capture Instructions (Aug.2009) Pg. 17 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Use of the Probe Cursors in PSpice AD
Figure 15: Probe Cursor in PSpice AD
Toggle cursor Toggles the display of the Probe cursor on and off. Equivalent to the Display command on the Cursor menu (on the Trace menu).
There are two cursors available on the graph window, after a simulation has run successfully – A1, controlled by the Left mouse button and A2, controlled by the Right mouse button. These may be set to make measurements on one of the traces, or set for one on each trace. When the Toggle Cursor icon is clicked (or use the Trace/Cursor menu item), the Probe Cursor window appears. This may be moved to any position on the screen, in the normal way. To set the Cursors:- a) For A1, LEFT CLICK on the symbol (tiny square, diamond, triangle, etc.) to the left of the trace name at the bottom of the graph. Then move the cursor to the graph window and hold down the LEFT button and move. You will notice that the cursor cross-hair moves along the trace selected, and the coordinates for A1 in the Probe Cursor window change – till the button is released. b) For A2, RIGHT CLICK on the symbol (tiny square, diamond, triangle, etc.) to the left of the trace name at the bottom of the graph. Then move the cursor to the graph window and hold down the RIGHT button and move. You will notice that the cursor cross-hair moves along the trace selected, and the coordinates for A2 in the Probe Cursor window change – till the button is released. To freeze the numbers in the Probe Cursor window, move the cursor to the white number section of the window and LEFT CLICK. To unfreeze the Probe Cursor window, LEFT CLICK again in the window.
CIS Capture Instructions (Aug.2009) Pg. 18 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Opening a Saved Project From the Capture CIS window, File/Open/Project
Find the correct project, and click on the .opj file to get a screen with the project folder
Click on the .dsn icon to open up the folder and then on SCHEMATIC1 and finally on PAGE1. This will bring up the saved schematic. You can work on the schematic, as before – modify it, edit the simulation profile, run the simulation, etc. Figure 16: Project Folder Windows
CIS Capture Instructions (Aug.2009) Pg. 19 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Retrieving saved simulation graphs
1. Know where you have saved the graph and go find the “xxx.dat” file. To do this, click on the project folder, and then in subsequent windows on all the “sub-folders” that appear, till in the end, there will not be any sub-folders, just files, among them a “xxx.dat” file. This is the one to open.
Figure 17: Path to PSpice xxx.dat files
Bring up PSpice AD Demo (not CIS Capture), and open the xxx.dat file. You will get a blank window, BUT with the horizontal axis scaled as you saved it (e.g. for the Integrator simulation -- 10 Hz to 1 MHz for the AC Sweep). 2. Now add the appropriate traces per your original graphs. Then:- Print, make
measurements, etc. From the menu list – Trace/Add trace. Then add the DB() with V(U1:OUT) and P() also with the same voltage. Click OK. [Note: For non-semilog graphs, do not use the DB() and P().]
Figure 18: Retrieving and Displaying xxx.dat files
CIS Capture Instructions (Aug.2009) Pg. 20 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Appendix A – Component Libraries Table 3 lists all the components (and their corresponding libraries) needed for simulating circuits in the text book and the laboratory experiments for phys333/334
Table 4: Libraries and Components
Component Library Comments “Zero-Ground” Place Ground icon Ground (Analog circuits) Digital Components 7493A 7400 Binary Ripple Counter –
4 bit 7473 7400 JK FlipFlop Logic Gates 7400 Comments 74XXX Series 7400 Basic Logic Gates Flip Flops 7400 Comments 74XXX Series 7400 Counters, Registers,
Memories, Flip Flops and Latches
Passive Components R ANALOG Resistor L ANALOG Inductor C ANALOG Capacitor DC Sources AC Sources SOURCE AC Sweep Sinusoidal SOURCE AC fixed frequency Pulse SOURCE Pulse source DigClock SOURCE Digital clock input VDC SOURCE DC supply Diodes Rectifier Diode DIODE Light Emitting Diode DIODE Operational Amplifiers µA741 OPAMP LF411 OPAMP Math Gain function ABM May replace unity-gain
op-amp
CIS Capture Instructions (Aug.2009) Pg. 21 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Appendix B – Suggested Project Storage It is suggested that your project files are saved in a systematic manner, so that you can find them and re-open the project, or use the saved data at a later time.
When installing ORCAD 10.5 Demo, you will be
given the opportunity to set up a folder for project files – in the left screen shown, this is the
OrCAD_Data folder (my name on my PC). In the OrCAD_Data folder, set up a separate folder for each project, as shown in the middle screen above – I have selected the Biquad Filter project, in order to show how the project files are stored by ORCAD – right screen. When it is necessary to open this project later, first open Capture CIS Demo. Then File/Open/Project, and work your way to the appropriate project file (.opj) and click on this – in my examples above, the BiQuadFilter.opj in the right screen.
CIS Capture Instructions (Aug.2009) Pg. 22 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Appendix C -- dB and Phase Markers for Bode Plots
When markers are required for Bode plots – dB and phase -- the toolbar icons cannot be used to obtain these. Instead, one must go the “menu” route, as shown above:- PSpice Markers Advanced dB Magnitude of Voltage (and/or Phase of Voltage) Both of these Markers should be applied to the output. No marker is required at the input, since a Bode plot uses Gain and Phase Shift. With the input voltage set to 1 Vac, the Gain is then calculated using the value of the output voltage. Notes:-
The supply should be the VAC source, set to 1 Vac. The supply must be placed in circuit before the markers are applied. The Simulation “Analysis Type” should be set to “AC Sweep/Noise
CIS Capture Instructions (Aug.2009) Pg. 23 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Appendix D – Capture CIS and PSpice AD Toolbars The Capture CIS screen has three toolbars:-
The Capture Toolbar, which has the usual edit/save/print etc features The Draw Toolbar on the right of the screen – placing components and wiring up your
circuit The PSpice Toolbar (in Capture) – setting up simulations, adding voltage and current
markers, and displaying bias voltages and currents Capture Toolbar The Capture toolbar provides shortcuts for many of the most frequently used commands. The following table describes the icons of interest on the toolbar. Note that the toolbar has a single row of icons, not two rows as shown.
Icon Name Description
New document
Creates a new document based on the active document. Equivalent to the New command on the File menu.
Open document
Opens an existing document based on the active document. Equivalent to the Open command on the File menu.
Save document
Saves the active schematic page or part. Equivalent to the Save command on the File menu.
Print Prints the active schematic page or part. Equivalent to the
Print command on the File menu.
Cut to clipboard
Removes the selected object and places it on the Clipboard. Equivalent to the Cut command on the Edit menu.
Copy to clipboard
Copies the selected object to the Clipboard. Equivalent to the Copy command on the Edit menu.
Paste from clipboard
Pastes the contents of the Clipboard at the cursor. Equivalent to the Paste command on the Edit menu.
Undo Undoes the last command performed. Equivalent to the
Undo command on the Edit menu.
Redo Redoes the last command performed. Equivalent to the
Redo command on the Edit menu.
Most recently used
Displays the most recently placed part name in the dropdown list. Capture automatically adds part names as you select them from the Place Part dialog box. Select from the list to place parts again later.
Zoom in Zooms in to present a closer, enlarged view. Equivalent to
the In command on the Zoom menu (on the View menu).
Zoom out Zooms out to present more of your document. Equivalent
to the Out command on the Zoom menu (on the View menu).
Zoom to region
Specifies an area of the schematic page or part to enlarge to fill the entire window. Equivalent to the Area command on the Zoom menu (on the View menu).
CIS Capture Instructions (Aug.2009) Pg. 24 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Draw Toolbar The Draw Toolbar provides shortcuts for commands to place components, pins, wires, bus, and drawing objects, such as arcs, polyline, ellipse, and text. The following table describes the icons on the toolbar. This toolbar appears as two vertical toolbars on the right of the Capture CIS screen. The icons are in a different order to that shown:- starting from the top left, every odd-number icon appears in the left vertical toolbar, and every even-number icon appears in the right vertical toolbar. The icons you will use are shown below.
Tool Name Description
Select Selects objects. This is the normal mode.
Place part Selects parts from a library for placement. Equivalent to the
Part command on the Place menu.
Place wire Draws wires. SHIFT allows any angle drawing. Equivalent to
the Wire command on the Place menu.
Place net alias
Places aliases on wires and buses. Equivalent to the Net Alias command on the Place menu.
Place ground
Places ground symbols. Equivalent to the Ground command on the Place menu.
Place offpage connector
Places off-page connectors. Equivalent to the Off-Page Connector command on the Place menu.
PSpice Toolbar (in Capture) The PSpice toolbar provides shortcuts for many of the most frequently used PSpice commands. This toolbar appears only if you have PSpice license and open a project that uses PSpice. The following table describes the icons on the toolbar. This toolbar appears below the Capture toolbar. Again, you will not need all the icons.
Tool Name Description
New simulation profile
Creates a new simulation profile. Equivalent to the New Simulation Profile command on the Pspice menu.
Edit simulation profile
Opens simulation profile for editing. Equivalent to the Edit Simulation Profile command on the Pspice menu.
Run PSpice Runs PSpice simulation for active profile. Equivalent to the
Run Pspice command on the Pspice menu.
CIS Capture Instructions (Aug.2009) Pg. 25 of 26 N. Abbasi, 2006 (updated by A. Pereira)
View simulation results
Shows simulation results for the active profile. Equivalent to the View Simulation Results command on the Pspice menu.
Place voltage marker
Places voltage/digital level markers. Equivalent to the Voltage Level command on the Markers sub-menu of the Pspice menu.
Place current marker
Places marker showing current into a pin. Equivalent to the Current Into Pin command on the Markers sub-menu of the Pspice menu.
Enable bias voltage display
Enables display of bias voltages. Equivalent to the Enable Bias Voltage Display command on the Bias Points sub-menu of the Pspice menu.
Toggle bias voltage display
Toggles display of voltage bias point value for selection. Equivalent to the Toggle Selected Bias Voltage Display command on the Bias Points sub-menu of the Pspice menu.
Enable bias current display
Enables display of bias currents. Equivalent to the Enable bias current display command on the Bias Points sub-menu of the Pspice menu.
Toggle bias current
Toggles display of current bias point value for selection. Equivalent to the Toggle Selected Bias Current Display command on the Bias Points sub-menu of the Pspice menu.
PSpice AD Toolbars Once the simulation has run successfully, the PSpice AD window opens with the graphs. The toolbars are shown below. Note that the bottom 6 icons appear vertically on the left of the screen.
The description of the icons you will use are given below. Tool Name Description
File Toolbar
Open document
Opens an existing document based on the active document. Equivalent to the Open command on the File menu.
Save document
Saves the active schematic page or part. Equivalent to the Save command on the File menu. [This may be blanked.]
Print Prints the active schematic page or part. Equivalent to the
Print command on the File menu. Simulate Toolbar
in PSpice
Run Runs the current simulation. Equivalent to the Run
command on the Simulation menu.
CIS Capture Instructions (Aug.2009) Pg. 26 of 26 N. Abbasi, 2006 (updated by A. Pereira)
Probe toolbar in PSpice
Zoom in Zooms in on a specified point. Equivalent to the In command on the
Zoom menu (on the View menu).
Zoom out Zooms out from a specified point. Equivalent to the Out command on
the Zoom menu (on the View menu).
Zoom area Zooms in on a selected area of a graph. Equivalent to the Area
command on the Zoom menu (on the View menu).
Zoom fit
Zooms to show all traces and labels. Equivalent to the Fit command on the Zoom menu (on the View menu). [Note: Returns to original graphs.]
Add trace Opens the Add Traces dialog box, which you use to add a trace (or traces) to a selected plot. Equivalent to the Add Trace command on the Trace menu.
Text label Opens the Text Label dialog box, which you use to add a text label to a graph. Equivalent to the Text command on the Label menu (on the Plot menu).
Mark data points Marks data points on analog traces. Equivalent to selecting the Mark
Data Points option in the Probe Options dialog box (accessed by choosing the Options command on the Tools menu).
Toggle cursor Toggles the display of the Probe cursor on and off. Equivalent to the Display command on the Cursor menu (on the Trace menu).
Vertical toolbar on left of the screen
Edit simulation profile
Opens simulation profile for editing. Equivalent to the Edit Simulation Profile command on the Pspice menu.
Top Related