14
An OrCAD Tutorial Dr. S.S.Limaye 1. Introduction OrCAD is a suite of tools from Cadence company for the design and layout of printed circuit boards (PCBs). This is the most popular tool in the industry. Its student version is freely downloadable from the Cadence web site. This document is a fast track course in designing an entire circuit board from start to finish. This will be a very small and simple circuit, but it will demonstrate the major concepts and introduce the tools behind completing a PCB design. After you have completed this tutorial, you will know all the steps needed to make PCBs using OrCAD. This is not, however, a guide to the inner workings of the OrCAD interface. You should use this document in conjunction with the online OrCAD help and tutorials. Design process The primary tool for entering schematics is Capture CIS. CIS stands for Component Information System which provides a database of components to all Orcad tools. The hierarchy of a design project is as follows. PROJECT (.OPJ file) DESIGN1(.DSN file) ……. DESIGN2(.DSN file)……. SCHEMATIC1 SCHEMATIC2 SCHEMATIC1 SCHEMATIC2 SCHEMATIC3…… PAGE1 PAGE2 PAGE3 PAGE1 PAGE1 PAGE2 PAGE1 PAGE1 PAGE2

An OrCAD Tutorial Dr. S.S.Limaye - JITjit.org.in/OrCAD_STARTER.pdf · An OrCAD Tutorial Dr. S.S.Limaye 1. ... In assignment 1, ... TCH sets up parameters only. The TPL file, in addition

Embed Size (px)

Citation preview

An OrCAD Tutorial Dr. S.S.Limaye1. Introduction OrCAD is a suite of tools from Cadence company for the design and layout of printed circuit boards (PCBs). This is the most popular tool in the industry. Its student version is freely downloadable from the Cadence web site. This document is a fast track course in designing an entire circuit board from start to finish. This will be a very small and simple circuit, but it will demonstrate the major concepts and introduce the tools behind completing a PCB design. After you have completed this tutorial, you will know all the steps needed to make PCBs using OrCAD. This is not, however, a guide to the inner workings of the OrCAD interface. You should use this document in conjunction with the online OrCAD help and tutorials. Design process

The primary tool for entering schematics is Capture CIS. CIS stands for Component Information System which provides a database of components to all Orcad tools. The hierarchy of a design project is as follows.

PROJECT (.OPJ file)

DESIGN1(.DSN file) ……. DESIGN2(.DSN file)…….

SCHEMATIC1 SCHEMATIC2 SCHEMATIC1 SCHEMATIC2 SCHEMATIC3……

PAGE1 PAGE2 PAGE3 PAGE1 PAGE1 PAGE2 PAGE1 PAGE1 PAGE2

The components in schematics file consist of schematic symbols that are contained in various libraries (“.olb” files). These files are located in the folder Orcad\Capture\Library. The output of Capture is called “Netlist file”. It has a file extension “.mnl”. After entering schematics, we export netlist to the other tools using ECO (Engineering Change Order) tool.This netlist can be imported either in following two tools.

1. “Pspice” simulator for studying the electronic behavior in response to a stimulus.2. “Orcad layout plus” tool for PCB layout. We need to create a new layout project

(Filename extension .max), define the technology i.e. capabilities of PCB fabrication process and import the netlist. Then we define the board outline, place the components, define the layer properties and do routing. The final output is “Gerber file” which can be sent to a PCB fabricator.

Capture CIS

OrCAD Capture is used for design entry in schematic form, you can refer to OrCAD tutorial“Learning Capture” for more details. For this, open the OrCAD Capture software, and then press “Help” > “Learning Capture” from the menu bar with the mouse to open the learning tutorial. We will start with a simple circuit.

Starting a New Schematic ProjectTo create a new project, first start OrCAD Capture and click File > New > Project. You will see the following dialog box.

In the Name window, enter assignment1. Create a new folder assignment1 in the tutorial folder and select it using the Browse button. Press OK. Another small dialog box appears for PSPICE project creation. Choose the radio button corresponding to “Create a blank project”. Your screen should look like this.

PLACING PARTS & MAKING CONNECTIONS - You are now ready to start placing the electrical components for your design. Open the first page of your schematics and click the Place Part icon on the toolbar on the right side of the screen. It is the second button from the top. You will then get a dialog for choosing which part you want to place on your schematics.

