PCB CNC

aus Metalab, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Wechseln zu: Navigation, Suche

Introduction

CNCs can facilitate in the creation of PCBS:

  • Manual etching and then using CNC to drill automatically.
  • Cutting out the board , to have round PCBs, or similar.
  • Automated isolation routing: From a PCB some surface parts are milled away, so that the connection copper area are left isolated.

Currently, all three steps are working on the Geilomat.

A rather badly isloated and drilled PCB done on the Geilomat. One can get much better results. Short-Circuiting Copper flakes are visible on the center left.

For the isolation, there is the normal approach, where all contours of copper areas are milled.

A normal milled PCB, using pcb-gcode eagle plugin

However much faster results can be obtained by milling the minimal path necessary to create the PCB-topology.

A voronoi milled PCB (left), a normally milled PCB, and a traditional PCB. Source

Some results are given in the soup of the Geilomat

Time Consumption

For a complete, dense EuroPCB, expect about one hour of total time:

  • 10 minutes for preperation, mounting and setup.
  • 15 minutes for drilling/cutting.
  • 20 minutes for the isolation of the bottom layer.
  • 5 minutes for flipping/remounting/aligning
  • 20 minutes for the top isolation
  • 10 minutes for manual overworking the board.

For an arduino shield, expect about 35 minutes:

  • 10 minutes for preperation, mounting and setup.
  • 5 minutes for drilling/cutting.
  • 5 minutes for the isolation of the bottom layer.
  • 5 minutes for flipping/remounting/aligning
  • 5 minutes for the top isolation
  • 5 minutes for manual overworking the board.

Pros/Cons

Pros:

  • Quite Faster than manual UV-exposing, etching and drilling.
  • Cool
  • No chemicals
  • Good for high currents, as wired are wide.
  • Cheaper PCB material. (Same area approx 50% the price)
  • PCBs of up to 30x20 cm. However, flatness is problematic.

Cons:

  • If the board is not mounted completely flat, the isolation might be not deep enough, and hence there are short circuits.
  • Sometimes, flakes of copper short circuit neighboring copper areas. Usually at corners. A knife helps.
  • Dust.
  • Loud.
  • Capacity between adjacent copper areas.
  • Hotter soldering is required, as there are no thermal pads.
  • 0805 SMD resistors work fine, although the solder locations are not visible any more. However, SMD chips are probably to small

Metaboard*.sh

Metaboard are some bash shell scripts, that will automatically create cnc-paths in the form of gcode files. The starting point is the eagle .brd file. Download of the files: Here

Usage: metaboard3.sh <options> filename filename: eagle brd file to process

-double: create a double sided gcode
-0.8:    use a 0.8mm mill head instead of a 0.6
-tight:  only offset by a distance of 0.3 mm
-filled: the eagle board file has a filed dimension area instead of lines

It calls a couple of external programs:

  • Eagle: to output the gerber files of the top and bottom layer
  • eagle: to call an ulp-program "drillbernhard.ulp" that outputs the drilling and cutting paths.
  • Eagle: to output the excellon drill files.
  • Visolate: To create the isolation paths. We use an unreleased version, that is scriptable.
  • Meanwhile, pcb2gcode was adopted and is used.
  • grecode To mirror the board for second side. (Grecode was created especially for metaboard.sh by --Bkubicek 09:55, 26. Jul. 2010 (CEST))

While these are called, a couple of windows will pop up and hopefully disappear again. only shell output will be produced. you will get some debug images also in the current directory.



Usage

The workflow splits into the following points:

  • Preperation: create an eagle brd file, copy it
  • Metaboard*.sh: create the gcode files for the geilomat
    • For the most current worflow use metaboard3.sh . It will require a 0.6 mm mill head, which is the best, as small IC holes are possible, and the tool length is so small that little sidewards forces are created. Hence, mill speed is larger than for 0.8mm tools.
  • Setup:
    • mount the board in the geilomat using double sided sticky tape.
    • On the flat milled wood area.
    • Which should be de-dusted first.
    • Double sided tape should not overlap, as this creates 0.1mm height difference.
    • Insert a suitable tool. Either a sharp Gravierstichel .

