Instructables

Make your own PCBs on an inexpensive desktop CNC mill

Picture of Make your own PCBs on an inexpensive desktop CNC mill
Engraving_a_circuit_board_with_guido_2.jpg
Traditionally, there are two ways of hobbyists making custom PCBs:
1. Using toner transfer and chemical etchant -- can be tricky to get the right materials, and the chemicals are nasty and messy
2. Paying a service like BatchPCB or OshPark -- fairly inexpensive, but usually have to wait a long time, like two or three weeks.

Milling them on a CNC is a quick way with a different set of pros and cons:

The good:
* Quick turnaround - don't have to wait days or weeks for it to ship
* The mill does the drilling
* No messy acid to deal with
* Once you have good settings, the process is easily repeatable
* Two sided boards are possibly slightly easier than with etched boards
* Inexpensive - you're just paying for blank circuit boards which are a couple bucks each

The not so good:
* Bits and end mills can be expensive and they wear out.
* Bits of copper clad fiberglass get all over the place
* Milling a board can take a while
* Board stock and mill bed flatness will present a challenge
* Isolation size is a function of bit size and mill accuracy. Check your design carefully before you plan on using fancy SMT parts with densely packed pins.

How I've Made Things Work:
I'm a CNC newb and an electrical engineering disaster so my milling process and the following outline use what I've determined to be the most common (though not necessarily the best) tools.

Those tools are Eagle CAD, pcb-gcode, pcb-probe, Mach 3 CNC, Zen Toolworks 30deg V Shaped Engraving Bit, random surplus carbide PCB drill bits and, of course, Guido for doing the milling. If you want to get those tools, see the links below.

The only tricky part is related to the V shaped bit. Obviously, you will want to etch the smallest, cleanest line that you can in order to mount all of those tiny surface mount LEDs that you already bought. Unfortunately, the V shape of the bit will change the width of your cut depending on how deep you cut into the board. Since your copper clad stock isn't perfectly flat you are challenged to pick a milling depth that will cut clean traces across the entire board.

I've had some success with flattening my copper clad as much as I can by using a metal straight edge to check flatness and then bending the board by hand to try to make it flatter. With the board then as close to flat as I can make it, I would then test at what depth I can cleanly etch a line on all four areas of the board that surround the area that I plan to etch. The results were always usable but I sometimes found myself rebuilding missing traces with bits of jumper wire.

A better way seems to be to use some G-Code trickery to probe the height of the board at key points on the surface and then perturb the height of the vertices accordingly while milling. It sounds both awesome and complicated but luckily for you there is already a program that does all of the work so you can just deal with the awesome part and follow along with my directions.

Submitted by Ace Monster Toys Hackerspace in Oakland, CA for the Instructables Sponsorship Program.

Check out the original version on our wiki -- it's somewhat specific to our particular machine, I've tried to write this instructable to be more generic and widely applicable.
 
Remove these adsRemove these ads by Signing Up
kghalieh25 days ago

there is almost 0.8 scale in transferred g code , where to fix this

The black and red wires are from the Zmin button i guess?

jg1562 months ago

I've been doing this, but some of the holes are missing their traces. It is always the same holes that do this in a given piece of code.

Does anyone know what's up?

Thanks for a great tutorial by the way.

jabelone2 months ago

At school I use the guillotine which yields a perfectly clean cut that is also straight.

TrueHybridX8 months ago
So does gcode-pcb automatically mirror the top and bottom so you can install the parts and solder them or am I missing something.

It will mirror the bottom layer so when you are etching from the top, it is flipped from what you would see in eagle. For one sided boards, what I have been doing is only using the bottom layer in eagle, so when I etch the copper, I then flip the board upside down (so now you are looking at the non-copper side) and put my parts in that way. This way it matches what you would see in eagle from a part outline perspective. Now if only there was a way to get a silkscreen onto the non-copper side based on the eagle silkscreen layers, that would be awesome!

davr.org (author)  RUok01012 months ago

Hmm...what if you mounted a felt tip permanent marker on your CNC, and then created gcode from the silkscreen layer? you could get a crude silkscreen this way.

