Sei sulla pagina 1di 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

ECE231&Guide&to&PSpice&
Introduction:&
One$of$the$key$goals$of$the$ECE231$laboratories$is$to$help$students$become$familiar$with$the$use$of$a$ circuit$simulator$such$as$PSpice$as$part$of$the$overall$process$of$modern$circuit$design.$This$guide$is$ written$to$get$you$quickly$up$and$running$with$PSpice$which$you$will$use$throughout$the$labs$in$this$ course.$You$should$complete$the$exercises$here$prior$to$the$first$lab.$ $ $ This$document$has$three$key$sections:$ 1. Installing$PSpice$ 2. Using$PSpice$ 3. Exercise:$Simulating$a$Comparator$with$Hysteresis$ $ In$addition,$there$are$other$resources$available$online:$ $ Pspice$tutorial:$http://denethor.wlu.ca/PSpice/pspice_tutorial.html$ $

1. Installing&PSpice& &
For the labs, we will be using the demo version of PSpice version 9.1, available at $ http://www.eng.auburn.edu/ece/download/91pspstu.exe$ NOTE:$this$is$a$different$version$than$the$one$provided$with$the$course$textbook,$Microelectronic*Circuits$ [Sedra$and$Smith]$(i.e.,$version$16.2$in$the$6th$Edition$and$version$9.2$in$the$5th$Edition).$Version$9.1$was$ chosen$over$the$other$versions$because$of$its$free$availability,$relatively$small$size,$ease$of$use,$lack$of$ licensing$restrictions.$ When$installing$PSpice,$make$sure$to$check$off$Schematics$in$the$Select$Schematic$Editors$window$as$ shown$below$

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

2. Using&PSpice&
The$following$diagram$summarizes$the$simulation$process$and$the$key$operations$and$functions$.$The$ appendices$refer$to$the$ones$at$the$end$of$this$guide,$not$the$textbook.$

Drawing$the$ circuit$
Finding$ Components$
Parts$Browser$ Library$Browser$ Ground$(AGND)$$ Common$Components$ (see$Appendix)$$

Simula`ng$the$ circuit$
Analysis$Setup$$

Plobng$the$ Results$
Opening$PROBE$ window$
Grid$op`ons$ Adding$a$trace$ Ac`vate$Cursor$ Saving$and$Prin`ng$ plots$ Other$common$ opera`ons$(see$ Appendix$B)$

DC$analysis(bias$point)$

Transient$analysis$$ Ini`al$condi`ons$ Start,$stop,$step$`mes$$$

Changing$Component$ Values$
Units$conven`on$ Voltage/current$sources$

(see$Appendix)$

AC$analysis$$ Frequency$range$ Linear,$log$sweep$$

Placing$parts$
copy,$move,$rotate$ opera`ons$

Labeling$$
components$ wires$&$nodes$

$ $ $

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

In$the$Pspice$package$you'll$see$programs$like$Capture*Student$and$PSpice*AD*student,$but$the$only$ program$we$will$use$is$called$Schematics.$Thus$start$Schematics$by$selecting$ Starte>Programse>Pspice2Studente>Schematics$ This$should$bring$up$the$PSpice$Schematics$editor$window$ $

$ You$can$then$call$up$the$parts$you$need$by$clicking$ Draw$e>$Get2New2Part$ and$then$select$Libraries$to$bring$up$the$Library2Browser$window.$ $ On$the$rightehand$side$you'll$find$the$libraries$(e.g.$analog.slb$and$port.slb$l)$and$on$the$leftehand$side$ are$the$parts$(e.g.$OPAMP)$ $ as$shown$below:$

$$ $

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

3. Exercise:&Simulating&a&Comparator&with&Hysteresis&
Lets go ahead and apply your knowledge simulating the Comparator with Hysteresis which we will investigate in Lab #1. The circuit is shown below.
vin v+ vout R1=100kohms R2=100kohms Comparator with hysteresis
You$will$need$the$following$parts:$

Resistor$and$op$amp$parts,$R$and$OPAMP$respectively,$from$the$analog.slb$library$ An$ideal$voltage$source$part,$VPULSE,$the$source.slb$library$ The$ground$part,$AGND,$from$the$port.slb$library$ $