Gravierstichel.jpg

  • EMC-setup: home the machine "home all", "touch off"/set coordinate system so milling will be on the actual board

Bottom layer:

    • Isolation-milling: use the *back.ngc file created by metaboard3.sh
    • drilling: use the *drill*.ngc file created by metaboard3.sh
    • and cutting: use the *outline*.ngc file created by metaboard3.sh.

For single sided boards, the process stops here. Double sided boards are more sophisticated:

  • Flipp the board, mounting it in any usefull position.
  • Top layer:
  • note down two drill hole coordinates from the drill file, in mm units.
  • navigate using the joypad to the holes location on the flipped mounted PCB. Write down the coordinates of the special holes.
  • call "grecode -align x1 y1 x2 y2 X1 Y1 X2 Y2 *front*.ngc > tmp.ngc" to rotate and shift. Maybe you have to change the signs of the x1 and x2, depending of the pcb2gcode version you use.
  • Loading the tmp.ngc file just created
  • check if the gcode is now aligned with the pcb.
  • Isolate the top.

Removing the boards works best by using a twist motion around the z-axis. A brush should be nearby to clean the grooves.



Preperation

Then you start linuxcnc.org/ EMC on the computer next to the geilomat. You load the xxx_debug.ngc file and look at it really intense to see weather it is correct.

Then you press the home-all bottom, and the mill will move to its home position on the close left corner in front of you.

Mount the board using the thin double sided tape and stick it to the flat-milled piece of wood.

You want to insert a 0.6 mm mill-head in the Kress (a drill might break in the the sidewards cutting movement). Then you move to one location just above the mounted PCB, and set the working coordinate system using "touch off" in X and Y. For the Z, you move next to the PCB, and go tiny bit deeper than the lower board edge, and touch off at the lowest z-coordinate value, which should be -2.5 mm. For security, move up so that the mill can move freely thereafter.

Bottom Layer

Load the xxx_bottomdrillcut.ngc file.

For the drilling, set the Kress to speed "2".

Close the geilomat-latch. Turn the spindle on in EMC so that the Kress rotates. Press the play button and watch out for problems. Stop with the Stop button, or with F1. After an emergency off with F1, you maybe have to reposition the machine. Try not to be overwhelmed by all the noise and awesomeness.

Load the xxx_bottom.ngc file. Change the mill-head to a 0.1mm-0.3mm 30°-45° "Gravierstichel". Aproach an intended pcb corner location of the copper surface with the tool, home x and y according to the absolut locations visible in emc. Then slowly, using the joypad analog controls, lower the z axis so its nearly nearly touching. but not touching. And home z to 0.2mm. if first tests fail due to too little copper removal, stop the isolation process while its at height z=0, and rehome with 0.13, so it gets deepper at the next try.

Isolate the bottom. Then insert the 0.6/0.8mm millhead. Lower again very close to the copper, again using analog controls. set z=0, 0.4 mm deviation are no problem at all in this step. drill. cut.


Top layer

Then remove the board, remove the sticky tape, and clean the surface a bit. Mount a new batch of tape to the milled surface, and glue it onto the wood so that you see the to-be top layer.

load the xxx_debug file. Define two positions on the board that you identify both on the mounted board and the in the software. Only drill holes or cut-corners on the flipped top surface are suitable ! Read the coordinates of this points in EMC by clicking at the line and reading the X-Y coordiates in the gcode-text-view. Write them down.


Move the mill to the according locations in the flipped pcb, and write down the coordinates displayed in the 3d-window.

Open a konsole, call with the inserted coordinates:

grecode xxx_top.ngc -o xxx_topnew.ngc -overlay physicalPointAx physicalPointAy physicalPointBx physicalPointBy   GcodePointAx GcodePointAy GcodePointBx GcodePointBy 

This will produce a shift-rotated gcode file xxx_topnew.ngc. Touch off the Z-height to a suitable value. Load xxx_topnew.ngc and isolate the top.


Metaboard OUTDATED background info

This is the manual workflow, that is now obsolete as most steps are done by metaboard.sh.


