This page describes the open source toolchain, or series of tools, used to go from an idea for a circuit to a physical circuit board in your hand.
THESE INSTRUCTIONS ARE NOT WELL TESTED AND MAY HAVE MISTAKES. Feel free to improve it or email me. My email address is "[email protected]" where FIRST is "daniel" and LAST is "benamy".
These instructions are based on Ubuntu 12.04 LTS 32 bit because it's the most recent LTS (long term support) release. KiCad and Visolate also run on Windows, but I haven't gone through the process there.
- Design a schematic.
- Create a pcb layout for the schematic.
- Create gerber file(s) of the board layout. Details below.
- Convert the gerber files to G-code. Details below.
- Feed the G-code into the CNC Circuit Mill which carves your design into a blank copper board.
- Drill holes if needed for through-hole parts.
- Solder on components.
Designing and Laying Out a Schematic
Creating Gerber Files
- Install KiCad: sudo apt-get install kicad. This tutorial was written using version 2011-05-25-stable which is what's in the Ubuntu 12.04 repository as of May 18, 2012.
- Download an existing board design. Here's one that doesn't really do much but is a good test: sudo apt-get install subversion && svn checkout http://opendous.googlecode.com/svn/trunk/Abandoned_Designs/LevelTranslator ~/Documents/LevelTranslator
- Run KiCad: Alt + F2, kicad <enter>
- Open Documents/LevelTranslator/LevelTranslator.pro.
- Open the board in the PCB Editor (pcbnew). TODO screenshot showing which button that is.
- The opendous tutorial says to edit mask clearance at this point. I don't know what that means or if it's needed. Please update this if you do know or if you try it both ways and see what the difference is.
- Click File -> Plot.
- Choose an output directory like Documents/LevelTranslator/CNC Files/. If it asks if you want to use a relative path, say yes.
- Make sure the layers you want are checked and all other layers are unchecked. For this particular board, you'll want Component. Often with other boards you'll want Front or Back or both.
- Leave the rest as defaults. TODO screenshot.
- Click Plot.
- Click Close on the plot window.
- Close the PCB Editor.
- TODO Check gerber files for correctness. See http://code.google.com/p/opendous/wiki/KiCADTutorialCreatingGerberFiles.
- Close Kicad.
Converting to G-code
Visolate 3 looks like an interesting and user-friendly tool. I don't have any experience with it so I can't comment on how well it works.
- Install dependencies: sudo apt-get install --no-install-recommends openjdk-6-jre libjava3d-java libjava3d-jni libvecmath-java.
- Download Visolate from https://github.com/Traumflug/Visolate/downloads.
- Run it: Alt + F2, java -jar Downloads/visolate-3.0.1.jar <enter>.
- Load a gerber file: click "Browse", select Documents/LevelTranslator/LevelTranslator-Component.gtl, click "Load".
- If you don't see it, click the "Fit" button on the right just below the display area.
- Click "Fix Topology".
- Click "Fit" again if needed.
- Select "voronoi" or "outline" (on the right). Voronoi will try to figure out efficient cuts for the cnc mill, to separate the traces with the least cutting. Outline will make cuts that outline each trace so the board looks more normal.
- Click "Make Toolpaths" next to those options.
- When it's done processing, if you can't see the board, click "Fit".
- Click "Save G-Code".
- If you have more than 1 layer, repeat the process with the other layer(s).
- You can preview the G-code at http://gcode.joewalnes.com/ to make sure it looks right before sending it to the CNC Circuit Mill. Note: I haven't gotten this to work yet.
For more info or if these instructions get out of date, Visolate has good documentation at https://github.com/Traumflug/Visolate.
pcb2gcode is another tool to do the conversion. It's command line only and doesn't run on windows. If Visolate turns out not to work well, I'll investigate it further, document its usage, and possibly improve it.
gCncCam is one more tool which does this. It doesn't look like it's been updated in a few years so it's last on the list.
This tutorial is heavily based on the excellent Opendous tutorials at http://code.google.com/p/opendous/wiki/Tutorials.
Tons of info on all parts of the process can be found at http://reprap.org/wiki/PCB_Milling