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

Orcad Capture and PSpice

The programs we will be using are Orcad Capture and PSpice A/D. The Capture program is used primarily used for drawing schematics. In Capture, you select parts from a set of libraries, and wire them together with a wire tool. Capture will automatically create a file used by PSpice to simulate this circuit. PSpice is the simulation program which provides the results of the circuit simulation. Today, we will be constructing an op amp circuit and testing it.

Getting Started
1. Open Orcad Capture. To get to Capture, go to Start All Programs EE Programs PSpice Student Capture Student 2. From the File menu of Capture, choose New Project. A wizard will pop up. Select the Analog or Mixed A/D radio button. Give your project an appropriate name. Then click OK. Next, select the Create a blank project radio button, and click OK. 3. At this point, two windows will appear. The large mostly blank window is where you will draw the schematic. The smaller window on the left is there to help you keep track of your different project files. Click on the schematic window. Notice that a small, vertical bar appears on the right side of the screen. These are the tools for drawing the schematic.

\ Figure 1. The parts of the Capture window

Building the First Circuit


4. The first part we will select is a voltage source. On the right side tool bar, select the second button from the top, entitled Place Part, or go up to the Place menu and select Part. The parts are sorted into libraries Libraries categorize parts so that they can be located easily. Voltage sources lie in the sources library. Highlight the SOURCE library. The part we are looking for is VDC. This is a DC voltage source, like a battery.

Figure 2. The Place Part Menu 5. Highlight the VDC object, then click OK. Next, click somewhere on the white space of the schematic window. This will place the VDC on the screen. Notice the two texts next to the VDC symbol. The 0Vdc tells the voltage value of the source. The V1 is the name of the source. 6. Next go back into the Place Part menu. This time, highlight the ANALOG library, and select the R part, which is a resistor. Place the part next to the voltage source. Now that we have a couple parts, we want to wire them together. Select the Place Wire button, located right below the Place Part button on the tools bar. Click on one end of the voltage source, and then move the wire and click on one end of the resistor. Next, wire the other end of the VDC to the other end of the resistor.

Figure 3. The circuit with a VDC and Resistor 7. PSpice requires a ground in every circuit. We want to connect the ground to the negative terminal of the VDC. Go to Place Ground. The ground we are looking for is in SOURCE library. If the source library is not in the list, you will have to add it. To add it, go to Add Library The library should be in the PSpice folder. Get the 0 part and place it on the schematic. Connect it to the negative voltage source terminal.

Figure 4. The zero-ground used for a reference voltage 8. Double-click on the 0Vdc text, and change the value to 9Vdc or 9. Now the first circuit is set up. Measure the current though the circuit. It should be 9V/1k = 9mA. We will set up a transient simulation. Click PSpice New Simulation Profile. Give your profile a name and click create. For now, do not change any settings. Click OK. Now, back in the schematic window, click the Run Pspice button, which looks like a blue triangle.

Figure 5. The Run Simulation button and I button, located on the top toolbar 9. Ignore the program that appears for now. Go back to the schematic screen, and click the I button on the top tool bar. This will read the currents at various lines in the circuit. The current should read 9.000mA. Also, click the V button at the top. This allows us see the voltage at different nodes. 10. Next, build upon the circuit we have created to make the power source for the op amp circuit. Place another VDC and resistor, and create the circuit shown below. If you have trouble, look at steps 4-9 for placing the parts.

Figure 6. The completed power supply for the op amp circuit 11. Now that the power supply is set up, test that there is +9 Volts at the highest node, and -9 V at the lowest node, by running your simulation again. Click the Run Simulation button, then return to your schematic and press the V and I buttons to confirm the voltages and currents.

Using Integrated Circuits in Capture


12. Next, create the op amp circuit. The first part will be to make an inverting amplifier. An inverting amplifier will take some input, and output the same signal inverted, and multiplied by a factor of A. This circuit will require 2 resistors, one operation amplifier, and one voltage source. The op amp used in this tutorial is the LM324. This part is in a library titled EVAL. To get the part, go to Place Part, and highlight the EVAL library. Double-click on the LM324, and place it on your schematic. It will be easier to draw the circuit if the negative terminal of the op amp is on the top. To do this, right-click the LM324 youve placed, and select Mirror Vertically. 13. Place two resistors on the schematic. Also, place a 0-ground. Now, wire the resistors and ground as shown below. Note that the ground connects directly to the positive terminal.

