PCB prototype milling using CNC 3020

PCB prototype milling using CNC 3020

posted in: CNC | 20

Making your own PCB prototypes without all the messing around with chemicals sounds like a dream come true. The availability of low cost and seemingly high precision engraving / milling machines could provide the ideal tool for this, but in practice things are not as simple or as good as they appear.

Ebay has a number of vendors selling desktop CNC mills, commonly called CNC3020. I think the 3020 refers to the size 30 x 20 cm. These are also often referred to as engraving machines, which is probably nearer to the truth than them being a milling machine. Prices start at around $600 (USD).

If you are thinking of buying one of these please read this whole posting, as there are various bits of important information, which I’ve inserted in what I think are logical places in the description of the unit and how its assembled, configured and used.

Models

The first thing to note with these machines, is at the time of writing there are two different variants available, the “old” and the “new” model.
The “new” / improved model has both different mechanics and different electronics to the “old” model.
This is an example of the “new” version.

The key difference in the mechanics seem to be a strengthened gantry on which the “spindle” / milling motor is mounted, with  a thick aluminum plate all the way across. I suspect there are other mechanical changes, but its hard to tell from the photos on eBay.

The other difference is the power supply / motor control unit. The “new” version seems to be housed in a black box, with a sloping front, where as the old version was in a blue box with vertical sides all the way around. The changes appear to be more than just the cosmetics of the box. The PCB’s in this box differ from the ones in the old model as well – however whether they are an improvement over the old version, or just an alternative set of boards, is hard to tell.

I’ve read a lot of postings about issues of the control unit “missing steps”. This is where the PC tells the control box to move the motor a certain number of steps, but the motor doesn’t turn as much as it is supposed to because the control unit has not passed the correct number of steps onto the motor. I’ve not personally experienced this issue, as it manifests itself with cutting head not moving as far as it should do in any particular direction. However I have found other issue where the cutting head was actually moving slightly too far. More on this later.

Assembly

My CNC 3020 arrived as a partial kit, but without a mechanical assembly manual. My unit came with a CD that contained some software and a word doc explaining in pigeon English how to configure the software, again… more on this later.

I suspect all these units arrive partially assembled, where the motors were not attached to the frame, and their control / power wires were not attached. However its a relatively simple process to attach the motors using the bolts that are supplied, and the unit even came with Hex / Allen keys to tighten up the bolts. You also need to fit the flexible couplers on between the spindle of the motors and the lead screws, but this also just involves doing up some small Hex screws.
One thing that was slightly odd about my CNC 3020 was that the 3 couplers were not the same design, but all had the same internal diameter for the motor and lead screw shafts. As the unit didn’t come with an assembly manual, I made a guess that the odd one out, of the couplers, should go on the main, back to front / Y axis lead screw motor, however I suspect it does not make any difference.

Once the motors are bolted on, and you guess which control / power cable goes to each motor, (you can work it out from which cable will nicely reach each motor), you can connect the 4 circular control / power cables to the back of the control unit, and connect the control unit to a PC via a Centronics printer cable.

Yes… This unit needs your PC to have a old fashioned Centronics / parallel printer port. If your PC does not have one, you are out of luck.

Buying a USB to Centronics adaptor cable will not work, as the software that is supplied with the unit directly generates square waves on the Centronic port’s pins, using a special Windows driver, and this will not work with a USB to Centronics adaptor.

Setup

Anyway, assuming you have an old PC, even a laptop which has a proper Centronics / parallel printer port, you should be OK; but please note, I am also using Windows XP, and I can’t comment on whether Windows 7, or Windows 8 etc, work even if you have a machine with the correct hardware.

The software that came on the CD with the unit, is “Mach3” except it is a “demo” / limited version, which seems to be quite old.

Once installed, you have to enter the calibration numbers as stated on any installation documents supplied with the unit. This is basically the number of steps that each motor needs to take to move the cutting head 1mm

The limitation of the software is that it will only process 1000 lines of GCODE data. GCODE being the standard language for CNC machines and is generated by all sorts of design packages.

