eagle

Designing Circuit Boards

This tutorial provides some pointers for designing PCBs using Eagle. (If you just want to order copies of an existing design, see my tutorial on ordering PCBS.)

barebones-pcbVersion 2
Left: A “bare-bones” PCB, consisting of copper laminated onto a substrate. Right: a PCB complete with solder-mask and silk-screen.

Understanding PCBs

A printed circuit board (PCB) consists of a number of different layers of different materials. The electrical connections themselves are made of a thin layer of copper, etched to form the pattern specified by your design. The copper is laminated onto a substrate, usually FR4, a composite of fiberglass and epoxy. Simple circuit boards have two layers of copper, one on either side of the FR4 or other substrate. More complex boards will have multiple layers of copper on either side giving, for example, four or more total copper layers. (Very simple boards, particularly those designed for home etching or milling, may only have a layer of copper on one side.) For so-called “bare-bones” PCBs, the substrate and copper are the only layers.

Typical PCBs add a couple of additional layers, solder-mask and silk-screen. Solder-mask is a thin lacquer-like material (often green) that covers the copper. Typically, there are only holes in the solder mask at places where solder needs to be applied to the copper. (The solder-mask masks the solder, hence the name.) This prevents accidentally soldering to other parts of the circuit and reduces the risk of short circuits. Finally, a silk-screen (or “legend”) layer – typically white – allows for text, diagrams, or other helpful information for someone assembling or debugging the board.

For more information, see SparkFun’s PCB basics tutorial.

Designing Circuit Boards

There are many options for PCB design software, none of them great. They include:

Eagle Tutorials

I recommend the SparkFun Eagle tutorials, although they may not cover everything you need to know. Jeremy Blum’s Eagle tutorials are also worth checking out.

Parts Libraries for Eagle

If you want to use Eagle on your own, you’ll probably want to grab:

Sourcing Parts

Figuring out which electronic components to use is an art in itself. I tend to order from these vendors:

dip-rulersdip
A through-hole, dual-inline package (DIP) chip. The legs are spaced at 0.1″ intervals. (Photos by SparkFun Electronics, CC BY-NC-SA 3.0.)

tqfp-rulerstqfp
A surface-mount, thin quad flat pack (TQFP) chip. The legs are spaced at 0.8 mm intervals. (Photos by SparkFun Electronics, CC BY-NC-SA 3.0.)

Packages

One basic aspect to pick the right part is getting one in the size you want. These packages have many different names, which can make the process somewhat intimidating at first. SparkFun has a tutorial on integrated circuits that discusses packages for microcontrollers and other chips. In general, I’ve found that the smallest pitch (distance between adjacent legs of the chip) that’s feasible to solder by hand is the 0.8 mm of TQFP components. That is, you probably only want to use chips that are either DIP (through-hole components), SOIC (the largest surface-mount parts), or TQFP.

Small components, like resistors, capacitors, and LEDs, come in multiple small, surface-mount packages. A common one is the 1206 package, which means the part is 0.12″ by 0.06″. They get smaller – 0603 (0.06″ x 0.03″), 0402, 0201, etc. – but you probably want to stick with 1206 unless you really need something smaller.

milled-pcb
A milled PCB (sitting on a laser-cut piece of wood). The chips are an SOIC package, the resistors and capacitors are 1206 packages.

Designing PCBs for Milling

While ordering PCBs continues to get faster and cheaper, it’s sometimes nice to be able to make a PCB yourself. If you have access to a milling machine (like the Othermill), you can mill a custom PCB in an hour or two using a couple of dollars worth of material. This is particularly useful when you want to try out a new surface-mount component, as it’s a quick way to create a custom breakout-board.

There are some caveats though:

On the other hand, you can cut arbitrary shapes and cut-outs using the milling machine, which sometimes costs extra when ordering PCBs from a vendor.

dru64
Design rules for a 1/64″ end mill.

Design Rules

To tell Eagle not to put your traces too close together for the milling machine to cut, you can set the “design rules” (from the Edit menu). In the clearance tab, set all the distances in the “different signals” section to 16 mil (which is 1/64″). To check that your board layout satisfies these design rules, run the design rule check (DRC) on your board layout file. (You can find the DRC in the Tools menu or near the bottom of the left-hand toolbar.) You’ll want to cut out any holes in your board with the 1/32″ end-mill, meaning they need to be at least 32 mil (0.032″) in diameter.

For more information on the design rules for milled PCBs, see this tutorial from Other Machine Co.. (Although note that you can mill TQFP parts with a 1/64″ end mill, you just may need a custom footprint.)

Leave a Reply