Introduction to PSPICE (Concordia_s is Based on This)

download Introduction to PSPICE (Concordia_s is Based on This)

of 13

Transcript of Introduction to PSPICE (Concordia_s is Based on This)

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    1/13

    INTRODUCTION TO PSPICE

    I. OBJECTIVES

    -Start and invoke the necessary tools to run PSPICE.

    -Introduce the PSPICE 9.1 student version circuit simulation part.

    -Learn how to build circuits and simulation in time and frequency domains.

    II. ALL ABOUT PSPICE

    PSPICE V9.1 is a user friendly with a simple graphical interface version of the well known

    analog circuit simulator SPICE Simulation program for Integrated Circuits Emphasis. Other

    versions of SPICE include B2SPICE and HSPICE which have been used for the same purpose asPSIPCE to mathematically simulate the circuits behavior. The common part among all circuit

    simulation engines is the script used to describe the circuit components and the connectivity.

    This script is known as the circuit NETLIST that describes the topology of the circuit or a groupof numbered nodes in a very simple, easy to learn structure. In general, any SPICE version can

    evaluate the circuit behavior in DC, AC and Transient mode but the main difference between

    HSPICE and PSPICE is the user friendly factor. HSPICE requires the user to prepare andcompile the NETLIST while the PSPICE input simply drags and drops all circuit elements and

    the rest will be automatically generate.

    PSPICE student version V9.1 is available in WINDOWS on the laboratory Desktop. You can

    download the same version from http://www.engr.uky.edu/~cathey/pspice061301.html

    III. GET STARTEDWITH PSPICE V9.1 (STUDENTVERSION)

    Log into your WINDOWS account and create a new folder on windows Desktop. Rename the

    folder Pspice1 as shown in figure 1. This folder will be used to save the circuits you will

    shortly create using PSPICE.

    Create a short cut forCapture Student on windows desktop as follows:

    - Left click once onStart(lower left corner in figure1), click once on all programs, then move

    the mouse cursor to Pspice student and, Capture Student. At this moment, all the previous

    selections are highlighted, without loosing this condition right click once on Capture studentand

    select create shortcut, clickYes on the pop up window.

    1

    http://www.engr.uky.edu/~cathey/pspice061301.htmlhttp://www.engr.uky.edu/~cathey/pspice061301.html
  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    2/13

    Figure 1 Windows Desktop

    To open the capture student, double click on the short cut and maximize OrCAD capture, as

    shown in figure 2. Now you are ready to input your own circuit and conduct the simulation as

    described in the steps below:

    Figure 2 Capture window

    2

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    3/13

    1- Click on the first menus icon in figure 2 (the arrow is pointing to the icon), or click on

    File menu and select New project. Project window shown in figure 3 will appear.

    The new project name will be the same name RCCIRCUIT given to the circuit youintend to enter and simulate. Select Analog or Mixed A/D, click on Browse to locate the

    folder Pspice1, then click OK to open another window entitled Create Pspice Project as

    shown in figure 4. On this window select Create a blank project then hit OK.

    Figure 3 New Project window

    Figure 4

    3

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    4/13

    2- After you click OK, a blank OrCAD Capture window (figure 5) with a grid and Tool

    Pallet will pop up. If you dont see the Tool Pallet attached vertically to the left side of

    the capture widow, click anywhere on the window to appear.

    Figure 5

    Before going further you need to know the function of each button on the Tool Pallet. Please

    examine carefully figure 6 and get familiar with the function of each button. Some of them

    are essential to build electric and/or electronic circuits while others look similar to the ones

    found in any paint brush application. The brief definition of each Tool ballet button is given

    below in alphabetical order:

    A End mode, this button will deactivate any active component selection mode.

    B Open Place Part window. C Place Wire mode.

    D Open Place Power Window. E Open Place ground window.

    F Place Text. G Voltage/Level Marker.

    4

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    5/13

    H Current Marker. K Enable Bias Voltage Display.

    N Enable Bias Current Display. M Place Off-Page Connector.

    G H K N M

    Figure 6 Tool ballet

    A B C D E

    F

    Place the components and connect the parts

    4- Open Place Part window (click on button B) then click on Add Library button, the BrowseFile window shown in figure 7 will open. Select all library files then, press Open.

    Figure 7 Add to the project these Library files

    5

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    6/13

    Three of the above library files will be used extensively in electric/electronic circuits, the

    Analog, the Source and the Eval libraries.

    Analog: contains all passive elements RLC, mutual inductance, transmission line, and voltage

    and current dependent sources.

    Eval: contains all electronic devices such as Diodes (D..), Bipolar transistors (Q.), MOStransistor, JFETs(J.), real OpAmp (u741), switches, various digital gates and components.

    Source: contains all type of independent voltage and current sources such as Vac, Vdc Iac, Idc,

    Vsin, Vexp, Vpulse..etc. Make sure to include at least these three files with the project.

    After adding the library files, the Place Part window, shown in figure 8 will open. Choose theparts of the circuit and place them on the Capture window. For example, we will select R part

    and place it on the capture window as follow:

    - Select Analog Library; scroll up/down to locate R, once it appears in the designated block

    press O.K.

    - The Place Part window will close and the element you selected will be glued to the

    mouse cursor. One left click on the mouse will place one element on the capture window.

    This process will continue until you deactivate this mode by clicking on button A. Place

    one R and one C on the drawing area. Rotate C 90 degrees, which can be done byselecting the element, then right click to open the menu that contains Mirror, Rotateetc.

    - Place voltage source Vpulse from source library (Place Part) in capture window.

    - Place a GND, this can be done as follows: depress the button E (figure6), in the pop up

    window entitled Place Ground select GND/CAPSYM, the symbol of the circuit groundwill appear in the little block at the low right corner. Change what is written in the field

    Name: from GND to 0 then click on O.K. to place the element.

    Figure 8

    - To connect the circuit elements press button C (figure 6), place the wire cursor + onone end of the element then left click once. Drag the wire to the point where you want to

    connect and again left click once.

    - Add Voltage Level Markers button G (figure 6) at the input and the output.

    6

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    7/13

    The final circuit must look like the one shown below.

    Figure 9 RCCIRCUIT Project

    Assign Values and Numbers to the parts

    5- Changing the values/name of the resistors, capacitors or any other elements can be done

    by double-clicking on the number/name next to the element. As you finish a Display

    Properties window will pop up to allow you to enter the new value or name. Press O.K. for

    the replacement of the old value to take place. You can add text to your circuit such asInput/Output, your name on the circuitetc Press button F (figure 6) to activate text

    mode. Save the project.

    The values of elements can be specified using scaling factors (upper or lower case):

    T or Tera (=1E12); G or Giga (=E9); MEG or Mega (=E6);

    K or Kilo (=E3); M or Milli (=E-3); U or Micro (=E-6);

    N or Nano (=E-9); P or Pico (=E-12) F or Femto (=E-15).

    Both upper and lower case letter are allowed in PSPICE and HSPICE. For example a

    capacitor of 220 picofarad can be written as:

    220P; 220p; 220pF; 220pFarad; 220E-12; or 0.22N

    Set the value of capacitor to 22u, leave the default value 1K for R, and set the parameters of the

    Vpulse as follow:

    V1 V2 TD: Delay Time TR: Rise Time TF: Fall Time TW: P. Width PER: Period

    0 4 0 1 u 1 u Sec 100 m Sec 200 m Sec

    7

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    8/13

    Time Domain Analysis

    6- From the top menu of the OrCad Capture (figure9) click on Pspice from the pull-down menuclick on New Simulation Profile, writethe name of the new simulation as shown in figure 10.

    Figure 10 New Simulation and Simulation Settings Windows

    Press Create to open the Simulation Settings window. Enter 200m in the Run to Time, thenapply and press O.K. Now you are ready to Run the simulation. There are two ways to start the

    simulation: a) From the OrCAD Capture menu press Pspice, then Run.b) On the Capture press Play button.If any error window appears, press O.K. then run again or press again. Once you have done

    this the simulation results window will pop up displaying all wave forms that currently exist on

    the node or the point you had placed a Voltage/Level marker on. For instant, if you forget toplace any of the Voltage/Level markers on the circuit you will have blank results. Try (as a

    practice) to change the location of the Markers and Save the schematic and run the simulation

    again.

    Notice that the Result Display Window shown in figure 11 is different from the one you have onthe screen. You can customize the view of the window as you wish. If you want to have the

    window exactly like the one in figure 11 do the following: click on View top menu to open up a

    side menu. Deselect the Output Window, and Simulation Status Window.You can alter the appearance of the results and add text in a way you prefer to according to your

    taste for example, increase the line width, the color of the wave forms, adding labels and your

    name on the graph. These are simply done by selecting the waveform then right click to open theside menu with options information and properties. Take your time to explore all available

    options.

    8

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    9/13

    Printing the Results

    If you have a little experience with MS-Windows you will find no difficulties in printing, saving

    and most menus options. The only thing you should be aware of, is that, if you press the printericon, the file will go directly to the default printer. You can print your results in the printerQuilllocated in H852.

    Figure 11 Result Display Window

    After printing the results, close the result window and the OrCAD Capture window to start a new

    project for frequency domain analysis with different circuit.

    9

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    10/13

    Frequency Domain Analysis

    1- Double-click on the short cut of Capture student. Open a new project and type

    LOWPASS under name, select Analog or Mixed A/D, browse to place the new project in

    the Pspice1 folder on the Desktop, and create a blank project.2- Build the circuit shown in figure 12. The OpAmp can be in eval library last element of

    the library content, the power sources VDC (+15V, -15V for the OpAmp) form

    SOURCE library. Place two VDC sources next to the circuit and connect them as shownin figure 12. Now you need to connect the -15V and +15V to the pin # 4 and 7 of uA741

    respectively. This can be done using the Off-Page connectors, button M figure 6. The

    final element in the circuit is the signal generator (VAC) from the SOURCE library.Make the amplitude of the input source 1V if set to different value. Use Vertical Mirror

    (select the OpAmp and right click) to rotate the OpAmp as shown in the figure.

    Figure 12 LOWPASS Circuit

    3- Create a new Simulation Profile Frequency Response. In the Simulation SettingsWindow, select AC Sweep/Noise for Analysis type, and enter the start frequency, the end

    frequency and, number of points per decade as given in figure 13 below.

    4- Place a marker on the output node as follows: From PSpice menu select

    Markers/Advance /dB Magnitude of Voltage. The maker VDB is shown in figure 12.

    10

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    11/13

    5- Run the simulation.

    Figure 13

    The Result Display Window will open with the frequency response of the LOPASS circuit.

    Notice that the horizontal axis scale is a logarithmic scale and the Display window is shown infigure 14.

    Figure 14 Frequency response of LOWPASS

    11

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    12/13

    Use Cursors to extract information from the Result Display Window as follows: On the probe

    Toolbar, click on Toggle Cursor button to activate the Cursor toolbar, then click on CursorPeak. Click on any point on the frequency response to display the frequency and the gain in dB

    in a little window with entries A1=, A2= and dif=. Move this window to a convenient place on

    the result. In figure 14 , the 3dB point occurs at 1.796KHz.

    Toggle Cursor Cursor Peak

    To display the phase versus frequency do the followings: delete the Marker dB Magnitude of

    Voltage. Place the Marker Phase of Voltage form the same menu (PSpice/Markers/Advanced).

    The result Display Window now displays the phase versus frequency. The vertical axis scale is indegrees and the horizontal is in KHz as shown in figure 15.

    You can display both, frequency and phase responses on the same display window. This can be

    done by placing the two markers on the output at the same time. Please do that as a practice.

    Figure 15 Phase response of LOWPASS

    12

  • 8/6/2019 Introduction to PSPICE (Concordia_s is Based on This)

    13/13

    DC ANALYSIS

    1- Build the circuit shown in figure 16 ( hint : Create New project with name DCBJT,.).2- From PSpice menu choose New Simulation Profile, Type the name DC Analysis

    3- When the simulation settings opens, choose Bias point for Analysis Type, then click OK.

    4- Run the simulation.5- Click on button k Enable Bias Voltage Display (figure 6) and button N Enable

    current Display to show voltage and currents at all nodes and circuit branches as show in

    figure 16.

    Figure 16 DC Analysis with the display of the bias voltage

    13