Nowadays, PCBs can be bought extremely cheap from China. But let’s say you need one within 24 hours, making your own is then the only option. Furthermore, it’s way more challenging and fun!
In this Instructable I will guide you through the whole process of making a professional double-sided PCB on a cheap CNC mill, without any chemicals! The PCB features:
- Double sided
- Soldermask (green layer)
- Silkscreen (white text)
- Copper vias
- Though hole plating
- Tinned pads (optional)
It has taken me a lot of experimentation to get to this point. Especially the soldermask and silkscreen have required some work to come to a streamlined process. Let’s get started!
Add TipAsk QuestionCommentDownload
Step 1: Parts & Tools
9 More Images
Tools
- CNC mill with:
- 3.175 mm collet (like ER11 collets)
- Z probe
- Nail punch (for making the vias)
- Hammer (for hitting the nail punch)
- Sandpaper (fine grid)
- UV light
A cheap CNC is perfectly capable for the job. Chinese units are about 150-300$.
Parts
- PCB blanks / copper clad board
- PCB mills: 0.2 mm, 30° tip
- PCB drills: 1 mm and 1.5 mm
- PCB mills: 2 mm and 3 mm
- PCB rivets: 0.9 mm and 1.3 mm outer diameter
- PCB UV curable solder mask (green)
- Correcting fluid (tipp-ex)
- 3 mm alignment pins
- PCB and alignement pin holder
- Liquid tin / chemical tin solution (optional)
All parts can be found for cheap on aliexpress or ebay with the names above. The chemical tin solution might be harder to find and can be quite expensive (about 50 bucks for a bottle), but is completely optional.
The PCB holder and alignment pin holder are used to mount the PCB on the CNC bed. You can print them from the zip file or the original designer, 2 copies of each file are needed.
Attachments
Add TipAsk QuestionCommentDownload
Step 2: Software
2 More Images
Besides a CNC mill and some tools, we will also need 3 programs to make our own PCB
- PCB design software to design your PCB
- Flatcam to generate the code for the CNC mill
- Candle to control the CNC mill
PCB design software
You can use any PCB design software you want. Popular options include: Altium designer, Circuitmaker, Eagle, Kicad,… I will assume that you know how to design PCBs and export the gerber files. If you don’t know what these are, creating gerber files for a PCB is like generating a PDF for a text file. It is a standard format to save the specifications of your PCB. You can find plenty of tutorials online for this.
Flatcam
Flatcam is less common, but very easy to use. I will explain every step in detail and guide you through the whole process. When in doubt, take a look at the excellent Flatcam manual.
Flatcam will take our gerber files and convert them into machine movements (gcode) by a technique called isolation routing. To mill a PCB track, we have to mill the contour of the track to isolate it from the surrounding copper, hence the name.
Flatcam has 4 tabs (see picture):
- Project: gives an overview of the files you opened or created
- Selected: used to generate new files
- Options: used to store default settings
- Tool: used for double sided PCBs
We start by opening a gerber file with File>Open Gerber and it will appear under the Project tab. There are now 3 steps to convert this gerber into gcode:
- Generating the isolation toolpath
- Click the gerber file in the Project tab to select it and click on the Selected tab
- Here we can enter the settings of the tool we will use and click on Generate geometry
- Back in the Project tab we see a new file with _iso in the extension
- Generating the geometry
- Click the isolation file in the Project tab to select it and click the Selected tab
- Now we enter depth of cut and speed and click on Generate
- Back in the Project tab a iso_cnc file has appeared
- Exporting the gcode
- Click the cnc file in the Project tab to select it and click the Selected tab
- Click Export gcode and save the file with a .nc file extension
This easy procedure has to be repeated for every layer of your PCB. The specific settings will be covered in the upcoming steps and will be mentioned in metric units. The feed rate will depend on your actual machine. For reference: my CNC has a 300W spindle.
Candle
Candle is used to control the CNC machine; another popular option would be Chilipepr. Any software will work, as long as it has the option to make a heightmap (more on that later).
If you own a CNC machine, you’ll be familiar with most options and how to control the machine. I will go into the details for the PCB specific options we will need.
Let’s start milling!
Add TipAsk QuestionCommentDownload
Step 3: Drilling the Alignment Holes
3 More Images
Before we can start milling either of the two sides, we have to make sure we will be able to flip it once the top side has been milled. To do this, we will create alignment holes, such that we don’t lose the positioning when flipping the board. If you only need a single sided PCB, you can skip this step.
Flatcam setup
We will use the Double-Sided PCB tool of Flatcam to do generate the alignment holes. I prefer drilling 2 holes, one at each of the far ends of the PCB, about 5 mm from the edge. Since my PCBs are 150 mm long, I place them at coordinates (5,0) and (145,0). The diameter of the hole will be 3 mm.
- Go to Tools>Double-Sided PCB Tool
- Add the location of the holes:
- Point/box: (0,0)
- Alignment holes: (5,0),(145,0)
- Dril diam: 3
- Click Create alignment drill
- Go back to the Project tab: a file called Alignment Drills has been created
This has created a kind of gerber file of the two alignment holes. We can now follow the procedure I described in the previous step to turn it into gcode!
Select the file and go to the Selected tab:
- Tool: 3mm mill
- Settings: CNC job
- Cut Z: -2
- Travel Z: 1
- Feed rate: 25
Finally, export the resulting file. It’s now time to bring the gcode into Candle and mill the alignment holes.
Milling
First, place a PCB in the PCB holders, mounted to the CNC bed. Also add two alignment pin holders, but put them to the side of the PCB for now. Open your gcode file and install a 3mm mill in your CNC.
Next, set the origin vertically centered and 5 mm from the left edge of your PCB (see picture). Start the program to mill the alignment holes.
Place two 3mm alignment pins in the holes we drilled and through the alignment pin holders, as in the picture. The PCB is now firmly mounted and can be flipped in the future! From now on, never change the home position!
Add TipAsk QuestionCommentDownload
Step 4: Milling the Outline
5 More Images
We can now start creating our actual PCB. Before milling any traces, we will do the board outline and create a heightmap of the PCB.
Milling the board outline
Load your board outline gerber file into Flatcam and go to the Selected tab as usual.
Under board cutout, enter the settings mentioned below. We will mill this in 8 shallow passes.
- Gerber File: board outline
- Tool: 2 mm mill
- Settings: Board cutout
- Tool dia: 2.0
- Margin: 1.0
- Gap size: 0.15
- Gaps: 4
- Settings: CNC job
- Cut Z: -2
- Travel Z: 1
- Feed rate: 200
- Tool dia: 2
- Multi-Depth: YES
- Depth/pass: 0.25
After generating the gcode, install a 2 mm milling bit in the CNC and start the program!
The PCB will be held in place by 4 tabs, plenty sturdy for the coming operations.
Creating the heightmap
One crucial step to achieve good results when milling a PCB is creating the heightmap. To have a nice PCB, the depth of cut should be perfectly uniform across the whole board. Copper clads are never completely flat, so the mill would go too deep in some places and not deep enough in others.
We can avoid this by probing the height of the PCB in several spots and adjusting the mill depth accordingly, such that the depth of cut is the same everywhere. We create this heightmap with a Z probe: by attaching a crocodile clip to the milling bit and a clip to the PCB, the CNC can detect when both come in contact (since they complete a circuit). This function is implemented in Candle:
- Open the Heightmap dropdown menu and click Edit mode. This opens the heightmap settings.
- Click Auto to define the probing grid.
- Make sure your Z probe is correctly attached, and click Probe.
- When the heightmap is created, exit the menu by clicking Edit mode again
- Select Use heightmap.
We are now ready to mill the actual traces, let’s go!
Add TipAsk QuestionCommentDownload
Step 5: Milling the Top
9 More Images
The top layer can now be milled. We will do this in 4 steps: first the copper traces are milled, next the solder mask is applied and cured, then the pads are milled and finally the silkscreen is added.
Copper layer
First we mill the copper layer with isolation routing. Generating the gcode files is the same as before, with the settings below. Set the zero Z height with your Z-probe and be sure to use the heightmap when milling to get a good result.
- Gerber File: top layer
- Tool: 0.2 mm 30° tip PCB mill
- Settings: Isolation routing
- Tool dia: 0.3
- Width: 2
- Pass overlap: 0.3
- Combine passes: YES
- Settings: CNC job
- Cut Z: -0.12
- Travel Z: 1
- Feed rate: 50
- Tool dia: 0.3
- Multi-Depth: NO
Applying solder mask
Once the copper is milled, we apply a UV curable solder mask. Spread it over the the PCB with a squeegee in a kind of uniform layer but don’t apply too much pressure. Also, leave the PCB in place, otherwise the heightmap will be useless! This is key for the next step! Once applied, cure the solder mask with a UV light until it’s hard.
Milling the pads
The whole PCB is now covered in solder mask, so we have to free the pads again. We can do this by milling with a depth of zero. This is where the heightmap shows it strength: it allows to mill away the solder mask but leaves the underlying copper in tact! Since we need to mill the inside of the pads and not the outline, we enter a negative tool diameter.
- Gerber File: top solder
- Tool: 0.2 mm 30° tip PCB mill
- Settings: Isolation routing
- Tool dia: -0.3 (no typo!)
- Width: 4
- Pass overlap: 0.3
- Combine passes: YES
- Settings: CNC job
- Cut Z: 0
- Travel Z: 0.5
- Feed rate: 500
- Tool dia: 0.3
- Multi-Depth: NO
Making the silkscreen
To finish of the front and make it look like a proper PCB we need one more thing: the silkscreen. In a professional process the text is printed on top of the soldermask, but this is difficult to reproduce. The trick I found is to mill the text in the solder mask like in the previous step, instead of printing it on top. By then applying correction fluid and sanding the top, the silkscreen is embedded into the soldermask!
- Gerber File: top overlay
- Tool: 0.2 mm 30° tip PCB mill
- Settings: Isolation routing
- Tool dia: -0.4 (no typo!)
- Width: 1
- Pass overlap 0.3
- Combine passes: YES
- Settings: CNC job
- Cut Z: 0.03
- Travel Z: 0.5
- Feed rate: 200
- Tool dia: 0.3
- Multi-Depth: NO
The front is now done and we can move on to the backside. I leave the sanding to the end, when the PCB is completely cutout.
Add TipAsk QuestionCommentDownload
Step 6: Milling the Bottom
Milling the bottom is — ofcourse — very similar to the top. There is however one extra step: we need to flip the PCB and mirror the gerber files before generating the gcode.
Mirror the gerbers
First, load your gerber files for the bottom. To mirror the gerbers, we have to use the Double-Sided PCB tool once again. Select the layer via the dropdown menu and press Mirror Object. Do this for following layers:
- Bottom layer
- Bottom solder
- Bottom overlay
- Drills (nc drill files)
- Board outline
The process of generating the gcode is now identical to the top side.
Flipping the board
Flipping the board is as easy as it sounds: release the PCB clamps but leave the alignment pins in place. Flip the board and re-secure it in the clamps. A new heightmap can now be created as before.
Add TipAsk QuestionCommentDownload
Step 7: Drilling the Holes & Installing Vias
8 More Images
The final step on the mill is to drill the holes. We will drill two sizes of holes: 1 mm for the vias, and 1.5 mm for the plated through-holes. This is one of the main advantages of milling over etching PCBs, since etching requires manual drilling.
Drilling
To open the drill files, select Open Excellon instead of Open Gerber and select the correct diameters in the Selected tab. The other steps are identical.
- Excellon File: holes
- Tool: 1 mm and 1.5 mm drill
- Settings: CNC job
- Cut Z: -2.5
- Travel: 1
- Feed rate: 25
This was the final step, we can now take the PCB out of the CNC. and cut off the tabs holding it in place. A light sanding with a fine grid sandpaper shows off our beautiful silkscreen.
Vias and though-hole plating
The finishing step for our PCB is to install the vias and through-hole plating. You can buy these vias for cheap online in different sizes.
For the vias, use 0.9 mm sized ones and insert them into the 1 mm holes. Use a nail driver to hammer the other side shut and create a solid connection between top and bottom layer.
The plated through-holes use the 1.3 mm variant in a 1.5 mm hole. Since the hole needs to stay open, crimp these with a tool as shown in the pictures.
Tinning
As an optional last step, the PCB can be tinned. This makes soldering components to the pads easier and prevents them from corrosion. We do this with a solution called liquid/chemical tin, which is essentially dissolved tin, ready to bind to any copper it is exposed to. Wear gloves when handling this stuff though!
Simply pour the liquid tin / chemical tin solution in a container big enough for your PCB and submerge your PCB. Let it sit for about 2 minutes and take out the board (wear gloves!). Rinse it under water and you will see shiny tinned pads and through hole plating!
Add TipAsk QuestionCommentDownload
Step 8: Final Notes
We now have a double-sided PCB with soldermask, vias, through-hole plating and silkscreen, ready for assembly. In case you are wondering what we have been milling, it is an IR based LED strip driver.
Comparison with etching a PCB
As a final note, let’s address the elephant in the room: what about etching a PCB?
I have tried etching before, and personally I’m not a big fan of working with and storing chemicals. On the other hand, you don’t need a CNC mill, which might be a barrier for some. One pronounced advantage of milling is that the cutout and drilling is not a manual process, and therefore has better alignement.
In terms of time, I have tried both and the time it takes is more or less equal. On the one hand you have to generate the gcode, while etching requires toner transferring (or similar) of the gerber. Where milling takes time, so does etching. Although etching is faster for larger prints, you don’t have to stand next to the CNC either.
In the end it all comes down to personal preference; make PCBs the way you want and feel comfortable with! 🙂
Conclusion
When in dire need for a professional double sided PCB making your own is still the way to go. With this instructable and a CNC mill you should now be able to this! It isn’t meant to compete with commercial PCBs, but it can save you if waiting for manufacturing and shipping is not an option.
Furthermore, I really liked the challenge of producing my own PCBs with only a CNC mill and including a silkscreen. Hopefully I have given you some inspiration to try it out yourself! If so, please vote for me in the PCB contest.
Sorry, the comment form is closed at this time.