Click on ANALOG in the Libraries window and R in Part List window. Press OK. The part select window vanishes and a resistor symbol appears besides cursor. Click the cursor 2 times to place resistors R7 and R9. Now press the “R” key to rotate the symbol through 90 degrees and place R8. Right click the mouse and select “End Mode”. Notice that ORCAD has automatically labeled the resistors as R1, R2 and R3. To change the name, double click on the name to invoke properties dialog and change it. Similarly change the default value of 1K to 7, 6 and 6 respectively.Now select VDC from the SOURCE library and place it on the left of the resistors.

Now we need to draw nets to make electrical connections between components. To do this, click the Place Wire icon (third from top) and connect the components as shown in the assignment1 schematics. You need to add ground connection. Click on ground tool (ninth from top) and in the dialog box, select 0/SOURCE. Place it on the schematic and connect it to the negative terminal of the battery.

Your schematic is now ready but before the simulation can start, you need to put probes on the signals you want to display. For the voltage signal, you can click the icon “Voltage/Level marker”; for the current signal, you can click the icon “Current marker” from that tool bar

PSpice SimulationNow you can start to use PSpice to simulate your design. Press “PSpice” in the menu bar and choose “New Simulation Profile”. A new window page will pop up, type the filename as assignment1 and then click “Create”. When you are done, “Simulation Settings” window is shown as follows. There are 8 different pages, only the “Analysis” page needs to modified now, keep the others at theirdefault state.Operating Point Analysis (.OP)In assignment 1, you need to compute the corresponding node voltages and branch currents, this can be done by operating point (bias point) analysis. Firstly, choose “Analysis” page in the simulation settings windows, then choose “Bias Point” from the Analysis type. Keep other options at theirdefault values and click “OK”.After that, you can put your mouse pointer onto the net in the schematic that you want to probe. Nowyou can start the simulation by clicking the “Run PSpice” icon (which looks like PLAY button). When the simulation is finished, click on the menu Pspice > view output file to see the bias point.Press the V button to display bias voltages and I button to display currents.

Assignment 2

L1

10mH

1

2

V

R9

100

R7

100

C1

1u

V1 V2

0

V VI

V3

FREQ = 5000VAMPL = 2VOFF = 1

TRANSIENT analysisRemove the DC source and replace with VSIN from SOURCE library. Set frequency to 5000, offset voltage to 1V and amplitude to 2V. Remove R8 and add L1 and C1 as shown. Click on Pspice > Edit simulation profile, click analysis tab and choose analysis type as “Time domain (transient)”. Enter simulation time as 1ms and click OK. Now run simulation and see waveforms. You may also experiment with a square wave source.AC SWEEP analysisRemove the VSIN source and replace with VAC from SOURCE library. Click on Pspice > Edit simulation profile, click analysis tab and choose analysis type as “AC sweep/Noise”. Enter start frequency as 1 and end frequency as 1e6 and click OK. Now run simulation and see frequency response.Assignment 3Diode V - I characterstics with DC sweepCreate a new project called diode and enter following circuit.

V10Vdc

0

R1

1k

D1

D1N4001

I

The voltage source V1 need not be given any value because we are going to sweep it in the range -5 to 1 V. Put a current probe on D1. Click on PSpice > New simulation rofile. In the Analysis tab, enter DC SWEEP. In the SWEEP variable radio button, select “Voltage source” and in the Name edit box, enter V1. Let the sweep type remain linear. Enter Start value as -5, end value as 1 and increment as .1. Run simulation. By default, the X axis is the sweep variable, i.e. V1. However you want that the x axis variable should be the voltage across the diode. To achieve this, in the simulation menu, select PLOT > AXIS Setting. Click on AXIS VARIABLE button. Select variable name as V(D1 A). You should get following graph.

Observe that reverse current is too small compared to the forward current, so it appears as 0. To view it properly, set the sweep range of V1 only in the negative region, i.e. – 5 to 0. You will observe that a reverse saturation current of 14 nA flows. This corresponds to the default temperature of 27 degrees. If you want, you can change this setting by editing the simulation profile. In the OPTIONS tab, set the temperature to the desired value.Nested sweep.To find effect of temperature on V – I characteristics, we can use nested sweep. Edit the simulation profile. In the options window of analysis tab, check secondary sweep. Select sweep variable as Temperature. Let sweep type remain as linear. Enter start value as 0, end value as 50 and increment as 10. Click on Primary sweep. Run simulation and observe the result. It should be similar to the figure shown below. Verify that the reverse current doubles for every 10 degrees rise in temperature.

