# Connexions

You are here: Home » Content » High-Speed and Embedded Systems Design (Under Construction) » Preparing for OrCAD Layout

### Recently Viewed

This feature requires Javascript to be enabled.

Inside Collection (Course):

Module by: Patrick Frantz. E-mail the author

Summary: Step-by-step tutorial on how to prepare for OrCAD Layout.

## Warning:

The Connexions version of the OrCAD tutorial is still in development. Please click here for the original and complete tutorial. You may also browse this complete tutorial within Connexions by using the Mozilla browser and accessing the main Connexions page at http://cnx.rice.edu. Click on the 'Contents' tab and select Rice University ELEC 424/427 under the 'Courses' tab.

## Annotation

Now that your schematics are complete, you are ready to prepare to export the design to Layout. From now on, you will be working in both Capture and Layout. The first step in preparing your design is to annotate it. Annotation really involves several steps. First, we will assign unique reference designators to all of the parts in our circuit. Remember reference designators? These are just labels that are used in Layout to uniquely identify different types of parts. If you look at the hierarchy view in the project window, you will see a jumble of reference designators. You might have several capacitors named C1 or a lot of parts that have the label, R?, C?, U?, etc.

To fix this, we will use a few of the annotation tools. In the file view of the project explorer, highlight the top-level design file (the one with the dsn extension) and then select Tools-->Annotate. You will see the Annotate dialog box.

In a new design, it is best to first reset all the part designators. To do this, click the radio button that says Reset Part References to “?” and then click OK. You will be asked if you want to save your design before proceeding. Every part in your design will now have a question mark in its reference designator instead of a number. Now, reopen the annotate dialog box and check the box that says Incremental Reference Update and click OK. This will go through your entire design and number each part starting with 1 for each part type. If you now look in the hierarchy view, you will see that you have a nicely ordered list of parts.

## Creating Footprint Libraries

We are now ready to begin working in layout to proceed with our design. The first thing we need to do is create a library of footprints to be used in our PCB layout. Footprints are a representation of the physical area that a part occupies on a PCB.

### Note:

Footprints are also sometimes referred to as shapes or land patterns.

### Warning:

I cannot overemphasize this point. IT IS ABSOLUTELY CRUCIAL THAT YOUR FOOTPRINTS ARE CORRECT. Double-check them, triple-check them. It is sometimes possible to live with an error in a schematic symbol, but a footprint error can often sink your entire design. Please be VERY CAREFUL.

Start Layout Engineer’s Edition to begin working with footprints. Libraries for Footprints are very similar to libraries for schematic parts. Layout has a separate tool for working with footprint libraries, though. To start this tool, select Tools-->Library Manager. You will get a new window that looks like this.

### Note:

There are two versions of Layout: Engineer’s Edition and Plus. They are identical with the exception that Plus has an autorouter. We will not use this feature.

You will notice that there are already several libraries available for use. OrCAD has many existing footprints that you can use in your own design. As with the schematic symbols, be very careful to check that these footprints for correctness before using them. Often, you will have to make footprints for parts that don’t already have one. Most datasheets for parts will contain the mechanical information necessary to make a correct footprint. However, before making a footprint it is necessary to understand a little bit about how PCBs are constructed.

Let’s take a look at a padstack definition for an existing part. In the Library Manager, select the library DIP100T and highlight the first part DIP.100/14/W.300/L.700. You will see the part footprint in the Library Manager.

Close the padstack spreadsheet and open up the footprints spreadsheet. The name is confusing; it should really be called something like the pins spreadsheet because this spreadsheet defines the locations of the pins and also which padstack they use. You will see each pin for the part in this spreadsheet, its x and y locations, and the padstack used for each pin. Notice that pin 1 uses the square padstack, while the others use the round one.

Now let’s create a new footprint from scratch for your design. We will make the footprint for the pushbutton (Panasonic part EVQ-PAG04M). The mechanical diagram from the datasheet gives us all the information we need to know.

In the Library Manager, click Create New Footprint. This will bring up the following dialog box.

Name the footprint PB, and keep English for the Units. Even though the dimensions for the part are given in metric, most PCB fabrication measurements are still done in inches (or mils, 1/1000 of an inch). We can switch between the two systems fairly easily in OrCAD. Click OK to create the part. You will now see a new part with just one pin in the Library Manager.

Since this is a metric part, we need to change the systems settings to use metric instead of English. Select Options-->System Settings to bring up the following dialog. Change the systems settings as shown.

