pcb isolation routing

PCB Isolation Routing

Having got my home made CNC up and running I was keen to try making PCBs using isolation routing. Here is a write up of my initial experiences of the topic, covering converting eagle schematics and gerber files to g-code as well as the milling process. I am very much a novice in these matters. For a much more in depth discussion on the subject, please refer to the pcb-gcode group on Yahoo.

Contents: Eagle to g-code, Gerber formats, Isolation Routing

Eagle to G-Code

The main application I use for PCB design is Eagle and the rest of this thread will concentrate on producing PCB's with this software.  However I will describe dealing with other formats.

Producing GCode from an Eagle board could not be simpler, thanks to the pcb-gcode.ulp Eagle script magnanimously provided by the worthy John Johnson Software.  The script can be downloaded from here or check on the yahoo forum.
This script generates outline toolpaths with relevant offsets of all the PCB traces and produces resulting gcode files for milling and drilling.

First of all, the scripts may need some tweaking.  But they are very well written and offer complete control of the whole process.   John developed the scripts with turbocnc in mind, which did cause me a couple of hang ups with Mach3 but these were easily sorted.   I have also changed the configuration files to use metric measurements.   The biggest change I did to get them working with Mach3 was to change the dwell time formats for G82 and G04 codes to use P prefix instead of #.
My modified include files : pcb-defaults-10bulls.h and gcode-defaults-10bulls.h

UPDATE: John Johnson has released a newer version of pcb-gcode which now has a nice configuration screen which allows the selection of the target control software, units and other parameters used in the gcode generation which should make my include files unnecessary.   Also, if you would like to discuss the script, offer improvement suggestions or share your own PCB milling experiences John has also started a discussion forum.

To run the script, open up your board layout in Eagle then enter...

run pcb-gcode C:\gcode\myboard

...or similar on the Eagle command prompt.

This will create a number of gcode files in the specified output directory.   All very clever! I especially like the 'step' feature which will generate progressively larger toolpaths offset from the tracks.  The script does generate 'flood fill' code files, but tweaking these offset tracks makes these unnecessary.

For a much more detailed explanation of the process, read John Johnson's readme.txt.

Here is a screen dump of a resulting board layout in Eagle.

Easy Peasy! ...but what about board layouts in other formats? I hear you lament!

Gerber to Eagle to G-Code

Time for another piece of 'cool' code.   This time Eagle PCB Power Tools by Falk Stricker available from here (scroll down to eagle power tools). I have so far found this software quite capable in the free demo mode but full registration is fairly cheap for larger designs.  This software allows importing of bitmaps, dxf and gerber board layouts into Eagle.

As a test job I decided to have a go at Alan Garfield's input daughter board for his PICStep 'optobob' board.   I downloaded the Gerber/RS-274X files for this board, the plan being to use Eagle power tools to import this into Eagle.

The files I am interested in are...
opto_input.pcb.output_back.gbr (Gerber/RS-274X)
opto_input.pcb.output_front.gbr (Gerber/RS-274X)
opto_input.pcb.output_plated-drill.cnc (Excellon?)

Use the Gerber->Eagle conversion program on each of these.   The screen dumps show the options I used.


I did find one problem in that the 'Use other Layer for Flash Apertures' would always place square pads to the 118 layer when Layer '18 Vias' was selected.   A quick and dirty work-around is to turn off this option so that all pads and vias are generated as tracks.  This works fine for isolation milling purposes.   I reported this to Falk, around midnight one night and received an email around 7AM next morning saying he would change that behavior.  Way to go Falk!

UPDATE: Falk has now corrected this in his next version which will be loaded to Eagle's website soon.

The aperture file for the Excellon import is pretty simple to construct.  The drill dimensions were copied from the top of opto_input.pcb.output_plated-drill.cnc file.

;Aperture file: S:\PICStep\gcode\aperture.txt
;Code         Shape         Size
D1001         Drill         0.0200in
D1002         Drill         0.0280in
D1003         Drill         0.0300in
D1004         Drill         0.0850in

This produces 3 Eagle script files.
Now open up Eagle, create a new empty board layout and run each of these scripts.   You may get messages to 'Connect Signals' or 'Can't place via on via', just OK these.   That's it!  You now have the board in Eagle.

Now run the pcb-gcode script again to produce your isolation routing and drilling gcode.

I did run into a bit of a strange one.  For some reason, the script inserted a spindle off+end program within the gcode.  This may be down to my misunderstanding of how the script should work, something particular about my board layout or a bug.  I will investigate into this.   I *think* these mark the true program end and any gcode thereafter is 'junk'.

Isolation Routing

Right then...it all *looks* very pretty on the screen, but will it work ?!
Off to the garage to find out!!!

I purchased a number of routing bits from www.megauk.com

From left to right...

  • 2 x small ball nose bits (unknown origin)
  • A 2mm RP series router bit
  • 2 x 0.8mm chip breaker router bits
  • A 1mm RP series router bit
  • and rather pricy 30 degree isolation routing bit
  • Not shown is the 60 degree router bit which, counter intuitively, routes finer than the 30 degree.

    These are all 1/8" turbo shaft bits.  To use them on my machine I knocked up a quick and dirty collet adapter to fit my 6mm die grinder collet.

    Before I got started I decided to re-surface my milling table.  This is probably a good idea if you are trying to skim off 35 microns of copper with any hope of accuracy.
    IMPORTANT! Make sure you set Mach3 to pause when it gets a tool change code.  I think the default is to press on regardless.  This will allow you to change drill sizes at the relevant points in the proceedings.  Also, change the dwell time to be in milliseconds, otherwise you will be waiting around a looooong time!

    With the board clamped I set the (...TOP.NC) program off and grinned like an idiot as I watched the traces begin to appear.  The first pass looked fantastic, but it soon became apparent there were some tracks and pads still joined when using the 0.8mm chip breaker.  I then generated another script to use the 60 degree bit which I estimated would give around a 0.3mm cut at 0.1mm deep.  That solved the problem.
    I was amazed at the resolution my rickety mill would resolve.  Even the thin text traces came out legible.   I couldn't help reminiscing over all those happy hours spent swearing at steaming Ferric Chloride I would no longer have to endure

    Next I ran the drilling code (...TD.NC), pausing every now and then to change drills when the code told me to (...get me another drill bit Monkey Boy!).  Once again nostalgia set in as I recalled the many noisy hours spent hunched over a Dremmel, dodging the occasional snapped drill bit.

    Phase 3 was the one I was dreading the most, flipping the board over and lining it all up ready for the back.   This turned out very straight forward.  I had made a note of the dimensions of the 3 mounting holes.   This can be done in Eagle by clicking the info button then clicking on the holes.   Pcb-gcode references the back face dimensions using negative X.  So all I had to do was send the mill to the hole offsets with a -ve X, jog down the z to line up with the drilled hole, then clamp the board down.

    I tried a couple of experiments on the back face, but in essence the plan is to run a fine routing pass using the 60 degree bit then a second set of nc files using the wider 0.8mm bit to open it all up.

    For the final step, I ran a bit of gcode to cut out the board rectangle using a 2mm bit.   I left a 0.2mm web to keep the board in place which was then cut out with a knife and edges tidied up with a few wipes of a file.  Could do with a wire brushing to remove small copper tails but this is by far and away the easiest and most accurate double sided board I have ever made.