RUok0101 davr.org2 months ago

Interesting... perhaps thats why there is a text layer option in pcb-gcode. I just might try it!

RUok01012 months ago

Just wanted to comment on the cutting out of the board. By default the pcb-gcode will not generate correct milling files (will likely be empty), even if you select "generate mills" because it only understands the eagle 'milling' layer, and by default your board outline is probably on the 'dimensions' layer. What I found is if I temporarily change the board outline lines to be on the milling layer, then generate the files with pcb-gcode, I get a nice milling gcode file. Use the eagle change layer tool to do this, or select each outline and manually change it to the milling layer.

I also had to change the milling depth as by default it looked to be using the etching depth. So I set it to the same depth as my drills, such as -1.7mm and it came out great!

shobo7 months ago
have you measured how much of the fiber glass is milled?
jman 3111 months ago
Hey man, great tutorial! I am doing exactly what you have done, but I am stuck on the pcb-probe part. I was wondering if I could get you to tell me how you got it to work. I tried the pre-compiled windows program, but it always tell me that I'm missing .dll files. When I get them, it still gives me an error. Without the compiler, I don't know what to do with the source code. Any thoughts or advice would be greatly appreciated.

Regards,
Jeremy
davr.org (author)  jman 3111 months ago
I got it to work by compiling it myself. Since I could compile it on my machine, I'm pretty much guaranteed it would work on my machine.

If you tell me the exact command you ran, and the full output & error messages you got, I might be able to help.
jman 31 davr.org11 months ago
Thanks for the reply! I didn't run a command. I just double clicked on the executable (on the pre-compiled windows version) and that's where I got the error. How do you compile it if you don't mind my asking? I'm sure that is what I need to do as well.
I don't remember the error that I got. I will have to re-run it and then hunt for the .dll files again. I will do that shortly and report back.
davr.org (author)  jman 3111 months ago
I just uploaded a new version compiled staticly, so in theory it shouldn't need any DLLs. Download from the same place.

There is no gui, so you cannot just click on it. You need to run it from the commandline, sorry. When run it will tell you the arguments it takes.

I compiled it with mingw32, only thing I had to change was "gcc" to "g++" in the makefile. Setting up mingw32 and compiling code is a whole nother tutorial on it's own, too much to explain in a little instructables comment.
jman 31 davr.org11 months ago
OK. Thanks for your time. Looks like I will be learning about compiling in the near future! :)
jman 31 jman 3110 months ago
Found this:
http://www.autoleveller.co.uk/
Super easy and works great! No compiling necessary!
What depth do you mill at? Did you try any other degree bits than the 30 degree one? Or is the 30 degree optimal?

Have you tried the tool at http://rapid-pcb.com ? It's very easy to use, especially with the preview that shows exactly how the board will look like after milling.

Best regards,
Paul
myonus1 year ago
My friend works at a shop that makes CNC bits for a large aerospace company. And they scrap a lot of these bits that are imperfect (off by 0.00001 of an inch) he gives me for use with my Dremmel tool. Otherwise they get thrown in a bucket to throw away. If I buy or make a bench top CNC; am I really going to be able to mill PCB boards without going to engineering school to use it? Is it realistic to say that I can successfully design my circuits (this I can do) and work a program that will cut my prototypes? I am a minor technician at best. And I have no idea how a CNC machine interfaces with a computer. I can put together any kind of kit, But how much training and failure will I experience before I can expect to have a successful milling job? Money I have, but time to learning this device? i dunno. I have had no luck whatsoever with chemicals. But have been able to successfully use my Dremmel with these micro bits and make my own PCB boards. I have a very steady hand, and a headpiece with magnifying lense pieces. Like a jewler uses. Do you have any advice? I just dont want to spend $800, then end up selling it because I have no clue how to use it. What about cost of software? Any help would be, umm,,, helpful :)

Regards,
Myonus
How much is your CNC milling machine
davr.org (author)  HelmutHound1 year ago
The full kit with everything including software is $799, but you could probably buy parts separately and get it for cheaper.
http://www.zentoolworks.com/product_info.php?cPath=44&products_id=194