Figure 7. The op amp configuration for the inverting amplifier 14. A new type of voltage source will be used as the input for this circuit. Go to Place Part, and highlight the SOURCE library. This time, select the VSIN part. This part allows you to generate a sine wave voltage, where you specify the frequency, amplitude and offset. Double-click on each of the values and set them to the following: VOFF = 0 VAMPL = .1 FREQ = 1K

Notice that commonly used letters can be substituted in for the values. For instance, 1K = 1000 Hz in the FREQ parameter for VSIN. Here is a list of commonly used suffixes: p = pico = 10-12 n = nano = 10-9 u = micro = 10-6 m = milli = 10-3 k = kilo = 103 meg = mega = 106 Using these keeps your schematic looking neat, especially for larger projects. 15. Attach one end of the voltage source to the end of the resistor, and the other end to a new ground part. Your schematic should look like this:

Figure 8. The op amp with the voltage source attached 16. Before the amplifier can be simulated, it must also have power. The power supply you created at the beginning will be used. One of the problems with creating schematics is that they will start to look messy if long wires are placed all over the schematic. In order to avoid this, a net alias can be created. A net alias gives a name to a certain node. Whenever you place another net alias with the same name at another node, it will connect the two together, without using a wire. To create a net alias, click PlaceNet Alias in the menu or on the tool bar. Give it the name V+, and click ok. A net alias can only be placed on a wire. Place the V+ above the wire of the +9 Volts on your power supply. Similarly, create a net alias named V-, and place it above the wire for the -9 Volt power supply.

Figure 9. The power supply with net aliases

17. Now, create two wires out of each power terminal on the op amp. Create two new net aliases with exactly the same name as those connected to the power supply. Place the V+ alias as the positive power terminal, and the V- pin at the negative power terminal.

Using Plots in PSpice


18. The next step is to check if the amplifier is working. This time, however, PSpice will be used to provide a graph of Voltage vs. Time at the output and input. On the top tool bar, select the Voltage Level Marker. Place a marker at the output node of the op amp and the output of the VSIN part.

Figure 10. The voltage marker button

19. Go to PSpice Edit Simulation Profile. Up until now, you have ignored the parameters in this window. Since your VSIN frequency is set to 1KHz, set the run to time parameter to 10ms. This will give 10 cycles of the waveform. Now, click OK, and then run the simulation. 20. In the program that appears, you should see two sine waves. They should be opposite phase, since the amplifier is inverting. However, the sine wave looks pretty bad. This is because PSpice automatically chooses how many points to plot. To change this, go back into Capture and go to PSpice Edit Simulation Profile. Change Maximum step size to .01ms. This will allow you to plot 1000 points over the 10ms simulation. Now run PSpice again. The sine wave should look much better.

Figure 11. The output simulation at high resolution 21. The above simulation is known as a transient analysis. Next, you will perform an AC analysis. This uses a voltage source and changes the frequency, plotting the amplitude of the sine wave vs. frequency. To do this, delete the VSIN part, and place in its spot a VAC source, from the SOURCE library. 22. Go to PSpiceEdit Simulation Profile. From the drop-down menu on the left, select AC sweep/noise. Set the start frequency to 1, and the end frequency to 10MEG. Set 100 pts/decade. Click OK and run PSpice. The amplitude of the

sine wave at the output starts to decrease at about 100KHz. This is a limitation of the op amp that PSpice models.

Figure 12. The frequency response plot of the 23. For the final step, you will create an active low-pass filter. A low-pass filter only passes low frequencies, as the name implies. This suggests that the amplitude of the sine wave will decrease at lower frequencies. To accomplish this, get a C part, a capacitor, from the ANALOG library. Place this as shown, and change the value to 1u (1 microfarad):

Figure 13. The completed active low-pass filter.

Now, run your simulation, and the amplitude plot will change. Playing with the resistor and capacitor values will show you that you can control both the gain of the circuit, as well as what frequency range is passed.

Working with the Files


On the EE computers, your files are typically saved in C:\ Temp To keep things organized, we suggest putting all the files into a single folder. To restart your work, open the File with the icon with a blue page and yellow pencil.

You might also like