Week 8
Electronics Production
Week assignments
- 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 the workflow for sending a PCB to a boardhouse. ✔
- Document your work to the group work page and reflect on your individual page what you learned.
- Individual assignment
- Make and test a microcontroller development board that you designed. ✔
- Extra credit: make it with another process.
Group assignment
On Thursday, March 13, I was responsible for instructing Pablo and Francisco on the safe operation procedure for the milling machines. These machines have been in operation at our Fab for years, and their setup and functionality had been documented by me.
For the group assignment, I handled the first section to define the design rules for our in-house PCB production process, documenting feed rates, spindle speeds, plunge rate, depth of cut, and tooling.
Although I have been working with these millin machines for years, I have never done a test like the traces test. I learned how to verify de precision of the machines and also how to correctly adjust the feed rate, spindle speed and the plunge rate without causing the endmill to break.
Link to week 8 group assignment
Individual assignment
Design Update
On Thursday, March 13, early in the morning, I updated the PCB design that I had prepared in Week 5. I added a button to enhance its functionality, repositioned the LED and resistor, changed the connection pin, and slightly adjusted its size.
This week, I needed to manufacture the PCB. Before proceeding, I verified the absence of significant errors in the schematic design using the Electrical Rules Checker (ERC) and in the PCB layout using the Design Rules Checker (DRC). Once validated, I began the process of generating SVG files, which will serve as the basis for milling my PCB.
Exporting SVG from KiCad
First, I exported the PCB design from KiCad in SVG format to F.Cu and Edge.Cuts files.
GIMP
Importing SVG into GIMP
Next, I imported the SVG files, F.Cu and Edge Cuts, into GIMP increasing its resolution to 1000 pixels per inch.
After selecting black as the foreground color, I used the Fuzzy Select Tool to highlight areas such as the ESP32C3 pads in the image. Holding Shift
, I selected multiple areas. Before filling them, I applied a slight mask growth (2 pixels) to prevent gray pixels that could cause errors during vectorization.
Filling with Foreground Color
Then, I filled the selected areas with the foreground color.
At this point, I realized that I had not filled the holes for the PCB mounting. To fix this, I followed the same selection and fill steps as before. Once completed, I adjusted the canvas size to fit the outer limits of the image by applying Set Image Canvas Size
, selecting the All Layers option.
Additionally, using Set Image Canvas Size
, I changed the units to millimeters to visualize the actual PCB dimensions and noted them down. This measurement, taken as an order of magnitude, will be required later in VCarve.
Adding a White Background Layer
I created an additional background layer in white and placed it below the F.Cu layer.
Next, I merged the F.Cu layer with the white background into a single layer. After that, I inverted the colors of the image.
There was a large black area between the XIAO ESP32C3 and the connectors on the right. Although I could have removed it at this stage, I decided to do it later in VCarve Pro. With the image prepared according to the explained procedure, I exported two PNG images: one defining the areas to be milled and another containing the Edge.Cuts. Option: automatic pixelformat
Vcarve Pro
In VCarve Pro, I created a new project with dimensions that included the measurements taken in GIMP, in this case, 60x30 mm with a thickness of 1.5 mm.
I imported the Bitmaps, and after organizing the layers in the VCarve file, I traced the Bitmaps to generate vector paths for the F.Cu and Edge.Cuts layers.
Next, in VCarve, I defined the tools to be used. In this case, I created a new group for PCB fabrication and I created two new end mills with diameters of 0.4 mm and 0.8 mm. The parameter values were based on tests performed during the Group Assignment and can be seen in the attached image. The spindle speed on our Roland PNC-2500 is manually controlled.
Optimizing the milling area
As mentioned earlier, using VCarve’s drawing tools, I defined a closed polygon to reduce the milling area, optimizing both the milling task and fabrication time. Additionally, I could have removed the milling areas beneath the MCU since they were not necessary. While it was possible to mill the entire area, following Luis’ recommendation and to further reduce fabrication time, I decided to later apply adhesive tape in that region to prevent unintended electrical contacts.
Creating the pocket toolpath
At this stage, I was ready to create a Pocket Toolpath. I selected all the vectors from the F.Cu layer and assigned the 0.4 mm end mill as the cutting tool, setting a cutting depth of 0.15 mm. After clicking Calculate, the result can be seen in the following image.
Creating the Edge.Cuts profile toolpath
I followed the same process for cutting the Edge.Cuts layer. However, this time, the operation was a 2D Profile Toolpath using a 0.8 mm end mill with a cutting depth of 1.6 mm. Based on the tool definition, the software automatically assigned a total of four passes.
To ensure the PCB remains secured to the stock during milling, I defined Tabs to hold it in place. These will be manually removed after the milling process.
As expected when cutting through the full material thickness, VCarve triggered a precautionary warning.
My standard practice is to always check the toolpath preview multiple times to verify that the order is correct and everything matches the planned milling task.
Making my PCB
Milling
In the group assignment, I described the procedure for sending files from Vcarve to our Roland PNC-2500 CAMM-3.
I used an FR1 board, composed of a phenolic paper layer with resin and a top copper layer. I placed it in the machine’s clamping system, installed a 0.4 mm end mill, and set the coordinate origin to the bottom-left corner of the board by simultaneously pressing enter
+ home
. Then, I adjusted the Z0 position and saved it by pressing enter
+ Z0
.
When sending the file from Vcarve, the machine paused automatically. At that moment, I checked the board’s clamping, ensured there were no obstructions that could interfere with the milling process, and once everything was confirmed, I pressed the Pause Off button to start the job.
After completing this task, I replaced the 0.4 mm end mill with a 0.8 mm end mill and sent the 2D Profile job to perform the cut along the Edge.Cuts layer.
Using a manual cutting tool, I carefully separated the PCB from the remaining FR1 board.
Luis recommended cleaning the PCB with water and lightly sanding it with a very fine scouring pad. The PCB turned out shiny and clean.
Soldering
My experience with soldering is very limited, so I needed to practice before working on my PCB. A few weeks ago, Luis provided us with a test kit containing all the identified components. He named it PCBt41 Blink. As a practice exercise, I decided to assemble it along with the PCB Serial UPDI-3 programmer connector.
The beginning is always challenging, and the quality of my solder joints was not very good. However, all the continuity tests I performed with the multimeter were correct. Nevertheless, I need to improve the quality of my solder joints.
Luis provided me with this image to visually illustrate what a proper solder joint should look like. I have translated it into English so that everyone can understand it.
On Luis’s recommendation, I applied a small amount of solder to help secure each component on the PCB. I decided to always use the PWR_GND point for this purpose.
To verify that the solder joints were correct, I performed a continuity test with a multimeter each time I finished soldering a component. Every time I heard the multimeter beep across the correct traces, my smile grew wider.
As mentioned earlier, and as seen in the following image, I applied thin adhesive tape to prevent any unintended contact between the pins on the back of the XIAO ESP32C3.
The LED continuity test caused it to light up, ensuring that the LED and resistor were properly soldered.
Soldering the XIAO ESP32C3 to the PCB was quite challenging. My lack of experience initially resulted in it not being well-centered on the PCB. Fortunately, I had only soldered two pins, making it relatively easy to reposition the MCU without causing significant damage.
After several attempts, carefully checking and verifying each solder joint (the multimeter had a lot of work), the active pins and PCB traces were properly connected, and the PCB was ready for programming the first Blink test.
Programming
In Arduino IDE, I installed the esp32 by Espressif Systems package via the Boards Manager to recognize the MCU on my computer.
Once installed, I was able to select the MCU and the corresponding USB port.
To verify that the PCB was working correctly, I started with a simple Blink test on the LED located at pin D7 of the XIAO ESP32C3.
#define LED_BUILTIN D7
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // LED ON
delay(1000); // Wait 1 second
digitalWrite(LED_BUILTIN, LOW); // LED OFF
delay(1000); // Wait 1 second
}
Seeing that everything worked fine, I decided to retrieve the NeoPixel LED strip code I had used in Week 4 and uploaded it to the MCU.
Lastly, I wanted to test the proper functioning of the button.
Final Thoughts
It has been an intense week. Initially, I was concerned about the PCB milling process, but after Week 7, where I milled a larger project, controlling the Roland machine felt easier. However, soldering correctly and efficiently was more difficult. My lack of practice worked against me, and I had to learn how to desolder and fix two bad solder joints. Despite this, it was a valuable learning experience, and I was able to complete the rest of the soldering points without major issues.
In the coming weeks, I will have to solder many more components. I am sure that with time and practice, I will improve significantly.
The functionality verification was relatively easy—just installing the XIAO ESP32C3 driver in Arduino IDE, uploading the code, and running the tests.
The real challenge will come in the next few weeks, as I will need to connect nine load cells and a LED matrix for my final project during the Input and Output Devices modules.
Files week 8
PCB KiCAD zip
PCB Gimp zip
PCB Vcarve Pro zip
Arduino IDE Blink zip
Arduino IDE LED Strip zip
Arduino IDE Button Blink zip