• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Want to get organized in 2022? Let Dokkio put your cloud files (Drive, Dropbox, and Slack and Gmail attachments) and documents (Google Docs, Sheets, and Notion) in order. Try Dokkio (from the makers of PBworks) for free. Available on the web, Mac, and Windows.


Designing PCBs

Page history last edited by Kris 8 years, 10 months ago Saved with comment

Desinging PCBs

The good news is that it’s entirely possible to make PCBs using only free software!


Designing your board in Eagle:

This guide assumes you have already designed up your schematic and layed out a board in Eagle. For an introduction on how to do this check out the SparkFun eagle tutorials listed at the bottom of the page.

There are extensive amounts of free resources available to make using Eagle easier, such as parts libraries, user code and custom design rule checks. Check out some of the links  listed in the appendix.

Generating Code for the CNC mill

The CNC mill requires G-code which contains the toolpath of all operations to be done in manufacturing the board. The following works through the steps of creating the g-code.

Installing PCB-Gcode

You can download it directly from the manufacturer’s website here, but for best results grab the ULP.zip file attached below to get PCB-gcode with sane settings based on the space’s mill. PCB-Gcode is written in User Language Program, a C like language for creating custom addons to the software.

Note: It’s a good idea to put addon ULP files in a separate folder and set up eagle to point to that directory too. That way if you upgrade eagle you don’t have to worry about losing your settings.

Add the routing path to the edge of the board

Eagle knows what the PCB traces and hole sizes of the components are, however you need to define the size of the board and tell eagle which parts should be routed free at the end of the operations.

  • Use the ‘wire’ tool and make sure it’s drawing on layer ’46 – Milling’, with a width of 1mm (or whatever routing bit you choose)
  • Draw the outline of the board, taking care to remember the tool width
  • Feel free to add chamfers and remove 90* corners from the board, the mill can cut most shapes easily

Ready to Generate G-code

Generate G-code

  1. Use ‘File-->Run’ and then select ‘pcb-gcode-setup.ulp’
  2. Look at the settings and confirm that you are satisfied with the parameters (if you’ve downloaded the space’s ULP.zip then this should be fine)
  3. Click ‘accept and make my board

This generates the following files for both the bottom and top layer
The etch files contain the toolpath for the PCB traces. The drill files are for holes in the board, and the mill files are for routing the board free after completion. Be careful not to confuse the bottom and top layers.

You can now take the G-code files and run them on the CNC as described in Cutting PCBs.

Visualising code (optional)

As an optional intermediate step, you can use software (such as NC plot) to visualize the toolpaths before loading them into Mach3 and cutting.

The toolpaths for a milled board

Tips for Milled boards

  • Make sure the traces are wide enough. 16 thou or larger is a good size. (Note: confusingly a ‘mil’ is not anything metric. It’s 1/1000th of an inch! Just call it a ‘thou’ to avoid confusion)
  • Avoid 90* angles in your traces where possible. Put nice 45* points in to avoid the copper lifting.
  • Make sure vias are reasonably large. 0.5-0.7mm or larger with big pads.


Next steps, having a PCB manufactured professionally

Most fab houses accept ‘Gerber’ files for board manufacture (http://en.wikipedia.org/wiki/Gerber_Format).

Steps to do:


Resources for PCB manufacture

Eagle Tutorials

Sparkfun’s tutorials are first rate:

A great guide for the beginner is here:


Eagle Resources & Addons


G-code appliations


Manufacturing Tutorials


Gerber Viewers


Comments (0)

You don't have permission to comment on this page.