Jump to content
esaj

Milling PCBs with cheap Chinese "desktop" CNC-router

Recommended Posts

Part 2: Gerbers and Excellons (the PCB vector-format and drilling files)

So, you have designed your schematic and board layout in your EDA-package (Electronic Design Automation), I use KiCAD ( http://kicad-pcb.org/ ), an open source EDA-package that has its oddities and flaws, but is really great in general (especially considering that it's totally free :P). If you use something else than KiCAD, I expect you know how to get the front copper- and edge cuts -layers to gerbers and how to export the Excellon-format drill files. 

I personally use the combination of KiCAD + FlatCAM (for creating the machining paths) + bCNC (for controlling the CNC-machine). I think the general procedure can be done with pretty much any combination you feel comfortable with, but of course these instructions are written with that specific toolchain in mind.

When your layout is done, you probably already have your board cutout drawn or possibly did it last. In KiCAD, this is done in the Edge Cuts -layer, using the line-, circle- and arc-tools.

Here's an example of the step-up board I made recently (sorry that it's a bit messy, since I don't get silk screen prints in the milled boards, I don't move the texts or such)

40ECViG.png

The Edge Cuts -layer lines are drawn in yellowish color (although to my color blind eye it seems the exact same color as the texts and component outlines etc :P), going around the red copper-fill (ground plane in this case) and with rounded corners (made with the arc-tool, then the arcs are connected with the line-tool, all this needs to be drawn to Edge Cuts -layer, as you export the gerbers by-layer and you mill one layer at a time).

Here's the same board with some drawing disabled from the Render-menu on the right:

gobR2I5.png

Now you can clearly see the yellow Edge Cuts -outline, right? If you don't mind sharp edges, you don't necessarily need to do an Edge Cuts-outline at all. FlatCAM can create a cutout for you based on the isolation milling edges with configurable "tabs" (explained in the part about FlatCAM) that hold the board in place until you snap it out from the copper clad (those tabs can be actually useful, as I will later on warn you of a couple of things that can happen if you're not careful with this type of cutout).

I personally prefer to define my own cutout and use rounded corners in the boards, as they look nice, and sometimes actually need a specific cutout (for size or shape or whatever). Also worth noting that you don't need to shape or size your copper fill zones with the cutout; KiCAD will automatically make your fill zones follow the Edge Cuts -layer lines with the isolation distances you've configured in the zone. The isolation distances for your zones should be adjusted based on 1) how much actual isolation distance you may need (for higher voltages for example) and 2) the tool diameter you use for isolation routing (see the section explaining the V-bit, width of cut etc. in the FlatCAM-part). FlatCAM will follow the size of your isolations when generating the g-code, and if you have for example 0.1mm isolation, and use 0.15mm widht-of-cut, FlatCAM won't generate the code to go through those small isolations (as the bit would be too wide).

The next important part is placing your "zero" (origin) position. If you don't place your own, KiCAD will export the gerbers and excellons (drill files) using the top-left corner of the drawing area as X=0, Y=0 -position:

6qAAIZi.png

In this case, with A4-page set (the default, if you're drawing a really large board it might be larger), the board would be placed at X = 93mm, Y=28.5mm during the milling (in relation to the zero you set at the milling-phase, explained later). Not necessarily a good thing, although it depends how you do the milling, I don't use "homing" (will get to that in the milling-phase, again explained later), so I want to define my own "zero".

The tool for setting the "zero"/origin is in the right menu, beneath the trash can with a tool tip saying "Place the origin point for drill and place files":

VJnClx9.png

(sorry, the screenshot doesn't show the mouse cursor, which is placed at that icon when this screen shot is taken).

Select the tool and then click point you want to use as your origin. Adjust your grid as needed, I use different sized mils-grids (thousandths of an inch) for placing components, because most components have mils-based pin pitches, but I use millimeter grid for the cutouts. You want to place the origin at the top left of your cutout, like here:

ZkLdHHv.png

That red "crosshair-and-circle" -icon shows the position of your origin. In this case, since I use rounded corners, I've placed the origin right at where the left- and top-edges would meet, were it a sharp corner. If you use sharp corners, you may want to set the origin slightly above/to the left of the corner, as the origin point will also be used for depth-probing each tool you use, and the depth-probing needs an uncut connection to the copper clad section outside your cuts to work (I'll explain it further in the part about the actual milling-process).

Now, again assuming your board is otherwise done and your cutout is correct, we're ready for exporting the files for the CAM (Computer Aided Manufacture) -software, in my case, FlatCAM.

If you need slots, texts or 2-sided boards, check the Part 5 for what to take into account when exporting the Gerbers.

Exporting the needed files is under File -> Plot. There's an "Export"-submenu in the File-menu too, but that's not it. ;)

You're presented with this daunting window with lots of selection boxes, but fear not, it's not complicated:

h968byH.png

The above screenshot shows the values you want, if it's a new project there might be additional layers selected, and such, if you've already set these once (sometimes you need to go back during the CAM-phase to change things or such and re-export), they're saved with the project and will be remembered. In this case I've already milled the project before, so everything was set up already.

The plot format is Gerber (I think it's by default, I don't remember ever changing it), output directory is empty (meaning the same directory where your KiCAD-project resides, again a default). You want only the F.Cu (front copper) -layer, and the Edge.Cuts layer (in cases where you have slots to cut or text to engrave, you may also want the Eco1.User and Eco2.user -layers, or at least those are the layers I use for them). If you plan on making a 2-layer board, you also want to add your B.Cu (back copper) layer. The default options are otherwise fine (all the Plot... -options at what they were etc.), except, by default, the last option "Use auxiliary axis as origin" is not selected. This controls whether the origin is the top-left corner of the "page" or the "zero"/origin you set using the "Place the origin point for drill and place files" -tool. Make sure it's selected. The Plot... -options might come in handy if/when you're ordering boards from a fab-house, but since you can't (well, at least I can't :P) do any silk-screening or solder masks (tented vias mean vias covered by solder mask), they have no meaning really.

Under Gerber Options, leave the checkboxes clear (I'm pretty sure they're not checked by default) and use the 4.6 -format (I think that's the default).

Now, hit the Plot-button, and the Messages-box will fill with messages about the process (at least on my computer this happens pretty much instantly):

Z4JbjYA.png

Great. We've got the gerbers for our front copper and edge cuts-layers created. Now, we still need the drill-file(s).

A caveat that came to mind is that you might have drawn your copper (for a single-sided design) in the B.Cu (Back copper) -layer. I did that early on by mistake. You don't need to move everything to front layer (which can be difficult, as depending on component and how you can or cannot rotate it, the pins can get mirrored and then you'd need to route all your traces again), just export the back copper-layer instead of front, you can fix this in the CAM-part, by mirroring the layers, but the very important bit to remember there is to also mirror the drill paths, otherwise you end up with your drill holes in all the wrong places.

Next to the Plot-button, there's a button saying "Generate Drill File". Hit that.

VN1Itzk.png

Again a window with scary amount of options. Fret not, this is easy. I don't recall ever changing the defaults. I've never delved deep into the drill-file format specifics, but the defaults are alright for FlatCAM, basically this is outputting the "Excellon" -format file it reads (although the Drill Map File Format says "PostScript"). Just check that "Drill Origin" says "Auxiliary axis" (again the origin you defined), if it's absolute, it will use the corner of the "page" from the design. As far as I remember, the "Auxiliary axis" has always been default choice (never tested whether it's down to setting the origin yourself in the first place, or if it changes automatically when you change the gerber-file creation to use your own origin). Just hit the "Drill File"-button, and your drill file is created. The Messages-box will say something like "Create file <your project path>\<your project name>.drl".

If you have something like holes for M3-screws (I probably should have picked a project with both screw holes and slots to use as an example...), an extra file with the ending "-NPTH.drl" will be created. NPTH stands for (afaik) "Non-Plated Through-Hole". That means that they are holes that are not meant to be plated through (vias and holes for components are usually plated through), but that's only meaningful for fab-houses that can actually through-plate holes in the first place ;)  You might just as well use the "Merge PTH and NPTH holes into one file" -option, but it doesn't really matter. I've always let KiCAD create separate files for those, it's only a matter of remembering to open the NPTH-file separate in FlatCAM for creating the drilling paths for the M3-holes (in my case that is, I never use the NPTH's for anything else except M3-screw holes for fixing the board somewhere). For me it makes sense, since that's a part where you have to change the drill feed rate (the large drills require slower feed, as they cut much more material).

Now you're ready to move on to FlatCAM for creating the machining paths for different tools (V-bits, end mills, drills...) and generate the g-code that actually tells the machine what to do.

Edited by esaj
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Part 3: Generating the g-code for the CNC with FlatCAM

FlatCAM ( http://flatcam.org/ ) is an open source CAM-software specifically meant for PCB routing. If you're looking for a CAM-software to do something like wood carving with contours using CNC, this is not the software for you. It's written in Python, but the Windows-installer should contain all the necessary software (I think, it's been a long time since I installed it), for Linux, there's a script that can install all the necessary dependencies, and if that doesn't work, instructions for manual installation. The software can auto-update itself, so you're set after the installation.

The point of the CAM-software is to take your gerbers and excellon-files, and turn them into g-code, the instructions used by the CNC to know where to move, how fast etc. If you've used 3D-printers before, they're also controlled through g-code (at least usually), since it's a (semi-)standard way of programmatically controlling devices with one or more axes. You might have even tinkered around with the g-code by yourself... I've done that on occasionally, if there's been some special case where I've had to modify the tool-paths by hand afterwards, but it's rare, and you can avoid it altogether, and just be completely oblivious to how the g-code works.

When you start up FlatCAM, you're greeted with the main view and an empty project.

Application defaults and description of options

The FlatCAM-site has good manual for the entire software, tutorials etc., but I still go over the general options, what default values I use and why.

If this is the first time you start it up, you want to set up some common settings so that you don't need to change everything each time you have a new project. Select "Options" from the tabs near the top-left corner, and make sure the drop down says "APPLICATION DEFAULTS". 

6V60vqz.png

At the very top is the units -setting. I use mm (millimeters, metric), you may want to use inches. I've given the values only in millimeters here though, so if you want to use inches, you'll have to convert them yourself. Don't use values given here directly if using inches as units, you will just break your bits and ruin your copper clads.

Gerber options

Next at the top are Gerber Options, starting with the Plot Options. These control how (or if at all) your gerbers are being drawn by FlatCAM, but has no effect on the generated g-code. Plot means whether things are plotted (drawn) at all, naturally you usually want that ;), Solid means using solid color to draw the polygons, and Multicolored uses different colors for different polygons. I've used Plot + Solid as default, but you can change these options while generating the tool paths as necessary. Having everything drawn by default is useful, as you can image.

Next up are the Isolation Routing options. This needs some further explanation, and we actually have to jump a bit now, to the mechanical bits you use to mill the boards:

V-bits, degrees, tip width, depth of cut and width of cut

V-bits, named after the V-shape of the bit, are what you use for isolation routing, copper removal (larger areas, although end mill could work also) and V-grooves. My typical go-to bit is a tungsten carbide 30-degree 0.1mm V-bit, with 3.175mm (1/8") shaft (the shaft-size depends on your machine chuck, usually small CNCs have 1/8"), with or without titanium-coating:

10-pcs-3-175MM-Shank-30-Degree-0-1MM-Fla

images?q=tbn:ANd9GcRUb-Qpfl_JargIBbAIqoN

The "degrees" of the bit are the angle at which the tip tapers towards the pointy end. Typical angles are 10-, 20-, 30-, 60 and 90-degree bits. I have all of those, but 95% of the time, I just use 30-degree bits for isolations and copper removals. If I'd need really thin cuts, I'd go down to 20- or even 10-degree bits, but those are more brittle and break more easily. 30-degree has seemed like a good compromise of small cut width and durability of the bit (durability as in it doesn't snap as easily, all the bits will dull over time). Titanium-coated bits last longer while without dulling too much, but they can still snap as easily as the non-coated ones. After you learn your machine "limits" (speed-wise), you can keep using the same bit until it dulls out (at which point it will make bad cuts and/or snap), it's been a long while since I've snapped a bit with too deep cut or going too fast. If you're a systematic person, you could of course keep tabs on how much (millimeters) the bit has been used, and replace it after a certain point. I've never bothered.

The bits are very cheap ordered from Aliexpress (you can get a set of 10 bits usually for something like 3-5€) and they last you a long while after you get things set up correctly. Some people complain that the bits dull fast with FR4, not lasting even a single board, but I suspect they just use far too high feed speeds/single depth pass, as I've cut  at least 10 larger boards with the same tip without noticing much dulling. Still eventually, you will notice that the cuts aren't as good as they used to be. If you haven't changed any settings, followed your usual procedure that usually makes good boards etc, likely the bit has dulled too much and it's time to replace it.

The width or diameter of 0.1mm stands for the tip diameter. While to naked eye 0.1mm seems it's entirely sharp / point, there actually is a small 0.1mm (about 4 mil) "flat" end at the tip. For larger copper area removals, you want to use wider tip diameter, like 0.2mm or 0.5mm, or even more, depending how much copper you want to remove and how small crevices the tip still must be able to pass through (if for example you want to remove 0.3mm wide copper area from under an SMD-component, you can't use 0.5mm tip for that).

If you look at my settings, you will notice that the default option I use for Tool dia (tool diameter) is not 0.1mm, but 0.15mm. Why? This option tells FlatCAM how wide the cut is at the surface of the board. The tip deeper in the board will cut 0.1mm wide path, but the edge at the top copper will cut a wider path as the bit becomes wider. Here's how the width of cut is calculated based on depth of cut:

Tool4.png

Width of cut at the top = Tip diameter + 2 * tan(bit degrees / 2) * depth of cut

There's a tutorial explaining the trigonometry and equations here:  https://www.dropbox.com/s/mjdoql4m6s3vng6/V-Bit Calc Tutorial.pdf?dl=0 (do note that it doesn't take into account the tip diameter, which must be added to the final result, as the "flat" end is at that depth, not the point of a sharp triangle). Instead of working out that by hand/pocket calculator, you can also just use something like   http://woodworkerb.com/home/pcb-isolation-routing/tool-width-calculator/

Still, this doesn't explain why I've got exactly 0.15mm there as the Tool dia -value. The reason is that I use 0.095mm (notice the amount of zeroes, a little under 0.1mm) cut depth when doing my boards. If you use the above equation with 30-degree 0.1mm wide bit and 0.095mm depth of cut, you get:

Width of cut = 0.1mm + 2 * tan(30/2) * 0.095mm = 0.15091mm

