Thoughts On Using CNC Machines For Circuit Board 'Etching'

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
Hello there,

I had been considering the purchase of a CNC machine for making small, one-off circuit boards using copper clad fiberglass boards.
The price on these things has come down a lot, under $200 USD. I don't need it to be too large either, board 2x4 inches would be good enough for now.

My questions are twofold.
First, anyone here can recommend a reasonably priced machine? I would say it has to have enough accuracy to do SMD parts but if it is limited to the 0.05 inch pin spacing that would be ok for now.

Second, i see bits being sold that go from 0.8mm diameter and up. Would that be good enough to do SMD 0.05 pin spacing parts like IC's that have that spacing?
Also, do they make any smaller ones, like 0.5mm? I know that is small and probably some bit breakage now and then, but it might be good to do some things with the 0.5mm bits if they make them.
Also, do they make any POINTED bits to use for engraving or something like that? That would be a bit similar to a regular blunt face bit but with a point on it so the deeper you go, the wider the cut.

Thanks for any information and/or links.
 

dendad

Joined Feb 20, 2016
4,368
I have a 3018 similar to this one...
1686959215754.png
Then, additional collets and bits were purchased.
The CNC came with just tapered bits to be used for engraving.
Only one PCB has been made to try it out, and that was before the drills arrived. The tapered bit was used and so the holes were cut way too big but I was only interested to see how it worked, not to be usable.
I get my PCBs from JLCPCB and they are very cheeeeeep!
Just as an extra point, one of the extra purchased collets is the size to allow the bits from my hand router to be used and so I slowy used it to level a piece of wood screwed to the base.
For the price, these are really good value and well worth a play, even if you do not make PCBs.

http://www.sadarc.org/xenforo/upload/index.php?threads/cnc-machine.165/#post-907 shows my machine.
I do find it harder to drive than my 3D printers!
 
Last edited:

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
I have a 3018 similar to this one...
View attachment 296573
Then, additional collets and bits were purchased.
The CNC came with just tapered bits to be used for engraving.
Only one PCB has been made to try it out, and that was before the drills arrived. The tapered bit was used and so the holes were cut way too big but I was only interested to see how it worked, not to be usable.
I get my PCBs from JLCPCB and they are very cheeeeeep!
Just as an extra point, one of the extra purchased collets is the size to allow the bits from my hand router to be used and so I slowy used it to level a piece of wood screwed to the base.
For the price, these are really good value and well worth a play, even if you do not make PCBs.

http://www.sadarc.org/xenforo/upload/index.php?threads/cnc-machine.165/#post-907 shows my machine.
I do find it harder to drive than my 3D printers!
Hi,

Thanks.
Did you at least try to make a dip package pattern on the PCB board, with the holes too?
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
No, but folk have done that.
There are many Youtube videos.
A couple....
Hi,

Oh ok that's good to know thanks.

Did yours come with the software you needed?
Also, was it hard to create the design files for the etch pattern?
 

dendad

Joined Feb 20, 2016
4,368
Mine came with no software if I remember correctly, just links in the book to download it.
The PCB software I use is a commercial package for Mac computers. But there are many free versions that you can use to produce the files needed. The software for the CNC machine uses the Gerber file produced by the PCB program to make the boards. I cannot remember what the software is called as I have only used it once, over a year and a half ago, for a test but the Youtube videos will explain that for you as that is where I found how to do it. (It may have been "Candle", maybe.)
My CNC machine does not get a lot of use and when I do use it, like cutting out the front panel of the radio shown in the link above, I have to re-learn it all again because I've forgotten how to do it.
My 3D printers are used much more often and I find them easier. It would be good if the CNC machine just used the same program as the 3D printers!
 

MrChips

Joined Oct 2, 2009
29,834
To answer your questions in a nutshell, yes, you can engrave PCB circuits on a small CNC machine.

There is a small CNC 3018 selling for US$200. I have one and I made a PCB for my tube amplifier on it.
It usually comes with a collection of V-bits and router bits. I do not have the proper carbide milling bits for PCB engraving. (I have to remember to buy some.) I used a standard V-bit. For my tube amp PCB I did not require fine line engraving since all my components were thru-hole resistors and capacitors.