The PCB have to be put on a plain-milled surface of at least 3 mm thickness, as we are drilling. The slightest bend (0.2 mm) in the PCB will probably move the "Gravierstichel" out of the plane where it would isolate. You need a 0.6 or 0.8 mm drill with a mounting diameter suitable for the Kress-"Spannzange", probably 3mm or 1/8 inch=3.1something.

We will create three ngc-files, one for the isolation, one for the drilling, and one for the final cutting. They will be glued together in one ngc file to align them graphically using Axis.

  • Prerequisites:

** download Visolate

    • On Windows, that is
    • create a shortcut, respecting your paths, with the target ""C:\Program Files (x86)\Java\jre1.6.0_07\bin\java.exe" -Xmx1024000000 -jar C:\Users\bkubicek\Visolate.jar" and the working directory "C:/Users/bkubicek/Documents/eagle/LEDlampe/"
    • download and install [java3d]
    • save Datei:Drillbernhard.ulp.txt into your eagle/ulp directory without the .txt extension. Its an ugly hack of the next original ulp...
    • save Datei:Gcode.ulp.txt into your eagle/ulp directory without the .txt extension.
  • Create the Eagle board. Route only on Bottom Layer.
  • Output using the cam-processor, using the "GERBER_RS274" device, and only the layers "bottom","pads", "vias". Filename gerber_boardname.
  • Output using File->RUN->(ulp-directory)->drillbernhard.ulp . Layer "bottom", Mill and cut deaktivated, drill active,outputfile "drill_boardname.ngc"
  • Output using File->RUN->(ulp-directory)->gcode.ulp . Layer "bottom", Mill and drill deaktivated, cut active,outputfile "cut_boardname.ngc", other parameters are nearly irrelevant.
  • Then start Visolate, load the gerber file, make if full screen. press Fit. Fix Topology. Make toolpaths. Output file as "isolate_boardname.ngc"
  • Then comes the joining of the three ngc files: Create a new ngc file starting with
M8 ; turn on spindle ; adjust to your mill
F450
G90 
G21 
G0 Z2.54 ; move up to 0.1 inch above
G0 X-0.24 Y-0.24   ;change this to align the drill holes with the the isolation path
G20
;; end head

then add the content of isolate_boardname.ngc without the m5 m3 tail. The isolation has relative coordinates, so we have to set a proper starting location via the previous head. Also, moving to the assumed Z=0 position would already mill the board, so we have to change the first Z move. comment out the first move to Z-0.01 it could look something like this

G20
G17 G40 G49 G80
G91
G1 Z0.1
G0 X0.10814 Y0.28534
;G1 Z-0.1 ;; uncommented t
G1 X0.00392 Y0
;; end isolate

insert a commented line with an end program.

; G0 Z20 M2 ; program end to manual tool-change to drill

after the isolation we will insert the content of drill_boardname.ngc adjust the variables posdown to -2.1 posup to 1, feedown to 100,feedup to 200 after the cutting, create some blank lines and insert a section of cut_boardname.ngc, namely the part between (Start cutting wires) and (finished). This movements cut out the pcb from the surrounding. Maybe you have to invert all Y coordinates because of the mirroring


The complete file then should have some head, the isolation, the drilling and the cutting.

  • Open this ngc file in axis, and adjust the relative position of the drills to the isolation by the G0 X Y in the head, saving and reloading in axis.
  • after all is good, remove the commend right before the drilling, to have the the program stop there. Reload in axis. Insert a 30 Degree 0.1 or 0.2 mm "Gravierstichel", home the machine, touch off at a suitable location, and start the program.
  • If the isolation is not deep enough, touch off z in lower height, and restart.

Then Change to a 0.6 mm drill with a 3.12mm 1/8 inch holing diameter, touch of Z again, and re-insert the comment right before the drilling.

  • Reload in Axis, scroll to the line right before the drilling, right click->run from here.
  • do all the drilling and sidewards cutting.


  • if you really want things to be perfect, you could locate the most outwards line in the isolation, and move them deeper Z-0.1 ->Z-0.12 and the following relative up-movent as well Z0.1 ->Z0.12. By that, there will be no copper close to the cutting locations.

Links

PCB milling

Hello, Make Magazine!