Now let us study the forward characteristics. Change the primary sweep range to 0-1 V with increment of .1V. Run simulation. Again change the X-axis setting as before. Observe that forward voltage reduces with rise in temperature.

Assignment 4Transistor outpur characterstics with nested Parameter sweepCreate a new project called transistor and enter following circuit.

VB

VC

V110Vdc

0

I110uAdc

Q1

BC107A

I

To give name VC to collector voltage, select the N1 tool from the toolbar (fourth from top). “Place net alias” dialog box appears. Enter net name as VC and press OK, Touch the cursor on the collector net. The name VC is placed on the net. Similarly give name VB to base voltage.Click Pspice > New simulation profile, select analysis tab,In analysis type edit box, Choose DC sweepIn options, Click on Primary sweep. In sweep variable, select radio button for voltage source.In name edit box, enter V1. Fill start value with 0, stop value with 5 and increment with .1.Now, Click on Secondary sweep. In sweep variable, select radio button for current source.In name edit box, enter I1. Fill start value with 0, stop value with 100uA and increment with 10uA.Run simulation.The output characteristics will appear on the screen.Now change the range of V1 to 0-500V. Nothing drastic happens to the characterstics, But in reality, the transistor would burn down to ashes. This shows some limitations of simulation.

Assignment5Digital circuitCreate a new project and enter following circuit

LO

U5

7493A

14123

129811

CKACKBR01R02

QAQBQCQD

U3A

7400

1

23

CLKDSTM1OFFTIME = .1uS

ONTIME = .1uSDELAY = 0STARTVAL = 0OPPVAL = 1

U2A

7400

1

23

V

V

U1A

7400

1

23

VV

V

Set ON time and OFF time of Dig Clk (Source library) to .1us. In simulation profile, select analysis type as time domain(transient). Enter “Run to time” as 5 us. Press options tab and in “category” choose “gate level simulation”. Set the option for “Initialize all flipflops to” as 0.Press SIMULATE button.Observe the waveforms. The wave form of U3 output has a small glitch at 2.33us. Can you explain the reason?

Layout Plus

Step1: Creating a new project

Invoke layout plus by clicking the desktop icon. Click on File > New from the main menu. The initial steps are as follows.

A - Define technology (TCH) or template file (TPL)

These files set default values for spacing, trace width and other parameters. Definitions of technology files are in the Help menu. TCH sets up parameters only. The TPL file, in addition to parameters also generates a standard board dimension and connectors. This is very handy for designing standard boards like PCI daughterboard or SIMM cards. These files are located in the folder Orcad\Layout plus\Data. As a beginner, start with DEFAULT.TCH.

B - Name of an Input MNL file

Choose the TUTORIAL1.MNL file created by Capture..

C - Output file

This is the file that contains all of the information used in the Layout Plus of the PCB. The default name is the same as the MNL file with a “.MAX” file extension.

Linking Schematic symbols to footprint symbols.

After closing “Auto ECO” window, the “Link Footprint to Component” window appears for any part that does not have a footprint associated with it in a files named USR.PRT or SYSTEM.PRT..These files are located in the folder Orcad\Layout plus\Data. Once a footprint has been associated with a part, you will not see this window again for that part. A typical entry in the file is shown below.

7400 - DIP.100/14/W.300/L.750,,SOG.050/14/WG.244/L.375

If you have made a mistake by associating a part with the wrong footprint, edit the USR.PRTtext file by deleting the line where that association appears. Most parts will have a footprint in one of the standard libraries installed with Layout Plus. These libraries have “.llb” extension and they are in the folder Orcad\Layout plus\Data. For some parts, a new footprint will have to be created but it is the job of a more advanced user, so we will not discuss it here. Click the button titled “Linking existing footprint to component” Now the linking window appears. The lower left pane shows a list of available libraries. When you select one library, its components appear in the upper left pane. When you select a component, its diagram appears in the right pane. When you are satisfied that your choice is right, clock OK. Repeat this process for all components.

Now a black colored layout screen appears with following contents.

1- All components dumped in one corner.

2- A dotted rectangle called “Design Rules Check box”. Layout Plus checks design rules in real time for all components and traces within the box. It can be repositioned if desired.

3- Gold colored wires (collectively called the rat’s nest) that show connectivity between footprints. These are not physical traces but they represent connections. If we move a component, the wires move along with it like stretched rubber bands.

4- A title box at the bottom right corner.

5- A datum mark showing (0,0) position near the title box.