I used Eagle software to create the PCB layout and generate a single layer Gerber file. Note that Autodesk will be discontinuing support for Eagle. They want you to use Fusion 360 instead. The annoying thing with Autodesk software is you have to be online to use it. I still have a stand-alone version of Eagle from before it was acquired by Autodesk.

After generating a Gerber file, you have to generate a gcode file for the CNC machine. I will have to look up how I did this.

The software to use on the CNC machine is called Candle. This is free. Once you have the gcode file you are almost ready to go.

There is one additional step that you need to do and that is to map the surface of the copper laminate. When you securely mount the copper laminate on to the CNC bed, the height of the board will vary across the area of the board for various reasons. Hence you have to do what is called Z-mapping. The way I do this is to run a wire from the spindle motor frame back to the controller board. Then I connect a GND wire to the copper laminate. The Candle software does the Z-mapping procedure after you have set up the area and number of grid points to be mapped.

After creating the Z-map file, you are ready to engrave.

Like everything new, you will have to experiment by doing many small test runs.
Let me know if you need more answers and details.
 

MrChips

Joined Oct 2, 2009
29,834
And yes, the PCB layout software (Eagle in my case) will generate a drill file.
You change the milling tool to a drill bit and then run Candle again with the drill file.
You can do the drilling before or after doing the engraving. I don't think it matters which order you choose.

All of your cutting tools will be 0.125" shank. The CNC should come with an ER11 collet.
 

MrChips

Joined Oct 2, 2009
29,834
Eagle ULP (User Language Program)

There is a ULP called pcb-gcode.
This program is loaded in Eagle. From Eagle you can generate the gcode file for the CNC.

This only applies to Eagle. I don't know how it is done on other CAD software.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
Mine came with no software if I remember correctly, just links in the book to download it.
The PCB software I use is a commercial package for Mac computers. But there are many free versions that you can use to produce the files needed. The software for the CNC machine uses the Gerber file produced by the PCB program to make the boards. I cannot remember what the software is called as I have only used it once, over a year and a half ago, for a test but the Youtube videos will explain that for you as that is where I found how to do it. (It may have been "Candle", maybe.)
My CNC machine does not get a lot of use and when I do use it, like cutting out the front panel of the radio shown in the link above, I have to re-learn it all again because I've forgotten how to do it.
My 3D printers are used much more often and I find them easier. It would be good if the CNC machine just used the same program as the 3D printers!
Hi,

Ok thanks, i'll be looking into this more as time goes on.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
To answer your questions in a nutshell, yes, you can engrave PCB circuits on a small CNC machine.

There is a small CNC 3018 selling for US$200. I have one and I made a PCB for my tube amplifier on it.
It usually comes with a collection of V-bits and router bits. I do not have the proper carbide milling bits for PCB engraving. (I have to remember to buy some.) I used a standard V-bit. For my tube amp PCB I did not require fine line engraving since all my components were thru-hole resistors and capacitors.

I used Eagle software to create the PCB layout and generate a single layer Gerber file. Note that Autodesk will be discontinuing support for Eagle. They want you to use Fusion 360 instead. The annoying thing with Autodesk software is you have to be online to use it. I still have a stand-alone version of Eagle from before it was acquired by Autodesk.

After generating a Gerber file, you have to generate a gcode file for the CNC machine. I will have to look up how I did this.

The software to use on the CNC machine is called Candle. This is free. Once you have the gcode file you are almost ready to go.

There is one additional step that you need to do and that is to map the surface of the copper laminate. When you securely mount the copper laminate on to the CNC bed, the height of the board will vary across the area of the board for various reasons. Hence you have to do what is called Z-mapping. The way I do this is to run a wire from the spindle motor frame back to the controller board. Then I connect a GND wire to the copper laminate. The Candle software does the Z-mapping procedure after you have set up the area and number of grid points to be mapped.

After creating the Z-map file, you are ready to engrave.

Like everything new, you will have to experiment by doing many small test runs.
Let me know if you need more answers and details.
Hi,

Oh thanks for the information there that helps a lot.

So you are saying that you use Eagle to generate a Gerber file, then Eagle again to generate a gcode file.
I am wondering if there is another way to do this i don't like the sound of 'Autodesk' already and not even sure if it is free. I wonder why they make you go online to use it.
I used to have an old Eagle program around too but never used it because i did my layouts with regular image drawing programs like Paint and the like. I actually like doing it that way. I wonder how hard it would be to generate a Gerber file manually with a handwritten program, and a gcode program also. I'll have to look into this.

