ECE 201 LAB 6 INTRODUCTION TO SPICE/PSPICE

Similar documents
Introduction to PSpice

Engineering 3821 Fall Pspice TUTORIAL 1. Prepared by: J. Tobin (Class of 2005) B. Jeyasurya E. Gill

PSPICE T UTORIAL P ART I: INTRODUCTION AND DC ANALYSIS. for the Orcad PSpice Release 9.2 Lite Edition

EE 210 Lab Exercise #3 Introduction to PSPICE

EXPERIMENT NUMBER 10 TRANSIENT ANALYSIS USING PSPICE

Introduction to LT Spice IV with Examples

A Brief Handout for Introduction to

Introduction to OrCAD. Simulation Program With Integrated Circuits Emphasis.

Introduction to SwitcherCAD

OrCAD PSpice - Tutorial. TA: 黃玉龍

LAB EXERCISE 3 FET Amplifier Design and Linear Analysis

LT Spice Getting Started Very Quickly. First Get the Latest Software!

Introduction to SPICE. Simulator of Electronic devices

Fig. 1-1 show the main window of Orcad Capture. Every project you work on will start from Orcad Capture. Fig. 1-1 Orcad Capture Main window.

14:332:223 Principles of Electrical Engineering I Instructions for using PSPICE Tools Sharanya Chandrasekar February 1, 2006

ENEE207 Electric Circuits Lab Manual

Since transmission lines can be modeled using PSpice, you can do your analysis by downloading the student version of this excellent program.

Week 1: Preparing for PSpice Simulations

FACULTY OF ENGINEERING LAB SHEET

Chapter 12: Electronic Circuit Simulation and Layout Software

Background Theory and Simulation Practice

An Introductory Guide to Circuit Simulation using NI Multisim 12

Lab #2 First Order RC Circuits Week of 27 January 2015

ET 304A Laboratory Tutorial-Circuitmaker For Transient and Frequency Analysis

Using LTspice a Short Intro with Examples

Experiment 2: Simulation of DC Resistive Circuits

Electric Circuit Fall 2015 Pingqiang Zhou. ShanghaiTech University. School of Information Science and Technology. Professor Pingqiang Zhou

Introduction to Pspice

EXPERIMENT 9 Problem Solving: First-order Transient Circuits

Laboratory #2 PSpice Analyses

Xcircuit and Spice. February 26, 2007

EECS 312: Digital Integrated Circuits Lab Project 1 Introduction to Schematic Capture and Analog Circuit Simulation

The analysis of the linear voltage regulators

The default account setup for the class should allow you to run HSPICE without any further configuration. To verify this, type:

EECE Circuits and Signals: Biomedical Applications. Lab 3. Basic Instruments, Components and Circuits. Introduction to Spice and AC circuits

Using LTSPICE to Analyze Circuits

LTSpice Basic Tutorial

I1 19u 5V R11 1MEG IDC Q7 Q2N3904 Q2N3904. Figure 3.1 A scaled down 741 op amp used in this lab

Microwave Circuit Design: Lab 5

Lab 3: Very Brief Introduction to Micro-Cap SPICE

EELE 201 Circuits I. Fall 2013 (4 Credits)

FACULTY OF ENGINEERING LAB SHEET

EE 2274 RC and Op Amp Circuit Completed Prior to Coming to Lab. Prelab Part I: RC Circuit

Excel Tool: Plots of Data Sets

Class #8: Experiment Diodes Part I

ELEC3106 Electronics. Lab 4: EMI simulations with SPICE. Objective. Material. Simulations

EE-3010 Lab # 5 Simulation of Operational Amplifier Circuits

ECE 220 Laboratory 3 Thevenin Equivalent Circuits, Constant Current Source, and Inverting Amplifier

Excel Lab 2: Plots of Data Sets

LABORATORY 2: Bridge circuits, Superposition, Thevenin Circuits, and Amplifier Circuits

Electronics I LAB. Lab 1: Lab 1 : Introduction to PsPise

Getting Started. with Easy Blue Print

LABORATORY 3: Transient circuits, RC, RL step responses, 2 nd Order Circuits

A Short SPICE Tutorial

Experiment 1 Introduction to Simulink

EE320L Electronics I. Laboratory. Laboratory Exercise #6. Current-Voltage Characteristics of Electronic Devices. Angsuman Roy

MultiSim and Analog Discovery 2 Manual

Ansoft Designer Tutorial ECE 584 October, 2004

Introduction to NI Multisim & Ultiboard Software version 14.1

1. Hand Calculations (in a manner suitable for submission) For the circuit in Fig. 1 with f = 7.2 khz and a source vin () t 1.

