This tutorial is meant to provide you with everything you need to know to design and produce your own add-on Printed Circuit Board (PCB). If you are wondering whether a PCB is needed or whether a simple bread board will do, ask yourself what will the add-on board be doing. A breadboard should be fine for building low speed digital circuits of about 1 MHz or less. At higher speeds however, the capacitances of the breadboard will prevent the signal lines from changing fast enough, causing all sorts of problems for the digital logic. You can draw an analogy to FPGAs versus ASICs: breadboards are slow but customizable, while PCBs are fast but permanent.
If you do need to run your external digital logic devices at a higher clock rate then breadboards will safely allow, you must first decide whether a PCB is worth the investment of time and money. Planning a PCB for the first time takes a lot of learning and a lot of reading, as you must ensure that your final design meets every possible design constraint. These constraints range from the spacing between holes, to the size of the board, to the placement of your decoupling capacitors (more on this later). If anything goes wrong, your group will be out the $150 dollars or so required for the manufacturing of the board, not to metion the time it takes to get it manufactured. If you think the benefits of PCB design far outweigh the risks and costs, then read on.
For a project of this small scale, with limited financial and time resources, you will probably be building a prototype PCB. This type of PCB has quite a few limitations that allow it to be manufactured over the course of a day at a comparably reasonable price, and will be the type of PCB described throughout the remainder of this tutorial.
A standard PCB consists of several layers of fibreglass pressed together, with places for chips and connections between them called traces. With a prototyping board, you will receive only the PCB from the manufacturer, and will need to mount all your components yourself. The two most common ways to mount devices to a PCB are “through hole” and “surface mount”.
Through hole mounting consists of drilling holes in the PCB, allowing wires connected to the chip to pass through the holes. These wires are then soldered onto the conducting circles called pads around each hole in the PCB, forming a solid connection between the chip’s pin and the PCB pad. These holes come filled with conducting material (usually copper) so that traces to the top and bottom pads of the hole are connected to both the chip and each other without having to solder both sides of the board.
In contrast, surface mounting consists of creating rectangular conducting pads on the PCB’s surface. The chip’s pins are then soldered directly to these pads. Obviously, these pads only exist on one side of the PCB, unlike through-hole.
Of the two methods of mounting components, through hole is much easier to solder and offers more room for error. However, since surface mount components are common for production designs while through hole is mostly used for prototyping, you will often find an abundance of components in a surface mount package. There may even be components you require that are not available in a DIP package. Try to have someone willing to solder surface mount components for you before you decide to use them in your PCB design, as the process is quite involved. Successful surface mount soldering will require at least a fine soldering iron as well as good technique, but these components were meant to be soldered using solder paste and oven.
It is also very important that, before you start designing the PCB, you either have all the components you will be mounting in front of you, or have detailed schematics of the components and their PCB layouts if available. It is also a good idea to verify the availability of the required components. Design your PCB to allow for some margin for error and perhaps even to accept a similar component if possible. It is very important that you lay out the pads for your devices correctly.
Connections between device pads are accomplished by traces, which are lines of conducting material (usually copper) placed on the surface(s) of the PCB, acting like wires. Traces must be wide enough to support the current travelling through them (see Amperage) and must be spaced out enough so they do not interfere with each other (more on this later). Obviously traces cannot cross or touch at any point. It is also a good practice to avoid sharp angles in traces (90 degrees or less) since this increases signal interference.
One of the limitations of a fast turnaround prototyping PCB design is that you will probably have only two layers of traces (the top surface and the bottom surface) to work with. This can cause difficulties in the routing of traces in complicated designs, so special care is needed as the number of traces needed increases. Some ingenuity is often useful to manually route traces effectively but auto routing should do a good enough job in most cases.
To connect a trace from one side of a PCB to the other, a VIA is used. A VIA is a small hole drilled in the PCB that is filled conductor, linking any traces connected to it on top to any traces connected to it on the bottom. VIAs are useful to alleviate routing problems by allowing signals that cannot be routed on a single side to use the other side or layers of the PCB.
One of the easiest things to overlook in a design, decoupling capacitors are a must for almost any high-speed digital logic chip. Decoupling capacitors are placed in between the power and ground inputs of a digital logic chip, preferably as close as possible to the chip itself. These capacitors buffer the input power voltage, preventing voltage source spikes from reaching and damaging the chip, and to reduce the effects of interference. They also provide localized current to the chip for driving output lines, making transitions smoother.
Often, chip manufacturers will provide a guide describing how their chips should be decoupled and how large or small the capacitors doing it should be. This documentation is unlikely to be included in the datasheet for a chip with many different models like SRAM. In these cases, there will most likely be a single document applicable to a wide variety of models.
One first confusing aspects of PCB design is the mixing of metric and standard units. The two most common way of specifying measurements like pin or pad spacing are in millimetres or mils. Be careful, these are not the same thing! A mil is the term coined for one thousandth of an inch, and is obviously a lot smaller than a millimetre (since an inch is much less than a meter).
There are not that many places you can get a PCB manufactured in Canada, and even fewer with both a reasonable price and turnaround time. Of them, Alberta Printed Circuits (APC) is probably the one you will be using, since it is the only prototype board manufacturer in Alberta. For the remainder of this tutorial, manufacturer generality will be sacrificed for specific, useful information on this manufacturer’s restrictions and procedures.
Some of the features, restrictions or special pricing specific to APC that you will
undoubtedly run into for prototype 1 boards (fast turnaround) are as follows:
· The PCB can be at most double sided, with no internal layers
· The PCB can have through-holes, surface mount pads, and VIAs
· The PCB cannot have solder masks (application of mask ink to expose only
certain pads or traces for soldering, effectively protecting masked traces)
· The PCB cannot have component masks (the white labelling you normally see on
PCBs to indicate where components should go)
· Each PCB feature (trace/pad width or spacing between traces/pads) must be at
least 8 mil in size
· Each PCB design has a setup fee (currently $67) as well as an additional cost
per square inch (currently $0.95 a square inch) regardless of how many boards you
actually make
· PCBs must be at least 1.5 x 1.5 inches in size
· PCBs must be ordered in multiples of two, and are cut apart for you
· There are eight free drill sizes, all others require an additional fee
· PCB designs with more than 24 holes to be drilled per square inch are subject
to an additional fee per extra hole per square inch (currently $0.01)
As listed above, manufacturing a prototype board will often place many restrictions on your design. While some are quite significant like how many sides/layers the PCB can be, others merely need to be planed for throughout the design. One of the most common examples of this is drill hole sizes. Since it takes time to change drill bits, the manufacturer restricts you to a certain set of free drill sizes. While other sizes can be paid for, it makes the most sense to just select hole sizes from the free pool and save money.
Now that you have all your components spec’ed out and understand the limitations of a
PCB prototyping design, you are ready to start designing your PCB. There are many
different CAD programs that will allow you to do this, varying in ease of use,
complexity, and price. A standard format for the manufacturing of PCB designs is
the gerber file. Many CAD programs are capable of creating this output format, but
check to make sure your favourite CAD program has this capability. Here is a list of
a few common programs that can design PCBs:
· OrCAD (www.orcad.com)
· Protel (www.protel.com)
· Eagle (www.cadsoftusa.com)
This tutorial focuses on Eagle, which has a freeware version that applies to non-profit
use with very few restrictions compared to the retail version. The main limitations are
4” x 3.2” board area, and 2 signal layers. If you do not have access to a copy of Eagle
already, download and install it now. The following documentation will also be very
useful to you, since it explains the basic concepts of PCB design using Eagle:
· General Tutorial (
FTP)
· General Help (
FTP)
· Library Device Tutorial (
FTP)
The general idea is to create library devices for all of your chips and headers that will go on the PCB. You then place all the components into a schematic, where you can wire them up to show the connections you expect between them without bothering with routing. The next step is also the hardest, and involves placing all of the components in the PCB design and routing the traces, which often needs to be redone many times before you get a layout that works. The final step is to generate all of the files needed by the PCB manufacturer.
What follows is a list of topics which, in my experience, were not explained well enough in the documentation listed above.
Layer |
Description |
1 – Top |
The top layer of the PCB. The top and bottom layers are where traces are placed. Surface mount pads should only be placed on this layer. |
16 – Bottom |
The bottom layer of the PCB. |
17 – Pads |
The layer where through hole pads are placed. |
18 – VIAs |
The layer where VIAs are placed. |
20 – Dimension |
Any traces drawn in this layer are used to denote dimensions of the PCB board, generating errors if real traces or pads get too close to them. Artificial dimensions, like the size of a chip past its pads, should not be represented with this layer. |
21 – tPlace |
Any traces or text drawn on this layer are eye candy for the top layer, meant to aid in the identification of components. This layer can provide a visual clue as to the size of a given chip without imposing dimension restrictions on traces, ensuring chips aren’t placed too close together or dangle off the PCB. |
22 – bPlace |
Same as tPlace but for the bottom layer. |
In order for Alberta Printed Circuits (APC)
to fabricate your
board, you need to provide them with several files that describe how your PCB is laid
out, where the holes should be drilled, etc. The files requested by APC are referred
to differently than how Eagle refers to them, so consult the following mapping table:
APC File |
Eagle Equivalent |
Description |
Gerber Top Layer |
Component Side (.cmp) |
Features on the top layer of PCB |
Gerber Bottom Layer |
Solder Side (.sol) |
Features on the bottom layer of PCB |
Gerber Aperture Table |
Wheel File (.whl) |
Precise description of each feature type |
ASCII NC Drill |
Excellon Drill (.drd) |
Location of each hole to be drilled |
NC Drill Tool Size |
Excellon Rack (.drl) |
Types of drills to be used |
To generate the wheel, component side and solder side files, select the CAM processor from the File menu from the Board window in Eagle. Now, choose File -> Open -> Job and select gerber.cam from the dialog that pops up. By default, it should choose the correct PCB layers for placement into the component side (top) and solder side (bottom) layers. (See the layers section of this tutorial) Click Process Job, and the required files should be created, along with a .$$$ file that should be deleted. Likewise, to generate the Excellon drill and rack files, open the excellon.cam CAM processor job. Clicking Process Job should create these two necessary files.
Once all these files are created and you are satisfied with the design, download the text format order form from APC’s website. On the order form, you will specify contact information and the file names of the required gerber files. The files can be sent to APC via email and will take one business day to process if received before 11:00AM (Mountain time).
Last updated: March 25, 2003