PCB CNC: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
(Die Seite wurde neu angelegt: „==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 …“)
 
 
(61 dazwischenliegende Versionen von 4 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
 
==Introduction==
 
==Introduction==
 +
 
CNCs can facilitate in the creation of PCBS:
 
CNCs can facilitate in the creation of PCBS:
 
* Manual etching and then using CNC to drill automatically.
 
* Manual etching and then using CNC to drill automatically.
Zeile 5: Zeile 6:
 
* Automated isolation routing: From a PCB some surface parts are milled away, so that the connection copper area are left isolated.
 
* 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.  
+
Currently, all three steps are working on the [[Geil-o-mat|Geilomat]].
[[Bild:cncpcb.png|thumb|400px|A rather badly isloated and drilled PCB. One can get much better results.]]
+
 
 +
 
 +
For the isolation, there is the normal approach, where all contours of copper areas are milled.
 +
However much faster results can be obtained by milling the minimal path necessary to create the PCB-topology.
 +
 
 +
Some results are given in the soup of the [http://geilomat.soup.io/ Geilomat]
 +
 
 +
* 0805 SMD resistors work fine, although the solder locations are not visible any more. (you can use options to generate no voronoi patterns)
 +
* It is possible to have one wire between the 2.54mm piched pins.
 +
* Also 1.27mm pitch SMD chips are usually ok.
 +
* if you are really careful, you can even do HTSSOP (which is pitch 0.65mm) - but this needs proper milling equipment and a very flat surface
 +
 
 +
== Examples ==
 +
<gallery widths=400px heights=300px perrow=2>
 +
Bild:nicerpcb.png|A normal isolated result.
 +
Bild:cncpcb.png|A rather badly isloated and drilled PCB done on the Geilomat. Short circuiting copper flakes are visible on the center left.
 +
Bild:normalpcb.png| A usually milled PCB, using pcb-gcode eagle plugin. This can be done by metaboard3.sh -tight
 +
Bild:visolate.png|A voronoi milled PCB (left), a normally milled PCB, and a traditional PCB. [http://www.mit.edu/~vona/Visolate/Visolate-info.html Source]
 +
</gallery>
 +
 
 +
==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
 +
* 2 minutes for manual overworking the board.
 +
 
 +
For an arduino shield, expect about 30 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
 +
* 1 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.
 +
* Capacity between adjacent copper areas.
 +
* Hotter soldering is required, as there are no thermal pads.
 +
 
 +
 
 +
== Workflow Using gEDA pcb and pcb2gcode ==
 +
 
 +
The Workflow using the [https://packages.debian.org/wheezy/geda gEDA] suite and a seperate tool called [https://packages.debian.org/wheezy/pcb2gcode pcb2gcode] is well tested in the Metalab.
 +
 
 +
First of all you will create a PCB in a program called pcb. Then you will export gerber files from the pcb and generate ngc files with pcb2gcode. These ngc files can be read by linuxcnc.
 +
 
 +
For a Single Layer PCB you will run Steps 1,2,3,4 and 7 for a dual Layer you will run 1 to 7.
 +
 
 +
=== 1. Create the PCB ===
 +
[[Datei:Pcb layer groups.png|thumb|400px|grouping of layers in pcb]]
 +
gEDA's pcb is a complex tool to work with. It might not be as easy to use as other tools in the first place, but can do everything another tool can do.
 +
Normaly you will design the PCB as you would do normaly, just remember that you need some extra clearance because of the cutter diameter.
 +
 
 +
There is an extra step you need to do now. You need to group the layerers in a specific way:
 +
* All Bottom Layers go to one group
 +
* All Top Layers go to one group
 +
* Outline is one group
 +
 
 +
=== 2. pcb2metalab.sh ===
 +
 
 +
is a fork of the metaboard script. while it was stripped down to the very basics, it now only works with gEDA pcb files.
 +
Because of many chnges in the pcb2gcode tool, some things are now completly different than it was before! Be aware that now some files are generated with pre- and postamble, some are not. Please check and double check the generated g-code files before milling.
 +
e.g. there was a bug that the last line was a G53 G0 Z0, which mean on our CNC that the millhead would not retract but go down to the very bottom!
 +
 
 +
git clone pcb2metalab from here: https://github.com/reox/pcb2metalab
 +
 
 +
If you modify the Makefile and run make, it will build all necassary files for you. You can check the output of the gerber files with a tool called gerbv and there are also some png files for debugging.
 +
 
 +
=== 3. Milling of Bottom Side ===
 +
Now its time to go to the CNC and put in the PCB. Load the backside ngc file. Now you need to touch off the workpiece.
 +
Remember now two things: The coordinates in the pcb2metalab generated files are in inch and the PCB is not super flat!
 +
 
 +
=== 4. Drilling the Bottom Side ===
 +
The Next step would be to drill. Because the workpiece is already touched-off, it should go smoothly.
  
 +
=== 5. Switch Sides ===
 +
[[Datei:G10command.jpg|thumb|400px|The math behind the G10 L2 command]]
 +
This step is now crucial for the quality of the dual layer PCB.
  
 +
linuxcnc gives us a command called G10 L2. This command sets the coordinate system given by offsets of machine home point. If you know now two points in the original coordinate system (= the PCB coordinate system) and write down the coordinates that have these points in machine coordinates, you can effectively calculate the G10 L2 command.
 +
First of all you select two points in gEDA pcb. You probably want to choose two drill holes. Now you need to look up the workspace height (in the picture called <math>A_y</math>). Subtract the y coordinate from the workpiece height, these coordinates will be the original coordinates. You need to do this extra step because a) pcb uses a left-hand coordinate system and b) pcb2gcode calculates the y coordinates based on the workspace bottom line.
  
== Metaboard.sh ==
+
Now you enter G10 L2 P1 X0 Y0 R0 into the MDI field in linuxcnc. This will effectivly set the G54 coordinate system to the G53 (machine coordinates). but not the z offset (which is good because then you do not redo this).
Metaboard is a bash shell script, that will automatically create cnc-paths in the form of gcode files. The starting point is the eagle .brd file.
+
Use a tool of your choice to calculate the G10 command and enter it.
It calls a couple of external programs:
 
* [http://www.cadsoft.de/ 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.
 
* [http://www.mit.edu/~vona/Visolate/Visolate-info.html Visolate]: To create the isolation paths.
 
* [http://code.google.com/p/grecode/ grecode] To mirror the board for second side. (Grecode was created especially for metaboard.sh by --[[Benutzer:Bkubicek|Bkubicek]] 09:55, 26. Jul. 2010 (CEST))
 
  
While these are called, a couple of windows will pop up and hopefully disappear again.
+
=== 6. Mill the Top Side ===
 +
The top side can be milled like the bottom side, but because of the active G10 you do not need to touch of anything!
  
Possible issues:
+
=== 7. Mill the Outline ===
* Eagle sometimes stays on top: just close the opened .brd, and load your .brd again using the menu. If have no clue why this happens.
+
The outline is also milled like the bottom or top side. No extra step is needed!
* It might be necessary to have a parent project file in the same directory?
 
  
 +
== Workflow using eagle and metaboard.sh ==
  
=== Usage ===
 
 
The workflow splits into the following points:
 
The workflow splits into the following points:
 
* Preperation: create an eagle brd file, copy it
 
* Preperation: create an eagle brd file, copy it
* Metaboard.sh: create the gcode files for the geilomat
+
* Metaboard*.sh: create the gcode files for the geilomat
* Setup: mount the board in the geilomat, insert a suitable mill head.
+
** 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.
* EMC-setup: home the machine, "touch off"/set coordinate system so milling will be on the actual board
+
* Setup:  
* Bottom layer:
+
** mount the board in the geilomat using double sided sticky tape.
** drilling and cutting
+
** On the flat milled wood area.
** Isolation-milling
+
**Which should be de-dusted first.
* Flipping the board, mounting it.
+
**Double sided tape should not overlap, as this creates 0.1mm height difference.
* Top layer:
+
**Insert a suitable tool. Either a sharp Gravierstichel .
** Loading the top layer debugging file.
+
[[Datei:gravierstichel.jpg]]
** Aligning: Rotate and shift the top layers using grecode, so that the board is aligned perfectly.
+
* EMC-setup: home the machine "home all", "touch off"/set coordinate system so milling will be on the actual board
** Isolate the top.
 
  
 +
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.
  
Create yourself a directory in ~/gcodes/ and copy your .brd file there.
+
For single sided boards, the process stops here.
Then open up a shell window, move to the directory call
+
Double sided boards are more sophisticated:
metaboard.sh yourboard.brd
+
* Flipp the board, mounting it in any usefull position.
 
+
* Top layer:
If all goes well, you will obtain a lot of *.ngc files, that contain [[http://en.wikipedia.org/wiki/G-code Gcode]] for the CNC process. Also, a tmp directory will be created, where there are even more files.
+
* note down two drill hole coordinates from the drill file, in mm units.  
The files in the original directoy are:
+
* navigate using the joypad  to the holes location on the flipped mounted PCB. Write down the coordinates of the special holes.
* xxx_top.ngc: The top layer isloation paths.
+
* 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.
* xxx_bottom.ngc: The bottom layer isloation paths.
+
* Loading the tmp.ngc file just created
* xxx_drillcuttop.ngc: The top layer drilling and cutting.
+
* check if the gcode is now aligned with the pcb.
* xxx_drillcutbottom.ngc: The bottom layer drilling and cutting.
+
* Isolate the top.
* xxx_debug.ngc: A file so you can view the content of all the other files at once, to check for errors, or measure coordinates..
 
  
 +
Removing the boards works best by using a twist motion around the z-axis. A brush should be nearby to clean the grooves.
  
 +
=== 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: [http://kariert.org/files/metaboard3/ 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:
 +
* [http://www.cadsoft.de/ Eagle]: to output the gerber files of the top and bottom layer
 +
* <del>eagle: to call an ulp-program "drillbernhard.ulp" that outputs the drilling and cutting paths.</del>
 +
* [http://www.cadsoft.de/ Eagle]: to output the excellon drill files.
 +
* <del>[http://www.mit.edu/~vona/Visolate/Visolate-info.html Visolate]: To create the isolation paths. We use an unreleased version, that is scriptable.</del>
 +
* Meanwhile, [http://sourceforge.net/projects/pcb2gcode/ pcb2gcode] was adopted and is used.
 +
* [http://code.google.com/p/grecode/ grecode] To mirror the board for second side. (Grecode was created especially for metaboard.sh by --[[Benutzer:Bkubicek|Bkubicek]] 09:55, 26. Jul. 2010 (CEST))
  
=== Metaboard background info ===
+
While these are called, <del>a couple of windows will pop up and hopefully disappear again.</del> only shell output will be produced. you will get some debug images also in the current directory.
  
The PCB have to be put on a plain-milled surface of at least 3 mm thickness, as we are drilling.
+
== Hints ==
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''.  
+
=== VIAS===
 +
[[Datei:08ernieten.jpg|thumb|400px| larger "Kupferhohlnieten" ]]
 +
[[Datei:06ernieten.jpg|thumb|400px| smaller "Kupferhohlnieten"]]
 +
Milled vias form no automatic connection between top and bottom. You can solder them using a small copper wire. Or the magical Kupferhohlnieten.
  
* Prerequisites:
+
If you change the diameter of your vias to 0.8, you can use the 0.6 inner diameter "Kupferhohlnieten". if you have a double side-connected pin of you 0.7 mm you might want to use a 1mm hole, to use the larger "hohlnieten", where you can then insert a 0.7mm pin.
** download [http://www.mit.edu/~vona/Visolate/Visolate-info.html 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 [[https://java3d.dev.java.net/binary-builds.html java3d]]
 
** save [[Bild:drillbernhard.ulp.txt]] into your eagle/ulp directory without the .txt extension. Its an ugly hack of the next original ulp...
 
** save [[Bild:gcode.ulp.txt]] into your eagle/ulp directory without the .txt extension.
 
  
* Create the Eagle board. Route only on Bottom Layer.
+
Pins of through-hole mounted devices also do not form automatic top-bottom connections. This especially frustrating with the eagle autorouter, because I found no way of turning this off. Sometimes you can compensate by soldering also on the top side of the part, but very often there is really no space for that. Best thing is to manually overwork the board in eagle.
* 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.
+
[[Datei:goodpad.png|center|thumb|400px|How to make your solder easier.]]
  
* Then start Visolate, load the gerber file, make if full screen. press Fit. Fix Topology. Make toolpaths. Output file as "isolate_boardname.ngc"
+
=== Routing ===
 +
While the eagle autorouter tries to bundle wires closely together, for voronoi shaped pcbs, this is not so optimal.
 +
You can still use the autorouter, however I would recommend it only on the bottom layer. I use a 12.5 mil routing grid usually, and * for bottom N/A for top.
 +
Then I move the wires around, so that the sidewards distance is maximized. This is done by having arbitrary diagonals, and successively moving outer wires further outside.  
  
* Then comes the joining of the three ngc files: Create a new ngc file starting with
+
[[Datei:brdgoodpad.png|thumb|center|800px| Example of good (not really good, but sufficient) and bad wire placement". It is not a very good example, I will try to produce if there is time]]
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
 
  
 +
=== Mounting Holes ===
 +
Currently PCB2Gcode does not respect mounting holes, meaning that it would grow the wires possibly in a way that two different signals could be short-circuited by the screw. To prevent this, place a bottom wire-arc around the screw. Then it gets it's own "pad".
  
The complete file then should have some head, the isolation, the drilling and the cutting.
+
=== Isolation Distances ===
 +
If you happen to work with larger voltages, you need isolated gaps on the PCB. I would do that by drawing a filled polygon on the bottom layer, or a group of overlapping or connected wires, as if the isolation were a wire.
 +
After the milling, I would use a sharp knife to lift the copper from the board at a corner, and peel it off. If you know the trick, it works quite well.
  
* 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.
+
[[Datei:peeledpcb.png|thumb|center|600px|A peeled off PCB. In this case, it is not an actual isolation distance,  but just for the screws. You see here that I needed to peel off multiple areas. If I had connected the individual regions with overlapping wires, I could have saved some time.]]
  
* Check if whether the board is in a right orientation or if it needs to be mirrored.  This can be achieved by my gcode -filters: http://www.linuxcnc.org/images/fbfiles/files/grecode.zip  , see also this [http://www.linuxcnc.org/component/option,com_kunena/Itemid,20/func,view/catid,38/id,2288/limit,6/limitstart,12/lang,english/#2448 forum post]
+
==Links==
 +
[http://millpcbs.com/ PCB milling]
  
* 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.
+
[http://blog.makezine.com/archive/2010/07/voronoi_mapped_pcbs_using_visolate.html Hello, Make Magazine!]
* 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.
 
  
 +
== Further Things and TODO ==
  
 +
* [http://phk.freebsd.dk/CncPcb/ Z-Height compensation]
  
* 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.
+
[[Kategorie:Howto]]
 +
[[Kategorie:Heavy_Machinery]]

Aktuelle Version vom 23. Februar 2015, 20:16 Uhr

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.


For the isolation, there is the normal approach, where all contours of copper areas are milled. However much faster results can be obtained by milling the minimal path necessary to create the PCB-topology.

Some results are given in the soup of the Geilomat

  • 0805 SMD resistors work fine, although the solder locations are not visible any more. (you can use options to generate no voronoi patterns)
  • It is possible to have one wire between the 2.54mm piched pins.
  • Also 1.27mm pitch SMD chips are usually ok.
  • if you are really careful, you can even do HTSSOP (which is pitch 0.65mm) - but this needs proper milling equipment and a very flat surface

Examples

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
  • 2 minutes for manual overworking the board.

For an arduino shield, expect about 30 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
  • 1 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.
  • Capacity between adjacent copper areas.
  • Hotter soldering is required, as there are no thermal pads.


Workflow Using gEDA pcb and pcb2gcode

The Workflow using the gEDA suite and a seperate tool called pcb2gcode is well tested in the Metalab.

First of all you will create a PCB in a program called pcb. Then you will export gerber files from the pcb and generate ngc files with pcb2gcode. These ngc files can be read by linuxcnc.

For a Single Layer PCB you will run Steps 1,2,3,4 and 7 for a dual Layer you will run 1 to 7.

1. Create the PCB

grouping of layers in pcb

gEDA's pcb is a complex tool to work with. It might not be as easy to use as other tools in the first place, but can do everything another tool can do. Normaly you will design the PCB as you would do normaly, just remember that you need some extra clearance because of the cutter diameter.

There is an extra step you need to do now. You need to group the layerers in a specific way:

  • All Bottom Layers go to one group
  • All Top Layers go to one group
  • Outline is one group

2. pcb2metalab.sh

is a fork of the metaboard script. while it was stripped down to the very basics, it now only works with gEDA pcb files. Because of many chnges in the pcb2gcode tool, some things are now completly different than it was before! Be aware that now some files are generated with pre- and postamble, some are not. Please check and double check the generated g-code files before milling. e.g. there was a bug that the last line was a G53 G0 Z0, which mean on our CNC that the millhead would not retract but go down to the very bottom!

git clone pcb2metalab from here: https://github.com/reox/pcb2metalab

If you modify the Makefile and run make, it will build all necassary files for you. You can check the output of the gerber files with a tool called gerbv and there are also some png files for debugging.

3. Milling of Bottom Side

Now its time to go to the CNC and put in the PCB. Load the backside ngc file. Now you need to touch off the workpiece. Remember now two things: The coordinates in the pcb2metalab generated files are in inch and the PCB is not super flat!

4. Drilling the Bottom Side

The Next step would be to drill. Because the workpiece is already touched-off, it should go smoothly.

5. Switch Sides

The math behind the G10 L2 command

This step is now crucial for the quality of the dual layer PCB.

linuxcnc gives us a command called G10 L2. This command sets the coordinate system given by offsets of machine home point. If you know now two points in the original coordinate system (= the PCB coordinate system) and write down the coordinates that have these points in machine coordinates, you can effectively calculate the G10 L2 command. First of all you select two points in gEDA pcb. You probably want to choose two drill holes. Now you need to look up the workspace height (in the picture called ). Subtract the y coordinate from the workpiece height, these coordinates will be the original coordinates. You need to do this extra step because a) pcb uses a left-hand coordinate system and b) pcb2gcode calculates the y coordinates based on the workspace bottom line.

Now you enter G10 L2 P1 X0 Y0 R0 into the MDI field in linuxcnc. This will effectivly set the G54 coordinate system to the G53 (machine coordinates). but not the z offset (which is good because then you do not redo this). Use a tool of your choice to calculate the G10 command and enter it.

6. Mill the Top Side

The top side can be milled like the bottom side, but because of the active G10 you do not need to touch of anything!

7. Mill the Outline

The outline is also milled like the bottom or top side. No extra step is needed!

Workflow using eagle and metaboard.sh

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.

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.

Hints

VIAS

larger "Kupferhohlnieten"
smaller "Kupferhohlnieten"

Milled vias form no automatic connection between top and bottom. You can solder them using a small copper wire. Or the magical Kupferhohlnieten.

If you change the diameter of your vias to 0.8, you can use the 0.6 inner diameter "Kupferhohlnieten". if you have a double side-connected pin of you 0.7 mm you might want to use a 1mm hole, to use the larger "hohlnieten", where you can then insert a 0.7mm pin.

Pins of through-hole mounted devices also do not form automatic top-bottom connections. This especially frustrating with the eagle autorouter, because I found no way of turning this off. Sometimes you can compensate by soldering also on the top side of the part, but very often there is really no space for that. Best thing is to manually overwork the board in eagle.

How to make your solder easier.

Routing

While the eagle autorouter tries to bundle wires closely together, for voronoi shaped pcbs, this is not so optimal. You can still use the autorouter, however I would recommend it only on the bottom layer. I use a 12.5 mil routing grid usually, and * for bottom N/A for top. Then I move the wires around, so that the sidewards distance is maximized. This is done by having arbitrary diagonals, and successively moving outer wires further outside.

Example of good (not really good, but sufficient) and bad wire placement". It is not a very good example, I will try to produce if there is time

Mounting Holes

Currently PCB2Gcode does not respect mounting holes, meaning that it would grow the wires possibly in a way that two different signals could be short-circuited by the screw. To prevent this, place a bottom wire-arc around the screw. Then it gets it's own "pad".

Isolation Distances

If you happen to work with larger voltages, you need isolated gaps on the PCB. I would do that by drawing a filled polygon on the bottom layer, or a group of overlapping or connected wires, as if the isolation were a wire. After the milling, I would use a sharp knife to lift the copper from the board at a corner, and peel it off. If you know the trick, it works quite well.

A peeled off PCB. In this case, it is not an actual isolation distance, but just for the screws. You see here that I needed to peel off multiple areas. If I had connected the individual regions with overlapping wires, I could have saved some time.

Links

PCB milling

Hello, Make Magazine!

Further Things and TODO