Label the IN, OUT, and POSITIVE nodes as shown below. When finished, your circuit should look like Figure 1:

Figure 1: Schematic of Comparator with Hysteresis circuit

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

Set the voltage source to generate a 0.2Hz triangular wave of 20V peak-to-peak:

Set up the transient analysis to simulate the circuit for 20 seconds:

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

Finally, in the PROBE window, add traces to plot the voltages at the IN, OUT, and POSITIVE nodes as shown (see Appendix B for plotting tips):

Figure 10: Simulation Result of the Comparator

&

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

Appendix&A:&Table&of&components&used&in&ECE231&
Table 1: Important parts and their corresponding libraries

Description Resistor Capacitor Op amp

Part Name R C OPAMP

Library (.slb) ANALOG ANALOG ANALOG

Comments Set the initial voltage by double clicking on the symbol. The initial voltage is given by parameter IC (e.g. IC=1V) - Simple opamp model - Has only three pins, positive, negative, and output - Default power supplies for this model are VNEG=-15v and VPOS=15v

Si Diode BJT transistor DC Voltage source AC Voltage source Sine wave Source Square or triangular wave Source Ground

D1N4148 Q2N3904 VDC VAC VSIN VPULSE AGND

EVAL EVAL SOURCE SOURCE SOURCE SOURCE PORT - Specify the voltage value by double clicking on the value part and changing it - Specify the voltage value by double clicking on the value part and changing it - See Table 3 for parameter values for specific waveforms

Table 3: Using VPULSE to generate Triangular and Square wave Signals

Parameter V1 (initial voltage value) V2 (final voltage value) TD (Time Delay) TF (Time Fall) TR (Time Rise) PER (Period) PW (Pulse Width)
Notes

Triangular Wave Generate a 0.2Hz triangular wave of 20 Vp-p -10 v 10 v 1 ms (some small value, not very crucial) 2.5s = (Period/2) 2.5s = (Period/2) 5s = (1/Frequncy) = (1/0.2) 1 ms
Note that for a triangular wave signal Time Rise and Time Fall are almost half of the Period, and that the Pulse Width is very small with respect to the Period.

Square Wave Generate a 0.2Hz square wave of 20 Vp-p. -10 v 10 v 1 ms (some small value, not very crucial) 1us 1us 5 s = (1/Frequncy) = (1/0.2) 2.5s = (Period/2)
Note that for a square wave signal Time Rise and Time Fall are very small with respect to the period and Pulse Width is almost half of the Period.

Updated Jan. 21, 2013

of 8

ECE231 Guide to PSpice

ECE231 Introductory Electronics

Appendix&B:&Plotting&Tips&
Having multiple plots on one screen: Go to Plot\Add Plot to Window Then select your working plot by clicking on it Add Traces as usual. Using Cursor: Go to Trace\Cursor\Display or select Toggle Cursor from the toolbar (Figure 11) Two cursors would appear on the selected plot, one can be controlled using the left click of the mouse and the other using the right click Also a Probe Cursor window appears which shows two points A1 and A2 with their current x and y coordinates. A1 refers to the cursor controlled by left click of the mouse while A2 refers to the one controlled by right click. At the bottom of the Probe Cursor window another point called dif is displayed which is the result of A1-A2 Press and hold either the left or right mouse buttons to alternate moving one or the other cursor. As you move the cursors, the values in the Probe Cursor window would change. From the bottom of the plot (Legend) you can select the trace that you have in mind by clicking on the legend point (Not the variable). Again, left clicking on the legend point means that the cursor controlled by the left click of the mouse refers to the corresponding curve and vice versa. Note that A1 and A2 are completely independent and you have to select the curve for each cursor first. Then you are able to find the position of each point on a graph and also the difference between the positions of two selected points in the graph As an example, after you plot Figure 10, try to find the y-coordinates of the intersection of the two graphs (you should get around 7.5). What do those values represent? Zoom In Toggle Cursor Zoom Fit
Zoom Area

Figure 11: Probe Toolbar

Zooming: Go to View\Zoom (see Figure 11) Choose from different options of zooming Changing the settings of X & Y axis: Go to Plot\Axis Settings

Adding Labels to the simulation: Go to Plot\Label\Text

Updated Jan. 21, 2013

of 8

Potrebbero piacerti anche