First, change the name of the padstack to something more useful like PB (the name of our footprint). Doing this will make this padstack easier to find in Layout when there are 100s of padstacks to choose from. Next, select the Undefined radio button. This will reset the padstack definitions on every layer. Click OK to continue. In the spreadsheet you should now see a padstack called PB with no layers defined.

We will now set each layer individually. You can also select multiple layers at a time by holding down the CTRL key when you click the layer name. First, let’s define the size of the drill used for this part. The datasheet tells us that we need a drill of 1 mm for this part. Select the layers DRLDWG and DRILL. When you have multiple layers selected, you will need to right-click and choose Properties to bring up the Edit Padstack dialog. Choose the Round radio button and give the width and height a value of 1. Click OK when done. The changes you made should now be reflected in the spreadsheet.

Now we will define the amount of metal on the routing layers beyond the size of the drill. This is called the annular ring. Each board shop will have requirements on the minimum annular ring size based on the drill diameter. In most cases 20 mils (1 mil = 1/1000 inch) is a safe bet. 1 mm is approximately 40 mils, so 20 mils is about 0.5 mm. Select the following layers and bring up the Edit Padstack dialog: TOP, BOTTOM, INNER. Even though we have no inner routing layers, it is good practice to go ahead and define them. Make the pads round and put the value of 1.5 in the height and width fields.

Next, we need to define the clearance on the plane layers. The middle layers of our circuit board are solid pieces of copper that are used for power and ground. To prevent short circuits, we need to define a clearance around our drill. Most board houses will also have requirements for this, but 35 mils beyond the drill size is usually a good start. In our case, we will do a little rounding and just use 2 mm. Select the PLANE layer and define a round pad with a height and width of 2 mm.

The last thing we need to define is the solder mask. This is usually defined as slightly larger (about 5 mils) than the annular rings on the top and bottom layers. Select SMTOP and SMBOT and make them round pads with height and width of 1.625 mm.

You have finished defining your padstack for this part. You can close the spreadsheet and you will see that pin 1 should now look a little different based on the changes you just made.

You probably noticed that you don’t need to define all of the layers. As a guide, here are the layers that you need to define for thru-hole and surface mount parts.

• Thru-Hole - TOP, BOTTOM, INNER, PLANCE, SMTOP, SMBOT, DRLDWG, DRILL
• Surface Mount - TOP, SMTOP, SPTOP

As far as padstacks are concerned, surface mount parts are a lot easier to work with.

Library Manager can be a bit flaky sometimes, so it is best to save your changes to footprints often. Go ahead and click Save As. You have not yet created a footprint library, so you will need to click the Create New Library button. Browse to your lib directory and name the library Elec424Tutorial.

Let’s now clean up a few things before adding the rest of the pins. You will see a lot of text on your screen. Most of it is on the layer ASSYTOP, which we will not use. This text is safe to delete. Open the text spreadsheet and you will see five text items. Select all the text on the ASSYTOP layer and delete them. This will clean up your footprint a bit. You can leave the reference designator text on the SSTOP layer. We will need it.

We can add pins to the footprint in a number of ways, but the easiest way to do this is to use the footprints spreadsheet. Open the spreadsheet and you will see just pin 1 with an x,y location of 0,0.

### Warning:

ALWAYS PLACE PIN 1 AT 0,0.

For this part we have to take note of a few things. Our schematic symbol has pins 1 to 4, while the datasheet for the part labels the pins A, A', B and B'. We will make pin 1 = A', pin 2 = A, pin 3 = B and pin 4 = B'. To create a new pin, just highlight pin 1 in the spreadsheet and type CTRL-C. This will create open the following Add Pad dialog.

This dialog allows you to give the pad a name (OrCAD autoincrements, so 2 is already given as the name), adjust the x and y coordinates of the pin, and choose which padstack you want to use for the pin. In most cases, you will leave the other settings as they are by default. Set the x and y coordinates as they are shown above and click OK. Add the remaining two pads as shown on the mechanical drawing for the pushbutton. When you close the footprint spreadsheet, your footprint should look like this.

You are not quite done with the footprint even though all the pins are placed. There are just a few things left to do. First, we need to define a place outline. A place outline is a mechanical boundary that Layout uses to keep parts from hitting each other once assembled. In this case, the part outline is easy to draw. The physical switch does not extend beyond the square defined by the pads, so we will just draw a box around them. To do this we use the Obstacle Tool.

