8. Fabricate my own PCB¶
This week I finally completed the Development board that I designed in Week 6, by first milling traces from a copper-laminated sheet to make the circuits, and then assembling and soldering electrical components onto them.
I then tested the board for issues by first probing it with the multimeter, then by uploading a simple code onto it.
Group assignments:
- Characterize the design rules for FabLab Kamakura's in-house PCB production process:
feeds, speeds, plunge rate, depth of cut (traces and outline) and tooling.
- Document the workflow for sending a PCB to a boardhouse
Individual assignment:
- Make and test a microcontroller development board that I designed
Group Assignment:¶
In terms of figuring out the Design rules for milling at FabLab Kamakura, the default values on mods produced great results for us.
We tried out milling with different endmills (using some that past students have left behind), and we could see how the quality of endmill affects the finish; particularly how well it can mill thin lines, and how well the pathways surrounding the line keep up without peeling off.
We also learnt the importance of having a level surface when milling, as our first mill failed halfway due to the surface being slanted.
Read more in the Group Documentation here
Fabricate a Development Board:¶
Our main goal for this week was to fabricate the board that we designed in Week 6.
👉Common approaches of fabricating PCBs:
There are several ways to making circuits boards, such as;
- Toner transfer method / Etching with chemical solutions
- Milling
- Sending the design to a boardhouse
The method endorsed at FabAcademy is the milling method, which uses a milling machine (which is essentially a specialised CNC machine) to remove unwanted copper from a copper-clad board, creating the desired circuit pattern. This is a faster and cleaner/safer method than the traditional chemical etching.
We used the milling method and these were the steps I took;
1. Prepare design files (already completed in Week 6)
2. Generate the milling toolpath using “mods”
3. Use a milling machine to mill traces/outline on a copper board
4. Solder on electrical components onto the milled board
5. Test the board and debug as necessary
1. Prepare Circuit Board Design files¶
I simply exported the KiCad design from Week 6 as 2D vector (.svg) files.
2. Generate the Toolpath (.rml file)¶
To generate the milling toolpath for trace and outline, I used the online tool, mods.
👉Toolpath refers to the precise trajectory followed by a cutting tool during a machining operation.
“Trace”“ refers to the pathway for connecting electronic components, carrying electrical signals and power, while “outline” refers to the outer boundaries of the board, dictating the board’s size and shape.
“mods” is a modular cross platform tool intended for use with commonly found machinery in fab labs. It can be used in various tasks, such as CAD, CAM, machine control, automation, UI development, input device integration, and responsiveness to physical models.
- Visit the mods site.
-
Start by right clicking anywhere on screen >
Program
>Open Program
>Roland > Mill 2D PCB
. A node program will appear. Select the milling machine (This time, Roland SD-20 mill 2D PCB)
-
First, we read the 2D vector data (png or svg). This time, I read svg, and for svg we need to invert it.
- Then I set PCB defaults to adjust the milling tool settings. After setting the parameters (this time I used the default values below).
→ Tool Diameter: .0156 inch (1/64)
→ Speed: 4 mm/s
→ Offset stepover: 0.5
→ Offset number: 4
→ Plunge rate: On Roland SRM-20, there was no option to adjust this
→ Depth of cut (traces): 0.004 inch (max: 0.004 inch)
→ Depth of cut (outline): 0.024 inch (max: 0.072 inch)
selectMill traces
orMill outliine
(we need to create both, so we will repeat this process).
- Tool diameter: Diameter of the drill bit that we are using
- Cut depth: How deep the endmill will mill in a single pass. It is usually around 0.1mm, but it can be as deep as around 0.15mm if you want to remove more. Be careful to not cut too deeply as it will cause more wear-and-tear on your endmill. As it was for the CNC machine, general Rule of thumb is 1/2 the Diameter of the dndmill.
- Max depth: How deep the material will be cut in total. Divide by the cut depth to get number of stepdowns.
- JOG: the height that endmill will jump to every time it jumps from one point to the next. Keeping this value low will speed up the process.
- Number of offsets: How many times that machine will repeat the same path. The default of 4 is usually a good number.
- Offset overlap/stepover: In percentages, how much overlap there is between 2 offsets. Usually we use 50 to overlap exactly in the middle of the next path.
- I also need to change the XYZ origin to 0, as for some reason the defaults are set to 10.
- I also toggled the Save file option as
ON
. - Then I went to to Mill Rastor 2D, and selected
Calculate
to generate the Toolpath.
- The trace toolpath (.rml file) is generated and automatically downloaded (If it’s not displayed automatically, press
View
). It is a good idea to examine the toolpath to identify potential issues in the machining process before the actual fabrication.
It’s also useful to note the toolpath dimensions as it will help you when milling, in determining whether a particular area of copper is enough for your board. - I then repeated this procedure for the outline edge-cut toolpath. We select PCB defaults with below values, and select “mill outline” in step 4 above.
→ Tool Diameter: .0312 inch (1/32)
→ Speed: 4 mm/s
→ No. of offsets: 1 → Plunge rate: On Roland SRM-20, there was no option to adjust this
→ Depth of cut (outline): 0.024 inch (max: 0.072 inch)
selectMill traces
orMill outliine
(we need to create both, so we will repeat this process).
Once the toolpaths are completed, I can proceed to milling the PCB.
I exported the two .rml files onto a USB drive.
3. Mill traces¶
At FabLAb Kamakura, we normally mill using the Roland SRM-20.
Tools and materials used:
- Roland SRM-20: Max. operation area: 232.2(X)×156.6(Y)mm, Mechanical Resolution 0.000998594mm/step, Milling speed 6~1800mm/min, Max rotation 7,000 rpm
- Endmill for traces: 0,4 mm (1/64”) SE 2FL
- Endmill for outline: 0,8 mm (1/32”) SE 2FL
- Material used as board: FR-1 Copper-clad laminated substrate (cut substrate) / 紙フェノール(FR-1)の銅板, with thickness = 35um.
Steps for milling traces;
- First, the milling machine needs to be connected to the PC, and the machine turned on. It’s also a good idea to turn on a lamp for good visibility.
- We then open the software that can control the milling machine, which for SRM-20 is
VPanel
. - Then the copper board needs to be placed on the bed. Make sure it’s fixed securely to the bed with adhesive tape, and pressed down for good measure, to get a level surface.
- Next, the endmill needs to be set to the machine, (we start with the trace first, so I set the 1/64 inch). We don’t need to secure completely tightly this time, as we will be setting the Z origin soon (but make sure it won’t drop to the board).
- We then set the endmill’s XYZ origin. For XY origin, we use the arrow buttons on Vpanel and assign it as XY origin on the software.
- For the Z-axis the origin needs to be set manually (for SRM-20). I move the bit down, so that it’s nearly touching the surface. Then, lightly supporting the mill with my finger so it won’t drop and damage the tip, I unscrew to lower the mill to the surface. Then screw it again tightly and assign this as the Z origin on the VPanel software.
- When ready, I start milling. First lift the Z by a little bit, then select
Cut
, delete all files, and then open the .rml file, and finally selectoutput
.
- After cutting, remove the dust with brush, remove the endmill carefully, and and repeat the above for outline cut. Remember, we must replace the bit to 1/32 inch, and without changing the XY origin, we need to reset the Z origin.
For some reason that we couldn't figure out, we couldn't get the machine to mill my board properly. The milling wasn't producing dust, and the milled surface was still shiny, and when I held the milled board against the light, you could barely see the traces.
Once milling is finished, remove the board (using the acetone solution and spatula if necessary), and wash the board with soap, but make sure to dry it well (electricity and water don’t go well).
This is the milled board. The traces came out very clean.
4. Assemble and solder components¶
After milling, we can solder all the components onto the board.
First collect all the necessary components, and set up a conducive workspace.
4.1 Set up the soldering workspace¶
A well-organized workspace is key to efficient and accurate soldering. Start by spending some time to set up a desk space that works well for you.
- Ensure that there is a good light source: It’s a good idea to invest in a portable lamp.
- Magnifying glass (ideally with lamp, as pictured above) is also recommended, especially for beginners and if you don’t have good eye-sight
- Ensure the workspace is well-ventilated, to avoid inhaling harmful fumes (lead is toxic), by opening windows if possible. It is recommended to use a portable fan, although the effectiveness of those fans are questionable…
- Line the desk with an anti-static, heat-resistant mat.
→ Arrange all your tools within easy reach, to streamline your workflow.
→ Sharp tweezers: To keep components in place
→ Nippers: To cut off unnecessary parts.
→ Flux: for making the solder flow well.
→ Solder wire: I used 0.3mm 60/40% metal/lead mix.
→ Soldering iron: (I set it to 370C degrees), set on soldering iron stand.
→ Desoldering wick: to remove excess solders that accumulates on the iron.
→ Wrabbing arms - They are arms that help keep your hands stable. They are optional (I didn’t use it this time) but they can help with smaller components.
→ Easy access to the KiCad designs, for reference. - Set out all the components
To keep track of all the different components you need, and to avoid losing the especially small components, have designated container(s) to hold all the components. Another good approach is to write out al your components on a notebook, and use masking tape to secure them to the notebook
4.2 Start Soldering¶
- Turn on your Soldering iron.
Heat up your soldering iron. The ideal temperature depends on the wire but it is usually between 300-350 Celcius. Be careful to never touch the metal parts to avoid getting burnt! - Also consider fixing the board in place using double-sided tape, to stabilise it, although it has the disadvantage of making it harder to rotate it.
- Once ready, start soldering
→ Start with adding some flux to the surfaces you want to solder. It’s not mandatory, but it helps the solder flow more easily.
→ Put a small amount of solder to a little part of the component, and fix the component onto the board. This helps keeps the component in place, while you solder on the other parts.
→ The tip is to solder from small components to bigger components, and from center outword, and from low components to higher components.
→ When soldering on the component, first touch the tip of the iron to both the board and component’s pad, to heat them up, then bring the soldering wire close to them to melt, and let the solder flow onto them. Once the solder is enough, release the iron.
→ Be careful to not heat the components too long as it will cause them to get damaged/destroyed. - Examine the soldering result.
For example a through-hole connection like below should be shaped like a Mount Fuji.
I practiced my soldering beforehand by soldering the legs on this multiplexer.
→ Make sure you put enough soldering; too little will increase likelihood of connection errors.
→ If you added put too much solder, or to wrong areas, you can retract some of the excess solder by using a soldering wick.
→ For through-hole type connections, like Xiao’s pins, check that the soldering went through the components “legs”. It has to flow between the pin and the copper pad.
→ Remember that some components, such as diodes and LED, you need to place them in the right direction. - After finishing soldering, clean the PCB very well with alcohol. It’s also important to clean up the excess flux as it can interfere with the electrical continuity. Also wash your hands well with soap as consumption of too much lead is toxic (After handling lead, do not lick your hand or touch bruises or eyes before washing well.).
My first PCB board! Not sure if Neil would approve of the soldering job…
As you know, the LED needs to be positioned in the correct direction for it to work. According to my instructor Tsuchiya san, the standard in Japan is a green line on the Anode side. But after soldering it down that way, we tested with the multimeter, and in fact it was the other direction for this particular LED. So I had to remove it and resolder it. Hence the messy solders around the LED :( This is why it's a good idea to test the LED before fixing it down!
5. Test and debug¶
As we already discussed in Week 6, connecting a faulty board can cause costly damages, failures and injuries. So we should always assume that our board is faulty, and systematically examine its connections and components, before connecting it to anything.
First, make sure the board is fully disconnected, and the multimeter is set to the right settings.
Then probe two areas where they should be connected, to test continuity and open circuits, or where they shouldn’t be connected, to test for short circuits. If a beep occurs, it means that the 2 probed areas are connected.
6. Program the board and debug¶
Finally, I programmed the board to execute a blinking LED operation.
// Xiao ESP32C3 Program to blink the LED
#define led_pin D6
void setup() {
Serial.begin(115200);// initialize serial communication at 115200 bits per second
pinMode(led_pin, OUTPUT);
}
void loop() {
Serial.println("Light!");
digitalWrite(led_pin, HIGH);
delay(500);
digitalWrite(led_pin, LOW);
delay(500);
}
No debugging was needed!
Reflections:¶
Overall happy with my first very simple board, although the soldering can be cleaner!
Here were some of my key learnings;
On Component selection
- When soldering the LED, I thought it would have been nice to have it be a RGB LED, for testing different resistor values etc. I would like to try this during the output device week.
- I learnt about the concept of Pull-up Resistors, which enables stable readings from input signals. I would like to try understand this concept fully and to implement it in my next board. (Link 1 / Link 2)
On Board Layout:
- A lot of the board design considerations I read about in Week 6 were easier to understand with the board in front of me.
- For example, I felt the layout could have been more considerate of the usability, like Headers laying down sideways rather than upright.
- I also felt like I could do a better job of trying to make a more shock resistant board.
- I also understood the routing considerations such as being mindful of where to place Ground traces, as placing pin Headers near the Ground traces could create risk of accidental short circuits.
- I learnt a workaround for spatial constraints, which is to make holes and use the back of the board. I’d like to try this next time.
On Milling:
- Like with CNC machines, having a good endmill makes a big difference. I would like to treat mine with as much care as as possible!
On Assembly:
- Always test the correct direction of direction-dependent components such as LED before soldering them down.
On Soldering:
- I’m glad I followed Rico suggestion of spending an afternoon practicing soldering before the real thing. This made a huge difference on my soldering accuracy and speed (simply comparing with my classmates who just started).
Useful links:¶
Assignment Checklist:¶
- Linked to the group assignment page
- Documented how I made the toolpath
- Documented how I made (milled, stuffed, soldered) the board
- Documented that my board is functional
- Explained any problems and how I fixed them
- Uploaded my source code
- Included a ‘hero shot’ of my board