Week 06

Electronics Design

PCB Design, Electrical Measurement, PWM Analysis, and Oscilloscope Practice

1. Checklist

2. Group Assignment

For the group assignment, the lab characterized and analyzed electronic behavior using measurement instruments such as the multimeter and the oscilloscope. This included observing voltage levels, signal behavior, and practical measurements on a microcontroller platform.

3. Introduction to Electronics Design

Electronics design is the process of creating a circuit that defines how electrical components interact to perform a specific function. In this week, the work included both the digital design of a PCB and the practical analysis of electrical behavior using laboratory instruments.

Some fundamental concepts are essential before starting the design and testing process. Voltage is the electrical potential difference that drives current through a circuit. Current is the flow of electric charge through conductors. Resistance limits the flow of current, and power is the rate at which electrical energy is transferred.

A simple and useful relation between these variables is commonly explained through Ohm’s Law triangle: voltage, current, and resistance are directly related by the expression V = I × R. In practical terms, this relationship helps determine how a resistor affects the current passing through a load such as an LED.

In this assignment I worked with direct current (DC), which is the type of current delivered by USB power and by the regulated lines used by the XIAO board. This is different from alternating current (AC), where voltage changes direction periodically.

4. Electronics Design Software

For the PCB development of this week, I used EasyEDA Standard Version in its online environment. EasyEDA is an electronic design automation platform that allows the complete workflow for board development inside the same software environment.

With EasyEDA, it is possible to create the schematic, search and place components from libraries, assign footprints, generate the PCB layout, verify component positions in 3D, and export manufacturing files such as Gerber, SVG, PDF, and editable project files.

One of its strengths is that the schematic and the PCB remain linked, so after defining the circuit connections, the board layout can be generated while preserving the same logical structure.

EasyEDA blank schematic sheet
EasyEDA online environment used for the electronics design workflow.

5. Schematic Design

The schematic is the first formal step in the electronics workflow. It defines the logical electrical relationships between all components, independent of their physical position on the final PCB.

5.1 Component Library

EasyEDA provides an integrated library that includes symbols, footprints, and many predefined components. This made it possible to search and place the required elements directly in the workspace.

EasyEDA component library
Component search and library access in EasyEDA.

5.2 Components Used

Component Description Package / Type
XIAO ESP32-C6 Main microcontroller module used as the core of the board Module
LED Status indicator LED 1206
Resistor Current-limiting resistor for the LED 1206 / 220Ω
Male Pin Header GPIO extension header 11P / 2.54 mm
Female Pin Header GPIO extension header 11P / 2.54 mm
Male Pin Header Auxiliary connection headers 2P / 2.54 mm

5.3 Components Placed in the Workspace

After selecting the required elements, all components were placed in the schematic workspace to begin the electrical definition of the board.

Components placed in schematic workspace
Components placed in the schematic before defining all electrical connections.

5.4 Connections and Labels

The circuit connections were defined using both wires and signal labels. Instead of relying only on long direct wires, I used net labels to keep the schematic cleaner, reduce visual clutter, and simplify the reading of the design.

Another important point is that unused pins should not remain ambiguous. In the schematic, pins that were intentionally left unconnected were marked using the No Connect flag. This avoids false connection errors and improves design clarity.

The GND symbol was used as the common electrical reference for the board. Ground is fundamental because it defines the zero-volt reference point of the circuit. All voltage measurements are made relative to that reference, which is why connecting the measurement instruments correctly to GND is essential.

Schematic connections and labels
Schematic connections using wires, signal labels, GND references, and no-connect flags.

6. PCB Design

After verifying that the schematic was complete and electrically consistent, the project was transferred to the PCB layout environment. This stage defines the physical position of each component and the actual copper traces that connect the circuit.

6.1 Initial PCB Layout

Once the PCB was generated from the schematic, the components were arranged manually according to their function and the desired geometry of the board. This step is important because good component placement makes routing easier and improves the usability of the final design.

Initial PCB with components arranged
PCB workspace after transferring the schematic and manually arranging the components.

6.2 Routing

Routing is the process of creating the conductive paths that connect all components on the board. In this design, I used trace widths of 0.8 mm. This value provides a robust and easy-to-fabricate connection width for this board.

The board uses surface-mount components, which is common in compact PCB designs because it reduces overall size and supports organized routing around the board.

Routed PCB layout
Routed PCB showing the complete copper path distribution between all components.

6.3 Ground Plane and Polygon Tool

After routing the signal traces, I used the polygon tool to generate a ground plane. A ground plane is useful because it creates a large common reference area, improves electrical stability, reduces noise, and can simplify the routing of return paths.

In this board, the ground plane was created with a clearance of 0.254 mm. Clearance is the minimum distance between the copper pour and the other traces or pads. It is important because it prevents unintended short circuits while allowing the polygon to fill the remaining copper area.

PCB with ground plane
PCB after adding the ground plane using the polygon tool and defining the clearance distance.

6.4 3D Visualization

EasyEDA includes a 3D viewer that allows checking the physical appearance of the board before fabrication. This is useful to confirm the component placement, general proportions, and the overall visual result of the design.

3D PCB visualization in EasyEDA
3D visualization of the board generated directly inside EasyEDA.

6.5 Fabrication Preview

EasyEDA also provides a preview of how the PCB would look in a professional fabrication process, including solder mask, plated holes, pads, and other manufacturing-level visual elements.

PCB fabrication preview
Fabrication preview showing the board with a more realistic manufactured appearance.

6.6 Monochrome Export for Alternative Fabrication

A monochrome exported version of the PCB was also generated, showing only the top view, holes, traces, and board frame. This kind of graphic output is useful for alternative fabrication processes such as milling, engraving, or other custom production methods.