A SPICE (PSPICE) Tutorial

SIMULATION WITH THE CUK TOPOLOGY ECE562: Power Electronics I COLORADO STATE UNIVERSITY. Modified in Fall 2011

EE320L Electronics I. Laboratory. Laboratory Exercise #2. Basic Op-Amp Circuits. Angsuman Roy. Department of Electrical and Computer Engineering

Lab 4: Analysis of the Stereo Amplifier

DEPARTMENT OF ELECTRICAL ENGINEERING. Date: Assistant A2: PSpice 2 PC Pool

BIO 365L Neurobiology Laboratory. Training Exercise 1: Introduction to the Computer Software: DataPro

Working With Drawing Views-I

SolidWorks 95 User s Guide

Lab Reference Manual. ECEN 326 Electronic Circuits. Texas A&M University Department of Electrical and Computer Engineering

RELEASE NOTES SIMETRIX 6.2 O VERVIEW WHAT S NEW GUI DVM SIMETRIX SIMULATOR SIMPLIS SIMULATOR SCRIPT LANGUAGE MODEL LIBRARY

NGSPICE- Usage and Examples

Integrators, differentiators, and simple filters

Lab 13 AC Circuit Measurements

Example Application C H A P T E R 4. Contents

LAB 8: Activity P52: LRC Circuit

OrCAD 17.2 Pspice Tutorial. High-Speed Circuits & Systems Lab. Yonsei University

CAD Orientation (Mechanical and Architectural CAD)

Time-Varying Signals

PSPICE A brief primer

Experiment 2 Introduction to PSpice

Getting Started Guide

Activity P52: LRC Circuit (Voltage Sensor)

Getting Started. Right click on Lateral Workplane. Left Click on New Sketch

ENGI0531 Lab 2 Tutorial

SIMULATIONS WITH THE BUCK-BOOST TOPOLOGY EE562: POWER ELECTRONICS I COLORADO STATE UNIVERSITY. Modified February 2006

Figure AC circuit to be analyzed.

Lab 3: Circuit Simulation with PSPICE

Experiment 8: An AC Circuit

An Introduction to Dimensioning Dimension Elements-

Circuit Shop v December 2003 Copyright Cherrywood Systems. All rights reserved.

Name EET 1131 Lab #2 Oscilloscope and Multisim

Lab E5: Filters and Complex Impedance

Drawing Bode Plots (The Last Bode Plot You Will Ever Make) Charles Nippert

Department of Electrical & Computer Engineering Technology. EET 3086C Circuit Analysis Laboratory Experiments. Masood Ejaz

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Labs Introduction to Arduino


House Design Tutorial

NETWORK THEORY (EE 223 F) LAB MANUAL

This chapter shows various ways of creating matching networks by sweeping values and using optimization. Lab 5: Matching & Optimization

Chapter 6 Title Blocks

Transcription:

Version 1.1 1 of 33 BEFORE YOU BEGIN PREREQUISITE LABS Resistive Circuits EXPECTED KNOWLEDGE ECE 201 LAB 6 INTRODUCTION TO SPICE/PSPICE Ohm's Law: v = ir Node Voltage and Mesh Current Methods of Circuit Analysis Maximum Power Transfer Theorem EQUIPMENT Intel PC PSpice Version 9.1 or later MATERIALS Formatted 1.44 3¼ floppy diskette (optional) OBJECTIVES After completing this lab you should know how to: Create and read SPICE/PSPICE net list and output files. Draw circuit schematics using OrCAD Capture CIS. Use Probe to plot outputs from PSpice Simulations. INTRODUCTION SPICE, an acronym for Simulation Program with Integrated Circuit Emphasis, was created in the 1970s at the University of California at Berkeley. The program, designed to simulate circuits, is used to analyze and design integrated circuits as well as other types of electronic circuits. Although SPICE is public domain software, many commercial versions are available, such as PSPICE from OrCAD and HSPICE from Avant. Many industries use SPICE, or some commercial version of SPICE, and expect electrical and computer engineers to be familiar with simulation software. PRELAB Answer Questions 1 4.

Version 1.1 2 of 33 GETTING STARTED Log onto the NT network. Start OrCAD PSpice A/D by selecting Start Programs Orcad Family Release 9.2 Lite Edition PSpice AD Lite Edition. You should see a window similar to the window in Figure 1. Figure 1 shows PSpice with the netlist for Figure 2 opened. You will need to type in the netlist shown in Figure 1 soon after the netlist is explained in the following section. NETLIST A netlist is a description of the circuit that is typed in an ASCII text file and interpreted by SPICE. It may also be referred to as the source file. Each line in the netlist describes an element of the circuit. Spice is not case sensitive, which means that R1 and r1 are the same element. Figure 1. OrCAD PSpice A/D.

