Introduction: Laying Out the Board
Once you have your schematic drawn out in Eagle, it is finally 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
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
Once the board file is generated, it is time to arrange the components' footprints on the board. The idea is to keep the distance between the different 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 difficult to assemble later. On the other hand, the larger the board is, the more it will cost to manufacture.
You should be starting off with a jumbled mess of components and airwires. 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 ratsnest. 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 first 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.
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 differently.
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 fit 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.
A Note About Layers
Layers are different 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 different 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 different colors. By default you are viewing about two dozen different 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 (View > Layer Settings...) from the top menu bar.
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 off 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.
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 first 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.
Let's look at the left-hand side of the tool-bar. The first 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 different ways in which lines can be drawn between points. We'll come back to these in one moment, but first, I want to point out the "Width" drop-down menu. This specifies 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 different squiggles at the top allow you to draw different 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 figure 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.
A via 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-specific 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.
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 figure out how to route all of these wires, I'm instead going to add a 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.
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 finalized, it is time to add a ground plane. It may seem complicated, but it fairly easy to do.
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 confirm there are little blue lines connecting them to the ground plane. It's a bit like magic.
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.