CAD CAM EDM DRO - Yahoo Group Archive

CNC Milling PCB's

Posted by ian@e...
on 2001-11-27 01:19:25 UTC
Around 6 Weeks ago I decided as I had a CNC mill I should produce
PCB's by milling an isolation slot. During investigating the process
I posted to various news groups for information and several people
asked me to let them know the results of my searches. This is how I
finally got G code to mill and drill the first board. (Note I haven't
actually machined a real board yet, I guess that will be another
story). I decided early on I would like to first do a single sided
board, milling and drilling the bottom of the board with the copper
side up which meant I had to mirror all data. Something else I should
have decided early on was what units to work in. I would recommend
imperial units for a number of reasons despite being based in the UK.
I had a Gerber file generated from my PCB software so first I had to
convert it to G code. Someone suggested KellyCam for this and it
worked on a very simple file but not on the actual job I wanted to do
(the resulting G code cut the tracks where they should not be cut!)
and the author has suspended support for the time being. The next
suggestion was Eagle PCB software which has the capability of
generating suitable code. First I had to get the Gerber file into
Eagle format. I found 2powtool_gbr2scr1_20.exe in the user files on
the Eagle Web site and tried that. It would not import my files
properly. They came in OK but all 45 degree tracks were not joined to
the horizontal section of the same track although 90 degree tracks
were fine. I contacted the author Falk Stricker and by return
received a later version to try. Unfortunately that didn't work
either and so I sent my file to Falk. His support was first class and
within a day he came back to me and advised the problem was in Eagle
in that it was incorrectly identifying the tracks as being on
different circuits and therefore was isolating them. This problem
only occurs in Eagle 4 not 3 and the solution is to alter the wire
clearance in Eagles rules to 0. Having done this time my Gerber file
came in perfectly. Incidentally like a lot of processes in Eagle what
Falk's programme does is generate a script file. You run the
generated script from within Eagle to draw the board. Also by this
time I had discovered it was better to mirror the Gerber file in my
PCB software because I knew how to control the X value of the mirror
line which is something I still have not figured out how to do in
Eagle. I also discovered that it is much easier to use a Gerber file
in extended format that contains all the D code values otherwise you
need a separate file that contains all the pad and track size data.
By this time I knew more about Gerber format than I ever really
wanted to know. The next thing was how to generate the cuter path
around the Eagle tracks and pads. A search of the Eagle site came up
with outlines.ulp a user programme that did just that and it works. (
I did not know at that time there was a version of this on the
CAD_CAM_EDM_DRO group that produces G code directly, more of this
later) The version that comes with Eagle generates a script file that
when run produces a narrow PCB track on a different layer that runs
round the outside of all the actual circuit pads & tracks and if a
small cutter followed this track it would isolate the pad and track
just as I required. A couple of points if you intend to use it. In
the dialogue box that opens You must set Device to "Script", Width to
a value other than 0 (I used 0.1) & Layer to the layer your actual
circuit is on, 16 in my case as this is the "Bottom" layer in Eagle.
Also check exactly where the script file is going to end up. I had
real fun with scripts of the same name in different directories,
caused a lot of confusion to start with. Hit the OK button and once
again a script is generated. This can take a long time with a
complicated board on a slow computer. At first I did not think any
thing was happening so give it time. Eventually it stops and you can
run the script and the new tracks are generated before your eyes. You
get an error message about layers but it does not stop it working.
Eventually I hacked outlines.ulp to always produce a script of a 0.1
track to a named layer to avoid the error message. Now I had a narrow
PCB track to machine but how to get that to G code. At this time I
did not know about PENGUIN CNC web site that has a programme that
takes the Gerber code produced by the standard cam processor in Eagle
and converts it to G code. Why do you always discover on the Internet
that some one else has solved your problem AFTER you go through the
process yourself..... I searched for hours on Gerber and G code
isolation without success. Perhaps this is the "First Law of Internet
Searching". Fortunately the Cam Processor in Eagle is controlled by
an ASCII file that you can add to and after studying the
documentation I added a section called Fanuc and with a fair bit of
trial & error I got code suitable for my control software. I use Ahha
and that follows the Fanuc standard very closely. However there was
still a major problem. I could not get Eagle to output a decimal
point in the code which Ahha needs and despite a number of posts to
the Eagle news groups I could not find out if it was even possible. I
should point out at this stage I am using the free Eagle version so I
am not eligible for support from Eagle. By editing in decimal points
manually I proved that the code generated was good so I trawled the
web for a parsing programme that would put in the decimal point,
without success. I have done some programming so I put together a
simple programme using Visual Basic being the quickest I could code
in and after the usual debugging got a result that generated a copy
of the Eagle output with the decimal point. Hallelujah, the code
produces perfect tracking on my g code simulator. Now to drill the
holes. Well there is no drill information in the Eagle file produced
from the imported Gerber file so I went back to my original PCB
software. There it was Excellon output, great what does it produce
and how can you get mirrored data? Quick look at the Excellon file
and what is it, just a string of X Y data, no Z information , no
decimal point, and in my PCB software no means of mirroring. Back to
the Basic programme and add all the stuff to convert Excellon files
and also mirror around a specific value. Some time later I was
getting a result. A bit more debugging and I at last I am getting
perfect simulation with isolation milling and holes drilled in the
right places. This time I did not bother to search the Web and if I
had have done I would have found that Hans WEDEMER who is well known
on the CAD_CAM_EDM_DRO group has already written an Excellon to G
code converter available for down load from his web site. All I have
got to do now is rig up a high speed spindle and try it out. Having
got to this stage I also discovered during a web search that there is
in the CAD_CAM_EDM_DRO files section an Eagle programme called
outlines_gcode.ulp. I immediately tried it and it certainly generated
G code. The format was not quite right for my control and the
simulation did not look quite right but had I discovered it earlier I
would have pursued modifying that as it removes 2 steps from the
process that I have to go through. Still I guess that's life. Details
of all the CNC milling of PCB resources I have found which may be
useful to others:-