Version 1.1 3 of 33 1 10 k Ω R1 2 28 V Vs 20 k Ω R2 5 kω R3 0 Figure 2. Circuit 1 - current and voltage divider. Scale Factors Scale factors are nothing more than the standard metric prefixes and are listed in Table 1. Title Line Name Symbol Value femto f 10-15 pico p 10-12 nano n 10-9 micro u 10-6 milli m 10-3 kilo k 10 3 mega meg 10 6 giga g 10 9 tera t 10 12 Table 1. Spice Scale Factors. The first line in a net list is the title line. This line is used by SPICE as a label. The title line is mandatory; the first line of the netlist will be interpreted as the title line even if the line is an element declaration. Independent Voltage and Current Sources The syntax for independent sources is <name> <node1> <node2> <type> <value> The name for voltage sources must begin with a V, and for current sources name must begin with an I. For voltage sources, node1 and node2 represent the positive and negative terminals respectively. For current sources, the current flows from node1 to node2. The type can be DC, AC, or TRANS. These specify DC sources, AC sources, and transient sources respectively. The

Version 1.1 4 of 33 value is the value of the source, such as 5 V or 1 ma. The values can also be entered without units. Each element in the statements must be separated with a space or a tab. When using scale factors, do not enter a space between the value and the factor. Answer Question 5. Resistors, Capacitors and Inductors The syntax for resistors, capacitors and inductors is <name> <node1> <node2> <value> The name for resistors, capacitors and inductors must begin with R, C or L, respectively. Node1 and node2 are the nodes the element is connected to. It does not matter how the element is connected between node1 and node2. Voltage is referenced with node1 being the positive terminal and node2 as the negative terminal. Current is defined as flowing from node1 to node2. This is the same technique used to describe the voltage and current for independent sources. Answer Question 6. Ground Every circuit needs a reference node, or ground. This is represent in PSpice as node 0 (zero). Every circuit you simulate will have to have a reference node. With out it you will receive an error that your nodes are floating when you simulate the circuit. The.END Statement The.END statement signals the end of the netlist file. Entering the Netlist Now you will enter the netlist shown in Figure 1. 1. Selecting File New Text File. 2. Type in the netlist line for line as shown in Figure 1. 3. After the netlist has been entered, save the file with the extension.cir (for circuit), for example, CIRCUIT1.CIR. Running the Simulation After the netlist has been entered and saved, it is ready to simulate. One unfortunate difficulty with OrCAD PSpice A/D is that the first time a netlist is entered and saved, the file must be reopened by PSpice A/D.

Version 1.1 5 of 33 4. Reopen your circuit file. From the toolbar menu, select File Open, and select the file from the Windows File Open dialog box. 5. Run the netlist by selecting Simulation Run from the toolbar menu. The lower left box of the PSpice A/D screen displays the status of the simulation. If all went well you will see the message "Simulation Complete." If you received an error, double check your netlist and run the simulation again. SIMULATION OUTPUT FILE PSpice A/D saves the results of the simulation in a file with same name as the circuit file but with the extension.out. 6. View the results of the simulation by selecting View Output File from the toolbar menu. You can scroll up and down to view the results of the simulation (see Figure 3). Circuit Description The first part of the output file shows the netlist from CIRCUIT.CIR. The original netlist is included in the output so that the description of the circuit will always remain with the results.

Version 1.1 6 of 33 Simulation Results Figure 3. Simulation Results for Circuit 1. The actual results of the simulation are located at the end of the output file. By default, PSpice calculates the following values: The voltage at each node with respect to ground. The current through each voltage source. The total power dissipated in the circuit. Answer Question 7. FINDING NORTON AND THEVENIN EQUIVALENTS In the next example you will use PSpice to find the Norton and Thevenin equivalents of the circuit in Figure 4 as seen by the terminals a and b. 1 10 k Ω 2 3 10 k Ω 4 25 k Ω 5 R1 a b R2 R3 75 V V1 5 kω R4 25 kω R5 V2 25 V R6 0 15 k Ω 6 Figure 4. Circuit 2 In order to determine the Norton and Thevenin equivalents, we need to find the open circuit voltage potential between terminals a and b and the short circuit current between terminals a and b. There are two ways to do this. The first is with the resistors and the second is with capacitors and inductors. Using resistors, to find the open circuit voltage potential between terminals a and b we would place a resistor with a very high impedance (with respect to the resistors in the circuit) across the terminals a and b. To simulate short circuit, a resistor with very low impedance would be used. The method you will use in this lab will be with capacitors and inductors. Figure 5 shows the netlist for circuit 2. Before you type in the netlist for circuit 2, some new statements need to be explained.

