1 introduction to pspice...1 introduction to pspice.ppt author ashwin created date 8/23/2006...

28
Introduction to PSpice Lab 1

Upload: others

Post on 28-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

Introduction to PSpice

Lab 1

Page 2: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 3: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 4: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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”.

Page 5: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

5

Drawing Circuits

• Use the “Edit” and “Draw” pulldownmenus to draw a circuit in theschematics area

Page 6: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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:

Page 7: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 8: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

8

Manipulating Components

• Click on various resistors and move themaround.

• Click on a resistor and tryout the “Rotate” entry of the“Edit” pulldown menu.

Page 9: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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.”

Page 10: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 11: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

11

Other Components

• PSpice includes various other circuitcomponents such as:– Inductors (L) and capacitors (C)

Page 12: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 13: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 14: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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.

Page 15: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 16: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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:

Page 17: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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.

Page 18: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 19: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 20: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

20

Grounds

• There are two kinds of grounds inPSpice - Analog ground (agnd orgnd_analog in PSpice) and digitalground (egnd or gnd_earth in PSpice)

Page 21: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

21

Simulating circuits

• Connect an analog ground to the circuitas shown and simulate your circuit asdescribed earlier

Page 22: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 23: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 24: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 25: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

25

Build another circuit

• Clear the voltage divider and build acurrent divider as shown:

Page 26: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

26

Simulate the circuit

• Simulate the circuit and display onlycurrents in the circuit. You should endup with something similar to this:

Page 27: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

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

Page 28: 1 Introduction to PSpice...1 Introduction to PSpice.ppt Author Ashwin Created Date 8/23/2006 12:41:29 PM

28

Simulate

• Build and simulate the circuit shown inthe previous slide. Does PSpice giveyou the same answers that youcalculated?