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 LED roulette PCB using XIAO ESP32-C3

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.
Electronic components for LED roulette PCB XIAO ESP32-C3 microcontroller

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.

XIAO ESP32-C3 → GPIO Pins → 220 Ω Resistors → LEDs → Visual Roulette Animation
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

  1. Open KiCad and create a new project for Week 08.
  2. Create the schematic file.
  3. Add the XIAO ESP32-C3 symbol.
  4. Add the LEDs required for the roulette.
  5. Add one 220 Ω resistor for each LED.
  6. Connect each LED-resistor pair to a GPIO pin.
  7. Connect the LED cathodes to GND.
  8. Add power and ground symbols.
  9. Run the Electrical Rules Check.
  10. Correct unconnected pins or design warnings.
KiCad schematic for LED roulette PCB

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

  1. Assign footprints to each schematic component.
  2. Open the PCB editor in KiCad.
  3. Import the schematic components into the PCB layout.
  4. Define the board outline.
  5. Place the XIAO ESP32-C3 footprint.
  6. Place the LEDs in a roulette arrangement.
  7. Place each 220 Ω resistor near its corresponding LED.
  8. Route the copper traces.
  9. Check clearances between traces.
  10. Run the Design Rules Check.
  11. Export the files needed for fabrication.
PCB layout design in KiCad 3D view of the PCB in KiCad

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 PCB fabrication files

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

90 watt fiber laser engraver used for PCB fabrication.

11. PCB Fabrication with Fiber Laser

Laser Engraving Process

  1. Clean the copper board surface.
  2. Place the copper board on the laser work area.
  3. Fix the board to prevent movement during engraving.
  4. Import the PCB trace file into the laser software.
  5. Check the scale and position of the design.
  6. Adjust the laser focus height.
  7. Configure power, speed, frequency, and passes.
  8. Run a small test if necessary.
  9. Engrave the PCB traces.
  10. 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.

Laser setup for PCB fabrication Laser engraving PCB process

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.
Engraved PCB after fiber laser process

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

  1. Identify the holes for the XIAO ESP32-C3 headers.
  2. Identify the holes for LEDs and resistors if using through-hole components.
  3. Select a drill bit according to the component leads.
  4. Align the drill with the center of each pad.
  5. Drill slowly and vertically.
  6. Remove copper dust and debris.
  7. 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.
Drilling PCB holes PCB after drilling

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.

Cleaning the PCB after fabrication

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

  1. Prepare the soldering iron.
  2. Place the resistors on the PCB.
  3. Solder each 220 Ω resistor.
  4. Place the LEDs, checking the correct polarity.
  5. Solder each LED carefully.
  6. Place the header pins for the XIAO ESP32-C3.
  7. Solder the header pins.
  8. Mount the XIAO ESP32-C3.
  9. Inspect each solder joint.
  10. 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.
Soldering resistors Soldering LEDs
Final soldered 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 with multimeter

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

  1. Connect the XIAO ESP32-C3 to the computer using a USB-C cable.
  2. Open Arduino IDE.
  3. Select the correct XIAO ESP32-C3 board.
  4. Select the correct serial port.
  5. Open the roulette code.
  6. Verify the GPIO pins used in the code.
  7. Compile the code.
  8. Upload the program to the board.
  9. Reset the board if necessary.
  10. Observe the LED sequence.
Programming XIAO ESP32-C3 in Arduino IDE

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.
Testing LED roulette PCB LED roulette working

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:

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.