Posts Tagged ‘embedded circuits’

Learning to Make a PCB

Wednesday, April 20th, 2011

Over the past few weeks I have been working on creating my first PCB (printed circuit board) for a project called Emote. The process has been extremely rewarding, though at times also frustrating. The potential offered by using PCB is pretty amazing. It makes electronics much smaller and opens up numerous design possibilities.

There are many reasons why I wanted to design my own PCB: there are good free PCB design tools available, numerous high-quality tutorials for these tools exist online, and the cost of fabricating a PCB is pretty reasonable.

Here is a high-level tutorial with an overview of the entire process with links to the various resources so that you can learn how to make your own PCB.

Getting Set Up
The first step is getting set-up by downloading and installing a PCB design application along with the appropriate libraries and extensions. Here is a list of the applications I used, along with associated libraries and extensions.

Eagle CAD [link to site]. This is the design software where you can create schematics and boards. I found this application felt counter-intuitive at first since I am accustomed to Adobe creative suite type tools. After about 10/15 hours of use I got used to it and start to enjoy the work. What I am trying to say is that there is a learning curve but don’t get discouraged.

Sparkfun Eagle Library [link to download].  this library is extremely useful, especially if you buy stuff from Sparkfun. It also contains a large number of components that they use frequently on their own boards. If you plan to use any of the tutorials I list below then this is a must. Here is Sparkfun’s own description and instructions: “This is the collection of all the components SparkFun designs with and therefore components and footprints that have been tested. Unzip and place the SparkFun.lbr file into the Eagle\lbr directory. If the above link does not work, google ‘sparkfun eagle library’ to get the latest collection.”

Sparkfun Eagle CAM File [link to download]. This file should be used along with the Sparkfun library. Therefore, if you download the library file make sure to get this one as well. Here is their own description and instructions: “This file is responsible for creating the gerber files for submission to a PCB fab house. Place this file in the Eagle\cam directory.”

Sparkfun Eagle Shorcuts [link to download]. The shorcuts in this file are used in the tutorials that I reference below. I did not use them but you should make up your own mind on whether or not to download the file. “Place this file in the Eagle\scr directory.”

Though I only used the Sparkfun library in my project, there are several other libraries out there that you should know about. Here are the other two most popular libraries:
Lady Ada’s Eagle Library [link to webpage]
Microbuilder’s Eagle Library [link to webpage]

Designing a PCB
Once you have installed the software and placed the library and extension files in their proper locations, you are ready to start up Eagle. As I next step I recommend that you go through the Sparkfun tutorials, which are easy to follow and comprehensive.

Eagle, an Overview. Before you jump into the Sparkfun tutorials here is a quick overview of how Eagle is set up. This high-level overview will provide some context for the tutorial links featured below.

Eagle handles the design of components and boards separately. Components are always created within libraries. In order to create a new component you need to create a new library, or add the component to an existing library. Boards are created within projects. It is important to note that the term board is used to refer to one of the standard views within Eagle.

Components and projects all contain two standard views: schematic view and the board view. The schematic view provides abstracted information about a component or board. Component schematics are comprised of pins, outlines and labels; board schematics are composed of components, electrical links between components, outlines and labels.

The board view provides an accurate model of the physical features of component or board. For a component the board view includes the physical location of the pads for each pin, the overall dimension, and any other important markers. For a board this view features the physical location of each component along with wire connections, drill holes, plates, and all other relevant specifications for fabrication.

When designing a component or project in Eagle you always create the schematic first. The schematic feature is actually a great planning tool for any DIY electronics project. Schematics are created first because they enable you to plan your circuit conceptually before working on the physical design.

Sparkfun Tutorials. Now that you’ve got a rough understanding of how Eagle works here are some tutorial from Sparkfun that will walk you step by step through the process of creating a schematic, design a PCB layout, and making a custom part for your project. I’ve also included a link to a tutorial where they share common issues they’ve encountered in during their many years of experience.

PCB Fabrication
Once you have gone through the tutorials above and finished designing your first board you will be in an excited hurry to get your board printed. You are almost there but be patient. Before I even get into the next steps I recommend that you do the following checks on your board:

  • Check all electrical connections to make sure there are no incorrect overlaps. It will cost you money and time if you don’t catch it before you fabricate.
  • Print out your board design on a piece of paper and check to make sure that the size of all components are correct, especially if you are using untested component designs.

Geber Files. To fabricate a board you need to generate Gerber files. The process for generating these files is covered in the Sparkfun tutorial about designing a PCB. These files are the industry standard for PCB fabrication. For a 2-layer board Eagle will generate 7 files (assuming you are using the Sparkfun CAM file). All files need to be submitted to the fabrication house.

Here is the extension for each Gerber file along with a brief description of its function:

  • GTL: top copper layer, holds location of electrical connections (i.e. ‘wire’)
  • GTS: top soldermask layer, holds edges of solder mask that protects from bleed overs
  • GTO: top silkscreen layer, holds text and lines that will be printed onto board
  • GBL: bottom copper layer, same as top layer but for bottom of board
  • GBS: bottom soldermask layer, same as top layer but for bottom
  • GBO: bottom silkscreen layer, same as top layer but for bottom
  • TXT: drill file, holds the location of all drill holes on the board

It is important to review your Gerber files before you send them out for production. Unfortunately, I have not found any good free Gerber file readers for Macs. There is a an online Gerber viewer available at http://circuitpeople.com/, unfortunately, it does not let you view multiple Gerber files layered on top of one another. If you know of a good Mac Gerber file reader please leave a link in the comments section.

There is a great online service at FreeDFM.com [http://freedfm.com] that processes Gerber files and provides feedback regarding issues, and even fixes some of the problems automatically. This service is provided by the guys at Advanced Circuits.

Fabrication Options. There are many different PCB fabrication houses around the country (and beyond our borders). Below I’ve included the two that have been recommended to me. Another option is to create your own PCB at home. Here is a link to a tutorial that shows you how to do just that. A few friends of mine have used this approach successfully.

First and foremost, Advanced Circuits [http://www.4pcb.com/]. This is where I will be sending my first PCB for production later this week. This place was recommended to me by Paul Rothman, one of the residents at ITP. They provide great deals for students ($33 full featured 2-layer prototypes), and they also offer really fast turnarounds on their bare bones boards.

Next up is BatchPCB. I have not used them either. I have listed them here because they seem to have an interesting business model and I have seem a lot of stuff about them on Sparkfun (I will admit much of it was their advertising).