Version 1.1 7 of 33 The Remark As with most programming languages, PSpice also has a comment or remark command, which is the asterisk (*). PSpice ignores every thing on the line after the asterisk. In the netlist for Circuit 2, you will see an asterisk before the statements that deal with inductors. In order to find the Norton and Thevenin equivalents, we will need to run two separate simulations: one with an open circuit and one with a short circuit. To avoid writing two netlists, you should comment out the statements that will not be used in each simulation. The.DC Statement The.DC statement is used to sweep an independent source (increase the voltage or current of the source at a constant rate). The syntax for the.dc statement is.dc <name> <initial value> <final value> <step> The name parameter is the name of the source to sweep. The initial value, finial value and step represent the staring sweep value, the final sweep value and the size of the increment. The.DC statement overrides any value specified by the source description. In our example, V1 is swept from 75 V to 75 V with a step of 1. This is the same as declaring V1 with a value of 75 V. The.DC is needed by the.print statement. It does not matter which source is swept. In this example the source is only swept because without the.dc statement, the.print statement will be ignored.

Version 1.1 8 of 33 Figure 5. Netlist for Circuit 2. The.PRINT Statement The.PRINT statement is used to find specific values. By default, PSpice finds the voltage at each node with respect to ground. To find the voltage potential between two nodes, or the current through an element, the.print statement may be used. The syntax for the.print statement is.print <type> <output variables> The type of parameter describes the type of analysis to perform AC, DC or TRANS (transient). The output variables list the measurements to print in the output file, as in V(1,2) for the voltage potential between nodes 1 and 2, or I(R2) for the current through resistor 2. When using the.print statement, only the values specified by the.print statement appear in the output file. All the node voltages, as in the first example, are omitted.

Version 1.1 9 of 33 Answer Question 8. Determining Open Circuit Voltage In order to find the open circuit voltage across the terminals a and b, we will place a capacitor between nodes 2 and 3 of circuit 2. Recall that a capacitor acts like an open circuit when the circuit is at steady state. In our example, we chose an arbitrary value for the capacitor. Type in the netlist from Figure 5 and run the simulation. Answer Question 9. You may wonder why the circuit needs a capacitor at all. 7. Remark out the line declaring the capacitor with an asterisk and simulate the file again. Answer Question 10. Determining the Short Circuit Current To determine the short circuit current across the terminal of a and b, an inductor is placed between nodes 2 and 3. Unlike a capacitor, an inductor acts like a short circuit when the circuit is at steady state. 8. Remove the asterisks in front of the statements that refer to the inductor L1. 9. Insert asterisks in front of the statements that refer to the capacitor C1. 10. Run the simulation again. Answer Question 11. OPERATIONAL AMPLIFIERS An operational amplifier amplifies a given signal with a gain of A. Even if you have not yet studied operational amplifiers you should still be able to understand their operation by the model of an operational amplifier given in Figure 6. You can model an operational amplifier with a dependent voltage source.

Version 1.1 10 of 33 + Vn + Vp Ri A(Vp-Vn) Ro + Vo - - - Figure 6. Model of an operational amplifier. Dependent Sources Voltage Controlled Sources Voltage Controlled sources are specified by the following statement <name> <node1> <node2> <cnode1> <cnode2> <gain> For voltage controlled voltage sources, name must begin with the letter E and for voltage controlled current sources name must begin with the letter G. Voltage controlled sources are connected at node1 and node2 just like their independent counterparts. The control nodes, cnode1 and cnode2, are the nodes whose voltage difference controls the source, where cnode1 represents the positive terminal. The gain parameter is the value that the controlling voltage is multiplied by. Answer Question 12. Current Controlled Sources The following statement specifies current controlled sources <name> <node1> <node2> <control> <gain> For current controlled current sources, name must begin with the letter F and for current controlled voltage sources name must begin with the letter H. Current controlled sources are connected to node1 and node2 just like their independent counterparts. However, current controlled sources must be controlled by a zero valued voltage source, or dummy voltage. The dummy voltage source is needed because SPICE only calculates the current through a voltage

Version 1.1 11 of 33 source. The dummy source is used to determine the current through that particular branch of the circuit. The dummy voltage source is placed in the path of the controlling current, using the passive sign convention. The gain parameter is the value that the controlling current is multiplied by. Answer Question 13. AN INVERTING OPERATIONAL AMPLIFIER Figure 7 shows a schematic of a circuit with an operational amplifier. Figure 8 shows the same circuit, but uses the model of an operational amplifier. The circuit in Figure 8 will be the circuit that we will simulate. 25 k Ω 10 k Ω R2 R1 5 V R3 5 kω Figure 7. An Inverting Operational amplifier. 25 kω R2 10 k Ω 75 k Ω 1 2 3 4 + + R1 Ro 5 V Vn Ri 1 M Ω -100kVn Vo R3 5 k Ω - 0 - Figure 8. Circuit 3 - model of an operational amplifier.