Yeah i saw something about the surface mapping and thought that was a little strange. I guess the CNC bed is not always parallel to the motion of the spindle. As long as there is a way to do it though i guess that is cool.

I also saw an "Offline Controller", have any idea what that is about? It appears that you load files onto an SD card and plug that into the controller, and that does the work. That's about all i know about it. It is apparently sold for use with these CNC machines.

It sounds like a little fun to do too but it would have to work right or else it would be a total waste.

Thanks again.
 

MrChips

Joined Oct 2, 2009
29,834
Have you ever made a PCB using computer software? Just asking.
There is a free version of Eagle. Also KiCAD is a popular open-source suite.

After generating a Gerber file with any PCB CAD program you can convert it to CNC gcode with any number of free conversion software. FlatCAM is one example. Google gerber to gcode.

"Offline Controller" means that you can plug in an SD card into the machine. It does not have to be connected to a computer.
Some 3D printers have SD slots only. Some have USB connections. The CNC 3018 has USB connection and no SD reader slot. Hence it needs a computer with CNC software to drive it. This is what Candle does.

As for Z-mapping, the copper laminate itself might not have uniform thickness. Moreover, the laminate will be warped and will not lay flat on the CNC bed.

1oz copper is only 0.035mm thick. Hence you want the cutting tool to be precise to within 0.100mm depth.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
Have you ever made a PCB using computer software? Just asking.
There is a free version of Eagle. Also KiCAD is a popular open-source suite.

After generating a Gerber file with any PCB CAD program you can convert it to CNC gcode with any number of free conversion software. FlatCAM is one example. Google gerber to gcode.

"Offline Controller" means that you can plug in an SD card into the machine. It does not have to be connected to a computer.
Some 3D printers have SD slots only. Some have USB connections. The CNC 3018 has USB connection and no SD reader slot. Hence it needs a computer with CNC software to drive it. This is what Candle does.

As for Z-mapping, the copper laminate itself might not have uniform thickness. Moreover, the laminate will be warped and will not lay flat on the CNC bed.

1oz copper is only 0.035mm thick. Hence you want the cutting tool to be precise to within 0.100mm depth.
Hello again,

No i never made one with computer software except for the drawing itself using image software, and use a laser printer. Back when i worked in the industry, we would send our boards out to have them done, and really just send out the schematic then they would send us a PCB trace drawing and we would check it over, then when it was considered good enough we would send it back and they would make the boards.
I've done a fair amount by hand too back in the old, old days in the 1970's.
So really this would be my first CNC try.

I've been reading a bit more and now i see they use the "V" shape engraver bits to do PCB's.

You know what is funny also though, i have a half-built CNC machine i made myself using old line printer parts but things came up so i never got to finish it.
 

Ya’akov

Joined Jan 27, 2019
8,508
Keep in mind that a mill is a very messy machine and will require ventilation and dust collection. FR4 dust is not something I would want to breathe in any quantity.

I am not sure that using a mill (which certainly works!) for occasional PCB manufacture would be better than using a printer, toner transfer, and etching—or even sending off the files to a fab to get several really nice boards for a few dollars.

If you intended to do extensive or frequent prototyping with the mill, it would probably be worth the investment in the requisite dust collection, etc. But if it will be only occasional, even the low price of the machine itself doesn’t feel particularly compelling as a reason to go that way.

On the other hand, if you were going to use the mill to make plastic/wood/metal parts regularly, then an occasional PCB makes some sense.
 

MrChips

Joined Oct 2, 2009
29,834
The reason I asked if you have ever used a CAD program to layout a PCB is because of your comment.
I used to have an old Eagle program around too but never used it because i did my layouts with regular image drawing programs like Paint and the like. I actually like doing it that way. I wonder how hard it would be to generate a Gerber file manually with a handwritten program, and a gcode program also. I'll have to look into this.
Granted, one can create a PCB layout using Paint but that is not how a Gerber file works. A proper PCB CAD program is much more that an artwork creator.