Click the tool icon to switch to the obstacle tool and then right-click in the workspace. Select New from the context menu. Right-click again and select Properties. The following dialog box will appear.

Give the obstacle a meaningful name. Select Place Outline as the Obstacle Type. The width in this case is arbitrary. The layer is very important. This part is a thru-hole part, so in this case we want to make sure that surface mount parts on the bottom side of the board will not interfere with this part. By choosing Global Layer, the place outline will extend through every layer of the board. If this were a surface mount part, we could put the place outline on the top layer only. Click OK when you are done making changes. Now you need to draw the outline. Left-click to place each corner. When you have drawn at least 3 corners, you can press ‘F’ to have OrCAD finish the outline for you. It should look like this.

There is just one last thing you need to do to make your footprint complete. It is often nice to have an outline of the part on the silkscreen layer. This is not necessary, but it is a nice touch and makes things a bit easier during assembly of your board. We can easily make this outline by copying the place outline in the obstacles spreadsheet. Open the obstacle spreadsheet and copy the place outline by highlighting it and pressing CTRL-C just like you did for copying a pin. Double-click the new obstacle to bring up the Edit Obstacle dialog. Give the obstacle a meaningful new name, change the type to Detail, and change the layer to SSTOP.

Congratulations! You have created your first footprint.

I have provided a library of the remaining footprints for use in this design. Use the Add… button to add the library to the list of available libraries. Use the Save As button to copy each footprint into your own library. You can find this library on Owlnet at:

/home/jpfrantz/elec424/tutorial/lib/tutorial.llb

Copy all of the parts from this library into your library.

## Assigning Footprints to Parts

You will now switch back briefly to working in Capture. Open your tutorial schematics if they are not already open. You have defined a set of footprints to be used in your design, but now you must assign those footprints to each of the parts in your design. Each part in your schematics has a property called PCB Footprint and this must match one of the footprints in your footprint library. There are several ways to assign footprints to schematic symbols. One way is to open the Property Editor by double-clicking the part in schematics. This will show you all the properties for that part. Double click the pushbutton switch on the first page of your schematics. This is the part whose footprint you just drew.

There are quite a few properties, and it may seem a bit confusing. Using the drop-down list, you can filter by specific properties. Choosing Orcad-Layout will help make things make a little more sense. You should be able to see the PCB Footprint property now and assign it a value of PB, the name of the footprint you just drew.

Now imagine that you have hundreds of parts in your design. It could take quite a while to assign each footprint to every part. It would be much better if we could do it en masse. Fortunately, there are several methods we can use to do this. Close the property editor and press CTRL-A while on a page of schematics. This will highlight every part on the page. Press CTRL-E to bring up the Property Editor. Now you can see the properties for every part you have highlighted (make sure you are on the Parts tab of the spreadsheet because others are also visible). Now you can assign footprints to an entire page at once.

This is certainly an improvement. Now you can manipulate all the parts on one page. But what if you had 10 or more pages of schematics? This could still be cumbersome. In the next section, I will describe a much more powerful way of editing the properties in your design.

## Importing and Exporting Properties To and From Schematics

As you may have noticed by now, OrCAD stores quite of number of properties in the design file. However, it can sometimes be cumbersome to manipulate these in OrCAD itself. Luckily, it is possible to export the properties of your entire design so that they can be edited in another program like Microsoft Excel. We will use this feature to assign footprints and other part information. After reading this section you may think that this is a lot of trouble to go through for this small amount of work. For this design, that may be the case. However, in much larger designs this is truly a timesaver.

To export properties highlight the top-level design file in the file view of the project explorer (the one with the dsn extension). Then select Tools -->Export Properties… You will see the following dialog.

You can leave all the default selections. Just click OK to create the export file. It will be placed in the same directory as your schematic project and should have an exp extension. We can now edit this file directly and re-import it into Capture. If you look at the file in a text editor like Notepad, you will see that it is just a tab-delimited file with the values enclosed in quotation marks. Let’s open this file with Microsoft Excel so we can manipulate it better.

Start Excel and select File-->Open… Browse to where your file is located. You will probably have to change the file type to All Types (*.*) to see the file. Selecting the file will start the Text Import Wizard.