Version 1.1 12 of 33 The operational amplifier shown in Figure 7 and Figure 8 is connected as an inverter, or inverting operational amplifier. The output voltage V O is approximately related to the input voltage V N by the equation: V R = 2 o V N R1 Using this equation, the output voltage from Circuit 3 is calculated as follows: V V o O 25k = 5V 10k = 12.5V The netlist for Circuit 3 is shown in Figure 9. Type in the netlist for Circuit 3 and run the simulation. Answer Question 14. Figure 9. Netlist for Circuit 3.

Version 1.1 13 of 33 EXERCISE Figure 10 shows a circuit with a current source and one resistor in series with two parallel resistors. Answer Question 15. 1 5 kω R1 2 1 A Vs 10 kω R2 25 kω R3 0 Figure 10. Circuit 4 - current divider. To close PSpice, from the toolbar choose File Exit. 11. Close PSpice. ORCAD CAPTURE CIS OrCAD has a capture utility that will generate a PSpice netlist from a schematic drawn by the user. To start OrCAD Capture CIS, if you have not already, log on to the NT network. Click on Start Programs Orcad Family Release 9.2 Lite Edition Capture CIS Lite Edition. CREATING A PROJECT You will start by drawing the schematic for the circuit in Figure 11. After the schematic is created, you will use OrCAD Capture CIS and OrCAD PSpice to determine the value of the variable resistor when the maximum power is transferred to it. In order to draw a schematic, you must first create a project. 12. Select File New Project. You will be presented with the New Project Wizard, as shown in Figure 12. 13. In the Name dialog box, enter Maximum Power Transfer, as shown. 14. Select Analog or Mixed-Signal Circuit Wizard. 15. In the Location dialog box, type in the location where you want the project to be saved. When you are finished, click OK.

Version 1.1 14 of 33 R1 R2 R3 15 V + - 5 kω 25 kω 15 kω 120 kω R5 45 kω R6 10 kω R7 Rvar R4 25 kω Figure 11. Circuit 5: Maximum Power Transfer. Figure 12. New Project Window. 16. Next, you will be prompted with the Create PSpice Project dialog box (Figure 13). Select Create a blank project

Version 1.1 15 of 33 Figure 13. Create PSpice Project Dialog Screen. Your screen should now look like that of Figure 14. You will notice two windows. The one in the Project Manager is in the upper right corner and has the name of the project in the title bar. The second window is titled SCHEMATIC1 and is where the schematic is drawn. Figure 14. OrCAD Capture CIS.

Version 1.1 16 of 33 MAXIMUM POWER TRANSFER Placing Parts 17. To place parts in the schematic, from the tool bar click Place Part. You will see a dialog box like the one in Figure 15, except you will not have all the libraries loaded. The only library you should see is Design Cache. The Design Cache is a list of all the parts you have used so far in your design. 18. Click on the Add Library button and add the libraries shown in Figure 15. Voltage and Current Sources Voltage and current sources are found in the Source Library. 19. Select the Source Library. 20. To select the voltage source for Circuit 5 scroll through the parts until you see VDC, as shown in Figure 15. Figure 15. Place Part Dialog Box for VDC. 21. After the proper part has been selected, click OK. 22. To place the DC voltage source on the schematic, move the cursor to where you want the part to be and press the left mouse button. 23. After you place the part, press the right mouse button and select End Mode.

Version 1.1 17 of 33 24. To change the voltage supply from 0 V to 15 V, highlight the value of the voltage supply ("0Vdc") and double click on it. This should open the Display Properties dialog box. 25. Change the default value of 0V to 15V. The "V" and the "dc" can be omitted, however, if they are included, do not including any spaces in the Value dialog box. See Figure 16. Resistors, Inductors and Capacitors Figure 16. Display Properties for Vdc. Resistors, inductors and capacitors can be found in the Analog Library. To enter the resistors for your circuit, open the Place Parts dialog box, select the Analog Library, and scroll through the parts until you see the resistor (R). To place the resistors, move the cursor to where you want a resistor to be and press the left mouse button. Parts may be flipped horizontally or vertically. To flip a part, click the right mouse button and selecting Mirror Horizontally or Mirror Vertically. To rotate a part, click on the right mouse button and selected Rotate. This will rotate the highlighted part 90 counterclockwise. 26. Place all resistors on the schematic. Do not worry about spacing them properly. Elements may be moved after they are placed by highlighting them, and then dragging them to the desired location. OrCAD Capture CIS assumes that current always enters a resistor, inductor or capacitor at pin 1 and leaves at pin 2. By default, resistors, capacitors and inductors are oriented horizontally with pin 1 on the left. After one rotation, the element will be oriented vertically with pin 2 above pin 1. In order to define current going from the top to the bottom, the element must be rotated a total of three times. (See Figure 17.) Depending on how you want the current defined in an element, you may have to rotate the element 1, 2, or even 3 times.