You begin a PCB layout by drawing the circuit schematics. This is the schematics capture stage. You identify all the components used, package sizes and footprints. You create the electrical connections required for a complete valid electrical circuit. The CAD has error checking to make sure there are no invalid nodes or nets, for example, Vcc is not connected to GND.

In the PCB layout stage you set the physical board size and place the components and all tracks (manually or automatically). Again, the CAD program checks for design and placement errors, e.g. checks that all tracks and pads are given the designed width and spacing.

Next comes the generation of the drill file and gerber file. Generating the drill file is straight forward. The CAD program knows the x,y location and size of every hole required. It generates the gcode file suitable for a CNC drilling machine.

The gerber file is more complex. The gerber file is intended for a photo plotter. Thus it uses optical beams of different diameters in order to draw the electrical tracks. It has to have a library of all the pad shapes and sizes in order to flash an image of the pad. The gerber file is what is sent to a PCB shop for making the PCB.

When it comes to using a CNC engraving machine, you need to convert the gerber file to gcode. This is not trivial. The program has to generate the actual artwork of the layout (as if created by a Paint program). Then it has to construct the tool milling path around each and every pad and track.

This is similar to how a 3D printer gcode file is generated by the slicer software. After the 3D object is generated by the CAD program, the .stl file is submitted to the slicer program. This program has to recreate the entire 3D object as it would appear physically. Then the program slices the object (usually in 0.2mm slices). For each layer it has to figure out the optimal path to lay down the plastic. Of course, all of this is not trivial.

In summary, using a CNC engraver to make circuit boards is doable. All of the software is already available for free. There is no need to try to code this yourself from scratch.

(I know how difficult this can be. Many moons ago I wrote a CAD drawing program in ASM for a Data General Nova minicomputer. It used a mouse and graphics display to created the artwork. The layout was drawn on an ink pen plotter. A photographic negative was created which was then used to expose the photo resist on sensitized copper laminate in the conventional chemical etching process.)
 

Ya’akov

Joined Jan 27, 2019
8,508
The reason I asked if you have ever used a CAD program to layout a PCB is because of your comment.

Granted, one can create a PCB layout using Paint but that is not how a Gerber file works. A proper PCB CAD program is much more that an artwork creator.

You begin a PCB layout by drawing the circuit schematics. This is the schematics capture stage. You identify all the components used, package sizes and footprints. You create the electrical connections required for a complete valid electrical circuit. The CAD has error checking to make sure there are no invalid nodes or nets, for example, Vcc is not connected to GND.

In the PCB layout stage you set the physical board size and place the components and all tracks (manually or automatically). Again, the CAD program checks for design and placement errors, e.g. checks that all tracks and pads are given the designed width and spacing.

Next comes the generation of the drill file and gerber file. Generating the drill file is straight forward. The CAD program knows the x,y location and size of every hole required. It generates the gcode file suitable for a CNC drilling machine.

The gerber file is more complex. The gerber file is intended for a photo plotter. Thus it uses optical beams of different diameters in order to draw the electrical tracks. It has to have a library of all the pad shapes and sizes in order to flash an image of the pad. The gerber file is what is sent to a PCB shop for making the PCB.

When it comes to using a CNC engraving machine, you need to convert the gerber file to gcode. This is not trivial. The program has to generate the actual artwork of the layout (as if created by a Paint program). Then it has to construct the tool milling path around each and every pad and track.

This is similar to how a 3D printer gcode file is generated by the slicer software. After the 3D object is generated by the CAD program, the .stl file is submitted to the slicer program. This program has to recreate the entire 3D object as it would appear physically. Then the program slices the object (usually in 0.2mm slices). For each layer it has to figure out the optimal path to lay down the plastic. Of course, all of this is not trivial.

In summary, using a CNC engraver to make circuit boards is doable. All of the software is already available for free. There is no need to try to code this yourself from scratch.
There is this. I can‘t vouch for it and it is very likely to be quite messy given the vagueries of raster to vector conversion and the criticality of the lines that represent traces. Doesn’t seem worth it in the case of planning from the outset to include it in a workflow, but it looks like it could be a handy last resort for preexisting PCB artwork only available in a flat raster format.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
The reason I asked if you have ever used a CAD program to layout a PCB is because of your comment.

Granted, one can create a PCB layout using Paint but that is not how a Gerber file works. A proper PCB CAD program is much more that an artwork creator.

