Вы находитесь на странице: 1из 48

instructables classes

CIRCUIT BOARD DESIGN CLASS


5 Lessons Beginner Level

In this class, you will learn how to design a custom printed circuit board from a breadboard
prototype. This is useful if you want to make multiple copies of a circuit board for your project, or
simply want to add a level of polish and professionalism to your work. By creating your own custom
circuit boards, you are elevating your project to more re ned levels of design and fabrication.

While this may seem intimidating, it is actually easy to do if you take your time and do it carefully. I
will show you how to digitize a circuit in the freeware version of Autodesk Eagle and then how to
convert the schematic into board les which can be sent out for fabrication. Once you see for
yourself how easy this process is, you will be hooked. There are few greater feelings in the wild world
of electronics than holding your rst custom manufactured circuit board in your hand.

I hope that you will follow along with me as I teach you how to design a circuit board.

Class Author:
randofo
Randy Sarafan is an artist, designer, inventor, and founder of the Instructables Design Studio. Over the last 10 years he has
created hundreds of step-by-step tutorials on diverse subjects ranging from pancakes to self-driving robotic queen-sized beds.
He has authored two books, 62 Projects to Make with a Dead Computer and Simple Bots.
His work has been showcased by the NY Times, Popular Mechanics, The Today Show, The Tonight Show, NPR, the BBC,
Core77, Boing Boing, and the National Examiner (to name a few). He currently splits his time between Brooklyn, NY and the
internet.

Circuit Board Design Class: Page 1


Lessons

Lesson 1: PCB Concepts and Materials


We begin by learning some of the basic concepts and
terminology related to circuit boards. We will review what
tools and materials you will need to complete the class.

Lesson 2: Preparing a Schematic


Before we can design the board itself, there is some prep
work that needs to happen. In this lesson we will start
with a breadboard and end with a digital rendering of the
schematic.

Lesson 3: Laying Out the Board


Once the schematic is done, it is just a button-click away
from turning in a circuit board. Well... almost. Learn how
to layout the parts and draw traces to complete your
circuit board.

Lesson 4: Manufacturing
In this lesson we cover basic validation of the design file
and discuss selecting a manufacturer.

Lesson 5: Assembling the Board


Finally, we assemble our board and see if it works.
Hopefully all is good in the hood. However, if there are
problems, we touch on some basic troubleshooting
techniques.

Circuit Board Design Class: Page 2


Lesson 1: PCB Concepts and Materials

In this class we are going to learn how to convert a circuit from a mess of wires
on a breadboard into a custom print e d circuit bo a rd . This class is intended
for hobbyists who want to take their projects to the next level and produce an
end-product which is more nished. The bene t of designing a circuit board
for printing is that it is cleaner and more reliable than a circuit built on a
breadboard or perf-board. The other main bene t is that it is repeatable. If you
need to make ten boards, it will save you a lot of time to have a custom board
printed.

This is an introductory level class and we will not be going over more
advanced topics in design and testing that would help you make your board
ready for consumer manufacturing, but the skills covered here are a stepping
stone to making professional-quality circuit boards.

Circuit Board Design Class: Page 3


What Is a PCB?

PCB stands for "Printed Circuit Board." This is the standard circuit board you
will nd inside of most electronic consumer products.

A PCB consists of a berglass board with conductive copper pathways or


t ra ce s that connect together electronic components that are soldered to
them. The totality of connections between components is what constitutes the
circuit.

A standard circuit board has 4 layers that we need to concern ourselves with.
This includes the base, copper layer, soldermask and silkscreen layer.

The circuit board's ba s e is typically made out of a type of berglass called FR4.
This material provides rigidity, and has good heat resistance properties.
Thicknesses vary from board to board, but 1.6mm is fairly common.