Version 1.1 18 of 33 Figure 17. Component Orientation. To help you determine which pin is which, you can display the pin value on the schematic. 27. Double click on one of the resistors. That element's Property Editor will be displayed. 28. On the bottom right of the Property Editor window, click on the tab marked "Pins." 29. Highlight the cells under the spreadsheet heading "Number". 30. Click on Display. 31. In the dialog box that appears, select "Value Only" and then click on OK. 32. Close the Property Editor window. The element's pin numbers should now be displayed on the schematic. To remove the pin numbers, highlight them individually, click the right mouse button, and select "Delete" from the popup menu. After all of the resistors have been placed, you will need to change their values. By default, the value of each resistor is 1 kω. To change the value of a resistor, or any other element, double click on the value you want to change. This will bring up the Display Properties dialog box. In the box labeled Value, type in the appropriate value of the resistor. The same scalar suffixes in Table 1 may also be used. Remember not to use any spaces when editing property values.

Version 1.1 19 of 33 33. Change all the resistor values except for the variable resistor. Your schematic should start to look like the one in Figure 18 without the wiring. Creating a Variable Resistor Figure 18. Schematic for Circuit 5: Maximum Power Transfer. The next step is to set up the variable resistor to sweep through a given set of values. We want to select a set of values that will encompass the Thevenin equivalent resistance of the circuit. The values that we will use will be between 1 and 50 kω. To distinguish the variable resistor from the other resistors, we will change the name of the resistor to Rvar. 34. Double click on the label of the right-most resistor. 35. When the Display Properties box appears, type Rvar in the box labeled Value without the quotes. 36. Click on OK.

Version 1.1 20 of 33 In order to sweep Rvar through a set of values, we need to create a global parameter. A global parameter can be given a specific value, or a set of values. Any element in the circuit can have the global parameter as its value, as you will soon see. 37. From the toolbar, select Place Part, and choose the SPECIAL library. 38. Scroll through the parts until you find the part PARAM. 39. Select PARAM and place it on the schematic next to Rvar. 40. Then click the right mouse button and select End Mode or press the escape key. Next, a variable will need to be assigned to the parameter. 41. Double click on the parameter to bring up the Property Editor. 42. In the Property Editor, click on New to add a new item to the spreadsheet. 43. When the Add New Property dialog box appears, type in Resistance and click on OK. 44. In the cell below the new property heading of Resistance, enter a value of your choice. This is a required field, but since the parameter will be swept, the value in this field will be ignored. 45. To display the value of the new property, highlight the cell, click on Display, and select Name and Value, then click on OK. 46. Close the Property Editor window. Now we need to assign the value of the parameter to the variable resistor. 47. Double click on the current value of the variable resistor to bring up the Display Properties dialog box. 48. In the box marked Value, type in {Resistance} making sure to include the curly brackets. The curly brackets tells the capture utility that this is a parameter value. When finished click on OK.

Version 1.1 21 of 33 Ground Figure 19. Property Editor for Parameter. Just like the netlists you created earlier, the schematics created with the capture utility also needs a reference ground. 49. From the toolbar select Place Ground, and from the part list select GND 50. In the Name text box change the name from GND to 0 (zero) to indicate that it is the reference node. If you don not change the name to 0 you will get an error stating that your nodes are floating when you simulate the circuit. 51. Place the ground to the left of the 25 kω resistor. 52. End the mode. Wiring After all the elements are in place, you will need to wire them together. Do this now by selecting Place Wire from the toolbar. To place a wire, put the crosshairs over the pin connection you want to wire, press and hold the left mouse button and move the cross hairs to the pin of the part you want to wire together. When a valid connection is made, you will see a red dot as shown in Figure 20. When you see the red dot, release the left mouse button.

