Line Grinder
Gerber Plot to Isolation Milling GCode Software

Types Of GCode

 

Now that I've got Isolation GCode, What More Could I Want...

... well a lot more actually. Say you wanted to have your CNC Mill cut out the PCB board - you'll be needing some GCode for that because the Isolation code sure isn't going to do it. Fancy standing in front of a drill press for hours, breaking a drill bit ever couple of dozen pads? No? Well then, some drilling GCode would seem to be just the thing.

Different Types of GCode are Created for Different Purposes

Clearly a case can be made for the usefulness of lots of other types of GCode generated to handle all the other tasks associated with building circuit boards. The Line Grinder software generates a variety of different and useful types of GCode - each of which is designed to accomplish a commonly required task. The discussion below indicates the type of GCode generated by Line Grinder and why you might need it.

Bed Flattening GCode
Isolation cuts are made by engraving a thin line in the copper layer of a blank printed circuit board. The copper layer on these boards is only about 1.5 thousandths of an inch (35 microns) thick. Since the engraving bit which cuts the isolation lines has a conical tip, cutting too low necessarily makes a wider line. Cutting too high makes a thinner line and, if too high, can sometimes not completely cut through the copper - thus compromising the electrical isolation.

One of the most common problems is a wide variation in isolation cut widths between each end of the PCB board and much of this variation is due to the bed of the mill (a piece of wood attached to the real bed actually) not being completely flat and square to the toolhead. Milling the bed material flat before fastening the blank PCB to it and engraving the isolation cuts will improve the accuracy of the cuts dramatically since each part of the PCB is the same distance from the engraving tip. The Line Grinder software can generate Bed Flattening GCode which, when run, will mill flat a rectangular area on the bed so the blank PCB can be attached. Usually this GCode is run with a standard router bit in the toolhead on some scrap wood bolted to the mill bed.

Edge Milling GCode
Only rarely is it possible to purchase boards of exactly the required size. Normally one has to create the isolation circuitry and then cut the PCB to size with a band saw or shears. Well, you can still do that if you wish, but since you have a CNC mill you might as well have the option of using it to cut out the outline of the board. This is normally done with a special cutting bit called a chip breaker.

The Line Grinder can generate the GCode to run a chip breaking router bit around the outside of the PCB border. Note the router bit has to protrude through the bottom of the PCB board as it cuts. This will necessarily make a groove in the substrate on which the PCB is mounted - one of the many reasons a throw-away piece of wood is used to provide the bed.

Reference Pin GCode
Most complicated circuits require two layers (or more sometimes) in order to route all of the traces between the appropriate pads and pins. If you are attempting to create double sided isolation milled PCB's you will need to ensure that the pads and pins on the top and bottom are exactly lined up. This is especially important if you are drilling holes in the pads and vias.

The way the Line Grinder software deals with this "registration" issue is by a technique called Reference Pins. You define the Reference Pins by creating pads of a pre-defined size (you choose this size) on your PCB. Usually these are co-incident with the mounting holes for the PCB. No other pads on the PCB should be defined to that size. Because these pads are "through holes in the PCB" they will exist on both the top and bottom layers. The Line Grinder software finds these and then uses them to line up the top and bottom layers.

Once Line Grinder finds the Reference Pins in the Gerber Plots it can also generate GCode which will drill the Registration Pin holes in the PCB for you. This makes it possible to actually insert some physical pins through the PCB when turning it over in order to align it properly for the isolation paths on the other side. Note, if you don't actually want holes drilled through your PCB for the Reference Pins you can place the pads outside the border of the PCB. Line Grinder will figure this out and it will still work correctly. The only major requirements for Reference Pin pads is that they must be arranged in a rectangular pattern, the rectangular pattern must be parallel to the X and Y axis and the pins must be equi-distant from the left and right border edges (if the bottom layer isocuts are flagged with the Flip_X parameter) or from the top and bottom edges (if the bottom layer isocuts are flagged with the Flip_Y parameter).

Isolation GCode
This is the GCode which cuts the isolation paths in the PCB. Note that the Gerber files are always generated as a "top view". Since the isolation milling bit cannot reach through the PCB to cut the underside, this means the bottom layer has to be inverted left-right or top-bottom in order to be successfully cut. There is a parameter on the Isolation Cut File Manager entitled IsoFlipMode which controls this.

Drilling GCode
One of the most boring tasks involved with making a PCB (whether by isolation routing or etching) is the manual drilling of the holes in the pads. This can also be quite expensive as the drill bits are tiny and very easy to break.

The Line Grinder can take the Excellon drill files produced by the PCB program (these are usually output at the same time as the Gerber plots) and build a GCode file which will automate the drilling of the holes for the pads and vias. Also, it will ensure the origin of the plot is consistent with the origin of the Isolation routing cuts so that the holes being drilled actually hit the center of the pads. All in all, it is usually way easier to run a GCode drilling file than to manually drill the PCB holes.