Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
Introduction to PSpice
Lab 1
2
What is SPICE?
• SPICE stands for Simulation Packagewith Integrated Circuit Emphasis
• SPICE is as close to a universallyavailable package for doing numericalnetwork analysis as one can find
3
Getting PSpice
• On the handout, is the procedure to accessPSpice on ASU’s computers
• The only place that you can download PSpiceis from this link:– http://www.electronics-
lab.com/downloads/schematic/013/– Scroll down to the bottom of the page and
install a student version of PSpice on yourhome computer
4
Accessing SPICE Today
• Turn on the computer.• The password is ‘gwc273’.• Click on “Start”, then pull out
“Programs”, then pull out “PSpiceStudent” and then click on the entry“Schematics”.
5
Drawing Circuits
• Use the “Edit” and “Draw” pulldownmenus to draw a circuit in theschematics area
6
Placing components• Go to the DRAW menu and click on “Get new
part”. You can also get a part using control-G
• If you know the PSpice name of the componentyou want, you can type it into this text box:
7
Placing Components (contd.)• Click Place & Close and place about a half
dozen resistors down by moving the mouseand clicking on the left mouse button
• When done, click the right mouse button oryou will keep placing resistors
8
Manipulating Components
• Click on various resistors and move themaround.
• Click on a resistor and tryout the “Rotate” entry of the“Edit” pulldown menu.
9
Manipulating Components (contd.)• Click on a resistor and use the
“Attributes…” entry of the “Edit” pulldownmenu or double click the resistor itself– Change the following attributes: “VALUE,” to 5k
and “PKGREF” to “Resistor1.”
10
Manipulating Components (contd.)
• Names and values of the resistance canalso be changed by double clicking onthe displayed name and value
• To delete a specific resistance(components), select the resistor(components) and press the “Delete”key on your keyboard
11
Other Components
• PSpice includes various other circuitcomponents such as:– Inductors (L) and capacitors (C)
12
Sources
• Most circuits in PSpice require a source ofsome kind. The most common sources usedare Vdc, Idc, Vsin and Vpulse
– Note that the current source Idc shows the flow ofdirection of the electrons, which is the opposite ofcurrent
13
More sources
• There are other sources such as Vac and Iac, but weseldom use them
• Vsin is preferred to Vac because differentfrequencies can be set in Vsin
– If you see any “ghosting” (shown below), pressctrl+L on your keyboard to refresh the drawingarea
14
Basic circuits
• Build a voltage divider in PSpice• Step 1: Place the components as
shown
– To make things look bigger in PSpice,press ctrl+N on your keyboard.
15
Wiring components• Step 2: Wire the components together
– Select “Wire” from the Draw menu, or byclicking the button shown below or bypressing ctrl+w on your keyboard
or
16
Connecting the components• To wire the components click and
release the left mouse button at thestart point. Move the pointer to the endpoint, and click and release again. Thiswill wire two components together.Make sure your circuit looks like this:
17
Common error• If your circuit looks like this:
you made a common error. You mistakenly shortedout resistance R1. That is why you see the big dotson either side of the resistance and the wire runningthrough it. (shown here in red).
• Rectify it by deleting the wire running through theresistance.
18
Simulation parameters
• Set the value of the DC voltage source to 5 volts.
• Click on the Analysis menu, and click on “Simulate.”Alternatively you can click on the button shown belowor press F11 on your keyboard.
or
19
Simulation results
• You probably got an error as shownbelow:
• If you see the “Node floating” error, youhave not placed a ground in the circuit– Every circuit in PSpice MUST have a
ground
20
Grounds
• There are two kinds of grounds inPSpice - Analog ground (agnd orgnd_analog in PSpice) and digitalground (egnd or gnd_earth in PSpice)
21
Simulating circuits
• Connect an analog ground to the circuitas shown and simulate your circuit asdescribed earlier
22
Simulation Result• You should see something similar:
– In the lower left corner, you can see a messagesaying “Simulation complete,” but there are nomeaningful results displayed
23
Displaying Results
• Go back to your schematic (circuit) andfrom the Analysis menu, enable voltageand current displays. You can also clickthe buttons shown below:
or
24
Interpreting results
• Your circuit should now look as follows:
– Selecting a voltage display shows the node withwhich it is associated
– Selecting a current display shows the direction ofthe current
25
Build another circuit
• Clear the voltage divider and build acurrent divider as shown:
26
Simulate the circuit
• Simulate the circuit and display onlycurrents in the circuit. You should endup with something similar to this:
27
Circuit Analysis• Consider the following circuit. Analyze the
circuit using techniques learnt in class. Findthe current in and voltage across R6
• Show all your work in your data sheet. Writeneatly and legibly
28
Simulate
• Build and simulate the circuit shown inthe previous slide. Does PSpice giveyou the same answers that youcalculated?