Version 1.1 22 of 33 53. Wire all the elements together at this time. Be patient and do not rush yourself. Wiring is a relatively simple task, but it is also one that requires some practice. You may find that it helps to zoom in on the elements you are trying to wire. When you are finished, your schematic should be very similar to the one in Figure 18. Figure 20. Valid Wire Connection. Creating a Simulation Profile After all the parts have been placed and wired together, the final step before simulating the circuit is creating a simulation profile. The simulation profile tells PSpice what type of simulation to perform. Because of the variable resistor in Circuit 5, you will be performing a DC sweep analysis. 54. From the toolbar menu, select PSpice New Simulation Profile. 55. In the dialog box that appears, type in Maximum Power Transfer and click CREATE. 56. This will bring up the Simulation Settings dialog box (Figure 21). By default, the analysis type is Time Domain (transient). Change this value to DC Sweep. 57. Fill in the rest of the settings as shown in Figure 21.

Version 1.1 23 of 33 58. When finished, click on OK. Title Block Figure 21. Simulation Settings - Maximum Power Transfer. In the bottom right of every schematic is a title block. This is where your name, along with a description of the schematic, is entered. 59. Move to the title block and fill in the information as shown in Figure 22.

Version 1.1 24 of 33 Simulating the Circuit Figure 22. The title block. After all the parts have been placed and wired, and all values have been changed, the circuit is ready to simulate. This would be a good time to save your work. 60. To simulate the circuit, from the toolbar select PSpice Run. When the circuit is simulated, the OrCAD PSpice opens. If the circuit was properly simulated, the PSpice window will display a blank plot. If there were errors in the simulation, PSpice will automatically display the output file, which will list the errors that occurred. If there were errors, go back to the schematic and double check your work. When you are ready, run the simulation again. Plotting the Maximum Power Transferred Notice that the abscissa is in the range 0 to 50 k, which corresponds to the values of our parameter sweep. Next we would like to plot the power absorbed by the variable resistor. From the PSpice toolbar, select Trace Add Trace. This will bring up the Add Traces dialog box as shown in Figure 23.

Version 1.1 25 of 33 The window is broken down into two major sections. On the left are the data from the simulation. These include the current through the elements (I(R1), I(Rvar)) and the voltage at each node and element pin (V(N00021), V(R4:1), V(R4:2), ). On the left are the operations that can be performed on the data, from simple arithmetic to exponential and trigonometric functions. The values to plot are specified at the bottom in the Trace Expression dialog box. Answer Question 16. Figure 23. Add Traces Dialog Box. To plot your answer from Question 13, enter it in the Trace Expression dialog box and click OK. A plot should appear in the PSpice. If your expression was correct, your plot should look similar to the plot in Figure 24. If it does not match the curve in Figure 24, double check the Trace expression, which can be found below the abscissa of the plot.

Version 1.1 26 of 33 Figure 24. Plot of Maximum Power Transferred Curve. Reading Measurements from the Curve Measurements can be taken from the curve to determine the Thevenin equivalent resistance of the circuit and the power dissipated by the variable resistor at any given resistance value. Even though these measurements can be take directly from the plot, much accurate readings can be made with the cursors. 61. To display the cursors select Trace Cursor Display. A small dialog box labeled Probe Cursor is displayed which shows the position of each cursor and the difference between cursor positions. The left mouse button is used to move cursor A1. Just click and hold anywhere on the screen to move the cursor. When the cursor is in the desired place, release the mouse button. Move the cursor back and forth on the plot. Notice how the cursor stays on the curve. The right mouse button in used in the same manor to move cursor A2. Answer Questions 17 19. Printing Print both the schematic and the plot and turn them in with your lab report.

Version 1.1 27 of 33 62. Make sure your name and the name of the schematic are listed in the title block of the schematic. To print the schematic, switch to the Capture CIS window, then select File Print. 63. In the Print dialog box, make sure the proper printer is selected. 64. Click on Setup and check Landscape and then click OK to close the setup dialog box. 65. Click on OK to print the schematic. 66. To print the plot, switch to the PSpice window and select File Print. 67. Make sure the proper printer is selected. 68. Click on Page Setup and then on Header. 69. Delete what is in the Center box and replace it with your name. 70. Click OK to close the Header dialog box, and then click OK to close the Page Setup dialog box. 71. From the Print dialog box, click on OK to print the plot. Saving To save the project, switch to OrCAD Capture CIS, activate the Project Manager and then choose File Save from the toolbar menu. To close the project choose File Close. OPERATIONAL AMPLIFIERS The next circuit that you will draw will be the inverting operational amplifier shown in Figure 8. 72. Create a new project and title it Operational Amplifier Model 1. 73. Draw the schematic as it is shown in Figure 25, omitting the independent and dependent voltage sources for the moment.

Version 1.1 28 of 33 Figure 25. Schematic for Operational amplifier Model 1. 74. Place a VSRC voltage source from the SOURCE library as the independent voltage supply, as shown in Figure 26.