The 1000 line limitation is something which is likely to be an issue for most users fairly soon after they start to try to mill anything other than some demo files e.g. the outline of the “Roadrunner” cartoon character, and the best option for most people is to buy the full / official version of Mach3, which at the time of writing, retails for $175 (USD).

There are other options, including using Linux to control the mill, and also to buy a dedicated USB to CNC adaptor – which replaces parts of the electronics in the control box; however I have not investigated these options as yet.

Once you have connected it all up, and calibrated the software, you should be able to move all 3 axis motors and do a test mill of the “Roadrunner” icon to confirm that everything is working OK.

Tip:  One thing I do to test a new set of GCODE is to set the Z  zero position of the unit to about 5cm above the actual milling bed, and without a cutter in the chuck, then run the GCODE without the spindle / cutter motor running.

Finally after quite some time you are getting slightly closer to being able to mill your own PCBs.   Generating the GCODE for the PCB is relatively simple. An open source package called PCB-GCODE (http://www.pcbgcode.org/ ) can convert either Gerber files to GCODE, or there is a User Language Program (ULP) for Cadsoft Eagle which will generate the GCODE “tap” files from within Eagle.

With the “etch” file loaded into Mach3, you can attempt to mill your first PCB, but first there are a few more hurdles to overcome 😉

Securing the PCB to the milling bed

The main problem with milling a PCB is how to secure the PCB down onto the milling bed. As you will be drilling holes through the PCB as well as milling away the copper, you will need to mount something like a small sheet of wood onto the milling machine, and mount the PCB onto the wood. The best thing I’ve found so far to mount the PCB onto is MDF. The MDF needs to be thick enough so that the drill can completely penetrate the PCB and not drill into the aluminum bed of the mill. If you are careful, you can probably use 3mm or 5mm MDF, however these are likely to be too weak to attach to the bed using the bolts supplied with the machine, so I normally use 10mm or even 12mm MDF, as this feels really secure and robust. MDF has good dimensional stability as long as it doesn’t get wet or absorb a lot of moisture, but should work in most indoor environments unless you live somewhere very humid.

Initially I used masking tape to hold the PCB onto the MDF, however this doesn’t work particularly well, as the edges of the PCB soon start to lift off slightly, as most PCB I have appears to be not entirely flat.

If the PCB is not absolutely flat you will have major issues with the milling process. This is because the normal cutting head for milling PCB’s is a 20 deg or 30 deg V shaped engraving tool, hence the width of the section that is milled is dependent upon the depth that the point of the cutter is below the surface. So if your PCB lifts off by, for example 0.5mm, this is going to cause the cutter to penetrate into the board by an additional 0.5mm, which will mean it cuts a path which is approximately 0.25mm wider than you expect (assuming you are using 30 deg V cutter), this can be the difference between a track existing or getting milled away.

CNC with secured PCB
CNC with secured PCB

The way I hold the PCB in place is to clamp down at least 3 sides of the board using steel plates. I bought some steel fixing plates from a DIY store, which are about 15cm long by 3cm wide and about 4mm thick. I’m not entirely sure what use they have in building construction, but if you overlap them onto the edge of the PCB by a 5mm (or a bit less) them screw them down onto the MDF, the PCB is prevented from lifting on any of the sides. Of course if you have a PCB which bows up in the middle you will still have a problem, so you should try to use PCBs that are as flat as possible, and even possibly flatten them before hand by storing them flat under pressure e.g. between some heavy books.

I’ve seen some examples on the web, where people just used a small clamp in the middle of each side, and I think this would be equally effective; but either way its very important to clamp the PCB onto the MDF as flat as possible.

Cutting tool height adjustment

The next important thing is to set the exact height of the cutting tool. For a while I’d been using a sheet of paper as a feeler guage, and lowered the cutting head a little at a time, until it was in contact with a sheet of paper placed on top of the PCB, so that I could feel definite resistance, when trying to move the PCB, however this isn’t really accurate enough.

A better approach is to use the a continuity meter (buzzer / beeper) setting in a normal multimeter to determine when there is an electrical connection between the cutting head and the PCB. To do this I attach crocodile chips to the PCB clamps and to the cutting bit, and slowly jog the cutting head height down 0.01mm at a time until my meter beeps, I then raise the cutter a few 1/100 of a mm until it stops beeping, and I know its very very close to zero.

Even with the PCB clamped down, there can also be minor differences in its height, so its best to do this Z height calibration in the middle of the area you are about to mill. There is actually a program which will scan the PCB using this electrical connection and re-map the Z height of the milling to take account of minor fluctuations in the PCB thickness / height, however to use it you need to modify the control unit to accept the continuity as the Z zero limit, and so far in practice I have not found it necessary to go to this level of complexity.

Milling

When you have finally calibrated everything, you can start to mill the board, and hopefully you will not have too many problem with board thickness or warp.

After the “etch” path has been milled, you need to change your cutting bit to a 1mm or 0.9mm PCB drill, and load the “drill” tap GCODE file. Its important to not loose the X and Y calibration when you are changing the cutting bit for the drill bit, otherwise it will be very hard to get the machine re-positioned correctly to drill the holes in the correct locations.

I have attempted to use the same continuity technique to calibrate the Z zero on the drill, but I think perhaps the drills come pre-coated with some varnish, as they are not good conductors when they are new.

Its also very easy to snap the PCB drill, by applying downward pressure. So under no circumstances “jog” the drill down onto the PCB surface when its not spinning, otherwise you stand a very high chance of snapping it. Trust me, I have snapped one drill this way, and snapped a second drill trying to manually drill out some holes which the mill didn’t drill completely through a board.

As the depth of the drill holes isn’t that critical, as long as its completely through the PCB, its safer to use the paper technique, with some thicker paper, to get the Z height about right, even if its 0.5 or 1mm above the board, and set the drilling depth to 2,3 or even 4mm to ensure the drill goes completely though the PCB. (Assuming you have a decent thickness of MDF below the PCB).

After the board has been drilled, then and only then, should you release the clamps are remove the board.

Results so far…

So far I have only milled single sided boards. Milling double sided boards is technically possible, however I can see a number of possible problems around the re-registration of the zero point (X,Y), as after the board is flipped over, it would need to be repositioned to within about 0.05 of a mm in both X and Y of its original position. This can probably be achieved by adding a calibration drill hole at 0,0 in the board GCODE file. However the other problem is rotation. i.e 2 calibration holes would be needed to ensure the board is not slightly rotated. Or perhaps some sort of metal jig could be bolted to the MDF prior to milling the first side, to ensure that the board is refitted in exactly the same location.

I’m personally very skeptical about the feasibility of doing this. I know it can be done, but I think it would take quite a lot of practice and experimentation to develop a process to make reliable double sided PCB’s a practicality.

However overall, production of single sided prototype boards is entirely possible on the CNC 3020, it just takes some time and effort.

20 Responses

  1. matthias lichtenegger
    |

    So I sum up:
    600USD for the machine
    150USD for the full version of mach3
    =750 USD
    + problems caused by parallel interface (Ok, on desktop pc’s you can buy a pci-parallel card) and problems with newer versions of windows (so I guess)
    So maybe it’s a cheaper/better solution to buy a (partial) set of a prusa i3 a rebuild it as cnc?
    https://plus.google.com/photos/+LukasNajmanCz/albums/6032859747514044753/6032859897783746082?pid=6032859897783746082&oid=115449786982638731802

  2. Roger Clark
    |

    Hi Matthias

    Yes. I totally agree. These CNC machines are useless to mill PCB’s

    The fundamental problem is the physics and geometry of milling insulation between the tracks of less than 0.5mm wide.

    The cutting head is a 20deg or 30 deg V shaped tool, and the width of the cut is proportional to the depth of the cut.

    In practice the PCB’s are not very flat, and even if you clamp them down with metal brackets on 2 or even 3 or 4 sides, the PCB is higher in the middle of the board furthermost away from the clamps.

    With the result that the cut depth changes far too much.

    I know that some people, use a pre-process, which uses uses the cutting head as a continuity tester and software takes point height measurements across the whole PCB (perhaps 100 points) then remaps the Z height of the routing file to match the high changes to the PCB, but this is a complex process, and it requires modification of the CNC controller hardware so that an additional input goes from the CNC router continuity detector into the PC (via the parallel interface), and I’m not convinced that even doing this would give perfect results.

    I think if it was possible to CNC mill boards, then prototyping companies would use this process, but as far as I know, they use etching.

    CNC machines like this are probably good if you have to drill lots of through holes, onto an etched PCB and good for other things like engraving plastic and wood.

    But I’d not recommend them for PCB production

  3. Chris
    |

    Clamp a peace of wood to your bed mill it true with a end mill and stick the PCB with DS Tape to the board,

  4. Roger Clark
    |

    The issue is not really the flatness of the bed, though I agree if I mill some wood flat it will be flat with respect to the milling head.

    The problem is that I’d need to glue the PCB to the wood to get it flat enough

    I’ve tried using double sided tape (very strong tape), but unless you cover the whole of the back of the PCB, the PCB will warp enough to affect the milling of the insulation between the tracks.

    I’m sure it would be possible to mill PCB’s for big SMD components e.g. 1206 resistors etc, but for me it would still be neigh on impossible to reliably mill the tiny tracks on quad flat package MCU’s etc

    https://en.wikipedia.org/wiki/Quad_Flat_Package

  5. Chris Bezuidenhout
    |

    I agree with you, but for a proto board it is ok I still prefer the etching method because most of my designs are double sided and I do a lot of RF development then the track with is very importent and I do thru plating and with an engraved board it is just not possible. I still use Protel for my layout and I will only use the 3020 for drilling as soon as I find out how to convert the Protel gerber files to G-Code

  6. Roger Clark
    |

    Thanks Chris

    Using the 3020 just for drilling is a good idea. I only use Eagle and more recently KiCad.

    I suspect there must be a script or macro to convert Gerber drill files to G-Code.

    Perhaps as described in this article

    http://www.open-electronics.org/3drag-as-a-cnc-milling-machine-creating-g-code-from-gerber-files/

  7. Cody
    |

    I have had good luck using an autolevel program prior to milling. If using mach3 or emc, with a probe setup correctly, the program imports your pcb gcode file, adds a bunch of probe points to the beginning, then maps the z axis to match the boards contours. The results are awesome. I am able to mill a pcb with only a .003 depth on the z cut. https://www.autoleveller.co.uk/ for a look at the program. I was having similar issues with incomplete cuts or having make real deep cuts to get consistent cuts.

  8. Cody
    |

    https://www.youtube.com/watch?v=zlKiXWlp-JQ for 2″ x 8″ pcb on my 3020 mill

  9. Roger Clark
    |

    Thanks for sharing

  10. Roger Clark
    |

    Interesting… Thanks…

    Looks like the PCB was somehow glued down to the sheet of wood (MDF or similar).

    However I’m still not convinced that milling will ever take off as a good method to prototype PCBs.

  11. Pierre Fischer
    |

    Good testing, and good conclusion. My opinion : in the prototype PCB making area for “DIY Makers”, design is solved (Eagle, Gerber producing, etc), PCB manufacture is solved (see OSH & others prices (I have no stocks on them)), they produce high quality PCB, 3pcs minimum quantity at “reasonable” price. Now, SMD pick & place and soldering IS the final step. Test run of the T-937 reflow oven would be just fine 🙂 Please go on with your good work, we like it, and it is useful to lots of persons !

  12. Al Brown
    |

    Thanks for this Roger. I have a 3018 and been struggling for two weeks to get some sensible results from the PCB machining. I am down to 0.4064 track width for prototype boards and design to that. Running with 0.1 10 degree cutters, I seem to be snapping them at an alarming rate despite low feed rates ( but they were super cheap!!! and probably I am finding out why!!!) . It looks like I can get down to 0.254 mm traces if only the cutter can hold up to an hour of milling. One thing to look at is the backlash nuts on the screwed threads. On mine there is just enough movement in the recess to throw the cutter off ( you will see it turning ever so slightly). I have put some RTV in there to hold it in place and stop it turning. It has improved repeatability no end. The problem with my Z axis is the cutter pushes the spindle holder up. I am thinking that extra weight will help prevent that movement. From what I am reading and seeing , is that $15 on a decent milling bit will pay dividends in the log run. I think lubricant will also help. Lots of variables to work through yet. What PCB layout package are you using? If using eagle I can share my trial board for different traces and we could compare the results on the two different machines.

  13. Roger Clark
    |

    I have almost totally given up on the idea of milling boards.

    I found that I could not hold them flat enough, despite trying all sorts of methods.
    Perhaps if I bought PCB’s from a local supplier they would not get so warped in the post, but it only takes a 0.1 mm difference in height to make a major difference to the milling width.

    Using the mapping technique, to pre-determine the height of a matrix of points on the board e.g. 10 x 10 matrix of points, would probably be OK, would probably resolve that issue, however last time I checked there wasnt a simple / single software solution which would to the pre-mapping and then run the GCode file (appending the necessary height commands)

    I’ve now got a 100W CO2 laser (I built by upgrading a cheap 50W laser cutter from China), which I was hoping to be able to do PCB’s but it isnt much use for this either, because 100W isnt enough to remove the copper, and even if I had a more powerful laser e.g. 250W, (which would cost $$$$$$$) that could cut through copper, the PCB under the copper is much weaker than the copper and it would get burnt or potentially engraved or even cut.

    So the only way I can use the laser is just to etch onto photo resist and then chemically etch the traditional way.

    Sooner or later there may be a technology to do rapid prototyping of PCB’s but I don’t think that technology is with us yet 🙁

    PS. I was using Eagle, but since it got taken over by AutoDesk and now requires a login etc, I’ve moved to using KiCad

  14. mark
    |

    I can offer my experiences with the issues of milling pcb’s. I use a 6040 with my own custom built controller based on a UC400ETH, the control software UCCNC and larger than standard steppers – this eliminated the ccs problems often experienced with the control systems on these devices. I have a plugin which runs in UCCNC to do auto-levelling of the board prior to milling. It creates a 3d map of the surface and modifies the g-code to compensate for any lack of flatness. Using this I have been able to reliably produce boards with isolation channels just bigger than 120um. The machine I have has ballscrews and although they are of the chinese variety are reasonably good with almost zero backlash – this is important as lead screw backlash will cause all sorts of grief. I double side tape the boards to a piece of 18mm MDF and also clamp the periphery of the board. You need to try to minimize any vibration of the board as that is a sure way to damage/break the cutters. The other important issue is spindle runout, which can be from either the spindle itself or the collets or both. Ideally this should be zero but it should be checked – this is another way to damage the cutters. I use the chinese carbide v cutters but check the runout on them before use. I have found that the point is not guaranteed to be along the central axis of the cutter. I use pcb2gcode to generate the g-code from gerber files. When cutting I use a solution of dishwashing liquid (lemon scented seems to work best 🙂 )and water as a cutting lubricant which is brushed on the surface of the board prior to machining. This also suppresses any dust.

    As you point out this approach is not for production but for rapid (well relatively) prototyping. Given the low cost of board production from places in China you would have to be be nuts to mill boards. I have only used it for one off boards and spent quite a bit of time breaking cutters before getting it right.

    While I use a plugin to do the autolevelling, there is a program available autoleveller (https://www.autoleveller.co.uk/ ) which can run standalone and a free version is available. Autolevelling is essential if you want to produce good quality boards with fine traces. The other thing to get high quality pcb’s that is highly desireable is machine rigidity. The 3020/6040 class cnc machines are not known for their rigidity. But given a bit of care and patience it is possible to produce reasonably good quality boards.

  15. Roger Clark
    |

    Thanks for your insight.

  16. Kenny
    |

    I’m using a 3040 with ball-screw. When I first attempted 2-sided pcb milling with my setup, I was going nuts trying to figure out why I would get up to +/- 0.4 mm offset positions (drill holes etc). I finally found that my rookie error issue was due to the spindle not being properly square to the cutting surface. So it was a combination of spindle not trammed, and CNC bed not squared (or shim adjusted). The out-of-alignment spindle made registration holes larger than what they should be — which allowed error in x or y position (of the pcb) to sneak in — due to sideways movement. I agree that the CNC approach isn’t for production. But it can certainly yield excellent 2-sided circuit boards…….. provided that the CNC machine is properly set up and properly calibrated, and provided that the parts of the CNC machine are good performance….eg. ball-screw, rigid structure. Linear rail system is nice too.

    Drilling a tiny hole (eg. 0.8 mm diam or smaller) exactly halfway between the larger (main) registration holes is a pretty good way to check alignment. If a pointy CNC bit doesn’t line-up with that hole after the board is flipped…..then you know something isn’t right.

  17. Roger Clark
    |

    Wow

    I admire you determination in getting your CNC to be able to mill double sided boards..

    I actually came across a single sided board which I had tried to mill, and it wasn’t as bad as I thought, but it all the SMD components on it were large ones e.g. 1206 resistors and some regulators and a ESP8266 module

    However I think I went though several bits trying to do it, and at the moment I don’t have the need for rapid prototyping, so the CNC machine is sitting idle in a corner under a dust sheet.

  18. Kenny
    |

    Thanks Roger. Me too. I just use the mill to make my pcbs for my own tinkering only. After using auto-leveller software, quality of the milled pcbs is impressive. But we have to put in our own vias. I decided to go the milling path, as the chemical path (at home) would be quite fiddly.

    One main issue I had was – I noticed that the edges of my pcb would bend up and lift away from the spoil-board. To try get around this, I now use washers of a suitable size to clamp down on the pesky edges. I put a self-tapping screw into the spoil-board, and the lip of the screw-head is wide enough to clap down on a inner-side lip of the washer, while the outter lip of the washer clamps down on the middle edges of the pcb. Below….the “@” symbol represents the lip of the self-tapping screw looking from above. The ) ) represents the lip of the washer, which clamps down onto the pcb edge when the self-tapping screw is screwed in — doesn’t need to be tight. The screw doesn’t need to be in the centre of the washer. I like to use fairly large washers.

    ( ( @) )

    The washers are used only for the middle parts of the edges. The corner edges are just clamped using the regular metal cnc clamps.

    Thanks for letting me know that you had satisfactory results with your system. I’m using the auto-leveller software, which helps a bunch.

    I did have some frustrating moments with my 3040 ballscrew machine at the beginning though. One was when I thought that I had properly tightened (connected) the stepper motors to the shaft ….. but I had not. And I was wondering why the carriage was stopping every once in a while. Prematurely thought that I was sent a lemon. But after sorting it out for myself (properly tightening things), there’s been no missed steps. I definitely had my doubts about my ebay-bought machine at the beginning! But now, I like what they came up with. I take back what I had first thought (negative things) about this particular family of CNC machines heheheh.

  19. Scott
    |

    Hey there … my children are mad for making their own PCB … they have tried etchant, & we value their lungs etc., so have become reluctant to pursue this. The latest idea has been to buy an engraving machine or some such (for Christmas!), as you show above, and use this to mill boards, but after reading this, I am reluctant to pursue this (possibly for other projects, but not boards). Do you recommend we try going the etchant route again? Thoughts? Santa is getting his bag together … & I’m feeling like young craftsmen might look into other processes. I look forward to any feedback – thanks! -sno

  20. Roger Clark
    |

    I think you can engrave your own boards, but not for surface mount devices, and it takes a lot of setup to get it to work, and even with the best setup, SMD is very very hard.

    I know some people replaced bearings in their machines to stop vertical axis backlash, other people height mapping and post processing of the GCode to add the topology of the board, some people also use really expensive engraving bits which are not so likely to snap.

    I’ve not use etchant for years, i.e back in the days before health and safety, and when I used to physically draw on the board with a etch resist pen!

    I’m afraid nowadays your best option is to get the boards made in China, as some companies do some amazing deals and you can get the board back in a week for a modest expenditure (I’m not going to advertise who currently has special offers as this changes all the time)

Leave a Reply