You begin a PCB layout by drawing the circuit schematics. This is the schematics capture stage. You identify all the components used, package sizes and footprints. You create the electrical connections required for a complete valid electrical circuit. The CAD has error checking to make sure there are no invalid nodes or nets, for example, Vcc is not connected to GND.

In the PCB layout stage you set the physical board size and place the components and all tracks (manually or automatically). Again, the CAD program checks for design and placement errors, e.g. checks that all tracks and pads are given the designed width and spacing.

Next comes the generation of the drill file and gerber file. Generating the drill file is straight forward. The CAD program knows the x,y location and size of every hole required. It generates the gcode file suitable for a CNC drilling machine.

The gerber file is more complex. The gerber file is intended for a photo plotter. Thus it uses optical beams of different diameters in order to draw the electrical tracks. It has to have a library of all the pad shapes and sizes in order to flash an image of the pad. The gerber file is what is sent to a PCB shop for making the PCB.

When it comes to using a CNC engraving machine, you need to convert the gerber file to gcode. This is not trivial. The program has to generate the actual artwork of the layout (as if created by a Paint program). Then it has to construct the tool milling path around each and every pad and track.

This is similar to how a 3D printer gcode file is generated by the slicer software. After the 3D object is generated by the CAD program, the .stl file is submitted to the slicer program. This program has to recreate the entire 3D object as it would appear physically. Then the program slices the object (usually in 0.2mm slices). For each layer it has to figure out the optimal path to lay down the plastic. Of course, all of this is not trivial.

In summary, using a CNC engraver to make circuit boards is doable. All of the software is already available for free. There is no need to try to code this yourself from scratch.

(I know how difficult this can be. Many moons ago I wrote a CAD drawing program in ASM for a Data General Nova minicomputer. It used a mouse and graphics display to created the artwork. The layout was drawn on an ink pen plotter. A photographic negative was created which was then used to expose the photo resist on sensitized copper laminate in the conventional chemical etching process.)
Hello again,

Yeah i guess there is a lot to it when trying to hand code the machine instructions, but i have also read now that to get the best 'efficiency' you would have to know how to hand code as well. What they mean by efficiency i am not sure, maybe smaller board size or faster router run time or less tool wear.

It's all kind of interesting though for sure. Since i have programmed in various languages since the 1970's i would not be too uncomfortable writing some code to simplify the image to machine instructions part. When i first got into microcontrollers i didn't like the simulators that were available so i wrote my own simulator. Takes a couple weeks, but then you can always add something later if you like, or mod something that makes it better.
At first i probably would not want to do this though.

Thanks for the explanation of the process.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
There is this. I can‘t vouch for it and it is very likely to be quite messy given the vagueries of raster to vector conversion and the criticality of the lines that represent traces. Doesn’t seem worth it in the case of planning from the outset to include it in a workflow, but it looks like it could be a handy last resort for preexisting PCB artwork only available in a flat raster format.
Hello there Ya'akov and thanks for the reply,

That does look interesting and as long as it works i probably would not mind using it. My boards would be small to medium size i would not be doing anything near a full blown motherboard for a modern CPU for example. I also don't mind taking a little more time to plan a board out in detail. In fact, even a single sided board would be good enough for now. I've used countless single sided boards in the past for various things with little problem and that was when drawing the pattern on the board copper by hand using magic markers. I did a board about 8x12 inches years ago that way.

The way it was done back in the day was we would send out the schematic and they would send back a drawing on clear mylar (i think it was mylar but that was a long time ago) with the traces made with stick on black opaque tape. That was quite a tedious project just to do that. They would eventually make boards that way using a photographic process.
 

Thread Starter

MrAl

Joined Jun 17, 2014
10,900
This has some info on using FlatCAM post processor for Gerber conversion to G-code for PCT CNC.
https://hackaday.com/2019/03/03/cnc-your-own-pcb-with-this-tutorial/
Hi and thanks for the reply,

That looks interesting too i guess i have a lot of reading to do. It is unfortunate it seems like it is going to take a while to get this going, one way or another.

I like the way they seem to be using a laser head now to write on the top of the board with the component numbers like R1, R2, etc. That could be a big help too when assembling the board.
 
Top