Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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$
of 8
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)$
Changing$Component$ Values$
Units$conven`on$ Voltage/current$sources$
(see$Appendix)$
Placing$parts$
copy,$move,$rotate$ opera`ons$
Labeling$$
components$ wires$&$nodes$
$ $ $
of 8
$$ $
of 8
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:$
Label the IN, OUT, and POSITIVE nodes as shown below. When finished, your circuit should look like Figure 1:
of 8
Set the voltage source to generate a 0.2Hz triangular wave of 20V peak-to-peak:
of 8
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):
&
of 8
Appendix&A:&Table&of&components&used&in&ECE231&
Table 1: Important parts and their corresponding libraries
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
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
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.
of 8
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
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
of 8