3 OrCAD PCB Editor
The interface of PCB Editor may feel unfamiliar because the application was originally devel- oped for unix and has been ported to Windows with minimal changes. Some distinctive features are obvious almost immediately.
• The design window, which shows your board, has no scroll bars.
• One design is always open; you cannot open more than one, nor close the current design without opening a new one or exiting the application.
• There is no ‘null’ tool, such as the pointer shown by most drawing applications when no other tool is selected.
An important aspect of the interface is that tools can be used in two ways.
• First choose a command, either from the menu bar or by clicking a button, then the element of the design on which the tool should operate.
• Select the object first, then the command from the contextual menu by right-clicking.
I shall use both methods in the tutorials, picking whichever seems most natural at the time. However, confusion can arise when you change from one method to the other. It is therefore a good idea when switching to disable any active tool (right-click and choose Done if it is offered) and clear any selection (left-click outside the board or right-click and choose Selection Set > Clear All Selections).
3.1 The screen
PCB Editor needs a big screen – the elderly laptop that I have used to illustrate these instructions is not large enough to show all the toolbars! The main elements of the application are shown in figure 5.
• Design window, occupying most of the screen, where you lay out the PCB. It always shows the board viewed from the top; the bottom layer is seen through the board as if it were transparent.
Figure 5. Screenshot of OrCAD PCB Editor with an empty board; the black background has been changed to white for a clearer printout. The rectangles show the board outline (outer), route keepin and package keepin (inner). The Find and Options control panels have been pinned open on the right.
• Menu bar along the top as usual.
• Toolbars in two rows under the menu bar and a further column down the left-hand side.
Their arrangement depends on the size of the screen. Hover the pointer over a button to reveal its function.
• Control panels with tabs on the right-hand side. Each panel pops out when you move the pointer over its tab. Click the pin to lock a panel open.
– Find selects the type of object that is highlighted when you move the mouse around the drawing.
– Options changes according to the current mode and command; it selects the active class and subclass when PCB Editor is idle, then offers appropriate options when a command is chosen.
– Visibility hides layers of etch while routing the board; predefined settings select the films of artwork that will be used to manufacture the PCB.
I strongly recommend that you keep the Find and Options panels pinned open as in figure
5; Visibility is less useful in boards with only one or two layers of etch.
• Command console window at the bottom left of the screen. This prints a running log of your actions and is useful to show when Allegro is waiting for input from you. It also displays the output from commands such as Design Rules Check.
• Worldview window at bottom right shows how the relation between the board outline and the view in the design window. It is useful for moving the design window around the board as we shall soon see.
• Status bar at the bottom of the screen. It shows the coordinates of the pointer (crosshairs).
The P (Pick) button is useful for typing coordinates instead of clicking with the mouse if your hand is unsteady.
At the far right is a coloured block called DRC, which stands for Design Rules Check. It may be yellow because checking is not up to date. Usually it should be green to show that automatic checking is turned on and that no errors are detected.
A lot of jargon is associated with Allegro. It often refers to your design as the database, because that’s what it is from the point of view of the computer. The various elements of the design are classified into classes and subclasses, which I’ll write as class/subclass in the instructions. Here are some common examples.
• The Etch class includes the regions of copper that act as pads for the components and the tracks that carry the signals between them. The simple designs described here have two subclasses of etch, Top and Bottom. They are coloured green and yellow respectively by default.
• The Board Geometry class includes the Outline, which we have already seen. Sub- classes Silkscreen_Bottom and Silkscreen_Top are used for text to annotate the board.
• We have also seen the Package Keepin class, used to prevent components being placed too close to the edge of the board. It has no subclasses.
The class and subclass can be chosen in the Options control panel but PCB Editor usually selects them automatically when you make a tool active.
Tip for Layout users: The colours used by PCB Editor are different from those used by Layout but can be changed if you wish with the Color Dialog.
3.2 Moving around the design
Two methods can be used to pan or roam around the design – move the display to the region of interest.
• Use the arrow keys on the keyboard.
• Hold down the middle button of the mouse and drag. A confusing feature of this is that it drags the window over the design. This means that the design moves in the opposite direction to your drag. It is the reverse of the hand ‘grabber’ in applications such as Acrobat, which drag the design under the window.
But I have only a two-button mouse! Many two-button mice have a scroll wheel, which acts as the middle button when pressed.
Figure 6. The Placement dialogue box, showing the components for the one-transistor amplifier. Transistor Q1 is ready to be placed on the board.
You also need to zoom into the design to concentrate on small details or zoom out to review the complete layout. Again there are two methods.
• Use the commands under the View menu or the corresponding buttons and shortcuts.
Zoom Fit fills the window with your complete design, which is often helpful.
• The scroll wheel of the mouse zooms in and out, centred on the current position of the pointer.
The WorldView window can also be used to zoom and pan. If you drag a rectangle here, that becomes the area shown in the design window.
I could write a lot more about the interface but it is more fun to place the components and route the PCB.
3.3 Place and arrange the components
Choose Place > Manually. . . from the menu bar to start placing the components. This brings up the Placement dialogue box shown in figure 6. The Placement List tab should be active and the list should show Components by refdes with the components in your design listed below.
Allegro can place components automatically (not in the OrCAD version) but it is straight- forward to place them manually for this simple design. See figure 7 for guidance.
1. Start with the transistor. Click the box next to Q1 in the Placement dialogue. Its outline appears in the Quickview box (assuming that Graphics has been chosen).
Figure 7. Screenshot of the board for the simple, one-transistor amplifier after all components have been placed and arranged. Cyan lines of the ratsnest show the connections between components.
2. Move the cursor out of the Placement box on to your design. The outline of the transistor follows the cursor. Left-click to place it centrally on your board. The outline fills in and a small P for ‘placed’ appears in the Placement box next to the refdes.
3. Place the connectors for input and output next. Select the boxes for both J1 and J2.
Move the mouse onto the design and a two-pin header for J1 appears on the cursor. Click somewhere near the left-hand side to place it. Don’t worry about its orientation for now.
4. The outline of J2 now appears automatically on the cursor. Place this on the right-hand side.
5. Next place the four resistors. Put them in the same positions relative to the transistor that they have on your schematic drawing. This makes the circuit easier to wire. Refer to your schematic drawing to identify each resistor.
Keep all components inside the inner purple rectangle, which shows the Package Keepin. It turns green if you try to place any part of a component outside it.
6. Place the two capacitors in the same way. This completes the placement so dismiss the dialogue box.
Note. Components can be selected in Capture for placement in PCB Editor while the Placement dialogue box is open.
If components are missing, there was probably an error during netlisting. Go back and check the session log in Capture.
Why am I seeing the text double? – and why all the ***?
The components are joined by a set of cyan lines called the ratsnest to show their logical connections. These lines will be turned into copper tracks when you route the board. The lines
Figure 8. The Find control panel set up so that only symbols can be selected.
of the ratsnest simply take the shortest path between components and therefore cross other lines. Real tracks cannot do this. It is therefore vital to adjust the orientation and position of the placed components to reduce the number of crossings in the ratsnest and make routing easier.
Before doing this, experiment by moving the mouse around the design window without clicking. Elements of the design are highlighted and an explanatory note appears as the mouse passes over; there is no need to click on an object to highlight it as in many drawing programs. If you hover the cursor over the outline of the transistor, for example, the message Component Instance “Q1” is shown. The mouse may highlight the outline of a component, its pins, text or lines of the ratsnest. How can we be sure to move a complete component, not just a part of it? Moving a pin by itself would be a seriously bad idea, for example.
This is where the Find control panel is useful. Open it by moving the mouse over its tab if it is not pinned open already, click the All Off button, then select Symbols as in figure 8. Only complete symbols for components are now highlighted under the mouse. Individual pins are no longer selected, for instance. This makes it much easier to move and rotate components.
• The simplest way of moving a component is to left-click on it and drag, holding the mouse down.
• Alternatively, move the mouse over a component, right-click and choose Move from the contextual menu. Left-click in its final location.
• To rotate a component, right-click, choose Spin and move the mouse around to get the desired orientation.
• Both of these actions can also be chosen from the Edit menu and the toolbar has a Move
• Do not use the Mirror command, which is different from the commands with a similar name in Capture. Here it moves the component from the top to the bottom of the PCB.
The designs in this tutorial are not that ambitious. (It can be useful if you mix surface- mount and pin-through-hole components on a single-sided PCB.)
Move and rotate the components to simplify the ratsnest. This design is easy because no cross- ings are required if you follow the schematic drawing, which makes routing trivial.
Note. If some components have red outlines rather than the usual colour, and their text is in
‘mirror writing’, they have been mirrored and placed on the bottom of the board instead of the top. Select them and mirror them back to the top.
When you have placed and arranged all the components, update the design rules check by choosing Tools > Update DRC from the menu bar. The DRC block near the bottom right of the window turns green and the Command window shows No DRC errors detected if everything is correct. If you have placed a component outside the keepin, for example, the message would be DRC done; 1 errors detected. The error is shown by a tiny red ‘butterfly’ marker on the design. Move the component inside the keepin and the marker disappears.
Tip for Layout users: PCB Editor lets you perform an action even if it leads to a DRC error, which it then marks. This contrasts with Layout, which forbids anything that would create an
error. It’s a different philosophy: PCB Editor assumes that you know what you are doing.
Save your design with a new name for the populated board. Unusually, Allegro asks you if you wish to overwrite an existing file when you Save it. You may wish to save successive versions under different names in case you need to go back and repeat a step. Allegro does not save backups automatically.
3.4 Route the board
The electrical connections depicted by the ratsnest must now be replaced by copper tracks on the PCB. This procedure is called routing the board. The layers of copper are called etch in Allegro because of the usual manufacturing process. Tracks should be drawn on the bottom of the board with the components on the top (where they go by default). The wires from the components pass through the holes in the pads and are soldered to the tracks on the bottom of the board.
Jargon: cline is short for connecting line, a segment of a copper track. A plain line may show the edge of the board or the outline of a component and is not a conductor.
Keep the layout of tracks as straightforward as possible – imagine that you are soldering the board yourself. Do not make life difficult by running tracks unnecessarily close to pads, for instance. You should aim for something like the layout shown in figure 9 but there is no need to follow this precisely.
Draw the tracks as follows. Before starting, check that no objects are selected (left-click outside the board or right-click and choose Selection Set > Clear All Selections) and that no tool is active (right-click and choose Done if it is offered). Pin the Find and Options control panels open, which makes it easier to control the tools.
1. Choose Route > Connect from the menu bar.
Figure 9. Screenshot of the routed board for the simple, one-transistor amplifier. The tracks are yellow, which shows that they are on the bottom of the board. Your screen may not match this image exactly because it depends on which classes are active at the time.
Figure 10. (a) Options and (b) Find control panels for the Add Connect command, and (c) Options for Slide.
2. The Options control panel changes to reflect the current activity and it now shows the layers available for routing. We want all the tracks to go on the bottom of the board so change the Act (active) layer to Bottom, which is painted yellow. You can also change the Alt (alternate) layer to Top, which is painted green, but we need only one layer for this circuit. Line lock should be 45 (degrees), which determines the allowed change in direction of a track. See figure 10(a) on the previous page.
The Find control panel (figure 10(b)) is automatically configured to select the relevant objects for routing: pins, vias, shapes, cline segments and ratsnests. (Shapes are typically areas of etch, which is why they are active.)
3. Left-click on a pin to start routing a segment – the part of a track that runs from one pin to another. A segment of the ratsnest highlights to show that it is available for routing.
4. Move the mouse towards the pin at the other end of the highlighted ratsnest. A thick yellow line is drawn to show the copper track and replaces the line of the ratsnest.
5. Click at intermediate points to fix corners. These automatically turn through 45°, which is good practice. It is a bad idea to draw 90° corners because they are prone to breakage during etching.
6. Click on the destination pin to complete the track.
7. Repeat to route all segments of the ratsnest. Right-click and choose Done when you have finished.
Etch Edit mode provides a shortcut for adding connections.
Run a design rules check to detect any problems with routing. For further details, choose Display > Status. . . from the menu bar. The section on Symbols and nets should show that everything has been placed and routed, while DRC errors should be shown as Up To Date with no errors. Save your board.
Note. Some students put the tracks on the top instead of the bottom, in which case they appear green on the screen. Set the Find control panel for Nets, draw a rectangle around the board to select all the nets, right-click and change their layer to Bottom.
Another error is to draw tracks that don’t match the ratsnest. Some students lay out the components incorrectly but draw the tracks to match figure 9. This causes a profusion of DRC errors.
A few students manage to draw tracks that bear no relation to the ratsnest at all and aren’t even connected to pins. The underlying problem is usually that Pins are not active in the Find
control panel. ?
Oops! – I made a mistake
There are several ways of undoing an error.
• Right-click the mouse and choose Oops. This undoes the most recent partial action, such as drawing the last segment of a track.
• Right-click and choose Cancel, which undoes the last complete action.
• Try Edit > Undo to go further back.
• If you have made a complete mess, go to the menu File > Recent Designs and reload your design without saving changes (there is no Revert to Saved command). This aban- dons all changes since you last saved the file, which I hope was not too long ago. . . .
My tracks don’t look very good: How can I improve them?
PCB Editor offers many ways of adjusting the tracks. First make sure that you are not still using the Connect tool by right-clicking and choosing Done if this appears on the contextual menu. Small adjustments to routed tracks can be made with the Route > Slide tool, which loads the Options control panel as shown in figure 10(c). I suggest that you change Bubble from its default of Shove preferred, because this encourages Allegro to move tracks around in a startling manner; Hug only is more gentle. Click and release the mouse button on a segment to select it, slide it around and click again when you are satisfied with the result. Other helpful tools include Edit >Vertex and Edit > Delete Vertex.
For larger changes, you might wish to remove part of a track or the complete track and redraw it. Proceed as follows.
• Move the mouse over a cline segment, which should highlight. If it does not, open the
Find control panel and choose All On.
• You can delete the etch at three levels using the contextual menu:
– Delete removes the segment – a single straight line of track between corners or pins.
– Connect Line > Delete removes the complete track (cline) between the two nearest pins or junctions.
– Net > Ripup etch unroutes the complete net.
• Use Route > Connect to redraw the track.
This nicely illustrates the way in which PCB Editor allows a hierarchy of selections: just a segment, a complete line, or the whole net.
3.5 How to correct a layout if you spot an error in the circuit
It would be highly irritating if you had to repeat the whole layout after making a change to a circuit. The good news is that it is surprisingly easy to make corrections and that you already know the steps.
1. Save your board in its current state and quit from PCB Editor.
2. Re-open Capture and make the corrections to your circuit. Always run a DRC before proceeding.
3. Repeat the instructions for creating a netlist and sending it to
PCB Editor with these small changes.
• For Input Board File, choose the board that you just saved in PCB Editor – the most recent version of your layout.
• Use a distinct name for the Output Board File to create a new board.
4. The new board opens in PCB Editor with the minimum number of changes to accommodate the revisions to your circuit. You must place any extra components and re-route any tracks that were disturbed.
The jargon is that Capture sends an Engineering Change Order (ECO) to PCB Editor.
More advanced techniques allow you to make changes to the circuit in PCB Editor. For example, you might wish to swap the two equivalent inputs to a logic gate to simplify the layout. Alternatively, you might wish to swap two identical gates or op-amps in a multiple package. Allegro offers the commands Place > Swap > Pins and Place > Swap > Functions to assist you. Such changes must be sent back to Capture to keep the design consistent. This is called back annotation and is explained in the manuals.
3.6 Add text
Next add some silkscreen text, which is printed on a commercial board using ink or paint. The outlines of components are often shown too. Each component automatically has its identifier (refdes) and value but it is helpful to add other text to make the board easy to fabricate and use. In particular, all connectors (headers) must have the function of each pin identified as on the schematic. Your name or that of the product would be useful too.
1. Start by putting your name on the board, which is always a good idea if you want to claim it. Choose Add > Text from the menu.
2. Open the Options control panel. You are probably getting the hang of the interface by now: choose a command, select options, then do it.
• Text is normally placed in the silkscreen on top of the board so set the active class and subclass to Board Geometry/Silkscreen_Top.
• However, for a home-made PCB without a silkscreen, you should put text such as your name on the bottom layer of copper because this is part of every board. The active class should therefore be Etch/Bottom. Text on the bottom of the board should be mirrored so that it reads correctly from below, so select the Mirror box.
• Text block is a confusing way of specifying the size of text. A larger number for the block produces larger text. Something like 4 is about right for your name.
3. Click in the design where you would like the text to begin and type. Hit Return (Enter) to get a new line. Right-click and choose Done when you have finished or click to begin a new block of text elsewhere.
4. Add text on top of the board to identify the connectors. Put it in Silkscreen_Top if a silkscreen is available, Etch/Top if not. Reduce the size to text block 2. Do not mirror this text. Keep the text away from the pads if you use etch: It is printed in copper and could cause a short circuit.
Write labels for Input and Ground near the input connector and Power, Output and Ground by the output connector. (It is more reliable but tricky to transfer this information directly from Capture.)
Congratulations! – you have finished your first PCB. Don’t forget to save it.
3.7 Print the design
The simplest way of printing the design is to ‘plot’ it to a colour printer (the usage goes back to the days of pen plotters). Select File > Plot Setup. . . from the menu and choose the following settings.
• Usually the Plot scaling should be unity so that the size of the printout matches that of the PCB. This board is so simple that it is better to enlarge the drawing so enter 2 instead.
• Change the Default line weight to 10, otherwise the outlines are thin and indistinct.
• Select Auto center under Plot orientation.
• Set the Plot method to Color and close the dialogue box.
Open the Options control panel and set the active class to Etch/Bottom. This emphasizes the most important features. Now print your layout with File > Plot. . . .
• Click on the Setup. . . button. Check that the paper size is correct and is in landscape orientation. Confirm also that the correct (colour) printer is selected.
• Choose OK to print your layout.
The result should resemble figure 9 except that colours on the plot are opaque unlike those on the screen, which are partly transparent so that features underneath can be seen.
This plot is not useful for manufacturing the PCB.