I've just rounded it off to 0.15mm, and like said, I pretty much always use the same values: 30-degree 0.1mm V-bit, 0.095mm cut depth, makes a 0.15mm wide cut at the top of the copper layer on the board.

So, next question is of course "why exactly 0.095mm"? I use "1oz" -boards (1 ounce of copper "flattened" evenly per square foot). These boards happen to have 35µm (micrometers) = 0.035mm thick layer of copper on top of the laminate substrate (substrate being either bakelite for FR1 or fiberglass reinforced epoxy for FR4). 0.095mm is a "convenient value" in the sense that 1) it's roughly 3 times the thickness of the copper layer, making sure that the bit cuts all the way through the copper and cuts the connection between the sides of the cut and 2) it creates an "easy to remember" 0.15mm wide cut  ;)  No further science behind it on my behalf.

Why FlatCAM needs this information is so that it can plan the milling paths around your traces, it places the tip of the bit half of the width of cut away from your trace edge, so that the top of the trace is the correct width you've used in your board layout design. If you need to deal with higher voltages and "creepage" distances, you need to take account that the width is slightly smaller at the bottom of the copper layer (for example for 0.095mm depth of cut, the bottom of the copper layer is at depth of 0.095mm - 0.035mm and the width there is 0.1mm + 2 * tan(30/2) * 0.06mm = 0.132154mm. But, we'll get to the Width (# passes) -setting soon, and when you want wider cuts for high voltage isolation/comfort of soldering, you usually just make more passes to make the cuts wider (and/or maybe use a wider angle/wider width bit).

If and when at some point you use a bit with different angle and/or width (and you will use non-V-shaped bits for other stuff, but I get to that when I explain making the cut out tool path), you need to change the Tool dia-value, but you only do it for that "phase" of the project (I'll explain what I mean by "phase" later on), these application default settings are the most common ones, so you need to tinker around with the settings as little as possible when creating the g-code for your projects, and the whole process becomes fluid and pretty straightforward, making it easy to remember and repeat over and over as you make new designs.

The "Width (# passes)" and "Pass overlap" -options

The Width (# passes) option sets the number of passes to do in the current phase of the project (again, I'll explain what I mean with "phase" later on, maybe it's a bad choice of word),  that is, how many times the "polygon" (shape to isolate or cut) is gone around width-wise, each pass going further away from the shape.

When you do a "single pass" isolation-routing, the bit will make a single cut around the shape, and you end up with a width explained above (so 0.15mm for the 30deg/0.1mm at 0.095mm depth for example). When you want wider cuts, you can use a wider tipped bit, wider angle bit (or a combination of these) or make multiple passes. When you add more passes, the next pass will be done further away from the shape edge, and how much further it's done is controlled by the Pass overlap -option. Pass overlap is a multiplier of the Tool dia, so the default value of 0.15 means the overlap is done at 0.15 * Tool dia millimeters (or inches, if you use inch as unit). Do note that it's the amount of overlap, so if you set it to 0.10 instead of 0.15, less overlap is done, not more. You can also think of it as a percentage, where 1.0 = 100% (that would not really make sense, though, as it would mean the next pass is done right on top of the last one ;)) and 0.15 = 15% etc. The reason for "overlapping" the passes is that the V-bit is at an angle, and will cut a V-shaped groove instead of a rectangular shape, and if there's no or not enough overlap, clearly visible "ridges" may be left between the passes, and may even contain some copper there (which might become an issue if it's a really thin "sliver" that comes off and short circuits the adjacent copper areas).

For default settings, I've left the Width (# passes) and Pass overlap at the defaults of 1 pass and 0.15 overlap (I think those were the defaults at least ;)), and adjust them as necessary.

"Combine passes" -option

When using more than one pass, this checkbox controls whether the passes are combined to a single g-code -file, or if each pass is created as a separate file. I've never seen any use for having separate files, so I leave the option enabled by default.

 

Board cutout -options

The board cutout -options affect only if you don't define your own Edge Cuts in KiCAD (or whatever EDA you use). I don't usually use it, so I'll just go over the options briefly. The Tool dia -setting has the same purpose as with the isolation routing -options, except for cutouts you usually use an end mill and not a V-bit. What an end mill is, is a drill-like bit, except it has this rough texture and is meant not only to go straight through (depth-wise) but also cut sideways. I use titanium-plated "fishtail" end mills, they look like this:

1-5mm-PCB-End-Milling-Cutter-Strawberry-

Well, the picture's of an 1.5mm bit, I use 1mm for the cutouts, but the difference is just the bit diameter. Since there's no "tapering" in the bit, the width of the cut is the same across the entire depth, so you just enter the bit width as Tool dia. I leave the default at 1mm, because I always use 1mm end mill for cutouts (again, it's a compromise: thicker bit will be stronger and won't snap as easily, but you "spend" more board / need to leave wider margins around the holding clamps, larger cut area means more stress on the motors etc.). If you don't go overboard with feed rates, these bits will last you a good while. I've broken a couple on accident with trying to do too deep cuts in one go and/or too high feed rate (speed), but with "correct" settings, it seems these things are near indestructible. I'll get to the depth-wise multi-pass cuts at a later part, but it's essential to do it in multiple passes when cutting FR4, as the laminate substrate is so strong that you can't cut it in one go (or maybe with really low feed rate, but then it's faster and less stressful to the machine just to do it in smaller passes but with somewhat higher feed rates). 

The Margin is the amount of millimeters (or inches, again if you're using those as units) to leave at the edges from the nearest trace/shape. If you put 1.0 there, the generated cutout (remember, these options don't affect anything if you use your own Edge Cuts) will leave 1mm between the edgemost traces/shapes of your boards in X- and Y -plane. I've left it at 0.1mm, but I rarely do the cutout using this.

Gap size is a bit weirdly named option, as it's the size of a tab the generated cutout will leave, the Gaps -option beneath it sets the amount and location of tabs to leave. 0.15mm is really small, but still easily doable, if you make it too thick, it will be hard to get the tab to break. The Gaps options mean: 2 (T/B) = leave 2 tabs, one at the Top of the board, one at the Bottom, 2 (L/R) leave 2 tabs, one at the Left, one at the Right, 4 = leave 4 tabs, top, bottom, left and right. If it's unclear what I mean by tabs, this picture should clear it up (tabs are circled in red):

Tab_routing2.jpg

Remember, the generated cutout will ALWAYS be just a rectangle, with sharp corners. If there are multiple boards in your design, the generated cutout won't distinguish separate boards, but generate the cutout around everything in the design. The cutout-shape in the above picture is not done by FlatCAMs' board cutout, but defined probably in the Edge Cuts (or similar) -layer by whoever designed and ordered those boards (or maybe by the fab-house).

Non-copper regions -options

These settings are needed when you define areas for copper removal. There's only two options: Boundary Margin and a checkbox for Rounded corners. These options affect only the outer edge of the region, and you will use the Paint Area -tool later on to "paint" the areas where copper is to be entirely removed. Boundary margin is the amount of millimeters/inches to leave at the edges (again from the edgemost parts of the shape), and rounded corners makes, unsurprisingly, the corners round. The created region will again be always a rectangle, defined by the outermost shape-edges of the selected region.

I've left these at 0mm margin and the rounded corners -option off as default. Often the area where you want to remove the copper from is "inside" the board, not around the outer edges, so you don't want any margin, and rounded corners doesn't make sense when removing copper from "inside" the board. As usual, you will tweak these on a per-case -basis, if need be.

Bounding box -options

This is similar to Non-copper regions, except when you actually create a non-copper region with a real project, you select the polygon which to clear from copper. Bounding box will generate a rectangle around the outermost edges of the entire gerber. The Boundary margin- and Rounded corners -options work similarly as with the Non-copper regions. I must admit that I've never used the bounding box for anything, at least so far, the basic idea seems to be to use it for bed-flattening, but thanks to auto-leveling, there's no need. I don't use it, so for me the values have no meaning.

 

Excellon options

Excellon options are for the drilling files. Again you have the defaults for plotting, I just leave Plot enabled and Solid off. 

Drill options

Under the Create CNC Job -title, you have the options for the drilling. 

Cut Z is the depth of the drilling, the copper clad boards I usually use are 1.5mm thick (I don't know whether the 35µm copper layer comes on top of that or is included, and it doesn't matter), but I've set the default depth to 1.8mm to make sure the drill goes all the way through. An important note here is that the Z-axis increments when the drilling head is moving up and decrements going down. When you get to the part where the actual milling is being done, you will set the Z-axis zero point to the surface of the copper layer. To go through that layer, you move down, meaning that the Z-axis values going "inside" the board are negativeThus, the value you set to the Cut Z is negative! The default value I use is -1.8 (mm).

Travel Z is the height to which the milling head is lifted before sideways movement during drilling. Of course you want the drill bit above the copper clad while it's moving to the next position to drill, so you use a positive value here. 2mm is a good compromise; it's certainly high enough from the board surface to prevent the bit hitting it and breaking the bit, yet not that high as that it would take a long time for the drill going down during actual drilling. You could actually go lower here, the curvature of the board (I will get to that in the bCNC-section; but the curvature and "auto-leveling"/depth probing is very important to get decent boards, and probably many people have given up on trying to mill their own boards because they weren't aware or didn't have the option to do it!) is usually something like +-0.2mm.

Feed rate is the speed at which the drill moves up and down. When moving from one point to the next between actually drilling holes ("travelling"), another feed rate is used, that is not set in the FlatCAM at all, but programmed in your CNC firmware (at least for Grbl).

I've used a default of 90 (the unit is millimeters per minute; that means it's actually only 1.5mm/second!) for all other sizes, except when doing the large 3.2mm holes for M3-screws, I drop it (separately) down to 60mm/min, but the default is 90, because there are far more different sized drills used for making the holes for connectors and component legs than fixing screws, and you don't want to be setting the value separately each time.

Using too high feed rate (speed), the drill bit may break as it cannot cut that high "chip load" (large pieces, sort of...) at a time. Too slow feed speed will dull your bits faster as the drill bit is actually more like "scraping" the hole through rather than cutting. 90mm/min is not optimal, the actual "optimal" feed rate would vary depending on material and drill size, but it's a good compromise that works, and at least in my case, hasn't dulled down the drills really fast (I think I'm still using the first bits ever on many sizes, so far I've probably only replaced something more common, like 1.0mm and/or 0.8mm).

Warning: As I was writing this tutorial, I actually noticed the CNC started making much worse job than usual, after having some problems with drilling 3.2mm holes. After figuring out what's going on, I determined it to be caused byt the Z-axis motorclamp being broken by force. You may want to use even lower feedrate than 60mm/min. I've since fixed the motor clamp using a hot-air station, but after a couple of boards, it broke again. Likely you should use even lower feed rate for drill sizes over 2mm (or thereabouts, I got up to 1.5mm without problem when things started to go south) or get a machine with fully metallic Z-axis assembly (like some CNC3040's for example, with 300W motor and full aluminum cast motor clamp & full metal other parts of the z-axis).

Toolchange Z is the height at which the machine will rise the milling head for tool-change. I haven't ever used this, but the general idea is that you can create a g-code which has these "tool change"-parts, where the head is lifted up and the machine stops waiting for you to press "Continue" (either in bCNC or on a separate control board, more on that later). You'd then remove the current bit, and put on the new one, then allow it continue. Sounds good, eh? Like said, I haven't even actually tried it, but I can already see a glaring problem with this: When you change the bit, the new bit might be different length, or you don't get it down to exactly at the same height as the old one was. The result is that the drill might not go deep enough, or it hits the board surface during travel and breaks your bit (possibly also scraping and in the worst case ruining your entire board)! We'll get to depth probing in the part about the actual milling/drilling/cutour process; suffice to say, each time you change the tool (V-bit, drills, end mills), you need to run the basic depth-probing so that bCNC knows to adjust the milling head height correctly (autoleveling is only done once at the start of the process).

Spindle speed is an optional setting that inserts a g-code to tell the CNC to run the spindle at specific speed (RPM). I've left this empty (not set at all). If you have a CNC control-board that runs the spindle-motor through itself (like the "Woodpecker"-board the CNC 2418 comes with, running Grbl: https://github.com/grbl/grbl  for controlling the steppers etc. ) , you control the spindle speed through bCNC (or through g-code using this option). I burnt the spindle-motor control MOSFET of my original Woodpecker board with a more powerful spindle-motor (20k+ RPM, sounded like a jet-engine at full speed :P) multiple times, and since then created my own spindle-control board separately, with on/off button for the spindle and coarse- and fine-tuning potentiometers for the spindle speed, the stepper-control was replaced with Arduino Uno (I just uploaded the Grbl to it myself and figured out the settings) + CNC-shield + A4988 stepper motor controllers, totalling about 10€ in price. (To be fair, the Woodpecker-board isn't bad per se, but the replacement price was way too high for what it is, at around 30-40€ or thereabouts; a stripped down Arduino Nano + 3 x A4988 -stepper controllers, step down circuitry + spindle control and a few other passives around it).

Mill Holes -options only contain a Tool dia -setting. This is meant for making larger holes by milling in a circular motion with a smaller end mill (not a drill, it will snap as it cannot cut sideways). Note that this only means circular holes, not slots. I've never had to use it, since I have drill-bits from 0.3mm to 3.2mm, or at least all values until about 1.5mm in 0.1mm increments, then most sizes going up to 3.2mm, and never have needed larger round holes. If you intend or need to mill holes instead of drilling them (for example because the hole is very large or you need some size for which you don't have a drill-bit for), you can set you "default" end mill diameter here if you like.

 

Geometry options

This is where you put your defaults for isolation routing (these values are also used during milling slots and cut out, but since you can only set single defaults, I set the isolation routing values as defaults, and then change manually during possible slots and cutouts).

