From HacDC Wiki
Precisely manufacturing circuit boards with the CNC Mill can be high-quality, cheap, and fast.
The ideal tool for the artwork is probably gEDA. Start by making a schematic, convert it to a pcb file, export that as a gerber file, and use pcb2gcode to convert to gcode.
Place the following lines (or similar) into a file called millproject in the same folder as the gerber files. Then execute pcb2gcode in that folder.
# You may want to uncomment and change those in local project files front=Project.top.gbr back=Project.back.gbr outline=Project.outline.gbr drill=Project.plated-drill.cnc # The board outline is 10mil wide, no holes fill-outline = yes outline-width = 0.0433071 #1.10 mm bit. # parameters for isolation routing / engraving / etching #offset=1 #voronoi regions (commented out) offset=0.0433071 #1.10 mm bit. zwork=0.0492126 #1.25mm above table. Boards usually >1.5mm thick. zsafe=0.19685 #5mm above table. mill-feed=2.95276 #75mm/min. Always go slow here. mill-speed=10000 # parameters for cutting out boards cutter-diameter=0.0433071 #1.10 mm bit. zcut=0 #Right on the table. cut-feed=2.95276 #75mm/min. cut-speed=10000 cut-infeed=0.00393701 #Lowers Z 0.1mm each pass. # drilling parameters zdrill=0 #Right on the table. zchange=0.19685 #5mm above table. drill-feed=0.984252 #25mm/min drill-speed=10000 drill-front=true milldrill=false
The resulting *.ngc files can be loaded onto the CNC mill's dedicated computer and into the controller software (Mach3).
- The drill.ngc file may not include M3, particularly if milldrill=true is used. Uncorrected, this breaks the milling bit.
- The pcb2gcode utility does not support drill-front and milldrill simultaneously. Consequently, you may want to ignore/delete the toolchange commands (matching regular expression ^T.* ) in drill.ngc.
- Mach3 seems to go about some funny business loading ngc files. For best results, explicitly set the first line of an ngc file before starting.
- Milling the back side of circuit boards requires somewhat precise alignment. However, this is definitely possible.
- Newer versions of gEDA offer direct pcb file to gcode conversion. This is untested, and does not seem to offer as much control over the results as pcb2gcode.
- All areas around the copper traces (excess copper) should be grounded (ie. tied to a power rail), and wires will need to be soldered to power, input, and output connections. Be sure to include enough space in your design to accommodate this.
Touch off the Z axis to 0.0 while it is above the milling surface. Then execute your NGC file, and carefully observe the results step by step. Practicing on air this way greatly reduces the risk of making coasters or damaging the mill.
Copper Clad Board
Ideally, we are milling isolation paths between PCB traces on a copper clad board. These boards can be obtained at RadioShack, and other places.
The narrowest possible spade bit should be used for milling high-quality circuit boards.
Low quality boards may get away with wider spade bits.
Setting "zwork = 0" and using a spade bit allows extremely fine isolation paths to be developed after multiple passes. This technique is sometimes helpful for surface mount devices.
First touch off the mill's Z axis to 0.0 when it is barely touching the copper clad board. Now execute a PCB milling NCG script. After milling a pass at this depth, all traces should be clearly visible but not electrically isolated.
With the first milling pass complete, execute "g0 z-0.001", and touch off the mill's Z axis to 0.0. Executing the NGC script again will repeat the PCB milling at a slightly lower depth.
Finally, blow/brush all dust off the PCB, and test traces for electrical isolation with a continuity tester. If none of the traces short circuit, switch to an ohm meter, and make sure all of the traces are completely open circuits. It is not uncommon to find multi-megaohm connections between traces.
If the isolation paths are not electrically isolated, mill another pass, going slightly deeper. Once electrically isolated, mill one more pass to ensure long-term reliability and minimize soldering issues.
Some high-quality board have already been manufactured at HacDC, and will be added to this wiki as examples.