In this type of image, the contrast is normally used to define what should remain as copper and what should be removed. In practical terms, the dark path areas represent the conductive geometry of the board, while the surrounding clear zones define the material to be isolated or removed depending on the fabrication workflow.

6.7 Downloadable Design Files

After completing the design, I exported the main files needed for documentation, fabrication, and future editing.

7. Measurement Instruments

After completing the design workflow, I moved to the practical part of the assignment by measuring and analyzing electrical behavior using a Fluke 117 multimeter and a Siglent SDS1052DL oscilloscope.

7.1 Multimeter

The multimeter is used to measure electrical quantities such as voltage, resistance, continuity, and current. In this assignment, it was used mainly to verify the DC voltage rails of the XIAO board.

7.2 Oscilloscope

The oscilloscope is used to visualize electrical signals as a function of time. Unlike the multimeter, which typically gives a numeric value, the oscilloscope reveals how the signal behaves dynamically, including transitions, pulse width, frequency, amplitude, and waveform shape.

The oscilloscope probe works by referencing the measurement to the ground clip and using the probe tip to observe the signal point. This is why the GND reference of the circuit is fundamental for correct measurements.

7.3 XIAO Board Used for Measurement

For the practical measurements, I used a XIAO board. This board works mainly with 3.3V logic, while it can also expose the 5V USB rail depending on the power source. These two voltages were used as the first measurement points in this practice.

Pin / Rail Function
5V USB supply rail
3V3 Regulated logic voltage used by the board
GND Electrical reference point for all measurements
D2 GPIO pin used for PWM and digital signal tests

8. Voltage Measurements on the XIAO

The first practical step was verifying the main power rails of the XIAO. All voltage measurements were made with respect to GND, since ground defines the electrical zero reference of the board.

8.1 Measuring the 5V Rail

I first measured the 5V rail of the board. Using the Fluke 117 multimeter, the measured value was 5.066 V. On the oscilloscope, the signal remained stable around the DC level, with a recorded Vmax = 5.40 V and Vmin = 5.00 V.

5V measurement perspective 1
Measurement setup of the 5V rail using the XIAO and laboratory instruments.
5V measurement perspective 2
5V verification from another perspective showing the test arrangement.
5V measurement perspective 3
5V DC rail measured with the multimeter and observed on the oscilloscope.

8.2 Measuring the 3.3V Rail

The second measurement was the 3.3V regulated rail, which is especially important because it is the working logic level of the XIAO. Using the multimeter, the measured value was 3.295 V. On the oscilloscope, the voltage remained stable with Vmax = 3.36 V and Vmin = 3.32 V.

3.3V measurement perspective 1
Measurement setup for the 3.3V rail of the XIAO board.
3.3V measurement perspective 2
3.3V DC verification using both the multimeter and the oscilloscope.
3.3V measurement perspective 3
3.3V regulated rail measured relative to GND.

8.3 Measurement Summary Table

The following table summarizes the voltage measurements obtained using both the multimeter and the oscilloscope. This comparison helps validate the stability of the power rails and highlights the difference between static and dynamic measurement methods.

Signal Multimeter (DC Value) Oscilloscope Vmax Oscilloscope Vmin Observation
5V Rail 5.066 V 5.40 V 5.00 V Stable DC voltage with minor variation observed in oscilloscope
3.3V Rail 3.295 V 3.36 V 3.32 V Regulated voltage line with stable behavior

9. PWM Signal Analysis

One of the most useful experiments of this week was generating a PWM (Pulse Width Modulation) signal on pin D2 and observing its behavior in the oscilloscope.

PWM is a digital technique used to simulate analog behavior by rapidly switching a signal between HIGH and LOW states. What changes is not the maximum voltage, but the proportion of time that the signal remains in the HIGH state. This proportion is known as the duty cycle.

In this exercise, I tested three duty cycle levels to compare how the square wave changes while keeping the same peak logic voltage.

9.1 PWM at 25%

int pwmPin = 2;

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

void loop() {
  analogWrite(pwmPin, 64); // PWM low (25%)
}
PWM 25 percent on oscilloscope
PWM signal at 25% duty cycle observed on the oscilloscope.

9.2 PWM at 50%

int pwmPin = 2;

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

void loop() {
  analogWrite(pwmPin, 128); // PWM medium (50%)
}
PWM 50 percent on oscilloscope
PWM signal at 50% duty cycle observed on the oscilloscope.

9.3 PWM at 100%

int pwmPin = 2;

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

void loop() {
  analogWrite(pwmPin, 255); // PWM high (100%)
}
PWM 100 percent on oscilloscope
PWM signal at 100% duty cycle, where the signal remains fully active.

Comparing the three measurements made it possible to see how the waveform width changes while the logic amplitude remains defined by the XIAO output level.

10. Digital Square Wave with LED Blink

As a final practical exercise, I programmed the XIAO to turn an LED on and off every second using pin D2. This made it possible to observe a slower and more explicit digital square wave on the oscilloscope.

// BLINK DIGITAL - SQUARE WAVE (approx. 1 Hz)

int ledPin = 2;  // Pin D2

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

void loop() {
  digitalWrite(ledPin, HIGH); // LED on
  delay(1000);                // 1 second

  digitalWrite(ledPin, LOW);  // LED off
  delay(1000);                // 1 second
}
Video showing the LED blinking while the digital square wave is generated.
Square wave on oscilloscope
Square wave observed in the oscilloscope during the 1-second ON / 1-second OFF LED cycle.

This measurement is especially useful because it clearly shows the logic transition between HIGH and LOW states, making it easier to understand how a digital signal behaves over time.

11. Downloadable Files

12. Reflection