The Plot Options only contains the Plot-checkbox, which you want to leave checked (it'd be rare that you want to hide it, definitely not by default as with pretty much any plots).

Create CNC Job; milling options

Cut Z is the depth of cut, which I've set as 0.095mm, as discussed before.

Travel Z is the height the bit is pulled up to while moving from one point to another (when not cutting), I use 2mm again as a "safe" default value. You can make it smaller if you like, but it doesn't make that big of a difference in isolation routing

Feed rate is the speed at which the routing is done (again millimeters per minute). At least for my machine, the "safe" values are about 200-300mm/min for isolation routing, lower for cutouts. I leave the default at 300mm/min. Again you will modify this value for possible slots and cutouts, I'll explain the values I use later when we get to an example project going through all the phases of making the g-code files.

Tool dia is again the tool diameter used for milling (or slots, or cutouts). I again use the 0.15mm value as default.

Spindle speed is the optional spindle RPM-value, I don't use it since I control my spindle speed manually. See the Spindle speed - description above in Drill options for details.

 

Cut quality (Feed rate vs RPM)

Feed rate, meaning the speed at which the milling bit is moved (at fastest, Grbl will accelerate and decelerate it after/before turns to avoid overshoots and such), highly effects on the quality of the routing cuts (other factors are at play too of course). The faster the milling bit turns (rotates), ie. rpm's of the spindle motor, the faster it's possible to make the cuts without the quality suffering (or the bit breaking). I couldn't find an animation showing the effect, but this picture from Wikipedia shows the basic idea:

Revolutionsandridges.png

As the V-bit rotates around its center while being moved across the material to cut, the speed at which it's being moved vs. the rotation speed of the spindle will affect how big a "chunk" of the material is cut by the teeth at each rotation ("chip load"). Real machinists calculate or use charts or software that will get them the correct "chip load", ie. feed rate for specific material, cutting tool, RPMs etc. I've never bothered delve that deep into it, rather I've just tried out different speeds etc. to get repeatably good (enough) results. There will be some variance from board to board, depending on how dull the bit is, how tight autolevel grid was used etc, but my "usual" values have worked good for me pretty much always (depending on your machine, yours might be different, so best way to find them out is to make test cuts to find out the "correct" values).

8chipload.png

I usually run the spindle at full RPMs (as fast as it can spin), which is OK unless the motor bearings / chuck isn't that good, in which case high RPMs can cause more runout (wobble of the milling bit tip). With the original 7k or 9k (I no longer remember which it was) RPM motor and ER-11 chuck, there's very little runout. With the 20k RPM motor I had in use for a while, the runout was often way too much for higher RPMs, so I couldn't run it really at full speed most of the time (although sometimes it just "worked" and I could get good cuts at 800mm/min).

Going up with chip load (the milling bit cuts bigger chunks of the copper and laminate per rotation as the feed rate goes up), the edges of the cuts will become more jagged, as the bit is being moved forwards before the cutting edge of the tip has fully turned. The faster the feed rate is (vs. RPM), the worse the cuts get. Also, going "too fast", the tip might break as it's trying to cut too high load (this will vary based on tip quality, dullness, material hardness and depth of cut).

Here's an example of good cuts with 100mm/min (top left), 200mm/min (top right), 300mm/min (bottom left) and 400mm/min (bottom right) feed rates running the motor at full speed:

RPsCsyQ.jpg

The test shapes are 0.6mm traces, the size of a single shape is about 6x4mm. The cuts are clearly through, no jagged edges (except a little bit on the 400mm/min part) and not much variation in the trace width. Close ups:

100mm/min:

2nNGUbg.jpg

mw4bKQV.jpg

 

200mm/min:

JWWwHS9.jpg

OfMRf4U.jpg

 

400mm/min:

gzTv8Xr.jpg

pxokbO5.jpg

You can see the edges become more rougher and jagged with the speed going up. Suitable speed depends on your spindle speed and machine, so maybe do a couple of test runs with simple patterns if you haven't done this before.

When the milling bit is dull or the Z-axis has play (during making this tutorial, I actually found out the 3D-printed spindle motor clamp on the Z-axis had partially cracked, fixed for now with hot air, but no more drilling bigger holes until I replace it), the cuts may become bad. Not going all the way through or leaving scrap on the edges of the cuts. The below cases aren't that bad yet, as the copper scraps are removed during sanding:

200mm/min:

tsSEVPu.jpg

Close up of the 45 degree part:

VLKvTny.jpg

If you're getting cuts like this, try another V-bit and/or check that the spindle motor is firmly attached. My motor clamp lasted a good hundred boards, it seems that drilling the bigger holes (>1.5mm or so) puts a lot of stress on the clamp, so for now I've drilled the larger holes with 1.5mm bit and then enlargened them with a handdrill and 2.5mm or 3.2mm bit. It's a bit annoying, but good to know for anyone thinking about getting a machine with a 3d-printed motor clamp/z-axis assembly.

I usually sand down the board a bit before soldering it (even when the cuts are just fine), this gets rid of the copper bits still caught in the cut edges if there are those, and also removes oxidation (copper doesn't rust as such, but it does oxidize) from the surface, so the tin gets better contact.

After sanding the board a bit with 1000-grid wet sandpaper (I use both linear and circular motions, not pressing down much, the idea is to "swipe" over each cut edge in as many directions as possible to get the edges smoothed, you don't need but a stamp-sized piece of the paper) and then washing it (with plain water):

iZVqlTO.png

AIjbzmB.jpg

All of these cuts are totally through, ie. none of the traces are shorted, and what I'd still consider "good enough". I usually run the isolation milling at 200-300mm/min, going faster than that, the bit might sometimes not even cut all the way through (with FR4 that is, despite using two depth passes and about 2.5 times the thickness of the copper layer as depth, FR1 is more forgiving), or if it's dull enough, it might break halfway through the job. Also using more width-passes makes the isolations wider, so even if there are "not that good" edges in the traces, the second pass (or more) will fix the situation.

 

Paint Area -options

Paint Area contains options for "painting" areas, this is used for copper removal from larger areas.

Tool dia should be a familiar value to you already if you've read this far. I commonly use 30-degree / 0.5mm V-bit for copper removal, so I set the default to 0.55mm (the additional 0.05mm coming from the 30-degree angle and 0.095mm depth of cut), and modify the value per project as needed.

Overlap is similar to the Isolation routing settings, the factor how much the adjacent passes overlap each other. 0.15mm (the default) seems to work well, although if you want to make extra sure that everything gets removed, you can use even larger value, like 0.25 (25%) or 0.5 (50%).

Margin is the amount of millimeters of margin to leave at the edges of the painted area. I've left this at 0mm, as I want the cuts to go all the way to the edge of the area I've painted.

CNC Job Options; g-code output

The last set of options is for the generated g-code, called "CNC Job Options". 

The Plot Options contains the Plot-checkbox, which you want to leave checked, but also yet another Tool dia, this time it's slightly different than in other sections; this only affects the drawing of the g-code plot. I've set mine to same diameter as I usually use as the tool: 0.15mm.

Under Export G-Code you have input boxes for Prepend to G-Code and Append to G-Code. You can write your own bits of G-code in these boxes that gets appended and prepended to the generated G-code. I've left them empty, but you could for example add a piece of code to do a homing cycle (prepended to the start of the code, if you use limit-switches/end stops, I don't), and/or lift up the mill head after the job is complete (appended to the end of the code).

The last two options are Dwell and Duration. If the Dwell-checkbox is checked, the g-code generation will prepend a pause at the start of the code, with the duration given in the Duration -field. The idea is that if your spindle takes a second or two to reach full speed (and the spindle is controlled from the g-code, unlike mine), there's a small pause at the start of the job to allow the spindle to accelerate to full speed before it's being used.

 

After you've got the settings down, don't forget to select File -> Save Defaults. Otherwise you will lose your changes when the software is closed. After the changes are saved, you have "sensible" defaults, which you may have to tweak for your projects from time to time, but most of the time you can get away with just using the defaults.

 

Phases of process

I earlier on mentioned the "phases", or maybe "stages" would be a better word. When creating the g-code -files, the order isn't that important, but I usually follow the same order I do with the actual milling (and there the order matters, for reasons I will explain in the milling-part, although most of them are probably obvious):

-Phase 1: Isolation routing

-Optional phase 2: Copper removal

-Optional phase 3: Separate text engraving (can be done in isolation routing too, if you draw your texts to copper layer)

-Phase 4: Drilling PTH-holes

-Phase 5: Drilling NPTH-holes

-Optional phase 6: Cutting slots

-Optional phase 7: Cutting V-grooves

-Phase 8: Cutout

Phases 3, 6 & 7 (separate text engraving, cutting slots & v-grooves) aren't explained in this part, as they're more rare, and I need to dig up or create an example project using those.

A typical project I do usually doesn't contain copper removal, texts, slots or grooves, so that leaves only the isolation-, drilling- and cutout- phases.

 

For this example project, I picked a "testing board" called "595Breakout", that I did a long time ago, although it's not "plain" breakout board for a 595-chip, but rather a board that contains pinheaders and connectors, LED-bars for showing the states of the 595 outputs, two chained 595's (serial-input / parallel-output shift registers, through-hole DIP packages in this case), pins for attaching the shift-register outputs to somewhere and some SMD-logic level mosfets to "sniff" the output states for controlling the LED-bars + a bunch of passives. Here's the actual design in KiCAD and final board to give some reference, so you can compare it with the FlatCAM views:

TmkDIjS.png

RRQMYH3.png

The ready-made board picture was taken much later on, as when originally writing this, I didn't realize that this was one of those projects where I didn't take pictures during the milling process or of the unpopulated board...

The reason for picking this project was that it contains (of course) isolation routing, copper removal (it wouldn't be necessary for this board, but can be done for demonstration purposes), different sized "normal" (PTH, plated-through) holes to drill, NPTH-holes for M3-fixing bolts and a rounded cutout. The green lines near the left-middle of the board are actually traces drawn in the back-copper layer, but I didn't do this as a 2-sided board, instead I just use jumpers there on the non-copper side.

Also it uses a solid copper ground plane, which is typical for my boards, but does come with a couple of (possible) surprises. In this case, I've actually used a bit too low isolation distance when defining the copper area (the ground plane) in KiCAD, and will show how it can affect things (in this case, it's not critical, but depending on your project, you might want to return back to you EDA to make the isolation distances a bit larger).

 

Phase 1: Isolation routing

To start, you open the gerber for the F.CU-layer from your project (I save the gerbers in KiCAD-project directory, you might have placed them elsewhere). Select File -> Open Gerber... and open your file. If it's a large / complicated board, it might take a while to open (like seconds/tens of seconds), and then you see the "gerber-object" plotted in the main-view:

maTuWAR.png

The green part (if you use the "Solid" -plotting option and not multicolored) shows the "solid" copper. White parts (actually, they're "see-through", if there were another object behind this one, it would show through them) are places where the original layout has no copper.

The "message view" (actually it's a TCL -shell, but I've never learned to use it, suffice to say that you can "script" FlatCAM with TCL-language) on the lower part of the window says "Object (gerber) created: <your gbr-file>". FlatCAM has four types of "Objects", with this diagram shown in the manual what can be created from what:

objects_flow.png

Gerber-files create "Gerber objects", Excellon files create "Excellon-objects", there's also support for SVG's, but I've never used them. When you start generating the isolation/cutout/whatever g-code from a gerber, you first create Geometry object from it (which can also be modified through FlatCAM, but I pretty much never do it), and finally the Geometry Objects are made into G-code ("CNC Job Object"). If you look at the (default) settings I explained before, you can quickly realize how the settings match these object types (Gerber-, Excellon-, Geometry- and CNC Job-options -> Gerber-, Excellon-, Geometry- and CNC Job -objects).

On the top left, with the "Project" -tab selected, you see a single object at this point, the just created Gerber-object for your Gerber-file. Double click the line with the name of the object (or select it with single click and then select "Selected" -tab, it's the same thing).

To save a little bit of bandwidth, I'll just show what the Selected-tab looks like at this point, as nothing else in the screen changes:

akuj0Ig.png

A note about Scale- and Offset -options

These options don't have any defaults in the global-options, and are only visible for Objects you've created, I haven't had use for these so far, but maybe you might have.

The Scale -factor can be used to shrink or enlarge the entire object. I haven't had any use for it, as I design the board to that certain size what I want while doing the layout in KiCAD, but I guess it could be useful for some other purposes, or if for some reason your EDA would output the gerbers with wrong scale, you could (probably) fix the size using a non-1.0 scale-factor (shrinking < 1, enlarging > 1) and then clicking the Scale-button.  Do note that this is relative to current size, not absolute vs. the original scale. If you set a scale factor of 1.1, and click the Scale button, the object is scaled up by 10% in relation to current size and to the origin you've set when exporting the file. If you hit it again, it will again scale by 10% in relation to the size it currently is.

Offset is a vector value with X- and Y-offset given in your units (mm/inch). Setting the values and clicking Offset-button will move the entire object by the amount given in the vector components. Positive X -value will move to right and negative will move to left. Positive Y-value will move up, and negative will move down. Like with the scaling, do note that this is relative to current position, not absolute against the origin; if you set the X and Y-values as 10, clicking Offset will move the design 10 units (mm/inch) up and to the right. If you click again, it will again move 10 units up and to the right.

If you manage to screw up the offset or scale somehow, there's no "reset" -button or such to return back to the original; you'll have to delete the object (select it in the Project-tab and hit Delete from your keyboard or select Edit->Delete from the top menus) and reload the original or re-generate the Geometry object from the Gerber Object.

Generating the isolation geometry

At this phase, we're interested in Isolation Routing, so you need not care of the rest of the options (Board cutout/non-copper regions/bounding box). The options are the same as when setting the defaults (if you need descriptions for them, re-read the settings above), and as you can see, the defaults have been loaded.

Assuming I'm going with my "usual" 30-degree / 0.1mm bit and 0.095mm depth of cut, and don't want any extra passes, I can leave these at defaults. But for the sake of example, let's say I want to have wider isolation, so I set the Width (# passes) to 2, and leave the Pass overlap at 0.15 and Combine passes checked, then hit the Generate Geometry-button. FlatCAM will "think" for a while (it's generating the geometry), then plot the generated isolation geometry (assuming you've left the Plot enabled in the Geometry Options) on top of the Gerber object:

Z2i0Xhb.png
 

There are messages related to the creation of the object in the lower part, and selecting the Project -tab again, a new object is seen there now; 595Breakout-F.Cu.gbr_iso ("_iso" standing for isolation).

No actual tool paths or g-code has been yet created at this point, the geometry object just contains the "edges" of the gerber that are traced for tool-pathing next. Since the 2 passes were combined to single object, there's just one object. If you left the Combine passes -checkbox unchecked, it would have created two separate isolation geometries with the edges slightly offset from each other. Double click the newly created geometry object from the Project-tab, and you get to this in the Selected-tab:

M5Kg78x.png

Again the defaults are already set, but there are a couple of new options under Create CNC Job that aren't there when setting the defaults. Here's the important part; if you're milling FR4, which is much harder material than FR1, you want to do the depth cutting in stages, not in one go. If you do it in one go, you'll likely either break your V-bit or at least make it dull a lot faster, as it's "stressed" more by cutting more material in one go. If it's FR1, go ahead and click the Generate-button. I use almost exclusively FR4 (except for very quick & simple prototypes), so I want to do the depth cut in stages. I check the Multi-Depth checkbox and set the Depth/pass to half of my depth-of-cut/Cut Z:  0.095mm/2 = 0.0475. Do note that for this option, you don't use a negative value.

dq4rrOL.png

The downside of using multiple depth- / width-passes for cutting the isolation is that it takes longer; if cutting just single pass (width-wise) and whole depth in one go, the machine has to trace the contour once. For two-passes width-wise and full depth in one go, 2 passes. For two-passes width-wise and two-passes depth-wise, it takes 4 times as long (4 passes in total). And so forth. The upside is that your bits last longer (and don't snap) and you get better cuts. Like said before, FR1 can usually be pretty easily cut (depth-wise) in one go, but for FR4, you likely want two passes for the depth.

Technically, it could be possible to cut FR4 to the full depth in one go, if you drop the feed rate (at least if you have strong bits and a bit of luck, I have no idea how much variation in the bits there might be, and whether the cheap bits from AliExpress actually even really are tungsten carbide ;)), but dropping the feed rate will again cause things to take longer. Two-pass depth-cutting has worked fine for FR4's for me, with feed-rates of 200-300mm/min. I'll do some test boards with simple cuts at different speeds later on in Part 4, and show some microscope images of the cut quality.

The RPMs of the spindle motor will also affect how fast you can go (feed rate-wise), the faster the motor is turning, the less material the bit has to cut per turn (at the same feed rate vs. lower RPM). With the 20k RPM motor, I could get up to 800mm/min at best with good quality cuts, but the motor had low quality bearings, and usually had too much runout at high RPMs, or started "oscillating" at some specific RPMs. Do also not that the motor tends to run slower when cutting than when spinning "freely", and if you go really fast and the motor can't turn fast enough, your bit will break.

Before heading of to creating the G-code, I want to point out about the issue with the copper-plane isolation (clearance) distances I mentioned earlier, that you might also hit if you're not careful.

Copper plane isolation distance vs. generated isolation routing

Zooming in on the generated isolation routing, you'll notice that there are two sets of red-lines running through places, where there's enough room to make 2 passes. But the red lines (representing the isolation geometry tool paths) are partially "cut" or entirely missing from some portions, in this case the thermal reliefs:

iW20sXL.png

The rectangular shape with corners without copper near the center of the image has only small red "curves" in the corners. The round shape above it has no isolation routing marked at all!  I use thermal reliefs, or rather, KiCAD creates them unless you tell it not to, on components connected to ground plane. The idea of a thermal relief is to partially "isolate" the pad where the component connects to from the surrounding large copper area, so that the large amount of copper around it doesn't suck as much heat away from the pad while soldering. Usually, for a higher wattage (I use 75W) soldering iron and single-layer 1oz (35µm) board it's not that much of an issue (especially when using large tip), but still makes it easier. If you'd have a multilayer-board (like 4-8 layers) with ground planes going through all layers and attached by plated vias, the combined copper mass can suck so much heat that it becomes very difficult to get the pad to heat enough to melt and sufficiently attach the tin without a powerful soldering iron and large tip (the latter which might not be an option if the component is very small and/or in a tight spot). 

There are (at least) four options to circumvent this issue:

  • Nevermind it. In this case, this is a single layer board, I have a 75W iron and with a larger chisel-tip (like 1.6-2.4mm), it can still solder things directly to the copper plane, thermal reliefs or not. In case of this board, all the actual traces and pads do get isolated, it's just that the thermal reliefs have too low isolation distance and some of them won't get made. So I could just mill as it is and nevermind about this

 

  • Go back to your EDA and change the settings for the copper area. In case of KiCAD and this board, this is what the settings were for the ground plane Copper Zone:

0kT3BsL.png

Huh? The clearance is 0.15mm, and I'm using 0.15mm as my width-of-cut, so the bit should fit there. Why isn't it creating the isolation routing then? There's actually a couple of reasons:

  1. FlatCAM won't generate the cut if the space is exactly the width you defined, it would have to be at least 0.151mm or such (slightly larger), this might also be down to ever-so-small rounding errors in floating point numbers
  2. The round thermal-relief shape is done in segments by the Copper Zone-tool, but the pad on top of it is round. If you look at the shape, you notice the "inner" edge is round, while the out edge is made from two "lines". The distance between these isn't exactly what you define in the Copper Zone properties across the shape
  3. And then why do the "normal" traces get isolated? Because in KiCAD, the isolation around trace edges is defined under the Net Classes Editor in Design Rules. The default there is 0.2mm, and as you can see from the zoomed-in FlatCAM -screenshot, the cut there is wider than with the thermal reliefs.

So, you can go back to KiCAD (or whatever you use), make the clearances sligthly larger, rebuild your copper zone, and re-export the gerbers

For the rest of options:

  • Use smaller angled bit (like 20- or 10-degree) and/or slightly less deep depth-of-cut, that way the width-of-cut won't be as large on the surface, for example 0.075mm depth of cut with 30deg/0.1mm bit = 0.1mm + 2*tan(30deg/2) * 0.075mm = 0.140192mm. 
    • Delete the current isolation geometry by selecting it from the Project-tab and hitting Delete -button on your keyboard (or Edit -> Delete from the top menus), re-create the isolation geometry with 0.14 Tool-dia and use 0.075mm Cut Z. Don't forget about multi-passing the depth cut if using FR4.
    • If changing to a bit with different degree, calculate the width of cut based on bit angle and depth-of-cut, then recreate the isolation geometry with the new settings

 

  • The last option is to "lie". If you don't mind having ever-so-slightly smaller traces and pads, you can tell FlatCAM that you're using a 0.14mm (or 0.149mm) width-of-cut even if you still use 0.095mm depth. The software or the machine won't know what bit you're actually using, but of course this will make your traces and pads slightly smaller (very little so, if using 0.149mm), as the geometries are created based on the assumption that only 0.14mm is removed. The difference "even" for 0.14 vs. 0.15 is so small in the end, that unless you're using really thin traces, it likely won't make that much of a difference in the end (a runout of 0.01mm would already cause that much difference even if everything else is ok)

The "lesson" to learn from this is that you need to pay mind to the clearance/isolation distances you define in your EDA (at least if using filled copper areas) against the width-of-cut, FlatCAM won't allow you to "break" them (unless you lie about the width-of-cut  ;)), which is actually a good thing, so you can't screw up (as easily) by accident.

 

Generating the G-code

In this demonstration, I've left the slight problem with isolation width untouched. So not all of the thermal reliefs would get cut. After hitting the Generate -button in the above, another object is created, this time it's a CNC Job Object, with the ending "_iso_cnc" (meaning isolation CNC Job Object)The CNC-job object is plotted (assuming you've got the CNC Job Object plotting left enabled by default), the blue lines are where the bit is actually cutting the copper, light green lines (which can be a bit hard to see against the green Gerber Object solid-plot) are the "travel"-routes, where the milling head is lifted off copper to move elsewhere at travel feed rate (which isn't defined in FlatCAM, if memory serves, I've set it to around 800mm/min in Grbl, the firmware used in the machine):

XqGRVbo.png

As you can see from the blue lines, the round thermal reliefs near the top left corner are left untouched, and only small bits of the corners from the rectangular thermal reliefs are being cut. Like said, in case of this board, it's hardly an issue, but depending on your hardware etc, you may want to fix your copper zone (or use less depth or smaller angled bit, or "lie"). If there are actually traces missing cuts, then you need to do something about it (increase clearances and/or use smaller degree bits / less depth), or your board won't likely work.

There aren't any "extra" options compared to setting the defaults for CNC Job Objects:

B3yiyC8.png

At this point, you should just check that everything looks ok (usually the only issue for isolation routing, if there is any, is related to clearances as explained above). If everything seems alright, click Export G-Code and select where to store the g-code file.

I usually create a directory called "<project name>-gcode" under the KiCAD-project and place the G-code files there. I usually use my own naming method for the g-code files of a project, along the lines of:

  • Isolation-<degrees>deg-<tip diameter>mm-<WidthPasses>passes.nc for isolation routing, in this case it would be Isolation-30deg-0.1mm-2passes.nc, although I don't always mark down the number of passes, but the bit-size is useful, in case you sometimes use different sizes and need to make another board later on from the old files
  • CopperRemoval-<degrees>deg-<tip diameter>mm  <OR end mill diameter>mm.nc for copper removal. So for example for copper removal with 1.0mm end mill, it would be CopperRemoval-1mm.nc, and for removal with 30deg/0.5mm bit, it would be CopperRemoval-30deg-0.5mm.nc 
  • Drill-<drill size>mm.nc for drilling files (one per drill size, I don't use the tool-change option like explained before), for example Drill-0.8mm.nc
  • Cutout-<end mill diameter>mm-<REMOVEINNER>.nc for cutouts. The optional "REMOVEINNER"-flag relates to how I make cutouts with Edge Cuts, I'll get to that and what it means when we get to making cut outs. Typically I use 1mm end mill, so usually the file's called Cutout-1mm-REMOVEINNER.nc, or I might have left the tool diameter off entirely (because 99% of the time I use the 1mm end mill)

On top of those, there might be files for slots, more isolations (if doing separate text engravings or 2-sided board) and/or V-gooves. To be honest, I've never really done any V-grooves, but the idea is similar to cutout, except you do it in smaller depth-increments and not all the way through so you have a thin portion in the clad that you can break off with your fingers. Never had the need to do that (for multiple boards, I use Edge Cuts -cutouts that leave tabs between the boards, like seen before in the small IR-LED transmitter/receiver boards), but if the boards were really small (like < 1x1cm), I might try it some day.

The ".nc" -ending for g-code files is (AFAIK) a standard file extension used for g-code CAM files.

 

Phase 2: Copper removal

After finishing the isolation routing file, I want to do some copper removal for this board. There aren't any large voltages in this board (it runs with 5V DC), so it isn't strictly necessary, but can help for example when soldering SMDs, so that excess tin cannot short circuit the trace under the component by accident (if there's a small isolation cut there, enough tin can bridge the gap and cause a short). After practicing SMD-soldering for a while, it rarely is an issue.

You don't need the isolation-geometry and -CNC Job -objects anymore, so you can delete them. FlatCAM can save your projects with all the objects if you like, but I never bother, if I have to change things, I just recreate the objects with whatever settings I may need.

To delete the objects, select it from the Project-tab and hit Delete on your keyboard (or Edit -> Delete from the menus). I usually keep the front-copper gerber object there throughout creating the files (even when it isn't really needed anymore), as it acts as a good reference to view the other objects against. In this case, since we're still dealing with the copper layer for the copper removal, it's still needed any way.

With the project "cleaned" except for the .gbr -part, you again double click (or select it with single click and then go to Selected-tab) the Gerber Object. This time you want the "Non-copper regions" -part from the options in the Selected-tab. My defaults are 0.0 Boundary Margin and no rounded corners. Click Generate Geometry under the Non-copper regions, again a new Geometry-object is created in the project, this time with the name ending in _noncopper. Assuming Geometry Object plotting is enabled by default, the geometry is drawn on top of the gerber object with red lines. Go to Project-tab and select it by double clicking:

ZwVUaHF.png

Let's assume that I want to remove all the copper from the right-hand side white area, these are the pads for the LED-bars and their front resistors. You want to use the Paint Area -tool for this. The Tool-Dia is the width of cut for the tool, if using an endmill, it's the same as the end mill diameter, for V-bit, you again calculate it based on the tip diameter and angle (= tip diameter + 2 * tan(degrees/2) * depth of cut, as you probably already remember). I've set my default as 0.55mm for 30deg/0.5mm -bit with the usual 0.095mm depth-of-cut.

The Method -selection has options for "Standard" and "Seed-based" painting, the best way to show the difference is to quote the text and use the image from FlatCAM manual:

Parameters:

  • Tool dia: Diameter of the cutting tool.
  • Overlap: Fraction of the tool to overlap each pass.
  • Margin: Distance by which to avoid the edges of the polygon to be painted.
  • Method: The following methods are available:
    • Standard: The target polygon is shrunk by the tool diameter until no area remains.
    • Seed-based: A point inside the target polygon is calculated and it is enlarged until no segment of the resulting circle intersects the target polygon.
  • Polygon: Polygon defining the region to be painted. The polygon is automatically identified by specifying a point inside the polygon.

Generates a new Geometry Object with tool paths covering the whole surface of the specified polygon.

_images/paint.png

Geometry generated by the Paint Area operation applied to the same polygon using the (a) Standard Method and the (b) Seed-based method.

I've never used the Seed-based method, just the Standard-method. You may want to use larger overlap-factor than 0.15 if you want to make extra sure all the copper is removed.

So, after you check your settings are correct, you click the Generate -button under Paint Area, at which point the text "Click inside the desired polygon" appears in the TCL shell. I click anywhere inside the white portion on the right-hand side of the board, and a new Geometry-object is created with the paths for removing the copper, with messages related to the process appearing:

Quote

Painting polygon...
Polygon Paint started ...
Done.
Object (geometry) created: 595Breakout-F.Cu.gbr_noncopper_paint

9wQ2EUe.png

The new noncopper_paint -object will contain the paths for copper removal. Do note that the polygon is continuous throughout the trace edges, so there's also removal marked for the top-right corner (even though the 0.55mm widht is too large to run between the trace edges, the polygon is continuous and any space large enough for the bit is marked for removal). There are as many paths as needed to fill the empty area, unfortunately, if not using enough overlap, sometimes small copper "islands" can be left in the middle of the paths. If this happens at the milling phase, and you definitely need to get all the copper out (if you look at the actual board made from this design, you'll notice I originally left those small islands under the resistors, as in this case they don't matter), you can return to FlatCAM and create new removal file with more overlap or add margin (so that the edges aren't milled again) and "lie" slightly about the cut diameter to FlatCAM to get it to create paths more closer to the center of the removal. Another options is to scrape the islands away with a flat-edged sharp "soldering tool" (I don't know what it's called) after the board is done and cutout, the tools look like these:

soldering_tools_vtsa.jpg

Here's an example with 0.5 -overlap factor:

u2SQHoF.png

Go to Project -tab, double click the noncopper_paint -object. You want to use similar settings as with the isolation routing for the copper removal, although you may want to drop the feed rate somewhat if you use a wide tip-diameter bit, as it cuts more material in one go. Don't forget to do the depth in two stages if it's FR4.

owyGnFt.png

After the CNC Job Object is generated, the tool path is plotted to the view and you again export the G-code to an .nc -file, just like with the isolation routing. Or recreate it as needed, if it didn't go as planned ;) 

If there are two or more separated areas (polygons) that you need to remove the copper from, you must first create the Paint Areas for them separately. You can then either continue to create separate g-codes for them, or combine the areas by selecting both noncopper_paint -geometry objects (subsequent objects with same name will have an underscore and a number appended, like noncopper_paint_1, noncopper_paint_2 ...) from the Project-tab while holding down CTRL and then selecting Edit -> Join Geometry, then do the CNC Job Object from the new combined geometry (called "Combo" in the Project-tab).

There's no text to engrave in this project, so I'll skip it for now, and add details about it to another part later. For a few quick notes, if you draw your text in the copper-layer in KiCAD, it gets exported with the front copper gerber, in which case it's engraved similarly as the isolation routing is done, but if you use multiple passes, high feed speeds etc. it can mess up your text. If you want to do fine-detailed text in the board, it's best to draw it separately to another layer (like Eco1.User), export as its own gerber and use different settings (for example, you may not want to cut it as deep, maybe just do a single pass, use slower feed and/or use a smaller angled bit to get "crisp" and thin cut along the letter outlines).

 

Phase 4: Drilling (PTH)

To make the G-codes for drilling, you first load the Excellon-file for your drill holes (again you can delete all the other objects, except the copper layer gbr, or at least I keep the copper layer visible throughout creating the files, just so that I see that things like drill placement are correct). Select File -> Open Excellon ... and select your drill-file (if it was exported from KiCAD, it ends with ".drl"). An Excellon Object is created in your project and plotted on top of your copper layer. The "normal" (PTH) drill-file will contain all the plated holes, which means all the holes for component and connector legs and vias. In this example project, I have a couple of jumpers running in the back, so there are 0.4mm (adjustable from the KiCAD project) holes for vias, and some typical sizes for component and connector legs (0.8 & 1.0mm), and quite unusually sized holes for the LED-bars at 0.914mm.

Now, you don't have to use the same drill-size as the original layout used. The drill-sizes come from the footprints you use, and sometimes the default footprints in KiCAD have differently sized drills than what your actual components are (for example, the Chinese Bornier-connectors usually have 1.1mm legs, but the Bornier-footprint in KiCAD has a default size of 1.5mm for the holes). You can edit the footprints in KiCAD or adjust the hole-sizes per-pad in the layout editor.

FlatCAM groups all the same-sized holes, so you can't use it to make some of your "marked as 1.0mm" -holes 0.9mm and others 1.0mm, you have to drill the holes marked with the same size in one go. Vernier caliper is a very useful tool to have to check the leg diameters of your components. Also, do note that if you use larger diameter drill for the hole than what the drill-file says, the original pad-size is adjusted for the size of the original drill diameter. That means, if you go drilling holes marked as 0.8mm with 1.1mm drill, there's much less pad "left" around the hole. If you need to go much larger than the original, it might be wise to adjust the holes in the footprints/in your layout pads so the pads get somewhat enlargened, then re-export. Usually going something like up to 0.2mm or maybe even 0.3mm larger isn't an issue yet, depends a bit on the pad size and shape (circular vs oval vs. rectangular and the minimum distance between the hole and the pad edge). Even if the hole was large enough to cut the pad in two, it's not necessarily an issue, if you solder the leg so that the solder connects the sides of the pad and it isn't for high currents. If you go smaller, then it doesn't matter, just means that more pad is left around the hole.

Here's the drill-holes plotted in red on top of the copper layer, and the Excellon Object selected (so it shows the drilling stuff in the Selected-tab, you know the usual route, double-click on the object in the Project-tab):

JRCNwTV.png

You have your usual plot-options, you may want to use Solid-plot if you feel like seeing the holes is hard (it will fill the circles representing the holes with solid red color). Why I keep the original Gerber Object of the copper layer in the background is to see that the holes line-up with the pads on the copper layer. If for whatever reason I would have somehow screwed up, and the drill holes were offset from the copper layer, I'd notice it immediately.

Under the plot-options, you have your Tools. This is a list of the drill-diameters used in the drill-file. You select one or more (if you want to for example do both 0.9mm and 1.0mm with 1.0mm drill, you can generate the drill paths in one go) of the tools by clicking on the column marked "#". If you want to select more than one, hold down CTRL and click all the drills you want to group into a single g-code file (ie. you intend to drill all those sizes with a single sized-drill).

The Create CNC Job -options for Excellons were gone through in the section about the default options, but for a quick recap: Cut Z is the depth to drill to, you want it to go all through your copper clad, so add something like 0.1-0.3mm to your board thickness. I've used +0.3mm (1.5mm board + 0.3mm = 1.8mm). The value needs to be negative, as the value decrements when the milling head goes downwards, thus -1.8 (from the defaults). Travel is the height the drill bit is lifted from the top of the copper clad while travelling, a positive value (you want it to go up ;)). I use a feed rate of 90mm/min as default for anything smaller than 1.5mm or so, although you also might want to make it slightly lower for really thin drills (like 0.3-0.5mm or such).

I don't use the Tool change, Tool change Z or Spindle speed -options, for reasons explained in the options section.

When your Create CNC Job -options are ok (I use almost always just the defaults I've set for these "normal" holes, as I've explained before), select one or more drill-sizes you will drill with a single drill size, and click Generate. A new CNC Job Object will be again created. As an Example, normally I'd go through the drills in the same order as they appear in the Tools-section, but let's say that I decide to drill both the 0.914mm and 1.0mm holes with 1.0mm drill, so I pick the line with 0.914mm and, holding down CTRL, click the line for 1.0mm, then click Generate, a new object gets created and plotted:

AW2DgBd.png

The plot shows the stages the machining head will move, with numbers at points where something happens; 1 = start, 2 = drill hole, 3 = drill hole etc., until after all the holes are drilled, the machining head will return back to origin (at Travel Z height) and the g-code execution is complete.

This is already a CNC Job Object  (ending with ".drl_cnc"), so to make the g-code for it, you again just go to the Project-tab, double click on the .drl_cnc -object, hit Export the G-Code and save the g-code file (I would name this Drill-1.0mm.nc). When you load the files in bCNC, the file contents will give you no direct indication which drill or what kind of bit to use, thus I add the designations in the filenames, so I know which one I'm doing.

Then I'd remove (or at least hide the plot for this drill CNC Job Object, usually I just delete the object after exporting the G-code) and repeat the same for the rest of the hole-sizes, combining multiple drill sized to single size as I see fit, but I won't demonstrate it further here, as it basically is just repeating the same pattern:

  1. Pick drill size(s) from the Tools -list
  2. Check options (usually I only drop the feed rate for the NPTH-file, ie. large drills, but maybe drop the feed rate a bit for very small drills also)
  3. Hit generate
  4. Export the G-code from the newly created CNC Job Object with the file name indicating the drill size I intend to use (not necessarily the same as the original Excellon-file says)
  5. Delete the CNC Job Object
  6. Proceed to next drill-size, until all are gone through

You don't have to delete the "extra" objects at any point unless you want to (If an object with the name already exists, new ones will be named with _<number> appended after them, like .drl_cnc, .drl_cnc_1, .drl_cnc2), but I just want to get them out of the way, both for plotting purposes, but also because if I had multiple drl_cncs in the Project-tree, I might accidentally export the wrong one  :P

Phase 5: Drilling (NPTH)

For me, the Non-Plated Through Holes are pretty much always the 3.2mm holes for M3 screws. The procedure is basically the same as above, except for the large-diameter drills, I change the Feed Rate to 60mm/min. Other than that, just do what you did above. If you like and use KiCAD, you could also use the "Merge PTH and NPTH holes into one file" -option, then the NPTH-holes would be in the same Tools -list with the rest of the holes. Likely you won't be through-plating the holes anyway, it would be different were you to order the PCBs from a fab-house (depending where you order, at least with EasyEda they want the PTH- and NPTH-hole files separately, so that they know which holes to plate and which not).

This board has no slots and I don't plan on using V-grooves, so we skip the phases for those. I will explain how I make the slots and at least theory of how you could do V-grooves (like said, I've never tried it) in another part.

Phase 8: Cutout

This is the last phase (in the milling project at least; you could do the g-code files in whatever order you like, I usually follow the order I do the milling in also with FlatCAM). I usually use my own Edge Cuts -layer for defining the cutout, but for demonstrational purposes, I'll first show how it can be done just using the cut out generation from FlatCAM.

Using the cutout-generation of FlatCAM

If using the cut out generation, you want to do it with your front copper layer (still the same Gerber Object you created at the very first phase). With all the other objects removed from cluttering your project, select the .gbr -object (yes, you double-click it under the Project-tab). In the Gerber Object, there're the options for Board cutout:

rOMTd38.png

The options were explained when going through the default settings, but a quick recap: Tool dia is the diameter of the tool you use for cutout. You want to use an (fishtail) end mill, I typically use 1mm fishtail, thus 1.0 for Tool dia. Margin is the amount of millimeters (or inches) to leave around the board (from the outermost edges of the geometric shape you're doing the cutout for), if you need to for some reason. Here it's 0.1, which is my default setting, don't remember why I've set it there or maybe it was that when the software was first installed. Gap size is the size of tabs left, and Gaps are the amount and orientation (top/bottom, left/right, top/bottom/left/right) of tabs to leave.

Now I change the Gaps setting to 4 (top/bottom/left/right) and click Generate Geometry, a new Geometry-object with ending "_cutout" gets created. Go to that object through the Project-tab. In the Geometry Object -options, you want to this time cut through the entire board, like with the drills, but especially if you use FR4, you want to do the depth in stages. For 1.5mm board, I use the cut depth of 1.8mm (same as with drills, remember to enter the value as negative). To do the depth cut in stages, I check the Multi-Depth -checkbox, and enter 0.45 as the Depth/pass. This means that the cut is done 1/4th of 1.8mm at a time (4 * 0.45 = 1.8). Don't confuse the amount of zeroes, for isolation milling FR4, the Depth/pass was 0.0475 (slightly less than 1/20 of a millimeter), half of 0.095mm, for cutout, I cut 0.45 at a time (that's almost half a millimeter).

I also drop the feed rate to 120mm/min, as FR4 is hard, and the cut is somewhat deep (if you compare to what you do in isolation-phase). If you notice your machine struggling with this or you break a bit doing the cutout, use even slower feed and/or less depth at a time. Here's a screenshot of the settings and the cut out show in thin red lines:

rorWoNg.png

After clicking Generate, you get the plot of the CNC Job Object (ending _cutout_cnc), which can then be exported to G-code. I show the screenshot of the result, notice how the cutout is done in 4 different places, leaving a very tiny tab (well, "gap") at the middle of the left/right/top/bottom edges:

pb03pUN.png

Also you'll notice that the corners will be left sharp. It's hard to tell with this zoomed-out image, but there is a margin of 0.1mm left between the blue 1.0mm-line showing where the end mill will move and the edge of the shape. There's no way (at least to my knowledge) to tell the generated cutout to make the corners rounded. Also when you snap off the board from the copper clad after this kind of cutout, the tabs will leave small bits attached to the board, which you may want to file down for aesthetic purposes, other than that, I don't think they matter.

Doing the cutout from the Edge Cuts (or similar layer from your EDA, if not KiCAD)

After the couple of first boards I made, I started to use my own Edge Cuts. Not only can you make round corners, the edge cut shape may be much more complex, if for example there are some mechanical reasons for that (matching encasing contours or such). In this case, it's a simple rectangle across the edges of the board, with rounded corners, but the procedure is the same for other shapes too (after all, you define the shape in the layer, here you just make the milling path for it).

I suggest you still keep the copper layer -gerber object there to see that things align correctly. Open your Edge.Cuts -gerber file (File -> Open Gerber ...), which gets added as a Gerber Object to your project (the copper-layer is named "595Breakout-F.Cu.gbr" in my project, the edge cuts is "595Breakout-Edge.Cuts.gbr").

Selecting that object, you get to the usual Gerber Object -options, but now what? The "trick" I use is to make an isolation geometry from the edge cuts outline. You set the options to use 1.0mm (or whatever end mill size you use for your cut out) Tool dia, 1 width pass ("Width (# passes)"). The Pass overlap  and Combine passes  -options have no effect since you're just doing a single pass (width wise). When you hit Generate Geometry-button, you get the Geometry object (gbr_iso) for this.If you look at it closely, you'll notice something funny, we'll get to that in a bit.

Now go the created Geometry Object, and set Cut Z to -1.8 (it's likely 0.095 or whatever you've set as global default), or if you're using different board thickness, board thickness + 0.3mm or thereabouts. Travel Z of 2 is fine. Drop the feed rate to 120 (assuming this is FR4). Tool dia is 1.0 (or whatever you use as your end mill size). Multi-depth enabled, 0.45 as Depth/pass. Hit Generate.

As soon as the generated CNC Job Object is plotted, you'll notice an issue:

ZQGo3f0.png

But, but... there are two cutting routes there! Fear not, the other one will get removed in the milling-phase. Export the G-code and name the file Cutout_<your-end-mill-diameter>mm_REMOVEINNER.nc. Now you probably know why I add the REMOVEINNER "flag" in my cutouts.

It's easy to remove the portion of the g-code that does the inner cut in bCNC's g-code editor, even if you don't know a single command of g-code. It takes literally a few seconds.Plus it's so easy to see there (in bCNC) that there are two separate cutouts, that you couldn't possibly make the mistake of starting the cutout without remembering to remove the inner cut.

To be fair, there is a "geometry editor" in FlatCAM itself, and maybe that could be also used to remove the "inner cut", but after I tried it for a little bit on couple of occasions, I couldn't make much heads or tails of it. Plus the procedure of removing the "wrong" cut in bCNC is so simple, that I don't see the point to spend time learning to use the weirdly behaving (IMHO) editor just for that.

 

Except for the more "special" cases of slots, text-engraving (well, that's just isolation routing with slightly different settings) and V-grooves, this is pretty much what you do with FlatCAM for each project. Once you get "used to it", you will zoom by through these phases in 5-10 minutes (assuming there are no design issues / clearance problems or such in the design) and be ready to mill the board out.

Edited by esaj
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

Part 4: Milling, drilling and cutting out the board with bCNC

Milling out the board with bCNC is rather straightforward, once you learn the basic steps.

Preparing the copper clad and clamping

I use a piece of plywood as a "sacrificial plate" under the boards, so when drilling or milling through the entire board, the bits don't hit the aluminum bed plate. Some people level their sacrificial plate with the machine, I've found out that it's of little use, as the copper clads tend to have slight curvature on their own (typically between +-0.1mm..+-0.2mm), and you need a precision of <0.1mm on the depth, so you'd need auto-leveling anyway.

mlyyEio.jpg

You should know the size of your board to know how to place the clamps holding the copper clad. In the above picture I've drawn the board edges (rounded up, it's actually a couple of millimeters smaller on both dimensions, but extra won't hurt), as the board is about 80x60mm, and the copper clad in this case is 100x100mm. It's easier to place the clamps so that they don't get in the way with the outline drawn, but you can check it with a ruler also when clamping the copper clad down. I'd suggest leaving something like 5mm or more so you won't (as easily) run the bit to the clamps by accident. The point is to make sure the copper clad stays firmly in place, while still keeping the clamps so that the mill bit won't hit them.

Some people use two-sided tape or screws the hold the copper clad in place. Screws can be handy for 2-sided boards, if you have drilled holes to the copper-clad, you can use the screws to get the position (relatively) correct after flipping the board over. Whatever works for you, although metallic clamps have the added bonus that you can attach your second depth-probe wire to it, you need an electrical connection to the copper-surface of the board or it won't work.

After clamping the copper clad in place, I usually attach the isolation tool (in this case, and for me usually, it was a 30-degree / 0.1mm V-bit) to the milling head and attach the depth-probe cables (one goes to the bit, one to the clamp, doesn't matter which is which). The depth-probe works by detecting an electrical connection (so all parts must be metal on the path) when the milling bit hits the surface of the copper clad. If you don't have metallic clamps, you'll need to attach the other wire to the copper clad surface directly. I use two wires with alligator (or is it crocodile) -clips on the end, so I can easily clip them on the bit and the clamp. The wiring for Grbl -based CNCs is one to (any) GND-pin and the other to A5 -pin (in Arduino-markings, that's PC5/ADC5, PortC.5 for ATMega328).
 

Starting up bCNC

When you fire up bCNC, the first things you see are an empty work area and the File -tab selected. bCNC isn't connected automatically to your CNC (unless you mark the Connect on startup -checkbox). You connect by clicking the Open -button, I've only used it with the actual CNC on Linux, and at least there it has always autodetected the correct USB-port automatically, but in case not, you may have to select the correct USB-port from the Port -dropdown menu.

JxcM9Fc.png

In the above picture I've already opened the cutout-file, but the machine isn't connected yet. You can connect to your machine first and then load the file or the other way around, doesn't matter. 

About the Controls

Once you open the connection to the machine, you can move it from the Control -tab. If you (like me) don't use limit-switches, be careful. You can easily drive the milling head to a clamp, to the copper clad surface or over the edge of the axis, which can damage your bit or the machine. Even limit switches won't prevent you from driving the bit through the copper clad if you just tell the machine to go down the Z-axis.

0atU7zP.png

There's a couple of things to know (and be wary of) in the Control -tab. First of all, when you connect to the machine (or the controller has lost power and regained it), it has "lost position". The above screenshot shows the machine "thinking" it's currently positioned at X, Y, Z  =  12.0, -32.0, 31.183mm (WPos, I guess it's either Working position or World position). These are just random values, whatever happens to be at the RAM -memory locations the firmware uses to store the position. MPos is the absolute "machine position", but if you'd really want to to "home" the macine, you need limit switches.

The very first thing I usually do after connection is to zero all the axes. To do that, you hit each of the X=0-, Y=0- and Z=0 -buttons. The milling head probably isn't in the correct position yet, but this is a precaution: The middle button in the center of the directional arrows at the lower part of the screenshot will drive the milling head to 0-position ("Move to Origin") by default (the action can be changed though). If you accidentally hit that, and the X, Y, Z-position values are something random, the machine will move until all of those values have reached 0. In the above screenshot example case, if the Move to Origin -button was hit, the X-axis would move 12 millimeters to left, Y-axis 32mm up and the milling head would come 31.183mm down. Depending where it is etc, you could hit a clamp, drive the bit through the copper clad or drive out of axis. So, first zero them all, then we'll get to positioning it correctly.

Secondly, the default amount to move per click of an arrow on the lower part of the screen is 10mm, and set in the right-side of the arrows. Also, your keyboard arrow keys move the head with that amount. The keyboard arrows can backfire on you badly, because if you hold an arrow-key down, it's being repeated, but the machine won't likely move as fast. So if you hold down the key so that it repeats, say, 20 times the command, and you release the key, the machine won't stop. It will run until it has moved 20 x 10mm on that axis, or you hit the emergency stop (Stop -button on the top-row, but I also have the Stop -pin of the board wired to a big red button).

The x10 -button will tenfold the current value. The %10 -button will change the value to one tenth (1/10) of current value. The plus (+) and minus (-) -buttons adjust the value by one step. For above 10mm, it changes 10mm at a time (so 10, 20, 30...), for single-digit millimeters, it adjusts one at a time (so 1, 2, 3, or 3, 2, 1 going down). Below it will adjust one tenth at a time, then one hundredth at a time etc. You get the idea. If you don't know which direction is which (I don't know if some machines use "mirrored" Z or Y), set it to 1mm (assuming there's enough space around the bit) and try each axis with the arrow-buttons.

Mostly the stuff in the State -section is rarely needed, there are different "workspaces" (you can store different settings and recall them with the G54-G59 -buttons, never needed this), Distance can be absolute or incremental, Units can be mm or inches, Tool relates to tools you can save in the Tools -tab, never used this one either, Plane selects the plane used by some special g-codes (never needed those, something about circular interpolation g-codes 02 and 03, around which plane the circle is done), Feed sets the feed rate (but this is controlled from the g-code you generate) and Mode sets the units for the feed rate. The dropdown saying Feed has options for changing what the override-slider affects, the options are Feed (feed rate)Rapid (rapid movement speed) or Spindle (spindle RPM).

If you use the spindle-control through the Woodpecker board (assuming you've got a CNC 2418 or similar with no separate spindle control) the Spindle -button will turn the spindle on and off and the slider next to it will adjust the rpm. Do note that bCNC does not automatically know how fast your spindle is, I think by default the slider goes from 0 to 12000, it's adjustable somewhere. You might think it in percentage like 0 = 0%, 6000 = 50%, 12000 = 100% of top speed, or set the correct values if you know your spindle speed. I use a separate controller for the spindle motor, if you didn't set the spindle speed in your g-code, I think it won't start automatically (don't remember anymore, I changed to separate controller a long time ago).

As a sidenote, I won't explain the Tools -tab, as it's not really needed, but there are all sorts of options for storing info about your milling bits and copper clad/material -stock etc., also tools for creating patterns, milling programs from images, text with custom fonts, playing MIDI-files with the stepper motors and whatnot. I've used the text-tools for engraving guitar pedal enclosures and played around with the other tools a bit, but they're not really needed for PCB-milling.

The steps to zero in on the copper clad I do are as follows (start conditions: copper clad is clamped, V-bit is attached to milling head, depth-probing wires are in place), I'll explain in more detail below:

  1. By eye, check where you need to move (directions) and estimate by how much
  2. Adjust the step-size in the Control -section to something "suitable" (ie. if you need to move about 50mm to the side, you likely don't want to do it 1mm at a time, or if you need to move very little, you don't want to move 10mm at a time)
  3. Move one axis at a time and step at a time in the X- and Y- (sideways and backwards and forwards) -directions, leave the Z axis where it is (of course it should be above the copper clad and away from the clamps ;))
  4. Once you get your milling head at the position you've marked at the board (or chosen on the board, if you didn't draw the outline), zero the X and Y-axis with the X=0 and Y=0 -buttons
  5. Bring the Z-axis down until you're about 1-2mm above the copper clad
  6. Depth-probe the tool


yAxRKwd.png

The red circle in the working area shows the position bCNC/the machine "thinks" it's in. In the above picture it's already zeroed, but you will notice it moving (and being way out of place at start probably, before you've zeroed anything) on the screen as you move the machine. When you zero the axes, it goes back to origin.

The 0,0,0 -X,Y,Z -position is relative to the origin you set in the EDA (like KiCAD) for the gerber-files, I use the top left corner (although you might want to use the lower left corner, as the Y increments upwards and the auto-leveling will return to lower left corner regardless of where your origin Y is). 

The Set WPOS- and Move Gantry - buttons may come in handy. Set WPOS is likely needed more rarely, it can be used to check the current world-position of the milling bit by clicking on the button and then on the work-area. Move Gantry may come in handy more often if you need to move the head, like probably after the auto-levelling. It works by clicking on the button and then on a position in the work-area view, the milling head will move there the straightest route. Make sure the bit isn't against the copper clad if you do this and that it won't hit the clamps on the way.

 

Depth probing

Once you're in the correct position in X- and Y-axes, and have moved the Z-axis to about 1-2mm above the copper clad, zero the Z-axis with the Z=0 - button and select the Probe -tab:

190BcKa.png

There's a few settings here.

In the Common -section, you set the Fast Probe Feed (moving from one XY-position to next) and Probe Feed (speed the bit is lowered at in mm/min). 400mm/min is a good rate for sideways movement, I've used both 30mm/min and 40mm/min for depth-probing feed, both seem to work just fine. Using higher speed, there's more error as the bit still probably moves a little bit after the collision is detected, but then if the board has "play" (it bends down a bit under the bit) during actual milling, slight extra might be good (up to a point of course). TLO is tool-offset, I've always left it at 0mm,  probably this is meant if you use a separate "depth-probing" tool (the round thing that comes with some machines, if you don't have it, don't worry, it's of no use in PCB milling anyway) to set the tool height from the actual surface.

The Probe -section has values for X Y and Z. The Goto -button will rapidly move to last probe location. Never used it. The Pos -settings will limit the maximum movement of the head from the 0-position. I've only set -2 in the last box (Z-axis), this means that if no contact is made before the mill head has moved to Z-position -2, the probing is aborted and an Alarm -state will be triggered.

The Center -section is not needed. Do not hit the Center -button, the machine will do some sort of circular probing, I've never tried it after I once hit it by accident and the bit was driven to a clamp :o :P 

The Orient -part I've never used, so I can't tell what it does. Better not touch without reading the manual  ;) 

Assuming your V-bit tip is about 1-2mm above the copper clad (if it's not, move it a bit closer to prevent triggering the alarm), and you have the depth-probe wires correctly attached, hit the Probe -button. The milling head will move downwards at the rate set in the Probe Feed -box until it hits the surface of the copper clad (or an alarm is triggered). If your depth wires aren't in place, the milling head will keep trying to move until the alarm is triggered, even if it means driving the bit through your copper clad and sacrificial plate (or the Z-axis/motor clamp breaks).

Once the contact has been made and the Z-axis has stopped, zero the Z-axis with the Z=0 -button. You have now zeroed your machine on the origin of your design.

OvGGalc.jpg

 

AImKUfW.png

In the above pictures, the depth-probe is completed, but Z-axis not yet zeroed (the bit has gone down 1.226mm from where I first set it manually and by eye), when I hit the Z=0 -button, the software is in "sync" with the real world; this is the position I use as origin for milling the board.

You will repeat the Z-axis probing and zeroing every time you change the tool, but from this point on you already have the X- and Y-axis positioned correctly, so you just need to repeat the depth probe:

  1. Remove old tool
  2. Attach new tool
  3. Attach depth probing wires
  4. Bring the end of the bit 1-2mm above the copper clad
  5. Do the depth-probing from bCNC
  6. Move the Z-axis up 1 or 2mm (I don't like to leave it against the copper clad, in case I need to move it or such for whatever reason)
  7. Remove probe wires (I've forgotten a couple of times, be ready to make new wires when you turn the spindle on and notice you forgot... :P)

When you're doing the initial zeroing and haven't yet auto-leveled the board, leave the probe wires attached.

Removing the extra tool path from the cutout

The probing for auto-leveling is done next, except I'll skip a bit to removing the "inner cut" from the board cutout with bCNC's. It's really easy, and I usually do it at this point (if I've never milled the same design before, if I did, I've already removed it), although any time before actually doing the cutout is just fine.

  1. Go to Editor -tab
  2. Select the correct block from the left-side window (the main view will highlight the path), if you did the cutout like I do, there's only a header + 3 blocks, it's either of the two first blocks
  3. Hit Delete (either on your keyboard or in the top buttons)
  4. Save the changes (File-tab --> Save -button, CTRL-S on your keyboard or the diskette image near the top-left corner)

R4Qu486.png

I said it was easy in the FlatCAM-section... ;)  The editor has other nifty features, like changing milling direction and inverting (swapping) two blocks of g-code etc. You can also expand the blocks, edit the g-code (modify/add/delete lines) if you know how (it's like writing step-by-step instructions for movement and such, if you're interested or need it, see for example https://en.wikipedia.org/wiki/G-code#List_of_G-codes_commonly_found_on_FANUC_and_similarly_designed_controls_for_milling_and_turning

 

Auto-leveling

Auto-leveling is used to detect the small changes across the copper clad, so that the milling depth can be adjusted automatically during the job by the software. Remember that the copper layer thickness is only 35µm (0.035mm) for 1oz copper (and even for 3oz copper, it's still only 0.105mm), and also the width of the cut depends on how deep the bit travels. If you don't autolevel, and the copper clad has small differences in the height), you will probably end up both with cuts that are too deep (if it's on both sides of a really thin trace, the trace might get milled away) and too shallow (the cut doesn't go through the entire copper-layer, leaving a short circuit). Thus, auto-leveling is very critical to get decent boards made.

In the Probe -tab, there's buttons for Probe and Autolevel near the top. The Probe -button opens the settings for the "normal" depth-probing we did before. The Autolevel -button opens the view for autoleveling. When you go to the autoleveling-view, you notice that extra buttons appear in the top (Margins, Zero, Clear and Scan). 

FCs3RaJ.png

Margin will use the current job (file, in this case cutout) to set the margins (edges) for the auto-leveling in X and Y-axes. This is why I use the cutout-file for autoleveling, because it covers the entire work area including the cutout. 

Zero will set current position as Z-zero for leveling.

Clear will remove any previous auto-leveling data, unless you want to autolevel again for some reason, don't hit this. 

Scan will start the autoleveling-process.

There are similar settings in the Common -section as with the normal depth-probing. Don't change TLO or the Probe Command, adjust the Fast Probe Feed and Probe Feed if necessary (I've usually left them at 400mm/min and 40mm/min).

The Autolevel -section contains the "limits" for the autoleveling. The X- and Y-values are filled when you hit the Margins -button, you may want to adjust the Z-axis yourself. The Min-setting in the Z-axis is the alarm limit. Since my origin is usually near the clamp pressing the copper clad down, and the curvature tends to go up towards the middle of the copper clad, I set it at -1.0mm. The Max -setting for Z-axis is the travel height of the bit, 0.75mm means that the bit is 0.75mm above the Z-point I've zeroed it in. If your board was really curved, and you suspect that's not enough at the highest points (remember, the machine doesn't yet know the heights since the autolevel-probing isn't done yet), you could set it higher. Usually the curvature is something like 0.2mm or such and I haven't scraped the boards using 0.75mm travel here.

The Step -values tell the amount the head is moved by step on X and Y-axis. You change the value by changing the N -value (number of steps in each axis). In the above example, the board margins go from -0.5..mm (it's slightly to the left of the origin, as the 0 in X and Y-axes is the edge of the board, and the end mill moves slightly outside the edge to cut the board) to 78.5..mm on the X-axis, and -58.575 to 0.575mm on the Y-axis (Y-axis decrements downwards). I've set the number of steps for X-axis to 40 and Y-axis to 30 to get a fairly tight grid of about 2x2mm.

So during probing, the head will probe a point, move up to Z-max, move 2mm on the X-axis, probe again, repeat until it comes to the edge of the X-axis, move 2mm on the Y-axis and then go to the other direction in X-axis, until it has gone through the entire grid. 

To do the auto-leveling (assuming you've zeroed the axes, have the probe wires attached etc)

  1. Hit Margins -button (sets the X/Y min/max values from the job edges)
  2. Hit Zero -button (sets current position as +-0 height), I'm not sure if this really affects much, but doesn't seem to hurt either :whistling:
  3. Hit Clear -button if you're redoing the autolevel for some reason (wrong grid, need to adjusts feeds or such)
  4. Adjust the step-amounts (N-value) for the grid-size you want (the value might not update if you write the number there with keyboard, hit the arrows changing it back and forth to get it to update)
  5. Check that the Z-axis values are "sane", adjust if needed (the settings seem to be saved, so if you've set them once, they probably already are)
  6. Hit the Scan-button

Sidenote to above, always start from X/Y 0,0 and always first clear any old data before Scanning. I don't know if newer bCNC's still have the bug, but I've had the milling head run outside the margins if started with existing data and/or outside the 0,0- X/Y -position. I've hit it a couple of times in the past with older version, but haven't tried if it still exists in the newer versions.

The auto-level probing will start from the lower left corner, if you use the top left corner as your origin, it will first move the bit to the lower left corner at the travel height (autolevel Z-max) and then start probing. The machine probes the entire grid through, and depending on how large board and how many steps you have, this might take a while. I've tried to "save time" in the past by skimping on the grid, but when you use small SMD-components, small traces and/or have otherwise detailed board, it may backfire in the form of much less accuracy in the milling (making slightly wider cuts as the depth of cut has had more throw due to curvature). During running an actual job (but not during normal manual control -moves, ie. when not running a g-code file!), the height of the milling bit is adjusted by interpolating linearly from nearest points in the grid, so the tighter the grid, the more accurate it is, but the longer it takes to auto-level.

exoSjoD.png

Here's a screenshot of the autolevel scanning in progress. Do note that it has taken over 40 minutes at this point, and the current estimate is a little over 50 minutes in total, with 8 minutes 39 seconds left. The estimate is quite accurate during auto-leveling, since it's repeating the same moves all the time, but is much less accurate during an actual job, because the esimate is based on amount of code completed so far vs. time passed, and different codes take different lengths of time.

 

b3IvTsI.png

Close up on the grid after autoleveling has completed. If you look at the values, the changes are smallish (typically under 0.01mm between two steps), but grow across the board, lower left corner is at (+)0.138mm (compared to the set Z=0 -point), and the one seen in the top right corner of the view is at (+)0.235mm, a difference of 0.097mm, which is already about 2.5 times the thickness of the copper layer. Compared to the Z=0 -location, that high point is almost 7 times the copper thickness. Typically the copper clads I've used have about +-0.2mm (or 0...0.4mm, depending how you think about it) of differences in the height across the board (maybe more if you make larger boards), so the auto-leveling is really important to get good quality cuts.

After the scanning is complete, the head will move back to the lower-left corner. You don't need to do anything if you use lower left corner as your origin in your design, I'm so accustomed to using the top-left corner that I haven't changed it. If you did use a different origin, then you should move the bit to the origin. Don't immediately hit the "Move to Origin" -button in the Control -tab! It might seem obvious way to get to the origin, but unfortunately the head is moved linearly, and if the milling bit is 0.75mm above the copper clad, it will start moving to the "0"-height linearly as the origin is being approached. It also won't use the autoleveling-data, so likely it's hit the surface of the copper clad, make a scratch and then break the tip of the bit. Instead, go to Control -panel, move the Z-up a bit (just to be safe), and use the Move Gantry -button (hit it, then point at your origin). This way you will only move in XY-plane first. You don't need to hit it exactly, +-mm or a couple is just fine. After the head is near your origin, now you can use the Move to Origin -button. The head will drive the bit right at the top of the copper clad in 0,0,0 -position.

When all the "normal" job-parts after this go just fine, you won't have to use the Move Gantry or manual movement except for Z-axis when changing tools and depth-probing.

 

Loading the next file

Now we're ready to start the isolation milling part, so go to File -tab and Open your isolation milling g-code.  bCNC has an annoying way to ask you each time you have done a depth-probe and open a new file if you'd like to save the probe. I've never done this. It's not the auto-leveling info, but the current Z-position Just answer No.

g6mgROn.png

After that, if you have auto-level data, you're always asked if you want to delete it. No, you really don't. Like ever. If you want to clear the data, there's the Clear -button in the Probe -> Autolevel -section. Always just answer No to both questions (they will be asked each time you open a new file).

ayJU5UI.png

 

Isolation

2v6XEyx.png

Since the auto-level probing was already done with the isolation milling bit, no tool change is necessary at this point. You just

  1. Open the isolation file
  2. Make sure the probe wires are removed, and everything seems otherwise ok
  3. Turn on the spindle (from bCNC if you use the Woodpecker or similar controller, or from the spindle controller)
  4. Go to Control -tab and click Start

You can follow the job on the main view. At first, the estimation for the work won't be very accurate, it gets better as the job progresses, but at first it may over- or undershoot a lot.

 

0XEzUO2.png

yfJqU0H.jpg

uhkAXCd.jpg

In the closer up picture, I've vacuumed a lot of the dust away to get a better view of what's going on. 

After the job is complete, FlatCAM adds a last command in the g-code file that will return the head to origin, at the travel height you've set in FlatCAM. 

vaZlRna.png

6D4GFUl.jpg

Isolation completed, spindle turned off and dust vacuumed away. I usually inspect the cut quality just by eye at this point, to see if things seem off. In the early days I had to sometimes redo the cut after adjusting the Z-zero down something like 0.05mm or even 0.1mm, if it seemed it didn't go deep enough. With proper autoleveling and depth-of-cut, it shouldn't be an issue.

 

This board has no texts to engrave, but it does have lots of copper removal. Copper removal requires a different bit (in this case, I've made the toolpaths for 30deg/0.5mm bit). You can change the tool after or before loading the next file. Steps for changing the tool:

  1. Move the X/Y-position to origin, if it isn't already there (should be if you just finished the previous job)
  2. Lift up the milling head with manual control so you have enough space to detach the bit
  3. Detach the old bit
  4. Insert the new bit
  5. Attach probe wires
  6. Do depth probing
  7. Zero Z
  8. Lift up the bit 1-2mm
  9. Remove the depth probe wires

After this, you're ready to run the next job (start spindle, Control -> Start). No auto-leveling is anymore needed, and you just need to adjust the Z-zero to correct depth each time you change tool (which from here on out, happens on pretty much every file).

Running the copper removal job:

DTBAWSA.png

 

VfR9FT6.jpg

I've vacuumed the dust away here, copper removal makes lot of it. Shouldn't have played around with the paint-area margins on the edges, mistake I've done in FlatCAM  :P . Unlike normally, the copper area does not spread all across the board and there are small slivers left in top center and bottom right corner (more visible after cutout).

After the copper removal is complete, next up are the different sized drills (one file per drill). From here on out, you pretty much repeat changing the tool (including depth-probing) and loading the file for the tool (like Drill-0.9mm, Drill-1.2mm. etc) and running the job, then same for the possible slots and cutout.

iZeHHav.jpg

Drilling in progress.

Many people have said that the drilling should be done before isolation to prevent "pad lifting" (the copper pad around the hole lifting off), but that has never happened to me. Moreover, after the drilling process your auto-level data won't be as accurate anymore, because some dust gets pushed under the copper clad during drilling. That's why isolation, text engraving and copper-removel should be done before drilling, as they require accurate auto-leveling info to make good cuts.

There's nothing special to cutting slots in bCNC (the difference is how you make the g-code, it's explained in the next post), so it's still all just

  • Change tool
  • Attach probing wires
  • Depth probe
  • Remove probing wires
  • Load next file
  • Run the job

Once you get it down, most part of the milling process is mainly "mechanical", just running file after file, changing tools, vacuuming in between and checking that everything's going ok.

q5KeHz0.jpg

1eEtRsx.jpg

Slots being cut and vacuumed. You'll notice I didn't drill the bigger holes with the big drills. Like I said before, I noticed that I was getting more bad cuts and found out that the motor clamp was cracked. It seems that drilling the big holes (like >=2.5mm or so) stresses the clamp a lot, and the motor started sliding slightly upwards when trying to drill those (and making bad cuts, as it was moving a little bit). Using hot air to melt the crack shut and tightening the clamp made all the difference, but now I don't feel like trying if it lasts drilling those big holes, so I just use the otherwise largest drill in the project (<=1.5mm) for the bigger holes and then enlarge them using a hand drill. The holes won't be as accurately placed when drilling by hand, but usually the big holes are for wires or M3 bolts for fixing the board somewhere, so in those cases it isn't that critical to get it down to <0.1mm.

After everything else is done, it's time to cut out the board. Again, nothing special in running the job really, all the settings are done in the FlatCAM-part.

6ssAGiB.jpg

Board being cut out at 0.45mm at a time (for 1.8mm total, 4 rounds around the edges), you can better see the progress in bCNC by using the isometric view (the view can be changed from the dropdown near the top-left of the graphical display of the job):

XmDiOHR.png

Just a quick screenshot taken after the fact, I'm not actually running any job here. The red cone is the milling bit, going around the board 4 times when the job is being run, going 0.45mm deeper near the left corner.

I've let the machine do the cutout, but if you suspect the board might start moving around when it's nearing the end of the cut, you may want to hold it down with something. Probably not necessary, plus you don't want the end mill hitting your finger. If you do use your finger, do note that the head will return to X/Y origin after the cut is complete at travel feed rate, which is much faster! :P

yosLuf6.jpg

Board cut out, end mill removed, board and bed is vacuumed and the board is lifted out from the hole it leaves in the copper clad.

After taking out the board, I usually rinse it down under a faucet. If there's reason to do so, like something seems off or I want to see better, I take the board to my "light table" (basically a box with leds inside and a milky "plexiglass"-type plastic on top:

TthxDnq.jpg

This is the board after just washing it down. At this point I notice there are small slivers of copper left at the edges of the removal areas. They're not connected to the large copper areas, but knowing that in case of this project, the top right area can have voltages up to 150V, I want to remove those. Also maybe should have used more passes / more overlap on the isolation, as there are small copper slivers left between the traces and pads here and there. At least on the clads I use, they've never come off on their own, but I want to be extra sure that no shorts can occur, so in case of this board I scraped them off with a sharp metal scraper and also sanded off the edges of the removal areas.

cqJzuik.jpg

Board sanded first with 1000-grit wet sandpaper, removing excess copper from a couple of isolations + sanding off edges left by too wide copper removal margin (using 120-grit paper there to scrape off the copper). I later on enlargened some of the holes with hand drill (for reasons explained above, I didn't drill the large 2.5mm and 3.2mm holes with the machine).

Of these, only the 1000-grit sanding is usually necessary, and when the cuts are good, even that can be skipped (but you get better contact with lightly sanded surface). I also usually wash the surface before soldering with isopropanol (IPA) and an old toothbrush with the bristles cut short to get rid of any grease from my fingers or such.

Quick steps for 1-sided board leaving out details:

  1. Attach copper clad
  2. Attach isolation bit
  3. Open Cutout -file
  4. Zero X & Y to the origin, check that board fits on the clad without milling bit hitting anything
  5. Depth-probe
    1. Optional: Remove "inner" cut from the cutout
  6. Do autoleveling
  7. Load Isolation -file
  8. Run the isolation job
  9. Vacuum
  10. Load next job file (copper removal, drills, slots, cutout)
  11. Change bit (if needed, maybe you have more than one file with same bit)
  12. Depth probe (if bit was changed)
  13. Run the job
  14. Vacuum
  15. Repeat steps 10-14 until you're ready
  16. Remove the milling bit
  17. Remove the board
  18. Wash/sand the board

 

Edited by esaj
  • Upvote 1

Share this post


Link to post
Share on other sites

Part 5: Slots, text engravings, V-grooves, 2-sided boards, multiple copies of a board in one go

Slots

The way I make slots is by first drawing them on the Eco1.User or Eco2.user -layers (these are "free for use" -layers in KiCAD, but you could use whatever layer you need to) using lines and arcs, just like with the Edge Cuts.

O4Z7AAA.png

Close up on a few arcs and a line drawn to Eco2.User -layer in KiCAD. You might wonder why I want to cut such slots on the board. These are high voltage traces, with voltages that may be well above 100V. While there's about 1mm of isolation distance at minimum, I still want to add further slots cut there where the distance is lower for additional creepage distance to be extra safe. The name of the project, "ElectronicLoad", is a bit misleading, as this is only a part of the entire device (this is the OVP, OverVoltage Protection, circuitry).

I plot the layer along with the F.Cu- (Front copper) and Edge Cuts- into a gerber, the process is the same as explained in Part 2, with the exception that that additional layer is selected also.

During the "usual" process of creating the G-codes in FlatCAM, I make the tool paths for the slots as follows:

Open the gerber-file for the layer containing the slots (as explained before, I keep the front copper always open so I can see that things line up correctly).

On the Gerber Object of the slots, I make isolation routing with following settings:

F3lCI79.png

So single width (you don't want to do multiple width-passes, unless you need to cut a larger slot but don't have big enough end mill), but I "lie" and claim that the tool dia is 0.001mm. Why? Because the isolation will trace the contours (edges) of those arcs and lines, not the middle. By claiming that I use a really, really thin bit, the generated path will hug the shapes closely.

rficMp1.png

The thin red line around the arc shows the tool path.

If you'd need to make very precise slots (size-wise), you could change the arc and line widths in your tool, for example KiCAD uses a default of 0.2mm for arcs and lines:

FrSotHQ.png

So whatever tool-size I use, it will move around the shape at about 0.1mm (half of item thickness) away from the center of the shape. If I needed to make really precise slots, I'd set the item thickness to something like 0.01mm or whatever really small value, but I've never had the need to.

Once you've generated the Geometry Object with the Isolation Routing, you want to use slower feeds and cut the depth in stages (at least with FR4), just like with edge cuts:

3sNkT51.png

I've set the Cut Z (total depth) to 1.8mm (for 1.5mm board), always remember that it's negative, "normal" 2mm Travel Z, feed rate of 120mm/min and Tool dia is still 0.001. The cut is done in multiple passes (depth-wise), in this case 0.3mm at a time, for a total amount of depth passes of 1.8mm/0.3mm = 6 total passes depth wise. In this case, I've planned to use 0.6mm end mill, for a total slot width of 0.8mm (the center of the tip moves along the edges of the 0.2mm thick arc/line, and the edges of the tip are 0.3mm away from the center: 2 * 0.3mm + 0.2mm = 0.8mm, or simply, the real end mill diameter + thickness of the line/arc in the gerber). The feed speed needs to be low and the thinner bit you use, less depth you should cut at one go, as those thin "needle-like" end mill break very easily during sideways cutting if you go too fast or too deep in one go.

After you hit Generate on the Geometry Object, the CNC Job Object is created. The main view will show the generated tool-path in blue:

WSgTUY5.png

If you like, you can better see how wide the cuts are by setting the real Tool dia in Plot -options of the CNC Job Object and hitting Update Plot (this only affects the drawing of the toolpath, not the generated G-code or such).

nI7sfnh.png

Here's how wide the final slot-cuts should be with 0.6mm end mill. Also remember that you want to use end mill, not a V-bit or drill for making slots.

Once you're happy with the result, hit Export G-code on the CNC Job Object and save the g-code file (I usually name these Slots-<end mill diameter>mm.nc.

 

 

 

 

 

Edited by esaj
  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

@esaj wow a complete course ? thank you.

Number one reason for me for not etching boards was young children and dangerous chemicals (I also gave up doing colour photo developing and printing for the same reasons - ironically technology has superseded that as well now!)

As a result, if I cannot build it on a Veroboard it tends not to get built - It had never occurred to me to consider a CNC machine and dust Is not an issue now as I do a fair bit of woodwork that involves lots of sanding of quite exotic woods so I have good dust extraction and a powered respirator (https://www.axminster.co.uk/axminster-apf-10-evolution-powered-respirator-101809?gclid=CjwKCAjwwo7cBRBwEiwAMEoXPEOgfr16_YyGCr0NgGjy10IqIVaEYLTi0lwYmGYfDDiHDn88PYSQFBoCjrQQAvD_BwE - a ridiculous amount of money for something so simple and a spare battery which seems to have 4 off 18650 cells in it is £100 - God only knows why they want to price safety gear out of the market?)

  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites

This tutorial now should contain enough information to get normal 1-sided boards done without much hassle. Also removed some notes and some other off-topic stuff (mostly by me) to clean this up a bit, and some off-topic from other people, sorry about that :whistling:

I'll try to get around to write about the more special cases (engraving, 2-sided boards, multiple boards in one go) at some point.

Share this post


Link to post
Share on other sites

Finally the replacement Z-axis is on its way, I think I paid through the nose for it (around 68€ with shipping and taxes, an entire new machine with everything can be had for about 2.5 times that), but thought it'd be better to get a new full assembly rather than trying to 3D-print and assemble one myself with all the bearings etc, or getting an entire new machine. Once I get the part and replace the cracked Z-axis,  I'll get back to prototyping my own projects and try to update the missing bits of this tutorial (grooves, 2-sided boards...). Also added a warning about the Z-axis (or rather just the spindle clamp) durability in the tutorial.

In a longer run, I'm considering upgrading to a whole new machine, namely the CNC 2030 with full steel frame and Z-axis assembly, and 400W spindle:

32qzsuN.png

 

What's holding me back on that for now is the price, the total price with shipping and taxes is about 900€...

Edited by esaj
  • Like 2

Share this post


Link to post
Share on other sites
On 9/8/2018 at 8:34 PM, esaj said:

I'll try to get around to write about the more special cases (engraving, 2-sided boards, multiple boards in one go) at some point.

Esaj, I have been using (and tuning) my 2418 for over a year now. Yet there were still things you covered that I had missed (Z axis accuracy/step size, for example). This is an absolutely brilliant tutorial, and I am looking forward to the double-sided tips and tricks, too. When I get my new 52mm low-runout spindle-motor-mod finished I will make sure I post that here.

  • Upvote 1

Share this post


Link to post
Share on other sites
11 hours ago, trevmar said:

Esaj, I have been using (and tuning) my 2418 for over a year now. Yet there were still things you covered that I had missed (Z axis accuracy/step size, for example). This is an absolutely brilliant tutorial, and I am looking forward to the double-sided tips and tricks, too. When I get my new 52mm low-runout spindle-motor-mod finished I will make sure I post that here.

I've received and installed the new Z-axis assembly and milled a single board successfully since, but haven't had the time or energy to do much else lately. I'll try to get around to add the missing bits & pieces at some point, but can't promise when that'll be.

For a short overview of doing double-sided, the problematic thing is getting the board aligned correctly as you flip it. Some people use double-sided tape (don't recommend it though, at least in my experience the copper clad can move during milling with that), or mill a slot on the sacrificial plate (the wood block or such under the board) that's exactly the same size as the copper clad or final board.

Instead what I've done in the past is use the 3.2mm holes already existing on my design (smaller would work also if you have small wood screws), so that after the first side is done, I've used a separate drilling g-code so that smaller holes are drilled at the middle of the 3.2mm holes but go deeper into the sacrificial plate. When you flip the board over, you can screw it on and the position stays correct (assuming your screws are the "correct" size for the holes on the board, so that it can't move). Of course you need to be careful to get things correct, like mirroring the back side properly (and then flipping the board over the correct axis so your mirroring goes right during milling ;)). For that I need to write more exhaustive instructions at some point, but you can probably get the hang of it yourself, check out Tool -> Double-Sided PCB Tool in FlatCAM menus, which in current version also has options for making alignment holes if you don't want to use any in your actual board area (in that case, don't cut it out until both sides are otherwise done, for obvious reasons :P). You give the alignment hole positions as a list of one or more (x, y) -pairs in relation to the origin. Alignment holes outside the actual board design are better, as then you can also run full auto-leveling on the other side without having to watch out the bit hitting the screws holding the board.

s0g5AfF.jpg

TdYZ1Gk.jpg

LiFKFJ8.jpg

lTRI2Uz.jpg

This was a simple case where the backside only acts as one large ground plane, and I just needed to remove copper from around some of the holes for through hole pins that weren't meant to connect to the ground plane. It's a bad example in the sense that I've drilled the holes already on the top layer, those should be done last if you want to auto-level both sides.

There's a lot of small holes as I wanted to connect the ground planes of both sides (and went a "bit" overboard with the amount ;)) by soldering small pieces of copper wire between the sides, this was an amplifier stage for a signal generator that goes up to 180MHz.

qiAztqQ.jpg

 

6 hours ago, ir_fuel said:

I just order PCB's online :p 

Yeah, Chinese fab houses are pretty cheap, and it's nearly impossible to do similar boards at home (with all the through-plated holes and vias, multiple layers, soldering masks, silk prints etc.). CNC is handy for simpler single board projects and fast prototyping (and testing that your design works before you order a set from a fab house :P), but if I need more than a few boards (depending on size, I did make around 40 of those small IR-receiver/transmitter boards just by milling), I don't have the patience or the time to mill them all out, so then it's just a prototype + rest of the boards come from a fab.

Edited by esaj

Share this post


Link to post
Share on other sites
2 hours ago, esaj said:

Yeah, Chinese fab houses are pretty cheap, and it's nearly impossible to do similar boards at home (with all the through-plated holes and vias, multiple layers, soldering masks, silk prints etc.). CNC is handy for simpler single board projects and fast prototyping (and testing that your design works before you order a set from a fab house :P), but if I need more than a few boards (depending on size, I did make around 40 of those small IR-receiver/transmitter boards just by milling), I don't have the patience or the time to mill them all out, so then it's just a prototype + rest of the boards come from a fab.

I order at a place that has them produced in eastern Europe. You just pay for how fast you want them. I once had 150 units in 3 business days on my doorstep. I also ordered protoype versions without silk screen. Those I also had in 3 days, but in that case we are talking 20 euros a piece :D  If you can wait up to 7 business days it is a lot cheaper.

  • Upvote 1

Share this post


Link to post
Share on other sites

@ir_fuelI am currently milling microwave circuits on Rogers 5880 microwave laminate, which is PTFE-based and only 7mil (.2mm) thick. At millimeter-microwave  frequencies I can use nothing else (20mil FR4 stops working at about 20GHz).  I haven't been able to find a Chinese (or local) PC house interested in making me prototypes. Most of them do not have the microwave substrate available, let alone the paper-thickness boards..

@esaj Yes, I center the origin on the double sided artwork, and then drill four perimeter holes equidistant just off the edge of the board. Then I only have to worry about reversing the artwork for the back. I found it helps if you drill via holes (etc) before flipping, as then you can instantly see if you are cutting the backside in the wrong places. I use 0.8mm copper rivets for the through-hole vias :)

Edited by trevmar
  • Upvote 1

Share this post


Link to post
Share on other sites
On 2/26/2019 at 8:18 AM, trevmar said:

@ir_fuelI am currently milling microwave circuits on Rogers 5880 microwave laminate, which is PTFE-based and only 7mil (.2mm) thick. At millimeter-microwave  frequencies I can use nothing else (20mil FR4 stops working at about 20GHz).  I haven't been able to find a Chinese (or local) PC house interested in making me prototypes. Most of them do not have the microwave substrate available, let alone the paper-thickness boards..

I have no idea what you are building but it seems not something I would understand anyway :lol: 

Share this post


Link to post
Share on other sites
Posted (edited)

Looks like I found the limit of the machine tolerances on the CNC.

These were supposed to be 0.3mm traces, and I already had to pull a couple of tricks to get these done:

yLcIE8J.png

Yup, that's around 0.1mm traces there, or around 4 mils. Most fab-houses set the limit at 6-10 mils (around 0.15-0.25mm, mil = thousandth of an inch)... But like said, these were supposed to be 0.3mm. There's enough run-out to make the actual cuts somewhat wider... in this case, a 20-degree bit was used with a depth of 0.95mm, which should mean around 0.133mm wide cut at top level, but in practice the bit "wiggles" around enough to make the cut wider. I've managed to get less runout in the past, but usually ran into other troubles... Using less cut-depth might work to make the traces wider. Still, surprised at the consistency of the traces, but this is pretty much very near the limits of the machine. The footprint is for a MSOP-10 with powerpad.

MSOP-10.jpg

maxresdefault.jpg

Edited by esaj
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
19 hours ago, esaj said:

Looks like I found the limit of the machine tolerances on the CNC.

 

After I mounted a near-UV laser on my 2418 CNC to burn black paint off PCBs, I observed 3 "furrows" being burnt across a 0.1mm gap. I set the Coppercam "hatches" spacing to 0.033mm and got the same pattern - 3 'furrows' across 0.1mm.

Now obviously the laser focus is superb, but aside from that, I have seen more precision that you are getting, and I assume it is due to motor mass and inertia. I have just bought a low-vibration 52mm motor with less than 0.1mm runout, and when I get it mounted up I will post my observations here. Thanks for letting us know what you see.

Incidentally, it is simple to replace the CNC stepper motors with 0.9 degree units, 400 steps per revolution, and just reprogram the parameters in the Woodpecker GRBL board. This gives double the resolution, something I have only needed on my Z axis.

(ps: the laser I used was "GUUQA Blue Purple Laser Module 405nm 500mw Focusable for 3D Printer/CNC Engraving/Laser Engraving 12V" from Amazon)

(pps: I odered the mount for the 52mm motor from Thingiverse: https://www.thingiverse.com/thing:2719169 )

Edited by trevmar
  • Upvote 1

Share this post


Link to post
Share on other sites
Posted (edited)
3 hours ago, trevmar said:

 

After I mounted a near-UV laser on my 2418 CNC to burn black paint off PCBs, I observed 3 "furrows" being burnt across a 0.1mm gap. I set the Coppercam "hatches" spacing to 0.033mm and got the same pattern - 3 'furrows' across 0.1mm.

Now obviously the laser focus is superb, but aside from that, I have seen more precision that you are getting, and I assume it is due to motor mass and inertia. I have just bought a low-vibration 52mm motor with less than 0.1mm runout, and when I get it mounted up I will post my observations here. Thanks for letting us know what you see.

Yeah, the motor + bit vibration is what causes the too wide cuts, not the machine axes. If you look at it, the cuts are straight and the trace width is pretty uniform, so the axes are running straight and true... probably I shouldn't have used to word "tolerance" really, but 0.5mm pitch components seem to be near the limits of what I can do reliably. I ran another board today, with slightly different settings (slower cuts, first with 30-deg 0.1mm bit at 100mm/min, then again with 15-deg titanium 0.1mm bit to clean up). This time the traces are closer to 0.2mm:

iuViOBY.png

There's copper "slivers" left behind, but usually they're relatively easy to clean off or might just come off simply by rinsing the board under faucet with some water pressure. Next time I need to cut this small footprints, I might go just with the 15-deg bit + "lying" about the cut width in FlatCAM so that it runs in the middle of the pins to see if it gets close enough to 0.3mm. It's not the machines "fault" as such, or even a machine tolerance issue, just the runout on the bit + motor.

Here's what the earlier board with 0.1mm traces looks like after assembly:

oJHkWup.jpg

The resistors and capacitors are 0603's, except for the bigger cap on the right side of the chip (0805). The sticky looking stuff in the cut grooves is flux I haven't cleaned off yet...

 

Quote

Incidentally, it is simple to replace the CNC stepper motors with 0.9 degree units, 400 steps per revolution, and just reprogram the parameters in the Woodpecker GRBL board. This gives double the resolution, something I have only needed on my Z axis.

I burned the mosfet of the original Woodpecker-board enough times before with a higher powered motor, so I don't use it anymore  :P  Mine's currently running with Arduino Uno + CNC-shield with Pololu-drivers (set at 1/16th step) and a custom-made spindle driver. 

 

Quote

(ps: the laser I used was "GUUQA Blue Purple Laser Module 405nm 500mw Focusable for 3D Printer/CNC Engraving/Laser Engraving 12V" from Amazon)

(pps: I odered the mount for the 52mm motor from Thingiverse: https://www.thingiverse.com/thing:2719169 )

Tempting, but if I can save enough from what I get paid for this project, I might be going for the all-steel frame CNC next... :)

Edited by esaj

Share this post


Link to post
Share on other sites

×
×
  • Create New...