EE 210 Lab Exercise #3 Introduction to PSPICE Appending 4 in your Textbook contains a short tutorial on PSPICE. Additional information, tutorials and a demo version of PSPICE can be found at the manufacturer s website: www.orcad.com Introduction This tutorial provides an overview of the Orcad software application. This software package uses an interactive schematics editor to draw circuits (Capture) that can be simulated and analyzed (PSPICE). This software has many useful functions for analyzing all types and aspects of electronic circuitry. It is very important to become familiar with the standard functions because the software be used in most of the subsequent labs as a supplement and circuit verification tool. Exercise 1. Using Orcad Capture Part 1. Calculations 1. For the circuit shown in Figure 1, analytically determine the voltages at each node, the voltage across R1, the current flowing through the resistors, and the power across each component including the source. Part 2. Getting into Capture 1. Log onto the Computer Network with your Penn State s username and password 2. From the start menu in Windows, select the Orcad 10.0 demo application. Consult with your instructor for directions for different software versions. Part 3. Creating a schematic for simulation 1. From the File menu at the top of the screen select New and then Project Note: Project must be selected in order to run simulations. EE 210 Laboratory Exercise #3 page 1
2. In the new project window, enter the name of your Project, select the Analog or Mixed A/D and specify the location of the files to be saved. 3. The Create Pspice project window should appear. Select Create a blank project and OK. 4. The schematic and project manager windows should now appear on the screen. The project manager window contains all of the resources for the current project. The schematic window is where the circuits are to be constructed. 5. To begin placing parts in the schematic window select the part button on the vertical toolbar at the right of the screen or by selecting Place then Part from the menu at the top of the screen. From the Place Part window, select R from the Analog library. Notice that the symbol for a resistor appears in the lower right hand corner. Select OK and place the resistor on the schematic window by left clicking once. Place another resistor by left clicking again. Right click and select End mode to finish placing resistors. Note: Libraries containing other parts may be added to the project in the place part window. 6. Using the same procedure, place a voltage source (VDC) from the Source library in the schematic window. Note: Current sources can also be found in the Source library. They are manipulated in a similar manner as the voltage sources. 7. Select 0/SOURCE from the ground button from the toolbar on the left or in the CAPSYM library. Important: This is the ground that must be selected and placed in every circuit to avoid errors! Select OK to place the ground in the schematic window. Note: all parts currently used in the schematic can be selected from the pull down menu at the top of the screen. 8. Arrange the parts to roughly match Figure 1 by left clicking on the part to select it (turns pink) and holding the button down to drag it into the desired position. Once the part is in desired position, it can be rotated or mirrored horizontally or vertically by right clicking on the part and selecting the desired orientation. Note: Groups of parts may be selected and moved together by drawing a box around the desired parts with the cursor and clicking on the group to drag. 9. To connect the parts wires to form the circuit in Figure 1, select the place wire icon from the vertical toolbar to the right of the screen or by selecting Place then Wire from the menu. 10. Position the pointer at the top end of the source and click to drag a wire from the source. A solid line should connect the pointer with the source, right angles can be made in the wire by clicking and changing direction during this step. When the pointer is over the connection terminals of one of the other devices on the screen (i.e. resistor or earth ground), a red dot should appear indicating a terminal connection. Click, then right click and select end wire. Follow this pattern until the source-resistor-resistor loop similar to Figure 1 is complete. EE 210 Laboratory Exercise #3 page 2
Note: Placing parts end to end without using a wire is a common source of error because the parts may not properly connect. Note: Holding shift while dragging parts retains connections. Figure 1: Circuit with independent voltage sources and resistors. 11. The value of each component must be defined. The same procedure is used for each component. Double click on the resistor value. A dialogue box should appear. Enter the desired value in the dialog box labeled Value:. Click on the OK button. Repeat the above procedure for the other resistor. Note: The scale factor abbreviations in PSPICE are standard except that milli is represented by m and mega is represented by meg. 12. The voltage source may be corrected in a similar manner. Double click on the voltage source to bring up the dialogue box. Select the DC= line. Move the cursor to the Value input box and type in 10, since it is a 10V source. Click on the OK button. Part 4. DC Analysis 1. Place the voltage and voltage differential markers on the circuit as shown in Figure 2. This is done by selecting the respective icons (left) from the upper tool bar and placing them in contact with the point on the circuit to be analyzed and displayed in PSPICE. The voltage markers display the voltage at the node and the voltage differential markers compute the difference in voltage between two points with the positive and negative markers. Note: The voltage markers must be connected to a wire or node. The current makers must be placed to the pin of a specific device. The polarity of the resulting current determines if it is flowing into (+) or out of (-) the device at that pin. The power markers must be connected directly to a part. (see Figure 3) EE 210 Laboratory Exercise #3 page 3
Figure 2: Circuit with voltage markers. Figure 3: Example of current and power marker placement. 2. From the upper toolbar select the new simulation profile icon or by selecting PSPICE from the main menu and then new simulation profile. The new simulation window should open. 3. The simulation settings window should now appear. Check the Analysis tab to make sure that the Time Domain (Transient) analysis type is selected. 4. To simulate the circuit, select the run button from the upper toolbar, or by selecting PSPICE from the main menu then Run. 5. The PSPICE window should open, with the simulation progress reading at the lower part of the window. The simulation profile left hand side of the window will read simulation complete when it is finished simulating. 6. A plot should appear in the upper portion of the PSPICE window with all of the measurements color-coded corresponding to the markers from step 1. This plot is with respect to time (hence Time analysis) and the plots should not vary with time since the simulation is a simple DC circuit. Note: The simulations can be edited and executed from the PSPICE window by selecting the Edit simulation settings button and the Run button. 7. Add two additional plots by selecting the Plot menu at the top of the screen and selecting Add plot to window (window must be maximized!). Select the first new plot and used the add trace button. Add the currents I(R1) and I(R2). This displays the current through R1 and R2 on the new plot. Select the second new plot and ad the power values W(R1), W(R2), and W(V1). This displays the power dissipation of R1, R2, and the source. Doing this makes it easier to view voltages, currents, and powers separately with common units. For the remainder of the semester, traces of voltage, current, and power must be contained on separate plots unless directed otherwise! Note: Diferent functions can be performed on the traces by selecting the desired function from the list on the right of the add trace window. EE 210 Laboratory Exercise #3 page 4
Note: These currents and powers can also be displayed on a plot by repeating step 1 with the current and power markers. The simulations must be completed separately in order for the traces to appear on different plots as desired. 7. Place markers on each trace to display the exact value on the plot at any point in time by enabling the cursor display icon on the menu and positioning the cursor on the desired point on the plot. Select the mark icon to display the value on the screen. Select another trace by highlighting its name at the bottom of the screen. Always use marks when plotting DC values so that the exact value is always visible! Note: Other cursor functions such as finding the peak and slope can be performed using the buttons on the cursor menu. 8. Add your name and a title to the plots by selecting the text icon and placing the text on the desired plot. Always make sure the plots are clearly labeled with text! 9. (2) Print the plots by selecting File Print and specifying the desired printer. 10. Return the Capture window and the voltages, currents, and powers should be labeled on the schematic. Note : The simulation results can be viewed at any time by pressing the view simulation results button. 11. All of the circuits voltages, currents, and power measurements may be enabled or disabled for display by selecting the respective buttons from the menu at the top of the screen (left). Note : these values displayed on the schematic are the value of the node at the last simulation point. This is consistent for simple DC circuits but can be misleading for AC circuits. 11. Enable all of the measurements and verify that the match the calculations from Part 1. Also, and your name and a title to the schematic by selecting the place text icon from the menu to the right of the screen. 12. Print the schematic by selecting File Print. EE 210 Laboratory Exercise #3 page 5
Part 5: AC Time Domain Analysis 1. Replace the source from Figure 2 with the part VSIN from the Source library. This produces a sinusoid of variable frequency, amplitude, and dc offset just as the waveform generator does. 2. Set the frequency to 100Hz, the dc offset to 2V, and the amplitude to 6V, similar to adjusting the function generator. Remember that the amplitude is the peak value of the waveform no the peak-to-peak value. 3. Choose the edit simulation profile buttonfrom the upper toolbar, or by selecting PSPICE from the main menu then Edit simulation profile. 4. Setup the transient simulation as before except, set Run to time under the Analysis tab such that 2 cycles of the waveform are simulated and displayed. This is similar to the adjusting the oscilloscope display in Lab 1. Adjust the Maximum step size when necessary to provide an adequate number of data points from the simulation. When considering the step size, remember that the smaller the step size, the longer the simulation run time. 4. Following the same procedure described previously, simulate the circuit. 5. Remember that the values displayed on the schematic represent the values at the last simulation point. Since they do not provide much insight to the AC analysis, turn the display off. However, when printing a sinusoidal waveform, always mark the positive and negative peaks on the plots with a label. Label and print schematic and the plots, EE 210 Laboratory Exercise #3 page 6
Exercise 2. Circuit with Dependent Voltage Sources and Resistors Dependent source symbols used in PSPICE are shown in Figure 4. The source enclosed in the circle produces the current or voltage. The symbols in the source (not inside the circle) provide the reference. For the current dependencies, the reference is connected in series with the device used as the reference, as would done with the DMM. For the voltage dependencies, the reference wires are connected in parallel with the device used as the reference, also as would be done with the DMM. Figure 4: Dependent source icons. The top row indicates the PSPICE part corresponding to the circuit symbol below. 1. Begin a new schematic for the circuit in Figure 5. The dependent sources are found in the ANALOG library. 2. Look at the dependent sources. The small independent source acts as the dependent source (the diamond shape in Figure 4). The second port is used to indicate the reference voltage or current. Place the sources in the schematic window, noting the polarity of the ports. Double clicking on the dependent source will bring up a dialogue box as with all of the other components. The gain of the dependent source is the only parameter that is needed to describe the part, adjust the gain accordingly. 3. Once all of the components are in place and connected, follow the same procedure for the analysis as specified in Exercise 1. 4. Print out the schematic of the circuit and the probe plots for the current through the 1: resistor and the voltage across the 3Ω resistor. Be sure to label the requested traces in the probe. Also, make sure that only the requested voltages and currents are displayed on the schematic. 5. Replace the 12A dc current source with a 10kHz, 6A peak AC sinusoidal current source with a DC offset of 6A. Repeat the simulation (remember to adjust for the proper end time). Print out the schematic of the circuit and the probe plots for the current through the 1: resistor and the voltage across the 3Ω resistor. Be sure to label the requested traces in the probe. EE 210 Laboratory Exercise #3 page 7
Figure 5: Circuit with independent and dependent sources and resistors. EE 210 Laboratory Exercise #3 page 8