DIY Professional Double Sided PCB

11,044

133

23

About: I am an electronics engineer, doing a PhD at the VUB in Belgium. I have a passion for making things, both useful and cool.

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!

Step 1: Parts & Tools

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.

Step 2: Software

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:

  1. 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
  2. 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
  3. 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!

Step 3: Drilling the Alignment Holes

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.

  1. Go to Tools>Double-Sided PCB Tool
  2. Add the location of the holes:
    • Point/box: (0,0)
    • Alignment holes: (5,0),(145,0)
    • Dril diam: 3
  3. Click Create alignment drill
  4. 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!

Step 4: Milling the Outline

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:

  1. Open the Heightmap dropdown menu and click Edit mode. This opens the heightmap settings.
  2. Click Auto to define the probing grid.
  3. Make sure your Z probe is correctly attached, and click Probe.
  4. When the heightmap is created, exit the menu by clicking Edit mode again
  5. Select Use heightmap.

We are now ready to mill the actual traces, let's go!

Step 5: Milling the Top

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.

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.

Step 7: Drilling the Holes & Installing Vias

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!

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.

I hope you liked the project! Feel free to check out my other Instructables: https://www.instructables.com/member/ThomasVDD/

PCB Contest

Runner Up in the
PCB Contest

Share

    Recommendations

    • Remix Contest

      Remix Contest
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest
    • Build a Tool Contest

      Build a Tool Contest

    23 Discussions

    0
    None
    fred27

    13 days ago on Step 8

    Very nice work. I've tried most of these processes but never got it to look quite that good. The silkscreen is particularly inventive. I'm impressed that it holds up to the temperatures of soldering.

    One thing that I think could add to it, is to tin the traces. Tinning solution is readily available. It's not cheap but I think it's worth it.

    1 reply
    0
    None
    ThomasVDDfred27

    Reply 12 days ago

    As a matter of fact I already ordered a tinning solution, but it arrived only last week after I finished my guide. I paid 60 euros for a bottle, still reasonable for the amount of PCBs it can tin.
    I just finished testing and it tins the PCBs perfectly without affecting the soldermask. It has to be done as the last step, since I can't remove the PCB from the CNC machine between milling the traces and applying the soldermask.
    I will add it to the last step, since it makes soldering the pads a lot easier.

    0
    None
    pat133

    4 weeks ago

    Good job indeed. To do the "silkscreen" do you think it would be possible to replace the drill bit head by a pen to print directly instead of sanding ?

    3 replies
    0
    None
    IvanildoG2pat133

    Reply 21 days ago

    Hi...I normaly use a "1w laser" for burn the surface and used to get a Nice rusult in my Silk...

    0
    None
    ThomasVDDIvanildoG2

    Reply 20 days ago

    The issue with that technique would be the loss of alignement when swapping the spindle for a laser module..

    0
    None
    ThomasVDDpat133

    Reply 26 days ago

    Thank you :) I also thought of this, but I found two issues with this approach. Markers are simply not fine enough to get nice small text. Furthermore, it's not possible to mount the marker in the same location in the CNC as the bits, which means you need to use offsets and you lose precision in your alignement. Maybe it's possible, but this is the most reliable method I have found so far :)

    0
    None
    CoolNamesAllTaken

    21 days ago

    I've been working on milling PCBs for months, and this manual had so many great ideas I hadn't though of! Using a separate alignment pin jig, whiteout solder mask, milling the pads...wow, I need to try these!!

    0
    None
    fstedie

    4 weeks ago

    I really like the way you did the "silkscreen", very creative. IMO doing the vias is a step that most diy folks won't need to do but nice to see a thorough process.
    Also, since you're clearing the soldermask off the pads with the mill, you could use any other type of paint or epoxy if you don't want to use actual uv cured soldermask.

    1 reply
    0
    None
    ThomasVDDfstedie

    Reply 26 days ago

    Thanks! It has indeed been quite a challenge to find a nice and reliable way to do the silkscreen :)
    Good idea, I'm gonna give it a try next time!

    0
    None
    tercero

    4 weeks ago

    Fantastic instructable. Really well done.

    I voted.

    1 reply
    0
    None
    Eagletrike

    4 weeks ago

    Excellent well written instructable you definitely got my vote. I have tried the etching technique but found the transfer method rather unreliable so will be giving this ago once I get the CNC router.

    1 reply
    0
    None
    ThomasVDDEagletrike

    Reply 26 days ago

    Thanks! I had the same feeling about the toner transfer, and didn't really like dealing with the chemicals.

    0
    None
    LesB

    4 weeks ago

    Any Chinese PCB suppliers I checked are extremely cheap for large quantities. For small quantities like one, they are not extremely cheap. If you know of such a supplier I'd like to know.

    3 replies
    0
    None
    Dave McLesB

    Reply 4 weeks ago

    JLB PCB, $2 for 10 small boards

    0
    None
    LesBDave Mc

    Reply 27 days ago

    Thanks!
    I assume you meant JLC PCB. They have that deal.

    0
    None
    Dave McLesB

    Reply 27 days ago

    Yep, that's the one. D'oh.

    0
    None
    BlueSmoke

    4 weeks ago

    WOW!
    I'm very impressed. Time to buy a CNC machine.
    This is excellent work and a very nice writeup. I can tell you have put a lot of time into researching and developing this procedure and creating this instructable. This is just what I've been looking for for 35 years. Thanks!