Version 1.1 29 of 33 Figure 26. Place Part for VSRC. You will notice that we changed the part for the voltage supply from VDC to VSRC (Figure 26). By default, VSRC shows values for DC, AC, and TRAN (transient). 75. Since TRAN will not be used, delete it from the schematic. 76. AC will not be used either. Set its value to 0 V. To change the value of AC, double click on it to bring up the Display Properties dialog box. 77. Change the value from 1Vac to 0. 78. Check Do Not Display in the Display Properties dialog box. 79. Click OK to close the dialog box. 80. To change the DC value, double click on it and change the value to 5 and then click OK. 81. Change the value for the resistors as you did in the Maximum Power Transfer exercise. Dependent Sources OrCAD Capture CIS also has part models for dependent sources (Figure 27) and are found in the ANALOG library. The part names for independent sources start with the same letter as their PSpice counterpart. Each part has four pins: two for the outputs of the source and two to measure the controlling value. The two output pins are determined by the symbol for a voltage or current source, and are connected the to the circuit the same way as independent sources are. For voltage controlled sources, the controlling pins are connect in parallel to the nodes whose voltage difference controls the source, where the plus sign presents the positive terminal or node.

Version 1.1 30 of 33 For current controlled sources, the controlling pins are connected in series with the current that controls the source, with the current leaving the pin at the arrowhead. Figure 27. Dependent Sources. 82. Place a voltage controlled voltage source in the schematic as shown (Figure 25). 83. After the dependent source has been placed, the gain needs to be set. To set the gain, double click on the part to bring up the Property Editor window. 84. In the cell with the heading GAIN, type in the value 100k, and close the window. The circuit is almost ready to run. Simulation Profile The final step is to create the Simulation Profile. 85. From the toolbar, choose PSpice New Simulation Profile. 86. For the analysis type, choose Bias Point and then click OK. 87. Run the simulation. When the circuit is simulated, OrCAD PSpice opens.

Version 1.1 31 of 33 Notice that there is no empty plot this time. PSpice will only open with an empty plot if one or more of the values from the simulation varies. If the circuit was properly simulated, the PSpice window will display a blank window. If there were errors in the simulation, PSpice will automatically display the output file, which will list the errors that occurred. If there were errors, go back to the schematic and double check your work. Once you have made all necessary corrections, run the simulation again. Answer Question 20. 88. After the simulation is complete, save and print a copy of your project. Remember to fill in the title block before you print the schematic. USING MODELS Operational amplifiers are common devices, common enough that you would not want to model your own in PSpice every time you needed to simulate a circuit. The OrCAD Capture CIS has many devices, such as operational amplifiers, that are modeled and can be placed in the schematic. Even though the demo version of OrCAD Capture CIS is limited, it does have models of operational amplifiers in its EVAL library. Figure 28 shows the schematic for Circuit 3 (Figure 7 and Figure 8). The model is actually a visual representation of a PSpice netlist for a ua741 operational amplifier. As explained earlier, the netlist is a text description of a circuit. The netlist for the ua741, which is partially shown in Figure 29, is a detailed description of a realistic operational amplifier.

Version 1.1 32 of 33 Figure 28. Shcematic with Operational Amplifier Model ua741. There are seven pins on the model of the ua741 operational amplifier. For now, pin 1 and pin 5 can be ignored. Pin 2 represents the inverting input terminal and pin 3 represents the noninverting input terminal. VCC+ and VCC- (pin7 and pin 4 respectively) determine the upper and lower limits of the output voltage. If you look to the right of the main schematic in Figure 28, you will see where VCC+ and VCC- are defined. The double arrow symbol is called an off page connector. Defining the upper and lower limits in this manner helps to keep the schematic organized and easier to read. Labeling two or more nodes with the same off page connector is the equivalent of wiring the nodes together. You will also notice an off page connector labeled Out at the output node of the operational amplifier (pin 6). This was added to make it easier to read the voltage output from the operational amplifier in the simulation output file. The voltage potential at the off page connectors (with respected to ground) is printed in the simulation output file, along with the node voltages.

Version 1.1 33 of 33 Figure 29. Netlist for ua741 Operational amplifier. Another difference is that all the ground nodes are not wired together. Instead a ground is placed at the bottom of each branch; each ground is a visual representation of the same reference node. 89. Create the schematic shown in Figure 28. Use the ua741 operational amplifier model form the EVAL library. When creating the new project, remember to add the EVAL library. Remember to fill out the title block of the schematic. 90. After the circuit has been entered, simulate the circuit using bias point analysis. Answer Questions 21 22. To close OrCAD Capture CIS, from the toolbar select File Exit. If you have not done so, you will be prompted to save your work. 91. Close OrCAD Capture CIS.