Eagle software free version at http://www.cadsoft.de/

Gerber Importer 2powtool_gbr2scr1_20.exe from Falk Stricker in user
files at http://www.cadsoft.de/

Outlines.ulp Comes with Eagle outlines_gcode.ulp at
http://groups.yahoo.com/group/CAD_CAM_EDM_DRO/files/MaxNC-
PCB/outlines_gcode.ulp

Gerber format to G code programme or direct web processing if
preferred by Henry Palonen at http://www.yty.net/cnc/

Excellon to G code converter from Hans Wedemeyer at http://hans-
w.com/

If any one would like the Fanuc section I produced to insert in the
Eagle.def Cam processor definitions file I can upload it to the files
section of the CAD_CAM_EDM_DRO
If any one would like the programme I have written let me know but be
warned it is pretty crude and being Windoze weighs in about 2.8 Meg
or the VB source which is about 47k zipped.
I know, it could probably be 100K for the executable in C but then I
would still be writing it..........
If any one else can add to this any other information or tips about
producing PCB's by CNC milling and drilling I would be pleased to
hear from them.

I hope this helps someone.

Regards Ian Eagland

Discussion Thread

ian@e... 2001-11-27 01:19:25 UTC CNC Milling PCB's captnorm3@j... 2001-11-27 17:08:53 UTC Re: [CAD_CAM_EDM_DRO] CNC Milling PCB's Tony Jeffree 2001-11-28 02:53:48 UTC Re: CNC Milling PCB's ian@e... 2001-11-28 03:23:40 UTC Re: CNC Milling PCB's ian@e... 2001-11-28 03:33:21 UTC Re: CNC Milling PCB's Christopher Coley 2001-11-28 07:36:42 UTC RE: [CAD_CAM_EDM_DRO] Re: CNC Milling PCB's Peter Homann 2001-11-28 16:11:42 UTC RE: [CAD_CAM_EDM_DRO] Re: CNC Milling PCB's Christopher Coley 2001-11-29 08:03:35 UTC RE: [CAD_CAM_EDM_DRO] Re: CNC Milling PCB's wayne_j_hill@y... 2001-11-29 10:28:38 UTC Re: CNC Milling PCB's Vincent Chan 2001-11-29 14:00:23 UTC Re: CNC Milling PCB's