Click the Next button on the first screen. On the second screen, it is important to change the text qualifier to {none}. This will preserve the quotes around the values. If you do not do this, then you will be unable to re-import the file back into OrCAD. When you have made this change you can go ahead and click Finish. You will now have the data in Excel. Let’s do a few things to make moving around a little easier. First, I like to freeze the top two rows so that they are always visible. This way I can always see what the name of each column is. To do this, click row 3 to highlight the entire row. Then select Window-->Freeze Panes.

Next, I like to sort the spreadsheet so that it makes a little more sense. Highlight all of the rows and columns of your spreadsheet except the first row. Then select Data-->Sort… to bring up the Sort dialog.

I like to sort by Value and then by Part Reference. Once this is done, your parts should all be grouped by common value. For example, all of your 0.1uF capacitors should be next to each other. This will make it much easier to assign footprints and other properties to similar parts.

### Note:

It is crucial that parts with the same value all have the same text in their value fields. For example, you may know that .1uf and 0.1uF are the same thing, but OrCAD treats that as two separate values and will think that the two are completely different parts. This will complicate parts ordering and make your BOM (parts list) unreadable. If you find discrepancies like this, you can fix it in Excel or in OrCAD.

Fill in the remaining footprints based on the chart below. The reference designators in your schematics may vary slightly from those in the table, but this will make no difference to the design. Two things are important when you are assigning the footprints. First, make sure that you enclose the value in quotation marks or the import back into OrCAD won’t work. Second, make sure that the footprint name matches exactly the name that you gave your footprint in your library. If the name does not match, then you will get errors when you export your design to Layout.

