Home > CNC Machine > CNC Milling Circuit Boards

CNC Milling Circuit Boards

I finally was able to mill a circuit board using my CNC machine. No more acid etching, but I never had much luck with it anyways. After milling the table and fixture, I was held up by the lack of 1/8″ collet, which Bosch doesn’t make. I bought a nice collet set from Think & Tinker/PreciseBits for a modest price and it seems it was worth it.  I also needed to buy a license for Mach3 to go beyond the 500 line code limit, since the code to etch the board was near 20,000 lines. To produce the G-code from an EagleCAD project, a nice script is available for free, http://www.pcbgcode.org/.  It installs like any other ULP script for EagleCAD and comes with docs to get you going, plus forums and plenty of other websites with tutorials.

First attempt and first scrapped board.

It was neat watching the CNC machine cut the traces and no broken bits or other catastrophes. Unfortunately, I didn’t take the time to properly zero the end of the 45 degree v-bit and cut too deep. This washed out the traces and pads, so it’s scrap. Before I realized this though, I tried fiddling with the settings for the pcb-gcode script and kept milling on the sheet of copper clad board and got a lot more bad traces.

This is only a test.

The correct way to zero the end of the tool was to use a piece of paper between the board and the tool and to jog down at a very low speed (about 3% of max). While the tool is going down, move the paper back and forth till the tip catches it. Now zero the Z-axis in the Offsets tab of Mach3 in one of special G-code offset codes of your choice. Then measure the thickness of the paper with calipers (my piece was .0035″) and subtract it from the Z offset (press the “Save Work Offset” button to bring up a dialog box that allows you to edit the coordinates). This puts the Z-axis 0 coordinate on top of the circuit board without any pressure. The X & Y coordinates are set to where you want to start milling the board, and can be done by eyeballing it, just don’t re-zero the Z-axis. Now the machine is set to mill.

Successfully milled board, for the smart CAN house project.

My settings for pcb-gcode script (not all are included, just what I changed):

Generation Options


Default = .0001″

Maximum = .0001″

Step Size = .005″

Etching Tool Size = .007″


Z Axis

Z High = .5″

Z Up = .1″

Z Down = .002″ (someone posted an excel file in the pcb-gcode forums to calc this, I set mine .001″ higher and it worked)

Drill Depth = .065″ (go a little deeper than the board thickness)

Tool Change

X = 0

Y = 0

Z = .5″ (don’t leave as 0 or the machine will drag the end of the drill bit across the board between tool changes)

Feed Rates

XY = 10″/min

Z = 5″/min

Change any other options you need, then hit “Accept and make my board”. All the files generated will be placed in the project folder with the board. Check out the readme file in the docs folder for explanations, it was helpful. I’ll probably try setting the Maximum Isolation setting to something higher, so the slivers between close traces are removed. I’m sure I’ll update with more progress, or at least to show of stuff I made.

  1. June 1, 2012 at 7:59 am

    BEAUTIFUL! Thanks for this post. Great job!

    • June 1, 2012 at 10:54 am

      Yeah that’s them. I just ordered some 90 degrees, so I’ll see how those go. I read the wider angle is supposed to give better results, so I’ll try it out. I need some larger drill bits too. All the holes were done with .025″ bit and the larger components don’t fit.

  2. August 8, 2012 at 10:28 pm

    I have tried with horrible results. PCBs cost so much. Do you know where i can buy them cheap? Also have you tested the 90 Deg. bit yet?

    • August 8, 2012 at 10:46 pm

      I just got some more blanks from ebay, abcfab i think the name was. I’ve been doing some stuff with wood and plastic the past few weeks, so not much with circuits. Also, I got a job doing all this so I don’t want to do it when I get home, but it has a laser cutter that I’ve been playing with, which is awesome. Anyways, I need to make something to accurately zero the tool tip to make nice boards before I go on. I have a few ideas I just need to work on…

      • August 9, 2012 at 11:05 am

        Thanks, I just ordered some. I plan on using the PCB itself with a wire in the corner connected to a homing switch and alligator clip to the bit and when it makes contact its zeroed. This way i dont have to change settings… since the PCB is conductive 🙂

      • August 9, 2012 at 11:28 am

        That’s what I’m planning on doing too, but have been distracted with other projects. I had some thoughts on making it nicer with a case and spring loading the circuit board. I’ll have to get back to it now that I finished my first paid job!

  3. August 9, 2012 at 1:13 pm

    Congrats on the 1st paid job! I know i was happy when getting mines. Ive done so much work now. Most of it is private but some of it is public. I do tons of work for Simerec.com

    I have done a job for Dipmicro (NDA)

    • August 9, 2012 at 1:20 pm

      Awesome, you beat me to it. It was an easy part, but it’s for GM so hopefully they like it and I can make a bunch of them.

      • August 9, 2012 at 3:21 pm

        Lucky you! GM is huge! I guess ill have to learn some more and add that to my resume 🙂

      • August 9, 2012 at 3:55 pm

        Most business have something to do with the cars in Detroit. My new job makes custom gauges for hot rods. The first thing i did was hack a speedometer to go up to 200mph.

  4. August 9, 2012 at 5:15 pm

    Awesome! Im glad there is business for some of us. I havent done anything in the last few weeks but work on my CNC. Im actually in the process of designing a new controller. I think i heard you mention you use MACH3 or something correct? Im thinking on making something for LinuxCNC which im sure would be usable in MACH3 since its parallel based as well (i think)

    Not completely sure yet.

    • August 9, 2012 at 5:28 pm

      The controller software is Mach3 and I’m using a Rockcliff driver board, which is parallel. I had to get a PCI adapter since they are practically phased out. So far it’s all been working fine. I played around with stepper drivers several years ago and burned a bunch of them out so I knew it would be a pain to try them from scratch.

      • August 9, 2012 at 8:42 pm

        Yeah seems like your average 4 axis parallel controller which is something i might make. By the way even if the computer doesnt have a Parallel port… most come with the header on the motherboard still which would allow you to simply buy a cable and have the port back… including serial ports as well… (mines does)

        Anyway.. Ill take a look into MACH3… and see whats the hype about 🙂

      • August 9, 2012 at 8:53 pm

        A nice motherboard probably does, I’m using a cheap dell I carried off when my old work closed. Mach3 is nice and cheap enough to actually buy. The 500 line code limit won’t let you mill more than a trace or two on a circuit board. Making the touch probe will give me a good intro into modding it. Sounds like most people automate the tool changes with custom code.

  5. August 9, 2012 at 11:08 pm

    I do that now 🙂

    I use something like:
    G0 Z20
    G04 P120
    (GO BACK, motor on)
    G0 Z-original +/- tool diff

  6. JIM
    August 14, 2012 at 11:42 pm

    To set your Z without running the bit into the part or using paper over the surface, move the bit down to a little under 1″ higher than the surface to be milled. Use a 1″ guage block and slide it against the bit. Bring the bit up .001″ at a time, or less if needed for a super true height. Once the guage block will just slip under the tool, the tool is exactly 1″ over the surface to be machined. Re zero the Z, plus one inch. Mach 3 has an offset page to so this and you just type in the guage block height and hit “Set tool” once it is at the correct height.

    Since you are bringing the tool up to set it, you wont risk piercing the paper, the board or chipping a carbide cutter while setting the z height.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: