1 - Introduction To Orcad

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Lab 1.

Introduction to OrCAD

Lab 1.

INTRODUCTION TO OrCAD

OrCAD PSPICE is a very complex software package for electronic circuit design. Nowadays the electronic circuits have become so complicated that one has to use computer aided design (CAD) tools to design and simulate them. Capture is the schematic layout of the circuit, which produces the netlist for PSPICE to simulate and display the data. This lab will teach you the basic functions of: creating a new project, getting and placing parts, connecting placed parts, simulating the schematic, plotting and analyzing the results.

1.A.

LAB ACTIVITY

To get started, click on the icon from the desktop or choose from the bottom menu: Start Programs ORCAD Family Release 9.2 Capture CIS. Once Capture has started, a window named SESSION FRAME appears. In this window, another window named SESSION LOG is always open. The SESSION LOG records the events including warning and error messages that occur during the Capture session. The first step is to create a new document. CREATING A NEW DOCUMENT button (CREATE DOCUMENT) or select: File New Project. In To create a new document, click the the window that opens, fill in the following information: at Name type in the name of your document (choose a name that you can identify later) ; select Analog or Mixed A/D ; at Location type in G:\studeni (this is the location where your document will be saved); click OK. In the new window select the option Create a blank project OK. Now you should come up to a blank schematic entry screen. This is the schematic page editor, where you will design your circuits. PLACING PARTS The schematic page editor has a vertical toolbar (in the right side of the screen) that you can use to draw your schematic (if the vertical toolbar is not shown, click anywhere in the window and it will appear). Lets start with the circuit shown in Figure 1.1, which contains a voltage V1 VOFF = 0 R1 source and a resistor, connected in serial. VAMPL = 1 1k You can get the parts of the schematic by pushing the button (PLACE PART). In OrCAD, the parts are organized in libraries. In the lower left window, you can see a list of all the libraries of ORCAD. Once you have selected a library, the parts from that library will appear in the Part List window.
FREQ = 1k PHASE = 0 0 0

Figure 1.1

NOTE: If the library that you are looking for is not on the list, you can add it by pressing the Add Library button. The libraries are in: C:\PROGRAM FILES\ ORCAD\CAPTURE\LIBRARY\ PSPICE. Now lets place the parts from our circuit one by one. You will find the voltage source in the SOURCE library, as VSIN. Select VSIN then click OK. This will place you back to the schematic page with a source attached to your pointer. Place the source on the page by a click. You could continue clicking to place more sources but since we need only one, right click and select End Mode (or press Esc on the keyboard).

Lab 1. Introduction to OrCAD

The resistor can be found in the ANALOG library, as R. Place it on the page, then right-click End Mode. To get your resistor look like the one in the Figure 1.1, you have to rotate it, so right click Rotate. Now you need ground. Forgetting a ground is a common mistake that will lead to floating nodes errors. button (PLACE GROUND). Select the ground 0 from the BE library or the Insert the ground by pushing the ground 0 from the SOURCE library and place two grounds in contact with the bottom nodes of the two parts. WIRING PARTS TOGETHER button (PLACE Once you have placed the parts, you need to connect them. To do this, select the WIRE). See that the pointer changes from an arrow to a crosshair. Click on one of the pins to start the wire and click where it ends. To stop using the wire tool, right-click End Wire. At the beginning and the end of a connection, the program automatically places junctions. The next step is to edit the values of the parts. EDITING THE VALUES OF THE PARTS To edit the value of a parameter double click on the parameter, then in the window that opens, type in the value that you want OK. For the VSIN source, set its parameters as follows: VOFF (the dc offset in V) = 0; vAMPL (the magnitude in V) = 1; FREQ (the frequency in Hz) = 1k. Generally, a sinusoidal signal is described by three parameters: the magnitude, the frequency and the starting phase. Notice that only the amplitude and the frequency are displayed by your source. To display the phase, follow the steps: double-click on the source and you will get a complete list of the settable parameters and their values in a window named Property Editor; search for the PHASE parameter, click the Display button Name and Value OK ; close the Property Editor window; The phase is now shown and its default value is 0. Drag the PHASE parameter below the others parameters of the source. Leave the value of the resistor at 1k. Before running the simulation, you must create a simulation profile, to set up your simulation. For a given project, you can have multiple profiles (with different names). This allows you to analyze the circuit in different ways without having to change settings back and forth. CREATING A NEW SIMULATION PROFILE To create a new simulation profile, select the button (NEW SIMULATION PROFILE). Type a name for the profile, then click Create. The Simulation Settings dialog will appear. In then left side, Analysis Type allows you to choose the type of your analysis (i.e. in time domain, in frequency domain,...). Select Time Domain (Transient) then enter the following settings: Run to time (how long to simulate the circuit for) = 5ms; Maximum step size (how often the program will calculate the circuit parameters during the simulation) = 1us; OK. Once the profile has been created, you can now run the simulation. RUNNING THE SIMULATION AND PLOTTING THE RESULTS To run the simulation, push the button (RUN). Wait until the program completes the run. If everything was entered correctly, the simulation will run without any errors and will reveal a blank graphic screen.

Lab 1. Introduction to OrCAD

