Matoshri College of Engineering and Research Centre, Nashik
Matoshri College of Engineering and Research Centre, Nashik
CENTRE, NASHIK
SUBJECT: ELECTRONIC SYSTEM DESIGN(ESD)
Exeriment no. Title: PCB DESIGN
Date of submission: class: TE (E & TC)
Batch:
Date of Attendance(2) Practical(3) Oral(5) Total Sign
Performance
PCB Design
Basics
You will be making a schematic (myname.sch) file which contains your circuit diagram & a
PCB board layout (myname.brd) file. Each file has its own editor window. At any time you
will change just one of these but the two are linked, so that the connections & components on
the schematic always exist on the board. For example if you try to delete components on the
board you will be asked to make the change on the schematic first.
EAGLE has an excellent undo command (Edit->Undo or Ctrl-Z) which allows you to undo
any command. So don't worry about doing the wrong thing - easy when mouse clicks extend
connections - just undo as necessary when things go wrong. If the screen looks wrong at any
stage, use View->Redraw (F2) to refresh the display.
EAGLE is very forgiving - any part of the circuit can be modified at any time, providing the
auto-router is run again to sort out track changes.
This tutorial will take you through the design and layout of a simple circuit using EAGLE.
Before Starting
You will want (or if using EAGLE on a networked workstation need) to change the default
project directory. Start the EAGLE control panel. Options->Directories gives a list of
directories. Change the projects directory if necessary to something convenient that you can
write, e.g. on the EEE system H:/EAGLEProjects. All new projects will be created inside
this directory, and the EAGLE project navigator in the control panel uses this as a root. For
more advanced use you may wish to change the other directories also. The directory changes
made are saved under "My Documents" as eaglerc.usr, so normally need to be made only
once.
File->New->Project.
Rename the project if you wish as follows: the control panel window indicates whether a
project is open with a green circle next to the project name. Click this if necessary to close the
project. Then
Right-click->Rename
on the project's name. After having renamed the project you can reopen it.
Right-click on the Project name ->New->Schematic. The schematic window will open. Inside
the schematic window:
File->Save as (choose a suitable name for your schematic sheet. NB - the freeware version of
EAGLE allows only one sheet per design). For the first half of this tutorial you will be
working with the schematic window, and can minimise the control panel window.
Open component libraries
By default all the standard EAGLE libraries are open which makes it inconvenient to select
your components from the EEE library. Download the design project library from the web and
save it somewhere, for example (on the departmental system) to:
h:\eagle\lbr\ee2parts.lbr
2In the schematic command window (long thin box at top) type the following commands to
change the open libraries:
USE -*
<this closes all the standard libraries>
USE h:\eagle\lbr\ee2parts.lbr <this opens your project library>
or
USE < this displays an open file dialog box to find and open your library>
If you want to use components from the standard libraries they can all be reopened again with
"USE *". However the ee2parts components have hole sizes suitable for easy hand soldering
and should be used preferentially - they contain all the components needed for the design
project.
Add components to your schematic
Each open library in the ADD window contains a list of components (click + if not visible).
Some components have multiple packages (click on + to select the correct package). The
component schematic symbol and package layout appear in the two windows to the right of
the library window. Each component has a description you can check to see what it is. When
you have identified the correct component and package (component & package will be visible
in the two windows) click OK to start the ADD procedure (NB DONT click Drop in this box,
if you do this you will lose the current component and need to re-open the library with USE to
retrieve it). The ADD window will vanish and a schematic outline will track the cursor when
it is over the main schematic sheet window. Left-click to place each component. Right-click
before placing to rotate the component. Any number of the selected component can be added.
To stop the ADD procedure select Edit->Stop Command.
Any number of components can be added to your schematic in any order. As described above
you can position and even rotate components as they are added to the schematic. However
components can also be moved after adding, with the Edit->Move command, or rotated with
the Edit->Rotate command. Note that these menu commands can also be selected using the
buttons on the left side of the schematic sheet window. (See also Edit->Smash in Step 3a).
NB - you are allowed to flip/mirror schematic symbols, Edit->Mirror, e.g. op-amps to make
+/- inputs the other way round.
For this tutorial you will use one op-amp from one TL072 dual op-amp ICs, three capacitors
(C) and 4 resistors (R), all from the ee2parts library. Most components result in a single
schematic symbol, and correspond to a physical component on the board itself. However the
op-amp is a special case. A single op-amp symbol is only half of a dual op-amp component. If
you add multiple op-amp symbols (repeated left-clicks) you will notice that they are named
IC1a, IC1b, IC2a, IC2b etc indicating which op-amp symbols are part of a single physical
component. Make sure that you use add both parts (a and b) of each dual op-amp package to
the schematic (two left-clicks in a single add operation). If one part remains unused you can
then wire this up so that it has well-defined inputs and does not oscillate.
After adding components your schematic should look something like Figure 1. Note the
"spare" op-amp positioned away from the other components.
3Figure 1 - schematic, with components
All the operations selected from menus can also be accessed via buttons (hover mouse over
button icons to see what each do). Most useful are the zoom buttons (top middle), and the
Move
button, Delete button
, Stop button
. When a command is active its button,
and the stop button, will be highlighted. In this case right-clicking on a schematic object will
invoke the command. A short description of the command is displayed on the bottom window
edge.
Add a frame to your schematic
To make the schematic look neater add a frame (Draw->Frame) clicking on the corners of the
frame. If you get this wrong just undo and start again. You may need to change the position of
the frame when you draw a big schematic. It can be deleted and redrawn at any time.
Operating on groups of components
You can operate on many components at once - for example to move them - with the Edit-
>Group command. Edit->Group followed by either left-click and drag to select rectangle, or
left-click any number of times to draw a polygonal boundary followed by right-click. Now the
grouped components will be highlighted in red. If the group is wrong just repeat the operation
till you have the correct group. Then Edit->Move and right-click will select the group for
moving, left-click will terminate the move.
Practice this by moving your components to a position equi-distant from all frame edges.
Once you have defined a group it will persist until a new drawing is loaded or another group is
defined. Other commands work on groups of components in the same way - using the group
option under the right-click menu instead of left-click.
Supply connectors are a special type of component which does not exist physically on the
PCB. You can use them to make the schematic neater by naming supplies, and using
connectors instead of nets to join together supply connections which are not adjacent. All
supply connectors with the same name connect together. Some useful connectors can be found
in the ee2parts library. Supply connectors have one more very clever use. Some ICs have
supply pins which do not show on the schematic symbol. These will be automatically
connected to a net with the correct supply connector (which has the same name as the pin). If
you do not have a supply connector with the correct name it will result in an ERC error (see
next step). Obviously it is an error not to connect the supply pins for op-amps that you use.
Sometimes you will want to connect together distant subnets which are NOT a supply. You
can't use a supply connector for this since op-amp outputs joined to supply connectors is an
error. Choose a suitable alphanumeric name (e.g. sigout). Use Edit->Name and left-click on
each of the nets to be connected – giving them the same name will connect them together.
IMPORTANT: to make this connection visible on the schematic use Draw->Label to add a
label (which will display the net name) to each subnet so joined. Try labelling the op-amp
inverting output “OUT” to see how this works and then undo the operations (Edit->Undo or
Ctrl-Z will work through any number of commands).
To get signals on and off the PCB you need either connector components or connecting wires.
The best way to join wires to a prototype PCB is via terminal pads which have circuit pins
soldered - wires can then be soldered to the pins. Add the PAD-TERMINAL component from
the EEE library to allow wires for the V+, V- and GND supplies. Throughout your circuit you
will have internal nets which you need to measure when testing. Add testpoints (PAD-
TESTPOINT component) to these nets. Testpoints will appear on the schematic as small pads
similar to terminal pads - you do not however need to solder circuit pins onto testpoints.
Figure 2. A schematic with nets and supply connectors added.
The error messages indicate what is wrong. The error check is quite intelligent and knows
about power supplies, inputs, outputs, etc. Click on a message to highlight the corresponding
6error on the schematic. You can see in Figure 3 that the first error, (highlighted) is where a
horizontal net (N$4) crosses the end of the pins of C1 and GND components.
ERC messages indicate either errors - must be mended - or warnings - will not stop board
layout but nevertheless indicate a problem. You should normally eliminate all warnings.
One common source of ERC error is when wires which you want to connect look as though
they connect are in fact not joined. Where a wire joins the middle of another there must be a
green circle (Draw->Junction) to indicate connection. Sometimes two nets are adjacent and
appear joined but in fact are not. The View->Show tool ( ) is invaluable here. If you click
on any part of a net it will highlight all connected wires and component endpoints. You can
then easily check what is missing. When you encounter such an error simply delete (Edit-
>Delete) line segments around the problem and rewire again (Draw->Net).
Another common error is the opposite, a net runs across the endpoint of a component without
joining, as in Figure 4a, (the first two errors from Figure 3 are of this form).
(a) (b)
Figure 4
You must reposition the component (R4) or net so that the pin and net are separate as in 4b.
Before you make the board your schematic must pass ERC. POWER warnings which
relate to IC supply pins connecting to the wrong net are sometimes unavoidable. For
example, in our example circuit the op-amp V+ is expected to connect to V+ but we have
done this via an RC decoupling network - common practice to isolate AC supply noise.
You must examine each POWER error carefully to check that the supply is in fact
connected as you wish. Since supply errors are common and the most difficult to correct
on PCBs this check is important.
Figure 3 illustrates some POWER errors, and also some “no value” errors. In this case
we are laying out the PCB before precise R and C values have been calculated, so these
errors will remain uncorrected. However the no value PADs should be corrected using
Edit->Value.
Finally all ERC errors have been corrected except some understood POWER and “no
value” warning errors. Where an error is understood it can be approved to prevent
future display - DO THIS ONLY IF ABSOLUTELY CERTAIN THE ERROR IS OK.
Now you have got a schematic which passes its ERC and can be used to generate a PCB. You
will still wish to change it to make it easier to read.
Adding a Document Field
Add a document field component (docfield from the ee2parts library) to your schematic in
the right bottom corner to provide automatic info about date etc. To set the
>DRAWING_AUTHOR field use command Edit->Global attributes->New and add
name=DRAWING_AUTHOR, value= <your text>. View->Redraw (F2) will update the
displayed text as in Figure 5.
Figure 5
(1) This is useful when you are repositioning component names and values. To get the finer
grid, press Alt during a move operation, and the mouse will move items with 10X greater
resolution.
(2) This can be also used to reposition correctly connected components with a fine resolution,
but be warned that it makes connection of the repositioned components much more difficult,
since any new nets must be aligned with the component end-points using the 10X finer grid
also - they will fail to connect using normal grid. Rule of thumb - don’t do this!
(3) You may find a higher zoom factor (View->Zoom in) useful when doing fine positioning.
Printing a Parts List
You can print a parts list for a schematic (including resistor and capacitor values) with File-
>Export->Partslist.
File->Switch to Board
Since the schematic does not yet have a board attached you will be asked whether you want to
create one from the schematic: say yes.
The board (Figure 6) consists of all your components, with connections shown as a rats-nest,
and a rectangular wire outline (default 100mmX80mm) which represents the board area.
Change the user interface so that the board background is displayed in white or light yellow:
Option->User interface->layout->tick white or coloured (see Figure 10)
Figure 6: initial rats-nest of schematic components outside the PCB outline, with white
background. Note the cross indicating (0,0).
Figure 8
NOTE – dense circuits may get less than 100% routing. In Step 8 when you add poured
copper connected to V- this will simplify routing and may cure problems – so do not
despair at this stage. Layout optimisation should be done AFTER step 8, when the final
tracking is known.
If you now change the position of any component or add or delete components the routing will
need to be adjusted. The easiest way to do this is to rip up all connections to get back to "rats-
nest" wires and auto-route again, using a command in the command box (immediately above
layout):
RIPUP;
Reply yes when asked whether you want to rip-up all tracks. All tracks will vanish to be
replaced by another "rats-nest".
Step 7: Design Rule Check
Tools->DRC
This command will bring up a window showing the currently loaded set of design rules – for
the EE2 design project this should be ee_rules_dp latest version, which you loaded in step 4.
To change to a new set of rules (in a .dru file), click Load, select the new file, click Open, to
view the new rules, then click Apply to use them with the board.
Click Check and this will run the design rules and say whether there are any errors. If there
are errors Tools->Errors will display them. You must correct all DRU errors.
Step 8: Pour Copper
PCBs should normally have all area not used for tracks covered with copper "ground plane" to
reduce high-frequency noise. This does not interfere with the normal tracks, in fact it can be
used to reduce the tracks required. Normally, all "poured copper" is connected to a single
11circuit supply connector. EAGLE is clever enough to route connections on this supply using
the poured copper, thus reducing the number of tracks.
An added bonus is that the poured copper connections are much lower impedance than is
possible using tracks.
We will first add poured copper to the tutorial board in the simplest possible way. We use one
side only and connect the poured copper to the power supply connector GND.
EAGLE uses polygons drawn on top or bottom of the board to mark the boundary of an area
within which copper will be automatically poured.
To draw a polygon for the V- supply type “Polygon GND” in board wndow command box:
Select from the top toolbar drop-down box the layer (top or bottom) on which you want to
place the polygon from the top toolbar. (All other options can be unchanged).
Then left-click for each corner of the polygon, and right-click for the last corner. Figure 9a
shows a polygon round the whole board.
(a) (b)
Figure 9
After drawing the polygon you should rip-up all tracks, and recalculate the rat's-nest wires:
RIPUP; (rips up all tracks)
Tools->Rats-nest (recalculates the rat's-nest wires, which may have changed)
12and auto-route again. The auto-router will now try to connect all filled copper areas to the
appropriate supply. Figure 9b shows that the number of tracks is now significantly smaller,
with one side copper making the GND connections. (In more complex designs there will also
be tracks on this side - here it was not necessary).
Do the DRC check again after pouring copper.
If you need to change the layout or even the schematic after this final step you can still
RIPUP the tracks. To remove the poured copper use Edit->Ratsnest, and auto-route again:
1. RIPUP;
2. Tools->Ratsnest
3. Tools->Auto...
(This can be done in one go using the command line: ripup; ratsnest; auto; )
Tips: Your polygon can be drawn as near to the edge of the board as you like. Leave some
area around the edge of your board empty of components: at least 2mm. This will be filled
with copper and make a ring connecting together all the different filled areas easily. If you end
with very large unfilled areas your board layout is too dense, change it to allow room for
poured copper. Medium-sized unfilled areas do not matter.
Viewing poured copper
After Tools->Auto both tracks and poured copper will be displayed. This can make it difficult
to see tracks. Save the board, exit, and reload it. After the reload you will see tracks, and
polygon boundaries, but no poured copper. The layout is identical, and can be sent for
manufacture in this form (without another Tools->Auto command) but will be easier to view.
To see the poured copper, execute another Tools->Auto command. Figure 10 shows part of a
layout with poured copper visible on both sides. Note that top + bottom copper is coloured
dark brown, top only is red, bottom only is blue, and that colours can be changed using
Options->User interface.
Figure 10
Figure 11
Change the layer, angle, size, ratio, and font till they match those on the toolbar in Figure 11.
You can increase size from this, but not decrease it (to be precise, size*ratio > 0.01 is required
by some board manufacturers). You can check the results by moving the cursor over the PCB
layout.
When all is correct place the text on the PCB layout using left-click.
Use the tPlace layer (no 21) for lettering if your board will be manufactured with silk-screen,
and for the EE2 project. Lettering can overlap copper tracks in this case. If your board will
have no silk-screen you can put your text on the top (1) or bottom (16) copper layers. In this
case be careful to place the text somewhere well away from components and tracks.
Note that proportional (non-vector) fonts must be vectorised at the CAM stage and therefore
change slightly on output. This can mean that a font which does not touch tracks on the board
in EAGLE will touch them on the output board. Use of vector fonts avoids this problem.
14Remember to do another DRC check after this step if you are adding text to copper - just in
case something goes wrong.
Step 10 Final Checks before Manufacture (EE2 project –
NOT EE2Lab PCB Touch switch)
YOU MUST check these before submitting your final brd and sch files.
Check current board layout is saved
Check no ERC warnings or errors (except lack of value for R,C and supply nets with
wrong name – and these must be checked on schematic).
Check DRC rules loaded are correct for manufacturer (eerules_dp.dru v3.40 2008).
Check board size is rectangular and has precisely the specified X,Y dimensions using
run->statistic_brd. Boards with incorrect dimensions will be rejected
Check auto command gives 100% routing without polygons falling apart (message
at bottom of window after auto command)
Check there are no DRC errors
Check component names (layer 25) are all visible, on board, not overlapping pads, and
if possible not hidden under components. Note that component values (layer 27) are
not printed on silk screen. (Board will be OK if you do not do this but less easy to
build)
Check that no object (track or pad) lies within 2mm of the board edge
Check you have included, easily visible, a layer 21 caption giving your lab group
Your .brd file now contains all the information necessary to manufacture the PCB, however
make sure you keep safe both this and the schematic – you will be able to print schematics,
layouts, component value lists etc for use in debugging.
15Appendix A. Routing Problems
Some layouts can be very difficult to auto-route, especially when SMT packages are used
with dense connections.