WEEK 08 – Electronics Production
Individual Assignment
LED Roulette PCB using XIAO ESP32-C3
This assignment focuses on the complete process of electronics production, from PCB design to fabrication, soldering, programming, and functional validation. For this practice, I designed and fabricated a custom PCB for a LED roulette system using a Seeed Studio XIAO ESP32-C3 as the main microcontroller.
The roulette system consists of several LEDs connected to different GPIO pins of the XIAO ESP32-C3. Each LED is connected with a 220 ohm resistor to limit the current and protect both the LED and the microcontroller. The objective was to create a board capable of producing a sequential LED animation that simulates the movement of a roulette.
The PCB was designed in KiCad, fabricated using a 90 watt fiber laser engraver, drilled for the placement of components, soldered manually, and finally programmed using Arduino IDE.
Final result of the LED roulette PCB fabricated for Electronics Production.
1. Assignment Objective
Main Objective
The main objective of this assignment was to design, fabricate, assemble, and test a functional PCB using digital fabrication processes. The board was developed as an LED roulette controlled by the XIAO ESP32-C3 microcontroller.
| Objective | Description |
|---|---|
| Design the electronic circuit | Create the schematic of the LED roulette circuit using KiCad. |
| Design the PCB | Convert the schematic into a PCB layout and organize traces, pads, and components. |
| Fabricate the PCB | Use a 90 watt fiber laser engraver to remove copper and create the circuit traces. |
| Drill the board | Make the required holes for through-hole components and headers. |
| Solder the components | Assemble the XIAO ESP32-C3, LEDs, resistors, and connections on the fabricated PCB. |
| Program and validate | Upload the roulette animation code and verify that all LEDs work correctly. |
2. Components Used
The electronic system was designed around the XIAO ESP32-C3. This board was selected because it is compact, powerful, and easy to program. It also provides enough GPIO pins to control multiple LEDs individually.
Each LED was connected in series with a 220 ohm resistor. These resistors are necessary because they reduce the current that flows through each LED, preventing damage to the LED and protecting the GPIO pins of the microcontroller.
| Component | Quantity | Function |
|---|---|---|
| Seeed Studio XIAO ESP32-C3 | 1 | Main microcontroller used to control the LED roulette sequence. |
| LEDs | 7 or more, depending on the design | Visual outputs that simulate the roulette movement. |
| 220 Ω resistors | One per LED | Current-limiting resistors connected in series with each LED. |
| Copper clad board | 1 | Base material used to fabricate the PCB. |
| Header pins | As needed | Used to connect or mount the XIAO ESP32-C3 on the PCB. |
| Solder wire | As needed | Used to create permanent electrical connections. |
3. Bill of Materials
| Item | Component | Value / Specification | Purpose |
|---|---|---|---|
| 1 | XIAO ESP32-C3 | WiFi/BLE microcontroller board | Main controller of the LED roulette. |
| 2 | LED | Standard LED | Roulette visual indicator. |
| 3 | Resistor | 220 Ω | Limits current through each LED. |
| 4 | Copper PCB board | Single-sided copper board | Base for the fabricated circuit. |
| 5 | Header pins | Male or female headers | Connection and mounting of the XIAO ESP32-C3. |
4. Design Concept
The concept of the project was to create a small PCB that behaves like a roulette. The LEDs are arranged visually around the board. The program turns the LEDs on and off one by one, creating the effect of motion. At the end of the sequence, one LED remains selected or blinks to simulate the final position of the roulette.
| Design Element | Design Decision |
|---|---|
| Microcontroller | XIAO ESP32-C3 was used because of its compact size and available GPIO pins. |
| LED arrangement | The LEDs were placed to create a visual roulette effect. |
| Current protection | Each LED was connected to a 220 Ω resistor. |
| Fabrication process | The PCB was prepared for laser engraving on copper board. |
5. PCB Design in KiCad
The design process began in KiCad. First, I created the electronic schematic, defining the relationship between the XIAO ESP32-C3, the resistors, and the LEDs.
In the schematic, each GPIO pin of the XIAO ESP32-C3 was connected to one resistor and one LED. The resistor was placed in series with the LED to limit current. The cathodes of the LEDs were connected to ground, while the anodes were controlled from the microcontroller pins through the resistors.
Schematic Design Steps
- Open KiCad and create a new project for Week 08.
- Create the schematic file.
- Add the XIAO ESP32-C3 symbol.
- Add the LEDs required for the roulette.
- Add one 220 Ω resistor for each LED.
- Connect each LED-resistor pair to a GPIO pin.
- Connect the LED cathodes to GND.
- Add power and ground symbols.
- Run the Electrical Rules Check.
- Correct unconnected pins or design warnings.
Schematic design of the LED roulette circuit in KiCad.
6. Schematic Design Considerations
| Consideration | Reason |
|---|---|
| Correct LED polarity | The LED only works when the anode and cathode are connected correctly. |
| Use of 220 Ω resistors | The resistor limits current and protects each LED. |
| Individual GPIO control | Each LED can be activated independently to create the roulette sequence. |
| Ground connection | A common GND is necessary for the circuit to operate correctly. |
| ERC verification | The Electrical Rules Check helps detect connection errors before fabrication. |
7. PCB Layout Design
After completing the schematic, I transferred the design to the PCB editor in KiCad. In this stage, I placed the components on the board and routed the traces.
The LEDs were arranged to create a visual roulette pattern. The XIAO ESP32-C3 was placed in a central or accessible position so that it could be connected easily through USB and soldered properly. The resistors were placed close to the LEDs to make the routing cleaner and easier to inspect.
PCB Layout Steps
- Assign footprints to each schematic component.
- Open the PCB editor in KiCad.
- Import the schematic components into the PCB layout.
- Define the board outline.
- Place the XIAO ESP32-C3 footprint.
- Place the LEDs in a roulette arrangement.
- Place each 220 Ω resistor near its corresponding LED.
- Route the copper traces.
- Check clearances between traces.
- Run the Design Rules Check.
- Export the files needed for fabrication.
8. PCB Design Rules
| Design Rule | Application in This PCB |
|---|---|
| Trace width | The traces were designed wide enough to be fabricated using the laser process. |
| Clearance | Spacing was maintained between traces to avoid short circuits after engraving. |
| Pad size | Pads were sized to allow drilling and manual soldering. |
| Component spacing | Components were separated enough to make soldering easier. |
| Board outline | The PCB boundary was defined according to the final required shape. |
9. Exporting Fabrication Files
Once the PCB layout was ready, I exported the files required for fabrication. These files were prepared for the laser engraving process. The most important files were the trace file, the board outline, and the drilling reference.
The exported files were later used to prepare the engraving and cutting process. It was important to verify the scale and orientation before sending the design to the machine.
| File | Use |
|---|---|
| PCB traces | Used to engrave or isolate the conductive copper paths. |
| Board outline | Used as a guide for cutting or defining the final PCB shape. |
| Drill file | Used as a reference for drilling component holes. |
| KiCad project | Contains the editable source files of the electronic design. |
Exported files for PCB fabrication.
10. Fabrication Equipment: 90 W Fiber Laser Engraver
For the fabrication of the PCB, I used a 90 watt fiber laser engraver. This machine uses a concentrated laser beam to remove or mark material with high precision. In this assignment, the fiber laser was used to remove copper from the PCB surface and define the conductive traces.
A fiber laser is suitable for working with metals because its wavelength is efficiently absorbed by metallic surfaces. This makes it useful for marking, engraving, and removing thin layers of copper from copper-clad boards.
| Equipment Feature | Description |
|---|---|
| Machine type | Fiber laser engraver. |
| Power | 90 watts. |
| Main use in this assignment | Engraving the PCB to remove copper and form isolated traces. |
| Material used | Single-sided copper clad board. |
| Important setup | Focus adjustment, power, speed, frequency, and number of passes. |
| Safety considerations | Use proper protection, avoid reflections, keep the work area clean, and supervise the process. |
90 watt fiber laser engraver used for PCB fabrication.
11. PCB Fabrication with Fiber Laser
Laser Engraving Process
- Clean the copper board surface.
- Place the copper board on the laser work area.
- Fix the board to prevent movement during engraving.
- Import the PCB trace file into the laser software.
- Check the scale and position of the design.
- Adjust the laser focus height.
- Configure power, speed, frequency, and passes.
- Run a small test if necessary.
- Engrave the PCB traces.
- Inspect the copper removal and trace definition.
| Parameter | Description | Observation |
|---|---|---|
| Power | Controls the energy applied to the copper surface. | Too much power can damage the substrate. |
| Speed | Defines how fast the laser moves over the material. | Low speed removes more material; high speed removes less. |
| Frequency | Controls the pulse behavior of the fiber laser. | It affects the quality of the engraving on copper. |
| Passes | Number of times the laser repeats the engraving. | Multiple passes can improve copper removal. |
During fabrication, it was important to avoid excessive heat because it can burn the substrate, lift copper traces, or reduce the quality of the PCB. The engraving process must remove enough copper to isolate the traces, but not damage the board.
12. Inspection After Engraving
After the laser engraving process, I inspected the PCB visually to verify that the traces were well defined. I checked that there were no copper bridges between traces and that the pads were still large enough for drilling and soldering.
| Inspection Point | What I Checked |
|---|---|
| Trace continuity | Traces must remain connected from the microcontroller pins to the resistors and LEDs. |
| Isolation | There must be no unwanted copper bridges between different nets. |
| Pad quality | Pads must be complete and large enough for soldering. |
| Burn marks | The substrate must not be excessively burned or damaged. |
PCB after fiber laser engraving.
13. Drilling Process
After engraving the PCB, I drilled the holes required for the components. This step was necessary because the board included components and headers that needed to pass through the PCB or be mounted in defined positions.
The drilling process must be done carefully because poor alignment can damage the pads or break the traces. For this reason, I used the pad centers as references and drilled with controlled pressure.
Drilling Steps
- Identify the holes for the XIAO ESP32-C3 headers.
- Identify the holes for LEDs and resistors if using through-hole components.
- Select a drill bit according to the component leads.
- Align the drill with the center of each pad.
- Drill slowly and vertically.
- Remove copper dust and debris.
- Inspect that each hole is clean and centered.
| Possible Problem | Cause | Prevention |
|---|---|---|
| Pad lifting | Excessive pressure or poor drilling technique. | Use controlled pressure and a sharp drill bit. |
| Misalignment | Drilling away from the pad center. | Mark and align the drill carefully before drilling. |
| Broken trace | The drill bit cuts into a nearby trace. | Keep enough distance between pads and traces in the PCB design. |
14. PCB Cleaning
After engraving and drilling, I cleaned the PCB to remove dust, loose copper particles, and residue from the fabrication process. This is important because small copper particles can create short circuits between traces.
- I removed loose material from the surface.
- I checked the spaces between traces.
- I verified that holes were clean.
- I prepared the board for soldering.
Cleaning process before soldering the components.
15. Soldering Process
Once the PCB was engraved, drilled, and cleaned, I continued with the soldering process. The components were soldered manually. I started with the lower-profile components, such as resistors, and then continued with LEDs and header pins.
The XIAO ESP32-C3 was mounted using header pins, which allows the board to be connected securely while still making it easier to replace or remove if necessary.
Soldering Steps
- Prepare the soldering iron.
- Place the resistors on the PCB.
- Solder each 220 Ω resistor.
- Place the LEDs, checking the correct polarity.
- Solder each LED carefully.
- Place the header pins for the XIAO ESP32-C3.
- Solder the header pins.
- Mount the XIAO ESP32-C3.
- Inspect each solder joint.
- Check for solder bridges or cold joints.
| Soldering Check | Description |
|---|---|
| LED polarity | The anode and cathode of each LED must be correctly oriented. |
| Resistor position | Each LED must have its own 220 Ω resistor in series. |
| Solder bridges | There must be no accidental solder connection between adjacent pads. |
| Cold joints | Each solder joint must be shiny, firm, and electrically stable. |
| Mechanical stability | Components must be properly fixed to the PCB. |
PCB after soldering the components.
16. Continuity Test
Before programming the board, I tested the PCB using a multimeter. This step was important to verify that the traces were connected correctly and that there were no short circuits.
| Test | Expected Result |
|---|---|
| GPIO to resistor continuity | Each GPIO pin must be connected to its corresponding resistor. |
| Resistor to LED continuity | Each resistor must be connected to its corresponding LED. |
| LED cathode to GND | The cathode side of each LED must connect to ground. |
| Short circuit test | There should be no short circuit between VCC and GND. |
Continuity test before powering the circuit.
17. Programming the LED Roulette
The board was programmed using Arduino IDE. The program turns the LEDs on and off sequentially to simulate a roulette. The animation can start slowly, accelerate, and then stop on a final LED.
int ledPins[] = {2, 3, 4, 5, 6, 7, 8};
int numberOfLeds = 7;
void setup() {
for (int i = 0; i < numberOfLeds; i++) {
pinMode(ledPins[i], OUTPUT);
digitalWrite(ledPins[i], LOW);
}
}
void loop() {
int delayTime = 200;
for (int cycle = 0; cycle < 5; cycle++) {
for (int i = 0; i < numberOfLeds; i++) {
turnOffAllLeds();
digitalWrite(ledPins[i], HIGH);
delay(delayTime);
}
if (delayTime > 60) {
delayTime -= 30;
}
}
int selectedLed = random(0, numberOfLeds);
for (int blinkCount = 0; blinkCount < 5; blinkCount++) {
turnOffAllLeds();
digitalWrite(ledPins[selectedLed], HIGH);
delay(200);
digitalWrite(ledPins[selectedLed], LOW);
delay(200);
}
delay(1000);
}
void turnOffAllLeds() {
for (int i = 0; i < numberOfLeds; i++) {
digitalWrite(ledPins[i], LOW);
}
}
Note: The GPIO numbers must be adjusted according to the final PCB design and the pins used in the XIAO ESP32-C3 schematic.
18. Uploading the Code
Programming Steps
- Connect the XIAO ESP32-C3 to the computer using a USB-C cable.
- Open Arduino IDE.
- Select the correct XIAO ESP32-C3 board.
- Select the correct serial port.
- Open the roulette code.
- Verify the GPIO pins used in the code.
- Compile the code.
- Upload the program to the board.
- Reset the board if necessary.
- Observe the LED sequence.
Programming the XIAO ESP32-C3 using Arduino IDE.
19. Testing and Validation
After uploading the code, I tested the complete board. The LEDs turned on sequentially, creating the roulette animation. This confirmed that the PCB traces, soldering, and programming were working correctly.
| Validation Test | Result |
|---|---|
| Power test | The XIAO ESP32-C3 powered on correctly. |
| LED test | Each LED turned on according to the programmed sequence. |
| Roulette animation | The LEDs produced the expected sequential movement. |
| Soldering inspection | No visible solder bridges were detected. |
| Functional result | The PCB worked as a complete LED roulette system. |
20. Problems and Solutions
| Problem | Possible Cause | Solution |
|---|---|---|
| Some LEDs did not turn on. | Incorrect polarity, soldering issue, or wrong GPIO assignment. | Check LED orientation, inspect solder joints, and verify the pin numbers in the code. |
| The board had a short circuit. | Copper residue or solder bridge between traces. | Clean the board, inspect with a magnifier, and remove unwanted copper or solder. |
| The laser did not remove enough copper. | Low power, high speed, or incorrect focus. | Adjust focus and parameters, then repeat the engraving process. |
| The board surface was burned. | Excessive power or too many passes. | Reduce laser power, increase speed, or reduce the number of passes. |
| The XIAO ESP32-C3 was not detected. | USB cable, driver, or board selection issue. | Use a data USB cable, check the port, and select the correct board in Arduino IDE. |
21. Download Files
The following buttons can be used to download the project files. These files include the KiCad project, fabrication files, and Arduino code used for the LED roulette PCB.
22. Evidence List
| Evidence | Suggested Image Path |
|---|---|
| Final hero shot | images/w08/hero_shot.jpg |
| Components used | images/w08/components.jpg |
| KiCad schematic | images/w08/kicad_schematic.jpg |
| KiCad PCB layout | images/w08/kicad_pcb_layout.jpg |
| Fiber laser machine | images/w08/fiber_laser_machine.jpg |
| Laser engraving process | images/w08/laser_engraving.jpg |
| Drilling process | images/w08/drilling_process.jpg |
| Soldering process | images/w08/soldering_leds.jpg |
| Programming in Arduino IDE | images/w08/programming_arduino.jpg |
| Final working board | images/w08/roulette_working.jpg |
23. Learning Outcomes
Through this assignment, I learned how to:
- Design a PCB schematic in KiCad.
- Convert a schematic into a PCB layout.
- Prepare files for PCB fabrication.
- Use a 90 watt fiber laser engraver for PCB production.
- Understand the importance of trace width, clearance, and pad size.
- Drill a PCB for component assembly.
- Solder resistors, LEDs, and headers.
- Use a multimeter to verify continuity and avoid short circuits.
- Program the XIAO ESP32-C3 to control multiple LEDs.
- Validate a functional electronic board.
24. Final Reflection
This assignment demonstrated that electronics production is not only about designing a circuit, but also about understanding how the design will be fabricated. The PCB must be designed according to the limitations and possibilities of the fabrication process.
Using a fiber laser engraver for PCB fabrication was an interesting process because it allowed fast production and direct experimentation. However, it also required careful calibration, especially in relation to focus, power, speed, and the number of engraving passes.
The LED roulette helped me validate the complete workflow because it required design, fabrication, soldering, programming, and testing. Each LED became a visual indicator of whether the circuit was correctly produced and assembled.
25. Conclusion
In conclusion, this assignment successfully integrated the main stages of electronics production. I designed the LED roulette PCB in KiCad, fabricated it using a 90 watt fiber laser engraver, drilled the necessary holes, soldered the components, programmed the XIAO ESP32-C3, and validated the final operation of the board.
The final result was a functional LED roulette PCB. This project allowed me to understand the relationship between digital design and physical fabrication, as well as the importance of testing each stage before moving to the next one.