6- X-Y position displays below the tool bar. These two fields indicate the position of the cursor with respect to datum (in mils). This will be used in defining the board size and locating mounting holes.

Step 2 Defining layer and track properties

Click on spreadsheet icon on the toolbar and choose LAYERS to invoke the layers spreadsheet. Since we chose default technology, the PCB structure is a 6 layer board. Layers Top, Bottom, Inner R1 and Inner R2 are defined as routing layers. Layers GND and PWR are defined as Planes. Since we are interested in a 2 layer board, we will disable routing in all layers except TOP and BOTTOM. To do this, select Inner R1 layer in spreadsheet, hold CTRL and select other layers, namely Inner R2, GND and PWR. Change the layer type to “Unused routing”.

We want the power supply lines VCC and GND to be made thicker. To do this, click spreadsheet tool button and choose Nets from the menu. The Nets spreadsheet appears. Find VCC row and double click on it. “Edit net” window appears. In the respective edit boxes, enter Min width as 25, Conn width as 25 and Max width as 50.

Step 3: Defining Board outline:First you need to move the Datum (0, 0) off the title block.Select “Tool” “Dimension” “Select tool”Select “Tool” Dimension” “Move Datum”Now click on the Datum, leave the mouse button and click it where the lower left corner of your board will be. This will ensure that all coordinates are positive.

Next we need to define the board outline. Since this represents a boundary, i.e. an obstacle for the tracks, we need an obstacle tool for this. Select “Tool” > “Obstacle” > “select tool” > “New”. Right click and select “Properties”. Choose the layer as global layer, obstacle type as board outline and track width as 12.Place the cursor on the Datum, hold the left mouse button down and drag the box to the opposite corner of the board. Draw a rectangle 4” by 6”. Make use of the X, Y position indicators. For polygon shaped boards, you may draw it by clicking the mouse at vertices. After the last vertex

is placed, press escape. The rectangle will be completed automatically. This will be the board outline. Select View and Click on “Zoom DRC/Route Box” to resize the dotted rectangle called DRC box. The box is resized by dragging a box around the board.Step 4: Adding mounting holes to a board1 Choose the component toolbar button.2 From the pop-up menu, choose New. The Add Component dialog box displays.3 Choose the Footprint button. The Select Footprint dialog box displays.4 In the Libraries group box, select LAYOUT.LLB. Use the Add button, if necessary, to add this library to the list of available libraries. (LAYOUT.LLB resides in the LIBRARY directory.)5 In the Footprints group box, select a mounting hole (OrCAD provides three: MTHOLE1, MTHOLE2, and MTHOLE3). Choose the OK button to close the Select Footprint dialog box.6 Select the Non-Electric option, then choose the OK button to close the Add Component dialog box. The mounting hole attaches to your cursor.7 Place the mounting hole by clicking the left mouse button.

Step 5: Placing the components on boardIt is possible to place all components automatically but we want some components likeconnectors to be placed at particular places. Select “tool” “component” “select tool”, or simply click on the component tool on the toolbar (IC shaped). Click on the desired connector and drag it inside the board outline. You may press R to rotate it if desired. Click the left mouse button to place it at the right position. Press L to lock it in its place so that subsequent auto placement will not move it. Repeat this process with other connectors and components that you want to manually place. Now click “Auto” > “Place” > “Board”. If you want to change the initial positioning, click “Auto” > “Unplace” > “Board”. Click on “options” > “Placement Strategy”. A spreadsheet with 12 rows for 12 passes appears. Select the “enabled” column of each row one by one by holding down the CTRL key. Then right click and select “Properties”. A dialog box titled “Edit place passes” pops up. Uncheck the DONE box and check the ENABLED box. Press OK. Now you can repeat the steps above.Step 6: routingWe wish the power lines to be routed first. For doing this, click on spreadsheet tool button and select Nets. In the net spreadsheet, locate VCC and GND. Double click on the row to invoke the properties window. Check the “Routing enabled” box. For all other nets, unheck the “Routing enabled” box. Click on menu option Auto > Autoroute > Board. The power lines are routed. Now check the “Routing enabled” box for all nets and again do autoroute. Step 6:Running the Design Rule Check and cleaning upThis is needed to test the integrity of your board by verifying the board’s adherence to design rules. To check design rules:1 From the Auto menu, choose Design Rule Check. The Check Design Rulesdialog box displays.2 Select from the following options, then choose the OK button. Layout performsthe specified checks and marks the errors with circles on the board.