Electronics Production
Group assignment:
- Characterize the design rules for your in-house PCB production process: document feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
- Document your work to the group work page and reflect on your individual page what you learned
Individual assignment:
- Make and test the development board that you designed to interact and communicate with an embedded microcontroller
How to mill PCB on a big CNC
The CNC milling machine we have at my lab is a big CNC, not a real fit to create PCBs. But it should be precise enough. So let's give it a try.
Setup milling machine
First, our sacrificial layer is really old, it is not straight enough to mill PCB. So I created a Gcode to mill a pocket in the sacrificial layer of 3mm deep to me sure my OSB is perfectly flat.
Once it's done I fixed an MDF board in the pocket. I will use double-tap glue on the PCB.
Then I fix the small leftover PCB board to mill a first test. I also cleaned the surface will a bit of alcohol.
Set up the Z origin
Now, I need to be able to set the origin. For X and Y it's easy. It's the same as the previous week. But the Z
the paper technique doesn't work anymore as it's not precise enough. As I've learned at our local lecture there are 3 methods to set Z:
- multimeter + 0,001 mm step. When it's "beep" it's good.
- drill + sound/dust
- let fall the bit to the surface (/!\ can break the bit if the height is too high)
So first I try the last version. Carefully. But when I was tightening the collet, the bit wasn't at the top anymore. So I when for the drill method. My CNC can do smaller steps than , so I will do it like that.
The thing is because I drill on copper, I wear one more safety equipment, a mask, to not breathe the dust. (I also am careful to not touch the dust's copper).
It's difficult to hear or see something as I drill on the plane. So after some tries, I finally have a mark on the plate.
But to be honest I wasn't really happy with this method. So I try the last method with a multimeter.
Lines test with Mods
So I try to test the "Mods" method to do a lines test. I try first the program G-Code PCB (open server program)
I imported Neil's PNG and set the parameters. So first I thought about drilling through the copper layer. Its thickness is , so I choose . Because I'll use a V-Bit, to know the diameter of the tool I can use an Isosceles triangle calculator. So it's 0.014mm. Edit: A V-bit is more of a trapeze (see the FlatCAM section below).
source keisan.casio.com
So here are my first parameters.
I run calculate, looked at the preview and get the G-code. I run it for a first try "in the air" on the CNC.
I need to find the proper cutting feedrate (). As the diameter is so small, I already know I'll have to use the maximum spindle speed (): . I can take the equation from last week . The feed per tooth () on my datasheet is and it's one tooth (). So . For security, I'll choose a cutting feedrate.
And then I run it with the Z
zero set.
I can see that it didn't pass through the copper. And at some point, it stops the mill.
So first I thought that we Z wasn't good. So I try to reset it just next to the first fail. But I forget to set the super small step on the CNC, so I went too far on Z
and broke the bit. 😧
Hopefully, I have plenty of V-bit of 0.1mm. So I changed it, make sure it was on step mode and reset the Z. And try again the Gcode.
Still not engraving, so it looks like the MDF board is not flat. So run my deep pocket on the MDF to be sure it is as flat as the OSB. And then I changed to a new copper plate. First putting a double tap on it. Be sure it starts a bit before the board.
Then peel off the tap protection.
And change the parameters for the default one on Mods.
The preview on the Gcode looks better, and the depth of the cut is more than enough to cut the copper.
So I try this on the board.
The result doesn't look super great, but still, now the copper is cut. A wanted to try to cut the edge of the board. So I imported the interior png
Then I remembered that Ahmed told us at the local lecture that we needed to change the size of the PNG and add a sort of offset to the raster. But as I already milled the lines is too late to do the operation. I will stop for now to use Mods and try FlatCAM.
Path tests with FlatCAM
I looked on the web, for other PCB CNC milling technics. I quickly found two software that can handle Gerbers files and turn them in Gcode for CNC: CopperCAM and FlatCAM. Even if the first one looked convenient, the second one is free and open source, so I decided to give it a try.
For me it was interesting, to explore this tool to have a better understanding of PCB production, starting with Gerbers and Drill files. I looked to this tutorial to learn more about FlatCAM.
Make some Gerbers
But first I need Gerbers files. To test I won't start with my PCB from Electronic Design week. Better to design just some tracks to test it. So go back to KidCAD.
I create a new project and open the Schematic Editor. I just connected some pinHeader with 1 pin connected to the Ground to test the milling process of it.
I created 3 pairs of it, run the Footprint assignment tool and then when on the PCB Editor. There is set 3 different track widths and clearances.
I then draw the route between the pinhead. As close as possible to test the clearance too. I didn't find a way to assign the different Net Classes declared (I had already that problem on week 6). So I edit the width and clearance manually.
As I overwrite the track width, the DRC won't work, but it doesn't matter. Let's create the Gerbers Files (File > Fabrication Ouptus > Gerbers (.gbr)...).
I selected only the F.Cu and Edge.Cuts layers.
Then I create directly the Drill Files for the pinHeader holes.
Now I can open those files in FlatCAM. So I added the Gerbers Files and the Drill Files (Excellon).
First I need to set the Origin correctly (on the left-bottom of my PCB).
Then select the F_Cu Gerber Properties. So first I'll rename it simply F_Cu.
Then I need to Isolation Tool but first I need to know the diameter of my tool. As I said before I use a V-Bit tool. I kind of a trapeze shape.
source modsproject.org
So the diameter change regarding the depth tool is in the material. In FlatCAM there is a calculator to get the diameter with the tip diameter, the angle of the V-Bit and the depth. As I want to go in, I have a tip V-bit so the "kerf" of the tool will be
I decided to first try with the same parameters as Mods. 4 passes and an overlap of 50%. Don't forget to select Combine and then Generate Geometry.
Then it opens the properties of this new geometry. There I can set the Cut Z Depth as , and a safe height in Z
. Then Generate the tool path.
We then see the toolpath on the screen. Next is to create the toolpath for the drills. Here I can directly, in Drilling Tool in the Excellon file properties, generate the GCode. I set the depth to to pass through the board.
The last thing is to create the Gcode for the Edge_Cuts, in the properties, I go to Cutout PCB. There I can set a tool diameter, depth, and multip-depth. As I use double tap, I won't use any "gap" (= tabs). Once the geometry generates, I can then generate the Gcode. Like I did for the first Gerber.
With the 3 toolpaths generate, I can save the Gcode in their properties.
Here are the 3 tools I'll use.
I then run it on the CNC.
The result is pretty bad. Only the largest tracks are still connected . I measure the clearance between the Ground part and a track, I get ~.
And went I look in FlatCAM. I should have a . So probably the tool I use is already a bit used. Actual radius , and so the diameter is more than ... That's a lot! I created some new tracks on KidCAD to try even thicker tracks.
new parameters:
- track 0,8 and clearance 0,6
- track 1 and clearance 0,6
- track 1 and clearance 0,8
I will still use this bit for a new trial. But this time with a diameter for the path. Only 2 passes and an overlap of 40%.
And the result is much better! So let's try to solder some pins. The pinHeader fit perfectly. But it raises a question. The "pass-through components" are much easier to solder from the bottom. But not the SMDs (Surface Mounted Devices). So, how can I do it?
So first I try to solder just above the plastic holder.
Then without it. But when I test with the multimeter if the pins were connected. I discovered that the double-layer PCB where connected from the bottom.
So I removed some copper at the bottom.
Now that I know that, I remove some copper in advance for the other holes with a drill.
I also try to solder with the pins put from the bottom of the board.
Let's make my final project PCB
So let's reuse the PCB I designed in week 6. I will just edit it, with my learnings. So first I deleted all the tracks to replace them with my preferred Net Classes ( of width and of clearance). To delete only the track, I select Tracks in the Selection Filter.
Then I edit the Net Classes and start the routing. I also Change the gab/tab of the Ground *Zone, as I did on the last test. To assure a good connection to the ground.
I'm a bit afraid to still be able to plug the USB-C in the ESP32C3 as there are some tracks in front of it. So I tried to reduce a bit the size of the board, and I had to remove one of the holes to fix the PCB. I could try to use the Trought Hole connection of the ESP32, but it would mean I need to reverse all the connections in mirror.
So here is the new PCB.
I imported the new Gerbers and Drill Files in FlatCAM. There I rotate 90° the board as my platform to mill is too thin on the X-axis.
I use the same parameters from my last tracks test. Just I added one more passe for the isolation toolpath.
Here is the result, far from perfect, but it will work.
So I did a bit of cleaning and sanding.
To solder the ESP32C3 I used a tap to hold it for the first point.
Then I solder all the others. And I added some solder on on pin of the SMD components.
Then I started with the LEDs.
I received all my Resistors in one envelope. So I had to find the ones I needed, they all have a number on them. To find the code for the right resistor I used this website.
Here are the ones I need:
Ohms | SMD |
---|---|
1800 | |
1001 | |
1002 |
Then I solder them. Using the technic I saw during the Student's Bootcamp.
I added the pinHeaders and the button, and here we go the board is almost completed.
Almost, because like a saw, I made some mistake on the PCB.
1) A missing track to connect a pin to the ground. 2) A missing track for the +3.3V to be connected to the Left side of the board. 3) a connection between a LED and its resistor.
Here is the final result:
Files
Here are the files for the week.