Cadsoft Eagle is a multi-platform freeware circuit layout program. Lots of open source hardware is designed in Eagle, and it’s become a hobbyist favorite. We use it for all of our hardware designs.
There are several ways to turn an Eagle design into an actual printed circuit board (PCB). We’ll show you how to save Eagle designs as industry-standard gerber files that are accepted by any PCB manufacturer. You can use the gerbers to order a single prototype, or a full panel.
Introduction
Toner transfer is the beginners’ favorite way to make a PCB because the investment in materials is minimal. We’ve covered toner transfer before. Most PCBs in our how-tos are made with the photo-resist process. The photo process makes nice boards, but requires a bit of equipment; sensitized boards, developer, and an ultra-violet light source.
Some board manufacturers, like Olimex, make PCBs directly from Eagle .brd files. Most require a minimum order of one eurocard-sized PCB (100mmx160mm). Good if you need a few boards, expensive for a single experimental prototype.
The cheapest option is to submit gerber files like the professionals. Any PCB manufacturer will accept gerber formatted design files. Gold Pheonix sells 155square inches of PCB panel for $110. If you’re looking for something smaller, services like BatchPCB and PCB-Pool combine small orders and submit them as a full panel. Either way, you’ll submit gerber files to the board house. This is the process we describe.
Process overview
- Prepare the design.
- Create gerbers, generic files accepted by any PCB fab house.
- Verify that the gerbers are correct.
- Send the design for production.
Prepare the design
We’re going to walk you through the process of preparing our digital picture frame PCB for production. This design requires a double-sided board with fairly small traces.
Download the project archive (ZIP) from last week. Open the .brd file with the freeware version of Cadsoft Eagle.
The ground fill is empty when the file opens. Press the ratsnest button (or Tools->Ratsnest) to fill in the empty polygons.
Board manufacturers publish specifications outlining their production capabilities, such as the smallest possible traces, spacing, and drill size. BatchPCB has 8mil minimum traces and spacing, and 20mil minimum holes.
Don’t torture the manufacturer. Just because they advertise 8mils, doesn’t mean it’s safe to make every trace 8mils. Slightly larger-than-minimum tolerances will reduce manufacturing errors. The digital picture frame has 8mil traces around the tiny LCD connector, shown above. The traces are 8mils only until there’s enough clearance to use 10mil traces.
Use Eagle’s design rule check to make sure your board doesn’t exceed the manufacturer’s production abilities. Download the SparkFun design rules (DRU) for BatchPCB, or the Olimex 8mil (DRU) or 10mil (DRU) design rules. Click the DRC icon (or, Tools->DRC) and load the design rule file. Eagle analyzes the design and highlights any areas that violate the design rule parameters.
Correct any errors. Here, the spacing between traces is too close. Sometimes the spacing on a part footprint is too small to be manufactured. Sparkfun’s default footprint for the Nokia LCD connector had pad spacing less than 8mils. We edited the part library to make the pads smaller, and the separation larger.
It’s helpful to include part numbers on the printed silkscreen layer. BatchPCB prints a silkscreen on both sides. Be sure to see what your board house offers, some charge extra. Use the smash tool to unlink obscured labels, then move them to a better location.
Create gerber files
Gerber files are the PDFs of PCBs. Gerber files describe a PCB exactly as it should appear, agnostic of the display hardware. It’s a final production format that isn’t intended to be edited. We created our gerber files in Eagle using the procedure outlined in SparkFun’s Eagle tutorial.
The Eagle CAM processor writes gerber files, open it from the menu under File->CAM processor.
SparkFun has a script (CAM) that configures the CAM processor to make gerber files. Load the CAM script using File->Open->Job…
By default, SparkFun’s silkscreen configuration only includes the place layer. Our parts usually have labels on the names and docu layers, activate these layers on the top and bottom silkscreen tabs to add them to the output.
Click Process Job to create the gerber files.
The CAM processor creates seven files that we need.
- Top and bottom copper (.GTL, .GBL)
- Top and bottom solder mask (.GTS, .GBS)
- Top and bottom silkscreen (.GTO, .GBO)
- Drill file, 2.4 leading (.TXT)
Verify that the gerbers are correct
Verify the CAM output in a gerber viewer to make sure everything was positioned correctly. We followed SparkFun’s suggestion and used Viewplot.
Load the seven files with Viewplot. Be sure to specify the drill file type as 2.4 leading.
Check for errant vias, mirrored layers, and alignment. We’ve noticed that text added to the silkscreen layer is usually bigger than it was in Eagle. Correct any problems and run the CAM processor again.
When everything looks good, the board is ready for production.
Send the design for production
Zip the seven gerber files and submit them to the PCB fab house. Remember to tell them that the drill file format is 2.4 leading.
BatchPCB is a pooled panel service that sells space by the square inch. Other manufacturers and batch services require you to order at least a full eurocard. We use BatchPCB for prototyping because we never need the extra board space of a full eurocard, and we don’t mind the average 20day wait.
At BatchPCB, $2.50/square inch buys a PCB with silkscreen on both sides, unlimited vias, and a huge range of drill sizes; stuff that usually costs extra. BatchPCB’s minimum traces, spacing, and drill are similar to other prototyping services. There’s a $10 per order setup fee, but an order can include multiple designs. Shipping, even internationally, isn’t outrageous.
If you need a lot of the same board, look at Gold Phoenix. They manufacture boards for BatchPCB. A 100 square inch panel is $100, a 155 square inch panel is $110.
Create an account at BatchPCB. Click upload to add a new design. Name the design and upload the zip archive containing the 7 gerber files.
Verify that the gerber layers were successfully detected.
Verify that the correct size was detected.
The BatchPCB rule check ‘robot’ will verify that your design meets production standards, and send an e-mail in a few minutes. Since we ran our own rule check prior to sending the design, we can expect that everything will be fine. Click continue and you’ll have the option to order the board. For more help, see the BatchPCB help and support forum.
Receive your boards
Boards arrive from BatchPCB in about 20 days. Check the boards for obvious errors before soldering. Some manufacturers test PCBs, BatchPCB doesn’t. We’ve ordered PCBs from two of the popular hobbyist board houses, Olimex and BatchPCB, and all the boards have been satisfactory.
Taking it further
It’s easy to order professional PCBs using gerber files. Why not build that awesome DIY project you’ve been putting off?
What has been your experience with PCB fab houses?
UPDATE: the files have been moved! find them here.
Great article!
Excellent write up. Even if you’re not going to send it off to get 1000 boards printed, using CAD opens up great features like autowiring and checking for design errors.
very nice. hopefully one day there will be a way to get them pcb-prototypes cheaper in germany (less than 80$)! =)
I like batchpcb. The website needs a redesign and the order status needs to be updated in a more timely manor so the customer has a better idea when to expect boards to arrive. I’m sure its just growing pains. I’ve never received a bad board but I do suggest using larger than the min trace/space whenever possible. Sparkfun has a few pages on board design best practices where you can see some copper “spill” that shorts a trace to ground. Wider spacing cuts down this possibility and makes it easier for the QA guys to see.
Here is a useful tool:
http://www.freerouting.net/
Don’t forget to multi-up your designs to save money. There are free python scripts that will cram as many replications of your gerber design as possible into a given number of square inches. Many fabs charge by the square inch, and then do the very same thing, cramming a bunch of your designs (w/ other other ppl’s) on an even larger board. Don’t pay them for what you can easily do yourself.
What I hate about all the local board houses (canada, although US too) is that they charge literally twice as much if you want two different designs on the same board.
If I simply enlarged the first board to be twice the size, the quote is maybe 20% more.
Also, when dealing with prototypes, the majority of the quotes I get, the cost to go from say 5 boards, to 50 boards, is incredibly small. Say $500 to $550. What is the point of this? People will just order much more quantity than needed and the fab is screwing themselves over in labor costs + environmental impact IMO.
The only place I’ve dealt with so far that has a reasonable pricing structure for 4+ layer proto PCBs is http://www.myropcb.com. There is a NRE/E-test setup fee (~$200), and then a VERY reasonable cost per square inch for space + extras. Although if I am buying for the board myself, I’d probably go with 2 layer from gold phoenix :)
Actually, the reason the fabs charge so much less for multiple than the first is the bulk of the work involved is not in cranking out the production run, it’s in setting it up. A good majority of that first $500 is the setup for the process. The materials themselves aren’t expensive. This is where the agregators come in handy for small prototypes.
I’m sure Eagle is great, but what about KiCAD? It’s a great package,(I earn a living making PCB’s with it), it has fully integrated schematic capture and Gerber output, and it has versions for both Windows and Linux. Best of all, it’s totally FREE, as in FOSS, and has no pin count or board size limitations. Sounds like a natural for the hackaday community.
This seems like a good place to start for some advice. Anyone know where I should start if I wanted to make a linux computer from litterally scratch? a home designed PCB, a CPU/chipset, ROM or FLASH memory adapter, and access to a serial bus? Id like to build something that would sit in a tiny box hanging on a modem with a serial port out the other side. I want to learn the whole process. I am fluent in computer systems and linux in general ( I am an IT Manager and handle more than 20 linux servers ) but have never done PCB or system prototyping.
Thanks for any advice in advance. Hackaday rocks..
excuse the second post, I forgot to click the ‘notify me’
“We’ve noticed that text added to the silkscreen layer is usually bigger than it was in Eagle.”
Try enabling “Always use vector font” from the “Options -> User Interface” menu item. Should solve the mystery.
@THeOReos
Check out BatchPCB. The two boards in the picture were made and shipped to EU for $40US total.
That’s some excellent information and write-up, truly one of the best posts for a while. I just love this guides, like the series on parts … Please keep more like these coming, love it :D
@Ian Lesnet:
I can’t believe it. And everybody in Germany screams for more economical growth. I wonder how that’ll will work if it’s easier to import the stuff you need for half of the price in the US =)
politicians…
BTW: thanks for the infos =)
Very very good..
I do have a question that I haven’t been able to figure out (for years.. literally)
When designing a board that requires high current traces, how do you make the auto router route power traces that are wider than default?
I’ve already tried defining a class (called ‘power’) that specifies a trace width (0.07) but it still routes with the default width (much too narrow). Using the change feature is *not* an option because, often when I do this, the wider trace ends up coming into contact with another pad..
It seems silly that I should have to manually route these traces and correct routing errors like this when I should just be able to tell it how wide to make the trace and let it go. Am I missing something? I haven’t been able to find a ‘good’ solution to this problem..
Awesome! Thanks for the info. I’ll check it out
@dan:
something not too complicated (and with a lot of support in the web) can be this:
http://www.opencircuits.com/Linuxstamp
batchpcb used to be what sparkfun did. and when I started using it I threw in the trash all my PCB making tools. I usedto make 4 layer boards my self. but it’s far easier and cheaper to just send out the design to batchpcb and call it done.
One warning though. go 0.001 outside of the square inch and they charge you for 2 square inches.
The biggest problem I have is that I usually reorder the board 3 times. 20 days gives me time to make rev1, and then REV2. so I’ll have 1 “prototype” with wire wrap fixing things, and then one that is perfect and ready for sale. Yes most of my stuff I end up selling.
I made a killer MTG life counter that I regularly sell for $150.00 at tournaments. it’s amazing how much cash some geek will pay for some blinkey led displays and cast acrylic.
@joe
you wrote “there are free python scripts that will cram as many replications of your gerber design as possible into a given number of square inches”.
could you point me one? i would just love that. i am aware of this trick to save money and i do it at the job with another more professionel software. but with eagle, i though it was not possible…
@dennis
Your probably want something like GerbMerge. See:
http://claymore.engineer.gvsu.edu/~steriana/Python/gerbmerge/
and
http://www.ladyada.net/forums/viewtopic.php?p=15997
A bit unrelated, but anyone knows how to do hidden vias in Eagle? I could never figure it out. Do most fab house support it?
jenningsthecat, I agree with you on Kicad. Over the years I have used PCAD, Electronics Workbench, Circuitmaker / Traxmaker, Protel, Eagle, ORCAD, PADS, KiCad, gEDA and Altium Designer. Out of all of these, Eagle is the most convoluted reverse polish notation EDA software out there. I suspect the reason why it has caught on so much over the years in the hobbyist market is the price and feature set. In the past, the other free contenders (Kicad & gEDA) were too early in there development to easily get any real work done. I’ve tried Kicad again recently and it is getting much better. It is still a little lacking in the area of power planes. I would bet that in a few more Revs, it is going to start catching on as the best open source, multi platform, free EDA software available. I will admit though that the Eagle following has produced a huge amount of parts libraries though.
One point missed in this article is that the Gerber format is sucky, and there are things about manufacturing PCBs from gerber files that you need to know. One big one is that different CAD and CAM software (and manufacturing equipment for that matter) may process and display it differently. So, what you see on the screen on EAGLE might be very different than what the manufacturer sees if they use, for example, CAM Master. So, *and I can’t stress this enough*, make dang sure that you and the manufacturer share a common view of how the PCB should look. One way to do that is to generate images from http://www.circuitpeople.com, another way is to use the viewer recommended by the manufacturer (e.g. GCView, GView, GerbView, etc.). Both olimex and batchpcb are “build per files” services — meaning they aren’t going to fix your design for you. They probably won’t even look at it. For a higher level of service, yes at a higher price, a company like http://www.sunstone.com ensures that every design is looked at by a person before it’s built — a nice safety net for the lazy/busy (like me).
@keystoneclimber: “convoluted reverse polish notation” must by why i get along with eagle so well. die-hard HP guy here. i wonder how much work it really is to convert my eagle libs to kicad modules?
Here are the gerbers we submitted for the digital picture frame. This PCB cost $7.50 at BatchPCB.
@ian
Ya got an acid trap at about 1.605 X, 0.722 Y but it wasn’t going to hurt anything even if if did etch through. Anyone using the gerbers might want to fix it, just to make the fab happy.
@jproach:
As far as I understand there is a fairly high fixed tooling cost associated with producing any PCB. Actually running off boards is very cheap, but creating the tools (masks for the various layers) is relatively expensive. I think the reason this isn’t a big issue for BatchPCB etc. is because at a local fab house they will create a small set of masks specifically for your board while BatchPCB will make one big one with many designs, spreading the cost.
That’s the tradeoff if you want decent turn times. Some fab houses will keep your tooling around and give you a cheaper rate if you want more copies of a previously produced design as well, which is a nice bonus.
Thanks for a great guide and a very useful CAM script. Also thanks for the pointer to freeplot, much better than GC Prevue.
I wanted to get some custom t shirts prInted,and wanted to know If you or any body used usatees I heard they were good screen prInters. can I get some opnIons?
Non-existent customer service at Natwest and complete lack of any attempt at complaint resolution.
lol i love the drc (aka the caffienometer) cuz it shows you how awake you were when routing xD
but yeah, bigger traces are better cuz they offer less resistance
@medix, whenever you do power, it is recommended to use planes. A tool that is really useful in eagle is the configure tool (looks like a wrench). You click on that then click on the property you wish to assign, then whenever you click on a part/trace, it will assign that property. I believe it also sets the default for trace width if you go that route.
The default for trace-widths (and spacing) is set by (the greater) of the class dialog or the DRC. To set a particular group of nets (eg VCC & GND) to a different min trace size, assign them to a different class then use the class dialog to set a greater trace size.
Thanks for the tutorial.
Anybody know how to run the CAM processor so that the gerbers are output to a separate folder? It’s really annoying to have them mixed with the schematic and board files.
I used the CAM processor from SparkFun but got this:
BatchPCB is locking down. We are no longer accepting any floating files. Please clean up your uploaded file and resubmit.
We are only accepting the following list of file extensions:
* TopCopper – “.gtl” , “.cmp”, “.top”
* BottomCopper – “.gbl”, “.sol”, “.bot”
* TopSolderMask – “.gts”, “.stc”, “.smt”, “.stoptop”, “.tsm”
* BottomSolderMask – “.gbs”, “.sts”, “.smb”, “.stopbot”, “.bsm”
* TopSilk – “.gto”, “.plc”, “.sst”, “.positop”, “.leg”, “.slk”
* BottomSilk – “.gbo”, “.pls”, “.ssb”, “.posibot”, “.bsk”
* Drill – “.drl”, “.txt”, “.tap”, “.drill”, “.gdd”, “.drd”, “.cnc”, “.exl”
* KeepOut – “.gko”
* MiddleCopper1 – “.g2”
* MiddleCopper2 – “.g3”
* BottomStencil – “.gbp”
* TopStencil – “.gtp”
* Outline – “.outline”, “.oln”
BatchPCB Support
Anybody ever get this??
Project archive can be found here: http://www.whereisian.com/files/dpf.v1.zip
Providing Gerber files is definitely the right way to get a PCB manufactured. Be sure to use a Gerber viewer, which you can download for free, to verify your design before you send it. Most fab houses will run a number of checks to be sure there are not any issues with the design. If you simply send a board file, the fab house MAY be able to produce Gerbers, but then you will not have the opportunity to verify your design.
Ryan — I’d go one step more. Unless the design is for some reason secret I would take those gerbers and post them online for “peer/social review”. Correctness is one concern, but often there are substantial cost savings to be had with small tweaks (e.g. small increases in trace & space, widening long tracks, shrinking the layout, etc.). Getting more sets of eyes on a design improves the chances of getting the board made best, for least cost.
Thanx
Question about bottom silkscreen –
Should I be reversing the lettering?
Example: On the top silkscreen I put a “3”
On the bottom silkscreen I put a “E” (backwards 3)
-I haven’t seen much information on how this is handled by the manufacturers. Having good information on the bottom silkscreen can be tremendously helpful in troubleshooting. It prevents you from having to flip the board to determine what components are where.
Anyone have a fresh link to the files? Would greatly appreciate it!
Wanted to add. I couldn’t get viewport working to view the gerber files. On Win 8. I stumbled upon this useful tool.
http://circuitpeople.com/
That’s an amazing instruction.Very detailed and helpful. Thanks.
“We’ve noticed that text added to the silkscreen layer is usually bigger than it was in Eagle.”
The text is likely larger because the fab house converts the text from the eagle default of proportional text to a vector font, which is fixed width. In the properties of a text block, you can force it to use a vector font, and will get WYSIWYG results in Eagle.
i created gerbers. and there is one file that have the .dri format. first i thought it would be the drilling file. but i am not confirmed. can any one help me with this?