Save the file in Excel. You will get several warnings about the incompatibility of the format. You can just ignore these. There is one small last step that we need to do before we can import back into OrCAD. Excel will replace one set of double quotes with three, so we need to open the file in a text editor. Use Notepad or another text editor to open the file and do a search and replace to change """ with ". Save the file when you are done.

Now you can import the properties file back into OrCAD. In Capture, highlight the design file in the file view of the project explorer. Select Tools-->Import Properties… Browse to your properties file and click OK. You should not get any errors during the import. If you do, then there is likely a wrong footprint name or some missing quotation marks in the file. You will need to correct this before proceeding.

## Embedding the BOM in Schematics

You may have noticed in Excel that some parts had some extra information. OrCAD is a great place to store information about where parts are bought, who makes them, how much they cost, etc. If all the information is there, then OrCAD can use the information to automatically generate the BOM (Bill of Materials). The BOM will help you be organized when ordering parts, and it is essential for the person assembling your board. There are several extra fields that you probably saw with this kind of information.

• Description – A description of the part. Usually I cut and paste this from the description of the part from the supplier’s web page (e.g. Digi-Key).
• ManPartNum – The manufacturer’s part number.
• Manufacturer – The manufacturer of the part.
• Notes – Any miscellaneous information about the part that you want to record. Maybe it has a long lead-time and you want to note that.
• PerUnitCost – How much each part costs.
• SupPartNum – The supplier’s part number (e.g. Digi-Key, Arrow, Newark, etc.).
• Supplier – The supplier of the part.

Export the properties of your design again and fill in the information for each part. To help you, I have put an Excel version of the BOM in the following location on Owlnet.

/home/jpfrantz/elec424/tutorial/assy/BOM.xls

When you have finished editing the properties, save the file and import them into Capture just like you did for the footprints.

Now you are ready to have OrCAD generate a BOM for you. To do this, highlight the design file in the file view of the project explorer. Select Tools--> Bill of Materials… to bring up the Bill of Materials dialog.

You will want to change a few of the default settings. Cut and paste the following text into the Header and Combined Property String fields of the dialog box.

Item\tQuantity\tReference\tPart\tDescription\tSupplier\tSupPartNum\tManufacturer\tManPartNum\tUnitCost\tNotes

{Item}\t{Quantity}\t{Reference}\t{Value}\t{Description}\t{Supplier}\t{SupPartNum}\t{Manufacturer}\t{ManPartNum}\t{PerUnitCost}\t{Notes}

Then click OK to generate the file. This should put a file called Elec424Tutorial.bom in your sch directory. This will be a tab-delimited file just like when you exported the design properties. You can use Excel or another program to make it look a little more readable. Do this and put the finished version into the assy directory. This is one of the files that you will give to the assembler when you are ready to have your boards assembled.

## Creating a Board Template File

You are almost ready to export your schematic design to Layout. Before doing this, we must create a board template file. This file defines some default properties for the board that will be used throughout layout. To create a template, start Layout and select File-->New. When you see the dialog, press Cancel . You should now see a blank workspace. You can use the same shortcut keys that you used in Capture to zoom and center the design (‘I’, ‘ O’, and ‘C’).

The first thing we need to do is draw a board outline to define the perimeter of the board. For this PCB, we will make the board 3 inches by 2 inches. The board outline is an obstacle like the ones you placed in the footprint editor. To create the board outline, select the Obstacle Tool, right-click and choose New… and then right-click again and select Properties… Name the obstacle BOARD_OUTLINE, its type should be Board Outline , its Width should be 50 (mils) and it should be placed on the Global Layer. Place the first corner of the board at 0,0 and then draw from there. While drawing, you can use the information in the status bar to tell you where in the workspace you are. When finished, your board outline should look like this.

Next, you will edit the layer stackup. Layout has spreadsheets just like the Library Manager does. Click the View Spreadsheet icon and select Layers. This spreadsheet defines all the layers that your board uses and their respective functions in the design. You will see a spreadsheet that looks something like this.

You are making a 4-layer board, so we will turn off some of the pre-defined layers because we will not use them. Double-click the INNER1 layer to bring up the Edit Layer dialog.

Select the Radio button for Unused Routing. Click OK to continue. Do the same thing for the following layers: INNER2, SPTOP, SPBOT, SSBOT, FABDWG, NOTES. Remember that you can use the CTRL key to select multiple layers at one time. Also remember that all designs are different and may need extra layers. For example, a design with surface mount components will need the SPTOP and SPBOT layers. If we were to place components on the bottom side of the board, then we would likely need a silkscreen on the bottom and, therefore, the SSBOT layer. Close the spreadsheet when you have made the changes.

The next thing we need to do is change the output settings for the Gerber files . Select Options-->Post Process Settings… to bring up the Post Process Spreadsheet. Select the *.ASB and *.FAB layers. Right-click and select Properties to bring up the Post Process Settings dialog. Uncheck the box that is labeled Enable for Post Processing.

### Note:

Gerber files are in a special format that the board house can read. These are the files used to generate film and fabricate your board. There is one file per layer of your design.

Now select all the layers. You can do this by clicking in the cell in the top-left corner of the spreadsheet (Plot Output File Name). Right-click and select Properties to bring up the Post Process Settings dialog. Select the radio button for Extended Gerber. This is the format we want to use for fabrication. Close the spreadsheet when you are done.

Next, you will define a default via size. Click the View Spreadsheet icon and select Padstacks. This will open the padstacks spreadsheet and shows every padstack that is used in your design. Since there are no parts in the design right now, there are not that many padstacks, but this will change after we import from Capture.

### Note:

Vias are used to connect traces between layers and to make connections to solid ground or power planes.

We will only use one via type in our design, but OrCAD will allow you to define up to 16 different vias. You might want more than one if you wanted slightly larger vias for carrying high-currents. You can even assign specific vias to specific nets, but that is beyond the scope of this tutorial.

When a netlist from Capture is imported, we can set the default widths and other properties for all nets that get imported. After importing we can customize these parameters on a per-net basis. Let’s set the values for the default net. Click the View Spreadsheet icon and choose Nets. You will see a spreadsheet with just one net, DEFAULT. After you import your netlist from Capture, you will see all the nets in your design in this spreadsheet. Double-click the net to bring up the Edit Net dialog.

Our design will not be too aggressive, so we will use 10 mil traces. Set the Min Width and Conn Width to 10, and set the Max Width to 50. Click OK when you have made the changes.

The final thing we need to do to our template is set a few global spacing constraints. These spacing values will be used when you have Layout automatically check for design errors. Select Options-->Global Spacing… to bring up the Route Spacing spreadsheet. Click on Layer Name to highlight every cell, and then right-click and select Properties to bring up the Edit Spacing dialog. Put a value of 10 in every field and click OK. Close the Route Spacing spreadsheet.

Save your template. You are done with it and are ready to export your design from Capture to Layout.

## Creating the Netlist

To export your design to Layout, you must first create a netlist. A netlist is a file that has all the parts, footprints and nets for your design in a format that can be read by the layout program. To start netlist generation, highlight your dsn file and select Tools-->Create Netlist… to bring up the Create Netlist dialog box.

Click on the Layout tab in the dialog box. You don’t need to modify any settings, just click OK to generate the netlist. When finished you should have a file called Elec424Tutorial.mnl in your sch directory. Your design is finally ready for import into layout.

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

#### Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

#### Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks