Week 08
Electronics Production

This week focused on PCB fabrication and assembly. I learned how to turn an electronic design into a physical circuit board through schematic design, PCB layout, design rule checking, board-house submission, milling, soldering, programming, and testing.

Tools: LCEDA-Pro, JLCPCB, LCSC, JDpaint, PCB milling machine, soldering iron, multimeter, Arduino IDE

Materials: Copper-clad board, XIAO ESP32C3, SMD resistor, SMD LED, slide switch, pin headers, solder wire

Output: A custom XIAO ESP32C3 development board with a D3 LED output, switch, servo connectors, serial header, and power input

Assignment


Group Assignment

The group assignment was to characterize the design rules for our in-house PCB production process and submit a PCB design to a board house.

Individual Assignment

The individual assignment was to make and test an embedded microcontroller system that I designed.

Introduction


Electronics production is the process of fabricating and assembling printed circuit boards. Compared with using a breadboard, a PCB provides a more stable, compact, and repeatable way to connect components.

For my individual assignment, I designed a custom development board based on the Seeed Studio XIAO ESP32C3. The board includes an onboard LED connected to D3, a slide switch, two servo connectors, a serial communication header, and an external power input. The purpose of this board is to create a small embedded system platform for later Fab Academy assignments.

Group Assignment


PCB Design Rule Test

For the group assignment, we characterized the design rules of our in-house PCB production process. We used a test pattern with different trace widths and spacings to understand the minimum reliable dimensions that could be produced with our PCB milling machine.

PCB design rule test pattern
PCB design rule test pattern. The test includes different trace widths and spacings to evaluate the capability of our milling process.

We then prepared the milling parameters, including spindle speed, feed rate, cutting depth, and toolpath strategy. These parameters directly affect the quality of the traces and the depth of the cut.

PCB milling settings
Setting the milling parameters for the copper board.
PCB milling process
The PCB milling process for the group design rule test.
PCB milling result
Result of the milled design rule test. The test helped us observe which traces were clean and which became too fragile or difficult to mill reliably.

Group Result

From this test, I learned that PCB design rules are not only software settings. They depend on the machine, the tool, the material, the flatness of the board, and the accuracy of zeroing. Even if very thin traces can be drawn in software, they may not be reliable in the actual fabrication process.

Based on the milled test board, wider traces and clearances were more stable, while very thin traces became fragile or were not isolated cleanly. Therefore, for my own board, I avoided extremely narrow traces and kept enough clearance between pads and routes.

Submitting a PCB Design to a Board House

The second part of the group assignment was to submit a PCB design to a board house. Since I designed my board in LCEDA-Pro, I used the integrated JLCPCB layout ordering workflow. This allowed me to submit the layout directly from the same design environment.

JLCPCB layout order page
Submitting the PCB design through the LCEDA-Pro and JLCPCB layout ordering workflow. The page recognized the board size, layer number, pin count, design software, and Gerber file.

I did not need to complete the payment process for this assignment. The purpose was to verify that the PCB design could be submitted to a professional board-house platform and checked as a manufacturable layout.

This step also helped me compare in-house milling with board-house production. Board houses can provide solder mask, silkscreen, plated holes, and more stable manufacturing tolerances, while in-house milling is faster for local prototyping.

Individual Assignment


Board Concept

My board was designed as a compact XIAO ESP32C3 development board. I wanted it to support several basic functions that would be useful for later assignments: LED output, switch input, servo output, serial communication, and external power.

Schematic Design


I designed the schematic in LCEDA-Pro. The XIAO ESP32C3 is the main microcontroller. Around it, I added headers, servo connectors, a slide switch, power input, and an LED circuit.

The LED circuit is connected from D3 through a current-limiting resistor to GND. Therefore, when D3 is set to HIGH, the LED should turn on.

Schematic design in LCEDA-Pro
Schematic design of my XIAO ESP32C3 development board in LCEDA-Pro.

BOM and Component Source


I checked the bill of materials directly in LCEDA-Pro. Most of the components were selected from LCSC, the component supplier integrated with LCEDA-Pro and JLCPCB. The BOM table helped me check component names, designators, package types, supplier information, stock, and estimated unit prices before fabrication and assembly.

BOM in LCEDA-Pro
BOM table in LCEDA-Pro showing component information, supplier part numbers, stock, estimated price, and package type.
Exporting BOM in LCEDA-Pro
Exporting the BOM from LCEDA-Pro. This allowed me to review the component list and estimate the cost of the board before assembly.

Estimated BOM Cost

Based on the BOM generated in LCEDA-Pro, I estimated the cost of the main peripheral components used on the board. The table below does not include PCB fabrication, shipping, or the XIAO ESP32C3 module itself, because the XIAO module price was not included in the BOM list shown in LCEDA-Pro.

Estimated BOM Cost
Designator Component Quantity Unit Price (RMB) Subtotal (RMB)
H1 1x3 pin header 1 0.243 0.243
H3, H5 1x7 pin header 2 0.331 0.662
LED SMD LED 1 0.104 0.104
PowerIN 2-pin power connector 1 0.0948 0.0948
R2 SMD resistor 1 0.149 0.149
S1, S2 3-pin servo connector 2 0.131 0.262
SW1 SMD slide switch 1 0.779 0.779
U1 XIAO ESP32C3 module 1 Not included Not included
Total peripheral component cost 2.29

The estimated cost of the peripheral components is about RMB 2.29, excluding the XIAO ESP32C3 module, PCB fabrication, and shipping. The PCB fabrication was prepared through JLCPCB in China, while most electronic components were sourced from LCSC.

This BOM check was useful because it connected the schematic design with real component availability and cost. It also helped me confirm that the selected packages matched the footprints used in the PCB layout.

PCB Layout and DRC


After finishing the schematic, I moved to PCB layout. I placed the XIAO module in the center of the board and arranged the connectors around it. The LED and resistor were placed on the left side, while the power input and slide switch were placed on the right side.

PCB layout in LCEDA-Pro
PCB layout of my XIAO ESP32C3 development board. The board includes the XIAO module, D3 LED circuit, servo connectors, serial header, slide switch, and external power input.

Before fabrication, I used the DRC function to check the design. The result panel showed “All (0)”, which means no design rule errors were detected before exporting the board.

DRC check result
DRC check result in LCEDA-Pro. The result panel showed “All (0)”, meaning no design rule errors were detected.

PCB Fabrication


After finishing the PCB layout, I prepared the milling file and fabricated the PCB using the in-house CNC milling process. The copper board was fixed firmly to the machine bed, and the tool height was carefully zeroed before cutting.

Milling settings
Setting the engraving range and cutting depth for PCB milling.
Toolpath in JDpaint
Preparing the PCB milling toolpath in JDpaint before sending it to the CNC machine.
PCB milling process
Milling the PCB traces on the copper board.
Milled PCB
The PCB after milling. I inspected the traces and pads before soldering.

During fabrication, I noticed that milling quality was affected by cutting depth, board flatness, and toolpath settings. If the cutting depth was too shallow, copper was not fully isolated. If it was too deep, traces became rough or fragile.

Soldering and Assembly


After milling the PCB, I assembled the board manually. Some components, such as the resistor, LED, and slide switch, were surface-mount components. Compared with through-hole parts, SMD components require more careful alignment because the pads are smaller and the component orientation is more important.

Preparing for soldering
Preparing for SMD soldering. I fixed the milled PCB with a helping-hand tool and prepared the soldering iron.
SMD switch soldering
Close-up of the SMD slide switch after soldering. I checked the solder joints carefully because the switch pads are small and close to each other.
SMD resistor soldering
Close-up of the SMD resistor soldered on the PCB. This resistor is part of the LED circuit and limits the current flowing through the LED.
Partially soldered PCB
The PCB after soldering several SMD components, including the resistor and slide switch.

After soldering, I inspected the board visually. I looked for solder bridges, cold solder joints, missing connections, and incorrect component orientation. This step was especially important because small soldering mistakes can prevent the board from working even if the schematic and layout are correct.

Continuity Test


Before programming the board, I used a multimeter to check the continuity of important traces. This helped me confirm that the milled traces were connected correctly and that there were no unexpected short circuits between power and ground.

Continuity test with multimeter
Checking the PCB traces with a multimeter before powering the board.

Programming the Board


I programmed the board using Arduino IDE. First, I installed the ESP32 board package and selected XIAO ESP32C3 as the target board. Then I selected the correct serial port from the Tools menu.

During this process, I learned the difference between compiling and uploading. “Done compiling” only means the code has been compiled successfully, while “Done uploading” or “Hash of data verified” means that the program has actually been written to the board.

Arduino upload success
Uploading the test program to the XIAO ESP32C3 using Arduino IDE.

Testing the D3 LED


The first functional test was to control the LED connected to D3. In my circuit, the LED is connected from D3 through a resistor to GND, so D3 should be set to HIGH to turn the LED on.

#define LED_PIN D3

void setup() {
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  delay(1000);

  digitalWrite(LED_PIN, LOW);
  delay(1000);
}
LED blinking test on the custom XIAO ESP32C3 board. This test confirmed that the board could be programmed and that the D3 output circuit was working.

Troubleshooting and Debugging


Debugging means finding and fixing problems in both the software and the physical circuit. In electronics production, a board may fail because of code, upload settings, pin definitions, soldering, component orientation, or broken traces. Therefore, I checked the problem step by step instead of assuming that it was only a software issue.

One issue I encountered was related to the pin name. I first tried to define the LED pin as A3, but Arduino IDE returned a compilation error. The error message suggested that A3 was not declared in this scope and asked whether I meant D3. This helped me understand that the board package expected the pin to be written as D3 instead of A3.

A3 compilation error in Arduino IDE
Compilation error in Arduino IDE. The board package did not recognize A3 as a valid pin name and suggested using D3 instead. I corrected the code by defining the LED pin as D3.

I also encountered an upload issue. Arduino IDE showed that the sketch had compiled successfully, but the upload failed because the selected serial port was no longer available. I solved this by unplugging and reconnecting the XIAO ESP32C3, then selecting the new serial port from Tools > Port.

After correcting the code and selecting the correct port, I checked the hardware side when the LED did not respond immediately. I inspected the LED orientation, resistor soldering, D3 trace, and GND connection. This helped me understand that debugging an embedded system requires checking both the software and the physical circuit.

Reflection


This week helped me understand electronics production as a complete workflow. Before this assignment, I mainly thought of PCB design as drawing traces on a screen. After going through the process, I realized that PCB production is closely connected to fabrication limits, component packages, soldering quality, and testing methods.

The most important lesson for me was that debugging should happen step by step. When the board did not work immediately, I needed to separate possible problems: schematic design, PCB layout, DRC, milling quality, soldering, serial port selection, code upload, and pin definition.

Overall, this assignment gave me a much clearer understanding of how to design, fabricate, assemble, program, and test a small embedded microcontroller system.