The co ppe r la y e r is laid atop the berglass base (making the base "copper
clad"). This is the layer that conducts electricity and the circuit's components
are soldered to. All of the circuit's connections occur on the copper layer.

Circuit Board Design Class: Page 4


The s o lde rm a s k is a layer of colored resin strategically laid over the copper
layer to insulate the parts of the circuit that do not get soldered to. Typically
the soldermask is green, but it can be all kinds of di erent colors.

The s ilks cre e n la y e r is printed atop the soldermask and serves as a guide
for assembling the board.

Typically, a circuit board will have two sides, which means there will be a top
side and bottom side. Each side can have all four of these layers, but the
bottom often excludes a silkscreen layer since it is often unnecessary (which
also reduces manufacturing cost). This 2-sided arrangement is fairly standard
and the board we will design in this class will be like this.

More advanced circuit boards, such as you might nd in a laptop or


smartphone can have many conductive layers or "sides" sandwiched together.
However, we won't be covering anything that complicated in this course.

The type of components we will be using to build circuits in this class use
t hro ug h ho le s . These are round metal plated holes that serve to both
connect the top and bottom copper layers together, and give you a surface to
solder the component to the board. In this class, I will be dealing exclusively
with through-hole parts.

The other common type of component you might attach to a PCB are s ur f a ce
m o unt . These are small parts with metal tabs that get soldered directly to the
surface of the board.

When designing the board we will refer to the parts of the circuit in di erent
ways. Let's take a moment to clarify the ways that we can talk about a part.

A co m po ne nt refers to any part used in a circuit. This is always referring to


the part itself, and always has the same symbol. It can and often does have a
di erent package and footprint.

A s y m bo l is used when drawing a schematic as a stand-in representation of a


component. It has all of the necessary pin connections required by the
component.
Circuit Board Design Class: Page 5
A pa cka g e is the 3-dimensional shape of the component, and also indicates
how it mounts to the circuit board (through hole, surface mount, or
otherwise). This speci cation is typically provided by the manufacturer or
retailer and is used for selecting the appropriate footprint when designing the
board.

A f o o t print is the 2-dimensional layout of the package atop the surface of


the board. It consists of a silkscreen layout, name label, plated through holes
or pads, and any other necessary layout information.

There is, of course, much more terminology related to designing circuit


boards, but this will be introduced as we need it.

Download Software

Circuit Board Design Class: Page 6


To design a PCB we will be using Autodesk Eagle software, which is a CAD
program speci cally designed for making circuit boards. This software is free
for 2-sided boards up to 80cm². This should be more than enough area for any
hobby project.

You can download Eagle from Autodesk's website, and you will also need to
sign up for a free Autodesk account.

Gather Supplies

Since most of the design will be done on a computer, and the board will be
sent out for manufacturing, there are not really many things you will need.

In fact, the only things you will need for this class are:
A circuit (of your choosing) on a breadboard that you want to create a PCB for
Paper and a pencil
A ne tip marker (optional)
Digital calipers (optional, but recommended)

Once you have rounded up these things, it's time to get psyched for the next
lesson.

Circuit Board Design Class: Page 7


Lesson 2: Preparing a Schematic

Before we can lay out our circuit board we need to do a host of preparatory
work. This includes creating a schematic both on paper and digitally, and
setting up a project within the Eagle software. Creating a schematic is not just
a helpful step, but a necessary step in the Eagle design process. The circuit
board le is linked to the schematic le, and any change you make to the
schematic will eventually have an e ect upon the layout of the board. Albeit
this may all seem like a lot of extra work, you will be glad you did all of this
later.

Circuit Board Design Class: Page 8


Draw a Schematic

I'm going on the working assumption that if you want to make a PCB you
already know what a schematic is and how to draw one. If you don't, I highly
recommend rst completing my basic Electronics Class.

To begin, draw out a schematic of your circuit on a piece of paper, using the
breadboard as your guide. Even if your circuit is copied from a di erent one,
draw it out again. Perhaps you changed a connection or a value of a
component and forgot about it, or perhaps the original circuit was drawn
incorrectly. Either way, you want to make sure you have drawn the de nitive
schematic of the circuit you are making, drawn in a manner that quickly makes
sense to you. This schematic will later serve as your blueprint for making
connections in the design software.

It is helpful to use a pencil in case you draw something incorrectly and need to
quickly make a change. For instance, I forgot to add in a DPDT switch that lives
o of the breadboard and is used to toggle the audio signal routing.

Circuit Board Design Class: Page 9


When I'm done and sure the schematic is correct, I like to trace the whole thing
in marker to nalize it. Pencil tends to fade or get rubbed away over time.

Once it is traced, I then like to erase the remaining pencil marks to make it nice
and pretty-looking.

B.O.M.

B. O. M . stands for Bill of Materials. This is the entire list of materials for your
circuit. This can easily be created by making a list of the components you see in
the schematic.

To make matters even easier, I numbered each component in the schematic


(the "Name" eld below). This makes sure I don't leave any of the parts out as
each part should have a unique value in the materials list.

For my schematic, the B.O.M. is as follows:


Q ua n t i t y Va l ue Na me S up p l i e r P a r t Numb e r
2 10K R1, R2 Digikey CF14 JT10K0CT-ND
1 100K R3 Digikey CF14 JT100KCT-ND
1 4 .7K R4 Digikey CF14 JT4 K70CT-ND
1 4 7K R5 Digikey CF14 JT4 7K0CT-ND
1 1M Potentiometer R6 Mouser P160KN2-0EC15B1MEG
1 1K R7 Digikey CF14 JT1K00CT-ND
1 100K Potentiometer R8 Mouser P160KN-0QC15B100K
1 100uF C1 Digikey 4 93-134 64 -1-ND
1 0.01uF C2 Digikey 399-9858-1-ND
1 0.1uF C3 Digikey BC2665CT-ND
2 22uF C4 , C5 Digikey 4 93-12572-1-ND
2 1N4 001 D1, D2 Digikey 1N4 001-TPMSCT-ND
2 1N34 A D3, D4 Digikey 1N34 A BK-ND
1 4 2TL013 T1 Mouser 4 2TL013-RC
1 TL071 IC1 Digikey 296-7188-5-ND
1 DPDT pushbutton SW1 Mouser SF12020F-0202-20R-L-051
1 1/4 stereo J1 Mouser 502-12B
1 1/4 mono J2 Mouser 502-12A
1 9V battery B1 Digikey 36-232-ND

Setup Eagle CAD

Circuit Board Design Class: Page 10


Once we have our schematic and BOM sorted out, the next order of business is
to setup Eagle CAD.

Launch the software. First it will ask you to login using your Autodesk ID and
then it will launch the Control Panel.

Expand the Projects folder list on the left-hand menu, and then select the
Eagle folder.

Next, either select (File > Ne w > Pro je ct ) from the top drop-down menu or
right-click on the folder and select "ne w pro je ct " to create a new Eagle
project. Name the project after the circuit you are making, and hit enter on the
keyboard.

Our digital schematic and PCB design will live within this project. However,
before we can access those, we need to create them.

To begin we will create just the schematic. The board le will be created later,
once we have the schematic nailed down.

To create the schematic, select the project you have just created and then
select (File > Ne w > S che m a t ic ) from the top drown-down menu.
Alternately, you can right-click on the project and select the same. A new
schematic window should load.

Save this window by selecting (File > S a v e ) or pressing command+S to load


the save menu. Name the schematic whatever you want (like "Flying Monkey
Zebra"), but I nd it helpful to call is something intuitive like "[na m e o f
pro je ct ] s che m a t ic "

Circuit Board Design Class: Page 11


The Eagle Interface

Eagle is a complex software package intended for creating complex circuit


boards for mass production. By contrast, we will be using it to create a rather
simple circuit board for personal use. Thus, when you look at the interface you
will notice there are a lot more options and buttons than we will actually be
using in our rst design.

You may not easily understand (and may never fully understand) the Eagle
interface and, to be truthful, is not always intuitive to use. However, patience is
key. Don't lose heart or become intimidated by the interface. Once you get the
hang of it, creating a simple board is — well — simple. You can always learn
additional features later as your skill progresses. The core features that we will
be using will be introduced throughout this class as needed, and don't require
any sort of advanced degree.

Circuit Board Design Class: Page 12


Creating a Digital Schematic

Before we can create a board, we want to recreate our schematic within Eagle.
This will allow us to easily convert it into a PCB and helps to make sure all of
the parts and connections are made correctly. This may seem like extra work,
but will make life dramatically easier in the long-run.

In theory, you could have skipped the paper step and gone straight to this
step, but I nd having a paper copy is useful for two reasons. First o , having a
de nitive hard copy is nice simply for record-keeping. I recently rediscovered a
circuit board I made for a custom guitar pedal almost 10 years ago, and had no
clue what the circuit was or what value components I needed. The digital les
were lost to time, and even if they weren't, the le formats I used at the time
are surely obsolete. However, I am still able to quickly and easily nd the paper
schematic and B.O.M. in my project archive. Now would also be a good time to
start a project archive if you don't have one.

The other reason I like to rst make paper copies is that they will include all of
the components even if they are not attached directly to the circuit board (in
my case, the DPDT switch). On occasion, the digital version might omit it, as
parts not directly attached to the PCB are not always necessary to include in
the schematic (this will make more sense in a little bit).

Circuit Board Design Class: Page 13


If you look at your schematic window, you will notice it is blank. This is because
we have not placed anything there yet. Let's x this.

To begin, click the button on the left-hand side that looks like a plug with a
Swiss ag over it, and says "add" when you mouse over it. This will load a
window of all of the stock Eagle components.

In the search box type in "Frame." This should load a list of possible decorative
frames for your schematic. I recommend selecting an A3-sized (standard
printer paper) frame, but pick whichever you think will work best for your
schematic and select "OK."

Click anywhere within the blank window to place the work frame. Then, exit
out of 'add component' mode by hitting the escape key (esc) twice on your
keyboard.

You have just placed a work frame for your schematic. You can view it by
selecting the magnifying glass with a thick rectangle within in it on the top of
the schematic window. This will "zoom to t" to your work area.

As you may have guessed, adding a frame is not entirely necessary, but it helps
keep things organized and pretty. Also, the versioning information on the
bottom right-hand corner of the frame should auto-update as you save your
work, which is a nice touch.

To observe this in action, save your schematic by selecting (File > S a v e ) from
the top menu or pressing command+S. I recommend saving your work often
throughout this process.

Circuit Board Design Class: Page 14


Add Symbols

Now is time to add all of the rest of your component's symbols to the
schematic. Grab your B.O.M. and let's get to work.

Just like you did with the frame, select the "add part" tool, nd your parts, and
then place them into your schematic.

To begin, let's try something easy. Let's search for "op amp" and nd the TL071
op amp that we are using in the schematic.

Notice that the part has a drop down arrow. What this means is that the part
has multiple packages (surface mount and through-hole) and also has
di erent footprints to choose from. You need to select the footprint for the
board you will be using. If you select the surface mount footprint for a
through-hole part, you will not be able to assemble your board correctly.

You can tell the di erence between a surface mount and through hole part
because surface mount will have an abbreviation which starts with "S" and
through-hole will have an abbreviation which starts with "D." Aside from the
obvious naming conventions, surface mount parts will have pads without
holes in the center because the pins are mounted to the surface, and through
hole parts have pads with holes in the center because the pins are passed
through. It's actually fairly intuitive.

Circuit Board Design Class: Page 15


If you look for a resistor, you may be overwhelmed by about a billion di erent
resistor options. Knowing which one to select can be tricky. It's simply a matter
of nding the right footprint. Your part supplier should have it's package
listed on the product page, which, in turn, should indicate the best footprint
to select. Often it is also important to consider the listed measurements (in
mm) of the component in relation to the package.

For instance, if we were to look up a 10K resistor we will nd that it has an


"axial" package. This lets us know it is through-hole, but it still does not tell us
the exact footprint we need since axial resistors come in a wide range of sizes.
Fortunately, they also let us know the dimensions are 2.3mm x 6mm. From this
information we can determine that we need a resistor package with at least
7.5mm spacing between leads (since bending the leads for through-hole
mounting requires some additional width). However, to be on the conservative
side, I decided go with 10mm spacing between leads.

When the software states "grid 10mm" under the part attributes for this
through-hole resistor footprint, it indicates that we have found a resistor
package with a 10mm lead spacing and ultimately what we are looking for.

Alternately, this is also where calipers can come in handy. Instead of looking up
the lead spacing, we can simply measure the lead spacing and use this
measurement to gure out what part footprint to select.

Calipers can also be used to double-check that the measurements given


online are correct if something seems shy.

Sometimes you won't nd exactly what you are looking for. In those instances,
you can nd a similar part with an identical footprint. For instance, I could not
nd a 1N34A germanium diode, but it has a DO-07 footprint. Instead I am
going to use an AA112 germanium diode which also has a DO-07 footprint.

For our purposes, this should be good enough. It will show up on the board as
a diode with the correct footprint, and for what we are currently doing, that is
all that really matters. If you were going to get deep into Eagle and start
running circuit simulations, this might make a di erence. However, that is well
beyond the scope of this class and our goals.

Circuit Board Design Class: Page 16


If you really cannot nd anything close to resembling your part, hope is not
yet lost. Some manufacturers and part distributors will provide an Eagle parts
library for their inventory. A good place to start to look for those is the
Element14 Eagle CAD library page. Alternately, you can try googling for a
library as well. If that fails, you can always create a new custom part.

To add the library go to (Libra ry > Us e . . . ) on the top menu bar. Navigate to
and select the library you downloaded and click "open." It will appear nothing
happened, but when you now go to add a new part, your new library will be
included.

Finally, we need to gure out which components from the schematic don't get
mounted directly to the circuit board. In my circuit these parts include the
potentiometers, audio jacks, battery snap, and bypass switch. In fact, some of
these parts get wired directly and may not have connections to the board at
all.

What I need to gure out is precisely what input and output points the board
needs. After some thought I concluded I need an audio input and audio
output, a connection for the drive potentiometer, and a power connection. To
create these terminals, I am going to use the single "pin headers" from the
Adafruit library I just downloaded.

Note that there are other "pin headers" I could have used already included
with the software, but I just wanted to demonstrate adding a component from
the new library.

Circuit Board Design Class: Page 17


Draw Connections

Once all the symbols are placed, we need to arrange them, name them, and
draw the appropriate wire connections.

Select the move tool from the left-hand toolbar (it looks like a compass with
four arrows), and click on the symbols to drag them into place. Arrange them
on the screen to roughly match the layout of the hand-drawn schematic.

Circuit Board Design Class: Page 18


You may notice that sometimes when you click and drag on the symbol it does
not go anywhere. This might be frustrating to you, and you might think the
software is broken. It isn't that you are doing something wrong. You can only
ever select and perform an action upon a symbol when the cross-hair from the
tool overlaps the cross-hair on the symbol. Sometimes the cross-hair on the
part might be hidden under a symbol or in a corner, making the whole
endeavor kind of frustrating.

When appropriate, you can easily rotate the symbols by selecting the rotate
tool and then simply clicking on the symbol you want to turn. With each click
they will rotate 90 degrees.

Circuit Board Design Class: Page 19


The symbols should already have names, but these names may not correlate to
the ones already assigned on our paper schematic and B.O.M. Thus, we want to
use the Name tool on the left-hand toolbar to reassign the names of the
components as appropriate. These names will transfer over to the PCB when
we generate it, so it is important that we get them right.

Next we are going to assign values to each symbol using the value tool from
the left-hand toolbar. Whereas the symbols have names which specify what
sort of part they are, the value designation lets us know what the part actually
is. For instance, we can specify whether the resistor R2 is 100 ohm or 10K ohm
(as is the case). It should go without saying why assigning values to the
symbols is as equally as important as giving them each unique names.

Circuit Board Design Class: Page 20


Many of the schematic symbols look the same, even if they have dramatically
di erent footprints. This is particularly true of the capacitors in my schematic. I
am going to con rm that each schematic symbol correlates to the proper
component by using the info tool from the left-hand toolbar to double check
its footprint is correct.

In my case the footprint of the component matches my part perfectly, but if


the footprint were not matched to the component, I would then check what
other capacitor was incorrect and simply reassign the components that were
mislabeled.

Once all of the symbols are arranged and labeled correctly, now it's time to
connect them together. To do this we will use the NET tool to create
connections between the symbols. All of the connections we make match our
hand drawn schematic, with the exception of the components that we have
determined do not mount directly to the board. In these cases, we just need to
make sure the appropriate pin headers get connected to the appropriate
spots.

Often connections will overlap one another without actually connecting. You
can tell the di erence between a connection and an overlap by the presence
of a green dot. For instance, both diodes connect together with the output pin
header because all three lines converge at the green dot. However, pins 1 and
2 do not connect together because there is no dot even though they intersect.

Circuit Board Design Class: Page 21


Sometimes you might make a connection which looks okay on rst glance, but
is not a connection at all. You can see an example of a bad connection here on
pin 3. The long darker green overlapped section indicated that there isn't
actually a connection there. An actual connection should look like the small
green dot on pin 2.

To x this, you need to delete the green line by selecting the Delete tool from
the left-hand toolbar. This is easy to nd because it looks like a little garbage
can. Once the tool is selected, click on the line to delete it, and then you can go
back and redraw the line with the NET tool.

When you have a lot of symbols connecting with one another, your circuit can
get confusing very quickly. An easy way to tell if a connection is good is by
moving the symbol you are unsure about and observing to see if the
connections get dragged along with it. If they all appear to move around with
the symbol, the connections are reliable.

Circuit Board Design Class: Page 22


Finally, once all of the connections are made and you have meticulously
double-checked your work to make sure that it matches your hand drawn
schematic, you are nally ready to make a circuit board.

Now would be a good time to get up, stretch your legs, eat a sandwich, or — if
you are gluten free — have some rice pasta. If you are feeling particularly
inspired, maybe even go for a walk. You need to reset your brain for the next
lesson, and some exercise wouldn't kill you.

Circuit Board Design Class: Page 23


Lesson 3: Laying Out the Board

Once you have your schematic drawn out in Eagle, it is nally time to lay out
the circuit board. This may seem like it's going to be very complicated, but it is
actually not that bad. The process is fairly straightforward. It is just a matter of
taking your time and carefully thinking through what you are doing. By the
end of this lesson, you should have a circuit board that is ready for production.

Convert the Schematic

Circuit Board Design Class: Page 24


Now is the moment of truth in which we convert our schematic to a board
layout. To do this, all you need to do is click the "Generate/Switch to board"
button on the top menu bar. This will open a dialogue box asking you if you
want to "Create from schematic?" The answer is unequivocally "Yes."

A new window should load with a mess of components sitting next to a blank
circuit board rectangle. Save this new window. It will become your circuit
board.

Arrange the Components


Circuit Board Design Class: Page 25
Once the board le is generated, it is time to arrange the components'
footprints on the board. The idea is to keep the distance between the di erent
footprints as short as possible. On one hand, it is good to avoiding placing the
components so close that they are on top of one another because it will make
it more di cult to assemble later. On the other hand, the larger the board is,
the more it will cost to manufacture.

You should be starting o with a jumbled mess of components and a irw ire s .
These are thin "rubber band" lines which indicates two points that require a
circuit connection be drawn between them. When you move the parts around,
these lines stretch or contract like rubber bands.

This jumble also has a name. It is called a ra t s ne s t . I am honestly not 100%


certain why it has such an unpleasant name, but I suspect it has something to
do with looking like a nest a rat would (or something unequally unpleasant)
would make. At the very least, someone was having a bad day when they
decided to call it that.

Our rst order of business is to use the move tool to place the footprints
spread out upon the board. You need to place the footprints within the frame
of the board or the software will give you a really annoying pop-up telling you
that you cannot place a component there.

To begin with, don't worry about placing them in the correct position. Just get
them spread out and take inventory. Once you have a grasp on what goes
where, then you can begin positioning them on the board.

Circuit Board Design Class: Page 26


The goal in placing the footprints is to try to keep airwires from twisting,
overlapping, or traveling great distances. The easiest way to do this is to place
components which get wired directly together next to each other.

However, you are eventually going to get to a point that no matter what you
do, you have a mess of twisting and overlapping airwires. In fact, you may look
at your airwires and think many of the connections don't even make sense and
should be drawn di erently.

Fortunately, there is a secret weapon for redrawing the airwires and cleaning
up your connections. You simply press the "Ratsnest" button on the bottom of
the left-hand toolbar (the button that looks like a wooden molecule model).
When you press this you will be delighted to discover that the airwaves get
redrawn with more direct paths. This will allow you to continue to move the
components around, and simplify the circuit connections even further.

Once you start to have a grasp of part placement, move the circuit towards
the bottom left-hand corner of the board. Then, adjust the board outline to t
your circuit (typically shrinking it) by clicking and dragging on it using the
move tool. However, don't move the bottom left-hand corner of the board.
This corner is currently on the (0,0) position and this will be useful later in
easily determining the board size.

Continue compacting the board until the components are packed in fairly
tight.

I can probably compress the parts in this example even tighter, but I think
keeping them a little bit spread out will make it easier to route traces.

Circuit Board Design Class: Page 27


A Note About Layers

Layers are di erent work planes upon which your PCB is drawn. For instance,
all of the copper traces on the bottom of the board will be on one layer, and all
of the part names that are silkscreened onto the top of the board will be on
another layer. Yet another layer will have the board's cut outline. In short, the
di erent layers will indicate to the manufacturer to route, drill, or print upon
the board. It provides a blueprint to let them know exactly how to produce the
board.

It is therefore important that you place the correct information on the correct
layer. Fortunately, layers are fairly consistent from one PCB to the next, and
they are relatively easy to tell apart because they are displayed in di erent
colors. By default you are viewing about two dozen di erent layers.

You can view all of the layers currently in play by going to the layer menu,
which can be found by clicking the "Layer Settings..." button on the left-hand
toolbar (which looks like 3 stacked squares) or by selecting (Vie w > L a y e r
S e t t ing s . . . ) from the top menu bar.

Circuit Board Design Class: Page 28


All of the layers highlighted in blue are active. You can activate or deactivate
any layer by clicking on it, and then selecting "apply." Before you go messing
around with this make sure you know darned well what you are doing, or at
least keep track of any changes you make so that they can be undone.
Typically you would not want to toggle o any of the default layers on a
permanent basis. This can lead to unexpected results later.

I'm not going to go over every layer, but I will discuss the few we are working
with as they are introduced. Here is a full breakdown of PCB layers within Eagle
should you be curious.

Circuit Board Design Class: Page 29


Creating Traces

Creating traces is one of the easiest and perhaps — at times — most


frustrating parts of creating a circuit board. If you love puzzles, you will be in
heaven. If you don't love puzzles, I apologize in advance. Hang in there.

The goal is to connect all of the components together properly (using the
airwires as guides) without any of the traces touching or intersecting. The rules
are easy enough, but the game can get maddening as more and more traces
are placed. You will quickly understand why we paid such careful attention to
where our parts were initially placed and preventing airwires from
intersecting.

To create your rst trace select the "Route" tool on the left-hand side tool
menu. It is the one which looks like a blue squiggle with green dots on the
end. You will notice that when you select it you get a new toolbar on the top of
the window. These new settings are important to be mindful of.

Circuit Board Design Class: Page 30


Let's look at the left-hand side of the tool-bar. The rst thing you will see is a
layer drop-down menu. We are going to select layer "16 Bottom" to begin. It
doesn't particularly matter if you draw traces on the top or bottom of the
board, but for argument's sake, let's draw them on the bottom.

Next to the drop-down menu, you will see a series of squiggles. These indicate
di erent ways in which lines can be drawn between points. We'll come back to
these in one moment, but rst, I want to point out the "Width" drop-down
menu. This speci es the width of the copper trace you are creating on the
board. I keep mine set at a width of 0.016 which is more than enough for any
low-current application. If your traces are going to be carrying high current
(such as an amp or more), you will want to use a trace width calculator to make
sure your traces are large enough to handle it.

Anyhow, the di erent squiggles at the top allow you to draw di erent angled
lines. The curves that have right angles are good for drawing traces which are
straight lines or connections which meet at a right angles. The ones which are
diagonals are used for drawing diagonals. The curved lines are good at
drawing — you guessed it! — curved lines. For the most part, this isn't rocket
science.

The two colored squiggles, however, require our special attention. These are
the "follow-me" paths and allow us to auto-route traces between two points
that are connected by airwires. By clicking on the starting location and moving
the pointer around, you can slightly adjust the shape and location of these
routes. I prefer to use the option on the right-hand side which tries to gure
out the best path "from both sides."

This tool is extremely useful for complex paths that swerve around other parts
and traces. It is also useful for routing paths that require vias.
Circuit Board Design Class: Page 31
A v ia is a tiny electroplated hole which passes electricity from one side of the
board to the other. The reason you may want a via is to bypass obstacles and
keep your connections short. For instance, the red line is a trace on the top
side of the board and is therefore able to cross over all of the blue connections
on the bottom side of the board. Once it bypasses them, it connects to a via
that sends it back through to the bottom and allows it to continue along its
merry way towards the chip.

Vias are useful because aside from allowing us to bypass obstacles, they help
keep traces as short as possible. This aids in keeping the board compact.

Even though they are useful, vias should be used only when necessary. For the
sake of simplicity, it is best to try to keep all of your traces on one plane and
not have too many vias to keep track of.

On the right-hand side of the Route toolbar are all of the via-speci c settings. I
typically leave these settings at their defaults. I advise against decreasing the
drill size because this will likely increase production cost later. It is also
advisable not to increase the drill size because people might confuse these for
through-hole connections and try soldering to them.

If for some reason you mess up and need to remove some traces, you can use
the "Ripup" tool. In the above image I'm removing all of the ground
connections that I had previously drawn because I have new plans for
connecting all of the ground connections to the circuit.

Circuit Board Design Class: Page 32


Thanks to some creative routing, it turns out I didn't need to use the via after
all, and was able to keep all of my traces to the bottom side of the board. The
board now is mostly done. Notice that the only airwires not connected are the
ground wires. This is on purpose. Rather than gure out how to route all of
these wires, I'm instead going to add a ground plane.

Ground Plane

A ground plane is a large copper area covering most of the unused section of
the board. The purpose of a ground plane is to reduce noise and interference
between components in the circuit. The ground plane also allows us to make
ground connections without routing them between pins, which makes life
much easier. You might also note that it makes the board look real cool-
looking.

However, before I add a ground plane, I'm going to take one last pass at
making the board smaller. Components on a PCB can go fairly close to the
edge. I want to get rid of any unused space because every few millimeters
shaved from the dimension of the board cuts down the production cost.

Circuit Board Design Class: Page 33


To move everything at once, I use the "Group" tool to drag and highlight
everything within the boundaries of the PCB. This is the tool on the left-hand
toolbar which looks like a dotted box with a pointer arrow. Once everything is
selected, I simply grab any part by its center cross-hair, and drag the whole
selection to the bottom left-hand corner.

Next, I use the info tool to specify the new dimensions of the board.

Once the size of the board is nalized, it is time to add a ground plane. It may
seem complicated, but it fairly easy to do.

Circuit Board Design Class: Page 34


Select the "Polygon" tool which looks like a rectangle with a bite out of the top
corner from the left-hand toolbar. In the top toolbar make sure the layers is
set to "16 Bottom" and then change the isolate setting to 0.012. This number
means that there will be 0.012" of space between the all of the copper
connections and the ground plane.

Trace the outline of the board with the polygon tool. When complete, you will
see a dotted line form around the outside of the board.

Rename this dotted outline "GROUND" using the Name tool.

Finally, click the Ratsnest tool to draw in the ground plane.

Now is the moment of truth. We are going to connect the ground plane to all
of the circuit's ground pins.

Click on any of the ground airwires using the Name tool. Something akin to
"N$2" should show up as its name. Delete this and rename the pin "GROUND."

All of the pins connected to the "GROUND" airwires should now be connected
to the "GROUND" plane. Zoom in and review these pins to con rm there are
little blue lines connecting them to the ground plane. It's a bit like magic.

Circuit Board Design Class: Page 35


Finishing Touch

Circuit Board Design Class: Page 36


Now is time to leave your mark on the board by customizing the silkscreen
layer (layer 21 - tPlace) assuming there is enough free space left on the top of
the board to do so.

The easiest thing to do is simply to use the text draw tool (which looks like an
uppercase T) to write the name of the board. However, you can try drawing an
image with some of the other shape tools on the silkscreen layer (layer 21 -
tPlace) if you are feeling particularly inspired.

Your board is now ready to be prepared for manufacturing.

Circuit Board Design Class: Page 37


Lesson 4: Manufacturing

As soon as the design is complete, your board is ready to be printed. While


there are instructions online for creating your own board, I recommend that
your rst one be professionally manufactured. In this lesson we will go over
generating gerber les for manufacturing, reviewing your gerber les, and
then a little bit about selecting a manufacturer.

Measure Twice, Manufacture Once

Before I generate the production les, I want run two separate checks to
validate the board.

The rst check is to look for missing airwires and certify there are no
connections missing between components. To accomplish this we once again
simply press the magic ratsnests button. It should return "Nothing to do!" This
indicates to us all of the airwires have been connected.

Circuit Board Design Class: Page 38


The second check is to look out for any glaring design errors. On the bottom of
the left-hand toolbar we need to select the DRC button (Design Rule Check)
which is basically just a button with the initials DRC with a check mark. Once
selected, a new window should open. Click on the "Load" button and select
"default.dru," and press "Open." You will then be redirected back to the original
window where you simply press "Check." If all goes well, the phrase "DRC: No
errors." will load at the bottom of your design window.

If all does not go well, the "DRC Errors" window will load with a list of errors. By
clicking on each itemized error is will give an explanation what is wrong, and
highlight on the board where the error is occurring. It is imperative that all of
the errors are resolved before proceeding. Typically I don't use the check
process in the error window itself. Instead, I exit out, make the necessary
changes that it has indicated, and just run the DRC again (until the errors
don't appear).

Generating Gerbers

Circuit Board Design Class: Page 39


In an ideal world, we would be able to just send the Eagle les to the
manufacturer and be done with it. However, Eagle is just one PCB design
software package in a universe of design software packages. As well, Eagle has
so many di erent layers that a manufacturer might not be sure which layers
you meant to include and which ones you did not.

For both of these reasons, we need to generate a special type of CAM le


called gerbers. Gerber les are basically the universal format for circuit board
production. Regardless of what piece of software you used to generate the
board, the gerber les are always going to follow the same format. Thus, when
a manufacturer receives these les, they know exactly what needs to happen.

In the olden days (2016 or earlier), you used to have to open Eagle's native
CAM processor and go through an elaborate rigamarole to generate gerber
les. You still can do this if you want, but I don't recommend it.

Eagle's new process for creating gerber les is much more simple, and the one
I will be using. It basically involves uploading the board to Autodesk Circuits,
which is Autodesk's online hub for all things electronics. By uploading your
board le here, all of the appropriate gerber les will be automatically
generated.

To upload your les to Autodesk Circuits, press the "Make' button on the right-
hand side of the top menu bar. After that, just follow the prompts that pop up
to upload your board le and log into the circuits.io site. This will redirect you
away from Eagle and to a web page on your default web browser where your
le has just been uploaded.

Circuit Board Design Class: Page 40


Once logged into Autodesk Circuits, you will be presented with your circuit
board in a viewing window. First, look at the top and the bottom of the board
and see if they appear correctly. If you have done everything right, this should
be no problem. Otherwise, go back to Eagle, make the necessary changes to
your board, and re-upload it.

Reviewing the Files

After the quick visual check, you will want to look at the gerber les
themselves. To do this, click on the "layer stack" button in the top right-hand
side of the window to switch views.

You should see a list on the left-hand side with the following les:
Layer Description

Circuit Board Design Class: Page 41


A composite rendering of all of the layers on the top of the board. This layer has no equivalent gerber le
Top View
and is unique to Autodesk Circuits.
Top Silkscreen The top silkscreen layer for the circuit board as it appears.
Top Copper The copper layer as it appears on the top of the board. This layer does not account for drill holes.
The soldermask layer displays the inverse of where the soldermask appears. In other words, where there is
Top Soldermask
black displayed, there will be no solder mask.
A composite rendering of all layers on the bottom of the board. This layer has no equivalent gerber le
Bottom View
and is unique to Autodesk Circuits.
Bottom Silkscreen The bottom silkscreen layer for the circuit as it appears. This layer is typically not used.
The copper layer as it appears on the bottom of the board. Like the top copper layer, this one also does
Bottom Copper
not account for drill holes.
Bottom Soldermask This is the soldermask layer on the bottom of the board. It too returns an inverse display.
Drills Indicates all of the holes to be drilled through the board.

Toggle through the gerber les and make sure there is information there, and
everything looks about right. The drill le should have guides for drilling. The
silkscreen le should have everything that needs to be silkscreened. The other
les should have whatever the other les are supposed to have. If they don't,
you need to go back, gure out what went wrong during the setup process,
and create new les.

When you are sure they all look correct, scroll down the page and click the big
"Download Gerber" button to download the zip le to your computer. This le
is what you will be providing to the manufacturer.

If you want to take a look at my les, you can nd them on the Octave Up
Pedal Instructable.

Selecting a Manufacturer

Circuit Board Design Class: Page 42


There are so many di erent PCB manufacturers to choose from, and there are
pros and cons to them all. Selecting one can be a daunting task the rst time
you are having a board made. This is especially true since there is no one thing
that would make one stand out above the rest, and most manufacturers
provide roughly the same services.

You need to weigh many di erent factors including cost, turnaround time,
scale of order, ease of interaction, and added features such as as fun-colored
boards, exible PCBs, or certi ed lead-free production.

To give some hypothetical real world examples, one manufacturer might be


really cheap because they batch your jobs together with dozens of other jobs
and produce them all at once. However, they have no real board options to
choose from. Additionally, they only do this once a week, and they also use the
cheapest possible shipping, which makes turnaround times very slow.

Another manufacturer might cost a lot more, but they can get you a board in 3
days. However, they are set up exclusively for low-volume production with fast
turnaround times and can't cheaply produce hundreds of boards.

A third manufacturer might produce thousands of boards cheaply and have


fast shipping, but they might not speak the same language as you and
ordering is challenging.

In short, you need to weigh the various considerations and decide what is
important to you.

Often, word of mouth is the best way to nd a PCB manufacturer. Ask your
friends who they have used to have their PCBs made. If your friends don't
make PCBs, or you have no friends, Adafruit has created a list of popular
manufacturers and explain some of the pros and cons of each.

Lately, I have been having my boards produced by PCBWay. I nd their prices,


quality, and turnaround times to be reasonable at the small scale at which I
am working. I should note that I am in no way a liated with their business, I
just personally choose to use them.

Ultimately you just need to pick the manufacturer which looks like it might
work best for you.

Circuit Board Design Class: Page 43


Another thing to keep in mind when working with low-volume production is
the cost to make one might be roughly as much or the same as the cost to
make ten. A lot of the initial charge is setup fee, and producing addition
boards might be possible at little to no cost.

In my opinion you should always order more than one in case one is corrupted,
you assemble it wrong, or there is a design aw and that you need to debug.
Five is a fairly safe number and not too excessive.

Wait

After your board is submitted to the manufacturer and you have paid them a
bunch of money, the only real thing left to do is wait. I do not recommend
compulsively checking the mailbox, or online tracking information. Worrying
about whether or not your board has errors is also not helpful. It is best to
forget about all of this for a while and nd something else to do.

Circuit Board Design Class: Page 44


Lesson 5: Assembling the Board

The board has nally arrived! Hooray!

Now is time to assemble it. It is not until you actually begin to assemble the
board that you can tell whether or not you designed it correctly. In theory,
everything should be perfect and this should be the easiest part of the
process.

However, chances are that for the rst board you designed, you will likely
encounter a mistake or two. If this is the case, don't fret. This happens to
everyone sooner or later. So, let's start to put the board together and see how
you did.

Assemble the Board

It is best to start with the parts that sit closest to the surface of the board, and
work your way up. For instance, I install the resistors, diodes and ICs rst. I then
install the taller components like the capacitors and transformer last.

Circuit Board Design Class: Page 45


Assembling the board this way helps keep parts ush to the board when
installing them as the weight of the board is holding the part down. If the part
is not well sandwiched between the board and the work surface, it may end up
dangling by its leads above the surface of the board.

The nal components I attach are those that are external to the board itself.
Obviously, not all circuit boards have parts external to it, but many do.

Power it up and see if it works. If it works, great! You are basically done.

If it does not work, keep reading.

In an ideal world, everything about your board would be perfect the rst time
around. However, there is the chance that no matter how much you checked
and double-checked your work, something is wrong. In my case, the rst
board I made had an incorrect footprint for the transformer.

Circuit Board Design Class: Page 46


With some modi cations to the transformer I was able to make this work. I just
bent the mounting pins back, and jammed the leads through and I was able
to make it work.

I ultimately decided to x this footprint issue in the Eagle design software, and
pay to have a second version manufactured.

Fortunately, the footprint issue was my only error. However, there are others
you might encounter.

Another common problem is the board simply not working at all. The rst step
to resolving is to visually inspect the board and determine you have installed
the correct components and all of your solder joints are good.

Assuming this all checks out, visually inspect the traces to ensure they are all
routed correctly. If everything seems correct, this is where having additional
boards comes in useful.

On an empty circuit board, test the connections for continuity with a


multimeter to see if they are connected. You should de nitely also check any
vias for continuity to make sure they are actually passing the signal through
the board from side to side. Often shoddy vias can be the source of errors.

If nothing at all seems to be wrong, perhaps the rst board is simply corrupted
or has a corrupted component. Construct the second board and see if it works.
If it does, you are good to go. If not, you likely got a bad batch of a particular
component or are somehow damaging something during fabrication.

Debugging corrupted components is well outside the scope of this class.


Instead, I recommend when constructing future boards, lower the heat on
your soldering iron, use proper anti-static part handling techniques (such as a
grounding strap), and procure a new batch of components.

The other problem you may encounter is that the board mostly works but is
doing something unexpected. In this case, it is time to go back to the
breadboard, compare it to the board, and really consider what is happening in
the circuit.

Circuit Board Design Class: Page 47


One Last Thing...

One unexpected thing that you might nd is that the circuit on the PCB works
better than the circuit on the breadboard. This is typically because there is less
noise in the circuit on account of the shorter connections and a ground plane.
In my case, the guitar pedal I am building sounds much better on the circuit
board than it did on the breadboard.

If this is the case for you, think of it as a gift.

To complete this class, post a picture of the PCB you made in the comments
below.

If you post an Instructable using your circuit board and it gets featured, I will
also add it to the list of example projects for this class.

Circuit Board Design Class: Page 48

Вам также может понравиться