The graphical display contains an x-y graph with time as the x-axis. This is where the waveforms will be displayed. There isnt any trace displayed (yet) because you havent choose what signal you want to see (voltage, current, ). Suppose we are interesting in plotting the voltage generated by the VSIN source. To display it, you have two possibilities: button (ADD TRACE). 1) Plotting traces by using the Push this button. In the window that opens, notice in the left side a list of all the inputs ant the outputs of the circuit: currents I( ), potentials V( ), powers W( ). You can select any of them by clicking on it. The signal that you select will appear at Trace Expression box (at the bottom of this window). Click on V(V1:+) (this is the potential at the positive terminal of the source, therefore the signal OK. You will see the trace for the sinusoidal signal generated by the VSIN generated by the source) source. 2) Plotting traces by using the markers. First delete the trace previously displayed (click on its name shown below the graph, then press Delete). Minimize the simulation window (dont close it, just minimize it!). , meaning: On the upper toolbar of the schematic page, you have the markers buttons: voltage markers (the electrical potential in reference to the ground), differential voltage markers, current markers, and power markers respectively. By using these markers, you can mark right on your schematic the signal you want to see. Choose a voltage marker then place it on the wire between the source and the resistor. Then rightclick End Mode. Restore the graph window and notice that the same sinusoidal trace has been displayed. The markers on the schematic can be moved to display other points in the circuit without closing the simulation window. ADJUSTING THE AXIS Notice that our sine wave is of 1ms period, 1V magnitude, 0V offset. The range of the time axis is (0 5ms) (5ms is the value that you set in the profile, at Run to time). Suppose that we want to see just a single period of the sine (1ms). To change the scale of the time axis, do the following: double click anywhere on the time axis; in the new window select User defined; set the time range from 0 to 1ms; OK. Now you can see that just one period of the sine has been displayed (0 1ms). Now change again the upper limit, this time to a value higher then 5ms, for example 6ms. As you can see on the graph, the maximum time value of the displayed trace is still 5ms (remember this is the value that you set in the profile at Run to time). Therefore, if you want more then 5ms, you must change the value of Run to time.
VOFF to a to VOFF.

Lets modify now the dc offset of the signal (which was 0V until now). Go back to the schematic and change non-zero value. Run the simulation. Notice that the average of the signal is now the one that you gave

Go back to the schematic page and change VOFF back to 0V. Now lets try to get a cosine signal from the same source. To do this you have to modify the phase to 90 (because the different phase between cosine and sine is 90). Run the simulation then notice that you have got a cosine. MEASURING VALUES OF THE SIGNAL Modify the schematic as shown in Figure 1.2 (the symbol with a plus inside is called SUM and is in the ABM library). Set the parameters of the new VSIN source as shown in the figure.
VOFF = 0 VAMPL = 1 FREQ = 1k PHASE = 90 V1 VOFF = 0 VAMPL = 1 FREQ = 1k PHASE = 45 V2 0 0 R1 1k

Figure 1.2

Lab 1. Introduction to OrCAD

Place 2 voltage markers in order to see the voltages generated by the VSIN sources. Run the simulation. Notice that the two waveforms are both of the same magnitude and frequency and a phase difference exists between them. We know that the phase difference between the two signals is 45 because we set the phases of the sources at 90 and 45 respectively. Now lets measure this phase difference on the graph. But first, we will change the grid so that you can easily do the measuring. Do the following: select from the menu: Plot Axis Settings; in the new window, select XGrid (the vertical lines of the grid); notice that the XGrid window is divided in two columns, Major and Minor; in the Minor column choose None; do the same for YGrid (the horizontal lines of the grid). To measure different values of a trace, you will use the cursors. To make them available, click on the button (TOGGLE CURSOR). Two cursors (two pairs of vertical and horizontal crosshairs), marked A1 and A2, will now be accessible. Their positions are controlled using the mouse: to move A1 cursor, hold down the left mouse button and to move the A2 cursor, hold down the right mouse button. In the small Probe Cursor window, you can see the following: at A1 : the coordinates of the A1 cursor; at A2 the coordinates of the A2 cursor; at dif : the differences between their coordinates. You saw that both cursors were moving on the same trace. Also notice that there is small square around the symbol of the first trace (the symbol below the graph). To measure the phase difference between traces, first you have to put one cursor on the other trace. To do this, click on the symbol of the other trace. Notice that now, there is a small square around each symbol, and the cursors move each on a trace. Place the 2 cursors so that their x-axis superpose over the 0V grid line (as shown in Figure 1.3). Probably you will not be able to superpose them exactly. For a higher 0V button (ZOOM AREA). On the graph, select with the mouse an precision, use the area around the cursors (this area will be zoomed in). In the Probe Cursor window, dif will give you the difference between the cursors (on the x-axis and on the y-axis). The difference on the x-axis is the phase difference (in seconds) that we are Figure 1.3 interested in. Once you have superposed the cursors, you can zoom out by selecting the button (ZOOM FIT). Now that we measured the phase difference in seconds, lets verify if this value means 45. To convert seconds to degrees, do this:
VSIN

T [ s ] .................... 360 360 [ s ] [ ] = [ s ] .................... [ ] T[s] where T[s] is the period of the signals and [s] is the phase difference that you have just measured. Do the
calculus and you should obtain exactly 45. PLACING THE TRACES ON DIFFERENT PLOTS The two traces are on the same plot. To place them on different plots, do the following: add a new plot by selecting from the menu: Plot Add Plot to Window; move one trace to the new plot (CUT on the trace name bellow the graph and PASTE it on the new plot). CHANGING THE TRACES PROPERTIES To change the color, the width or the pattern of the waveform, do the following: right-click on one of the waveforms and select Properties...; in the new windows that opens (Trace Properties), you can change the color, the pattern, the width, or the symbol of the waveform.

You might also like