Engraving a PCB

Hardware works best when it matters the least.

Norman Ralph Augustine

It’s time to move our IR Transmitter circuit from breadboard to PCB. Just as a reminder, this is what the circuit looks like:

This is a circuit trivial enough to be made on a single layer Through Hole board (TH). These boards are readily available from hobby shops either locally or online, and consist of an FR4 fiberglass substrate with 1oz per square inch copper plating on one or two sides. We’re going to use a single sided board.

This circuit is also trivial enough to be made using a technique called Isolation Routing. Isolation routing has largely replaced home etching for simple PCBs. Home etching uses boards covered with a layer of photoresist, paper tape, or printer toner to define the areas where copper should be preserved when the board is dunked in an acid bath. It’s messy and often tricky to get an even etch.

Isolation Routing uses a V shaped CNC mill bit to remove the copper from the board where it isn’t wanted to result in a usable circuit. I use a 20 degree bit with a 0.1mm tip. For a bonus, you can also drill the through holes with the same CNC mill, resulting in a precise cut. I used a 0.8mm drill bit for this board.

The workflow is to go back to our circuit in KiCad and realize it on an PCB with the KiCAD PCB editor:

Here we have two PCB footprints for the two IR LEDs, one for the resistor and I added a 2mm 2-pin JST connector to allow easily connecting to the ESP32. The small red cross is going to become the workpiece origin in our CNC mill coordinate system. The black areas are where we need to remove copper to isolate our signal traces.

I also added a “ground plane” zone which ensures that the parts of the PCB we’re not using are left coated with copper which is connected to ground. This is a generally good practice, but more important for Isolation Routing as you don’t want to have to mill out all that copper unnecessarily. In this case, the ground plane in blue is connected to the GND net in the circuit, and to the JST connector. The other pin from the JST connector is the IR_EN pin.

I modified the PCB traces to make them a bit wider, and also adjusted the pads and holes on the PCB component footprints to make them a bit easier to solder and make the hole sizes consistent so I only needed one drill instead of 3 (the originals were 0.75mm, 0.75mm, 0.9mm and I made them all 0.8mm for consistency). KiCad also conveniently allows us to render a 3d view of the board, if the components provide the corresponding models:

Next we need to generate the Gerber and Excellon files for the PCB using the “Plot” function in KiCad:

As we’re only using a single layer, we plot just the edge cut (the outline of our board) and the B.Cu layer which is the Background Copper layer. We also need to generate the drill files to tell the CNC machine where to drill.

Having generated these files, we switch to a different tool, in my case I used FlatCAM:

Using the FlatCAM isolation milling tool, we can generate the paths the mill needs to cut with the V bit, which are the paths in red in the above image. This image also shows the locations of the holes which will be drilled. Note that you may need to flip the input file on the X or Y axis so that you generate the g-code in the correct orientation to cut the board upside down! From these paths we can generate the CNC g-code files, one for the milling and one for the drilling as I don’t have an automatic bit changer on my mill. For this board, I selected Full isolation, which generates paths around the inside and outside of the isolation area. It would be sufficient to do one or the other depending on requirements. Having generated the CNC G-code file we can see the toolpaths:

Next we generate and save off the g-code and send it to our mill resulting in the cut and then we change tool to the drill bit and send the second g-code. This process usually requires some iteration and patience before you get it right, but the end results can be quite good:

Having cut and drilled our board, we clean it up with a de-greasing agent, some Isopropyl alcohol and then solder the components on. I prefer to use separate solder and flux.

Now you can cut the board out from the larger blank, assuming you did not already do so. I used a Dremel with a cutting disk to cut along the markings I engraved around the perimeter. It is also possible to use a mill bit to cut out the perimeter if you want a more complex outline.

2 responses to “Engraving a PCB”