Shawn Wallace is a MAKE contributor, artist, programmer, and editor living in Providence, R.I. He designs open hardware kits at Modern Device and organized the Fab Academy at the Providence Fab Lab. He makes iPhone synthesizers with the Fluxama collective and is a member of the SMT Computing Society.
This series of 3 tutorials introduces the use of CadSoft’s popular free-as-in-beer EAGLE PCB design suite. We’re learning the ropes by stepping through the design process for a basic Arduino-type AVR microcontroller development board, specifically the Really Bare Bones Board design by Paul Badger of Modern Device. In Part 1, we showed you how to lay out the schematic and validate it with EAGLE’s built-in Electrical Rule Check. Part 2 took you though routing the traces and pads of the board, and testing your design with the Design Rule Check. Here’s what the final board layout looks like from part 2:
In this final tutorial we’ll show how to add the silkscreen layer and produce the final CAM files (called Gerber files) suitable for handing off to the PCB house.
What will the next generation of Make: look like? We’re inviting you to shape the future by investing in Make:. By becoming an investor, you help decide what’s next. The future of Make: is in your hands. Learn More.
If you don’t change any of the settings, the Dimension, tPlace, tNames, and tValues layers will be included on the silkscreen. Too see what the silkscreen layer looks like, go to the Layers menu and deselect all layers except those four. Select the tOrigins layer as well, so you can manipulate the parts.
1.1. If you haven’t already, use the Smash tool to separate all the name and value labels from their corresponding parts. You’ll notice that for an unsmashed part (below left) you cannot move the labels independent of the part, but a smashed part (below right) has handles for the labels as well.
1.2. Move and resize the names and labels where you want them, or delete them with the Delete tool if you don’t want them.
Note: If you’ve deleted a smashed name or value label and want it back, just select the object with the “Show object properties” tool and deselect the Smashed checkbox.
1.3. Keep human interface in mind when labeling parts. Is this a kit, where each part needs to be clearly (and logically) labeled, or is it a preassembled board that doesn’t need individual labels? If the orientation of a part matters, make sure it is clearly labeled, and that the indicator isn’t covered by the part when it is placed.
1.4. In addition to names and values, you can use the graphics primitives to draw lines and shapes, and the text tool to add additional text. With the EAGLE text tool you’re limited to three font styles (below).
NOTE: When adding text to the board you should keep some general guidelines in mind. PCB manufacturers use different resolution meshes in their silkscreens, and generally use a screen that’s just fine enough to get the job done. If you have very fine lines they may not reproduce well; a general rule of thumb for text is that the smallest size should be 32 mil or so, and the thinnest line of a letterform should be around 5 mil. To achieve this, zoom in on your finest letterforms and use the Ratio property to adjust the text to a proper weight. A 15% ratio at 32 mil is a good minimum guideline.
If you want total control of the silkscreen image (say, to put your logo on the board), you can create a bitmap image and import it using one of the UDL scripts. The next section shows how.
First, get an PNG version of your board layout to draw on top of. This is easier said than done. One way to accomplish this follows, which assumes you’re using the Inkscape vector drawing tool. The important part is to get a PNG image of your board that is the same exact dimensions as the EAGLE representation:
Select only the Pads, Vias, Dimension, and tPlace layers.
Choose File->Export…->Image.
Fill in a resolution of 920 pixels per inch. Inkscape imports images at 92dpi by default (I’m not entirely sure why it isn’t 72dpi). We’re going to be scaling it down to 10% of the original size to get a nice sharp image.
Open vector drawing program (Inkscape in this case) and import the board PNG.
In Inkscape, select Object->Transform…->Scale and scale the imported PNG to 10% of it’s size.
2.1. Now that you have a nice clean image of the board as a background, draw the silkscreen image using the vector tools. Here’s an example.
Note: The text labels in this example are a little too small for my taste, although they are bold enough, and should reproduce. Too many designs don’t take into account the room necessary for nice readable text, but this design was a trade off between a board that would fit evenly on the center rail of a breadboard and one that had plenty of space for labels. However, a design using surface mount components is much more compact and allows for nice, readable labels.
2.2. In Inkscape, select just the black vector objects (not the original board PNG) and select Export. Export the PNG at a high resolution (I use 1200dpi).
2.3. Next convert that PNG to a black and white BMP image. If you exported it from Inkscape you’ll need to flatten the image as well to remove the transparent background. In a raster image editing program like the GIMP, open the file and then perform:
Select Image -> Flatten Image.
Select Image -> Mode -> Indexed… -> Use black & white (1-bit) palette.
Select File -> Export -> Windows BMP image (.bmp)
2.4. Next, return to EAGLE and open the ULP script that will import the bitmap onto a layer of your board. Select File->Run… -> import-bmp.ulp.
Specify the color you wish to import (black), select DPI as the format and enter 1200 under Dots Per Inch. Use the default layer 200, though you can import bitmaps to any layer you want, even the top and bottom copper or stop mask layers.
2.5. The script will import the bitmap onto the layer you specified, and will translate the image into hundreds of horizontal lines. You won’t be able to edit it directly, and all the lines must be moved as a group. It’s a little clunky, but here’s how to move the whole silkscreen image:
In the Layers menu, select only the “200 bmp” layer.
Use the selection tool to grab the whole image
Select the Move tool
Right click on one of the lines in the image and select Move Group.
Turn the other layers back on now that the image is selected.
Note: The ULP script will change your grid along the way, so be sure to set it back to something sane.
When you go to make the final Gerber files in the next section, make sure you assign layer 200 to the silkscreen section of the CAM job.
The files you send to the PCB manufacturer are in the Gerber file format, a standard CAM file format for PCBs. Gerber files are created using the CAM processor under the File menu. You’ll also need to create a drill CAM file in the Excellon format. You’ll need (at least) the following Gerber files, which are specified as either “Component-side” (top) and “Copper-side” (bottom):
Layer
File Extension
Component-side copper
.cmp
Excellon Drill CAM file
.drd
Component-side silkscreen
.plc
Solder-side copper
.sol
Component-side stop mask
.stc
Solder-side Stop mask
.sts
Note: Many services allow silkscreen on the top and the bottom of the board. To add a silkscreen design to the bottom you’ll have to add a new Gerber file to the CAM job with a “pls” extension.
3.1. To create the CAM files, open the CAM Processor from the File menu. Note that this tool is context-sensitive whether you’re in the schematic or board view, so make sure you’re in the board view. Open the excellon.cam job to create the drill files (with extensions .dri and .drd). You only need the .drd file; the .dri is just metadata.
3.2. Next generate the Gerber files by opening the gerb274x.cam job. The only section you should need to double check at this point is the Silkscreen tab; if you’ve added a bitmap layer (or don’t want a layer on the silkscreen), make sure to assign the correct layers on that tab.
3.3. To preview your files you’ll need a Gerber viewer tool. Gerbv is a good open source option if you’re on a Unix-based system, or you can use ViewMate on Windows. If you’re on a Mac Gerbv is a little tricky to get up and running, so you should try to use a package manager like MacPorts to install it. The easiest solution to previewing Gerber files is to use the free online tool from Circuit People.
3.4. Import the layers into your gerber viewer (Gerbv is shown below). I usually re-organize them from top to bottom to make it easier to proof:
.drd
.plc
.stc
.cmp
.sts
.sol
Turn each layer on and off and inspect, if you tweak the layout, rerun the CAM processor.
Note: If you move a part, remember to run the Excellon drill job as well. Otherwise your holes won’t match up with your pads!
3.5. Bundle them up and send them out. As great service for small runs is OSHPark, which grew out of the DorkbotPDX service and merged with Sparkfun’s BatchPCB service. The interface is well designed and service is quick and consistent, with a free shipping option. Your board will be bundled with dozens of others and will come back with a distinctive purple soldermask. If you need more than a dozen boards it is more economical to go with another service. There are many competitive options (and more popping up in the US); I’ve had good luck with the affordable PCBCart service.
Note: OSHPark and some other PCB services require an additional Gerber file that is not created by the default gerb274x CAM job. You’ll need to add a “Board Outline” section that represents the board outline. With the job open in the CAM Processor, select “Add”, then select just the Dimension layer. Change the file name to “%N.gko” and you’re good to go.
If you have any suggestions to add, or ways we can improve this article, please post in the comments below. Happy routing!
Shawn Wallace is a MAKE contributor, artist, programmer, and editor living in Providence, R.I. He designs open hardware kits at Modern Device and organized the Fab Academy at the Providence Fab Lab. He makes iPhone synthesizers with the Fluxama collective and is a member of the SMT Computing Society.
When you buy through links on our site, we may earn an affiliate commission.
Our websites use cookies to improve your browsing experience. Some of these are essential for the basic
functionalities of our websites. In addition, we use third-party cookies to help us analyze and understand
usage. These will be stored in your browser only with your consent and you have the option to opt-out. Your
choice here will be recorded for all Make.co
Websites.
Allow Non-Necessary Cookies
Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 16th iteration!