Week 6 – Electronic Design
Electronic design
Group Assignment
The objective of this group assignment is to use the available test equipment in the lab
to observe and analyze the operation of a microcontroller-based circuit board. This involves
understanding how signals behave in real time and how different components interact within
the system.
As a minimum requirement, the use of a logic analyzer must be demonstrated.
This tool allows capturing and visualizing digital signals, making it possible to inspect
communication protocols, timing relationships, and signal integrity between components.
Through this activity, the goal is to gain practical experience in debugging and validating
embedded systems using professional measurement tools, reinforcing theoretical knowledge
with real-world observation.
All findings, procedures, and results must be documented on the group assignment page.
Additionally, each team member should include a personal reflection on their individual page,
describing what they learned and how the experience contributed to their understanding of
microcontroller systems and electronic testing.
Open Group Assignment
1. Introduction
This week’s group assignment consisted of learning how to use laboratory test equipment to observe and analyze the operation of a microcontroller circuit board.
As a minimum requirement, we demonstrated the use of:
- A Multimeter
- An Oscilloscope
The system under test was an ESP32-C3 development board powered via USB (5V) and operating at 3.3V logic level.
The objective was to understand how electrical signals behave in real hardware and to validate circuit functionality before moving into PCB design.
2. Definitions of Technical Equipment
| Equipment |
Description |
Useful For |
| Regulated Power Supply |
Provides stable DC voltage independent of input fluctuations. |
Safely powering circuits during testing. |
| Multimeter |
Measures Voltage (AC/DC), Current, Resistance, Continuity, and sometimes Capacitance. |
Diagnosing circuit issues and verifying correct electrical values. |
| Oscilloscope |
Displays voltage as a function of time (Voltage vs Time). |
Observing waveform shape, frequency, amplitude, and signal integrity. |
| Logic Analyzer |
Captures multiple digital signals simultaneously. |
Analyzing digital communication and logic states. |
| Mixed Signal Oscilloscope |
Combines analog and digital signal analysis. |
Testing circuits with both analog and digital components. |
3. Electrical Fundamentals
3.1 Ohm’s Law
Ohm’s Law relates voltage, current, and resistance:
V = I × R
Where:
V = Voltage (Volts)
I = Current (Amperes)
R = Resistance (Ohms)
Derived forms:
I = V / R
R = V / I
3.2 Electrical Power
Power is the rate at which electrical energy is consumed.
P = V × I
Alternative forms using Ohm’s Law:
P = I² × R
P = V² / R
Where:
P = Power (Watts)
Example – LED with ESP32-C3
ESP32-C3 GPIO = 3.3V
LED forward voltage ≈ 2.0V
Desired current = 5mA (0.005A)
R = (3.3V − 2.0V) / 0.005A
R = 260Ω
Standard value used: 220Ω
Power dissipation in resistor:
P = V × I
P = 1.3V × 0.005A
P = 0.0065W (6.5mW)
A 1/4W resistor is more than sufficient.
4. Using the Multimeter
4.1 Measuring Voltage
Purpose: Verify correct power supply levels.
- Turn on multimeter.
- Select DC Voltage (<20V range).
- Connect black probe to GND.
- Connect red probe to measurement point.
Measurements performed:
Working battery → 8.9V
Dead battery → 1.2V
ESP32-C3 3.3V output → 3.2V
This confirmed proper voltage regulation.
4.2 Measuring Resistance
Purpose: Confirm resistor value.
- Power off circuit.
- Select Ω mode.
- Place probes across resistor terminals.
Measured value: 220Ω
4.3 Testing Continuity
Purpose: Ensure circuit connections are closed and solder joints are correct.
- Turn off power.
- Select continuity mode (beep symbol).
- Touch probes across GND connections, LED terminals, PCB traces.
Beep indicates closed circuit.
4.4 Measuring Current
Purpose: Determine actual current consumption.
Current must be measured in series.
- Disconnect power.
- Open power line.
- Set multimeter to DC mA mode.
- Insert multimeter in series.
- Reconnect power.
Measured value for blinking LED circuit: 5.4 mA
5. Using the Oscilloscope
5.1 Setup
- Turn on oscilloscope.
- Select DC coupling.
- Adjust Voltage scale (Volts/div) and Time scale (Time/div).
Calibration was required to properly visualize the waveform.
5.2 Observing GPIO Blink Signal
The ESP32-C3 was programmed with a blinking LED (100 ms interval).
Probe connections:
Tip → GPIO pin
Ground clip → GND
Observed waveform:
Square wave
0V (LOW)
3.3V (HIGH)
5.3 Changing Frequency
LOW = 500 ms
HIGH = 100 ms
The waveform width changed accordingly, demonstrating duty cycle variation.
5.4 Observing Serial Communication
We transmitted character “K”. ASCII binary: 111101011
Oscilloscope displayed Start bit (0), Data bits, Stop bit (1).
This confirmed correct digital serial transmission.
6. Key Learning Outcomes
- How to safely use a multimeter.
- How to measure voltage, resistance, current, and continuity.
- How to validate power integrity in a microcontroller board.
- The difference between DC average measurement and time-based waveform visualization.
- How digital signals appear as square waves.
- How theoretical calculations compare to real measurements.
7. Conclusion
This group assignment provided practical experience using laboratory test equipment to analyze a microcontroller system. By validating electrical parameters on the ESP32-C3 board, we reinforced fundamental concepts such as Ohm’s Law, power dissipation, signal integrity, and digital waveform behavior.
These skills are essential for the upcoming PCB design and fabrication stages, where electrical validation becomes critical before hardware deployment.
INDIVIDUAL ASSIGNMENT – ELECTRONICS DESIGN
1. Introduction
For this assignment, I designed a custom electronic system using KiCad as the Electronic Design Automation (EDA) software. The project integrates a Seeed Studio XIAO ESP32-C3 microcontroller to control two servo motors.
The workflow included:
- Circuit design in KiCad
- Simulation in Wokwi
- Firmware development in Arduino IDE
- PCB layout generation
- Manufacturing-ready board design
2. About KiCad
KiCad is an open-source Electronic Design Automation (EDA) tool used to design schematics and printed circuit boards (PCBs).
It allows:
- Creation of schematic diagrams
- Assignment of footprints
- PCB layout design
- 3D visualization
- Generation of manufacturing files (Gerbers)
KiCad is widely used in academic and professional electronics development due to its flexibility and open-source ecosystem.
3. System Description
The system consists of:
Electronic Circuit Design – LED Roulette (XIAO ESP32-C3)
This circuit is designed to simulate a roulette effect using 7 LEDs controlled by a
Seeed XIAO ESP32-C3 microcontroller. The system sequentially activates each LED
to create a dynamic visual pattern, similar to a spinning wheel that eventually stops at a random position.
Components Used
- 1 × XIAO ESP32-C3 (microcontroller)
- 7 × LEDs (any color or combination)
- 7 × Resistors (220Ω – 330Ω) (current limiting)
- 1 × Breadboard
- Jumper wires
Pin Configuration
Each LED is connected to a dedicated GPIO pin of the XIAO ESP32-C3:
- D0 → LED 1
- D1 → LED 2
- D2 → LED 3
- D3 → LED 4
- D4 → LED 5
- D5 → LED 6
- D6 → LED 7
Electrical Connections
Each LED is connected in series with a resistor to protect it from excessive current:
- The anode (+) of each LED connects to a GPIO pin.
- The cathode (-) connects to a resistor (220Ω–330Ω).
- The other end of the resistor connects to GND.
This configuration ensures that when a GPIO pin outputs HIGH (3.3V), the corresponding LED turns ON,
and when LOW, it turns OFF.
System Behavior (Roulette Logic)
The program controls the LEDs in a sequential loop:
- LEDs turn ON one by one in rapid succession (scrolling effect).
- The speed gradually decreases to simulate a spinning roulette slowing down.
- The sequence stops at a random LED, indicating the final “selection”.
Design Considerations
-
Current Limiting: Resistors are essential to prevent damage to LEDs and GPIO pins.
-
GPIO Limits: The ESP32-C3 can safely drive multiple LEDs, but total current must remain within limits.
-
Timing Control: Delays or timers are used to create smooth animation and deceleration.
-
Expandability: The design can be extended with a push button to trigger the roulette or reset it.
4. Circuit Simulation in Wokwi
Simulation in Wokwi – LED Roulette (XIAO ESP32-C3)
The LED roulette system was first validated using Wokwi, an online simulation platform
that allows testing both circuit connections and embedded code before implementing the design in
physical hardware.
Step-by-Step Simulation Workflow
-
Create a New Project:
Access wokwi.com and create a new project selecting the
ESP32-C3 as the main microcontroller.
-
Add Components:
Insert the required components into the workspace:
- 7 LEDs
- 7 resistors (220Ω)
- ESP32-C3 board
-
Wire the Circuit:
Connect each LED to a GPIO pin (D0–D6). Each LED must be connected in series with a resistor,
and all resistors must go to GND. This replicates the real circuit configuration.
-
Insert the Code:
Open the code editor in Wokwi and paste the Arduino-based program that controls the LED sequence
(roulette effect). The code defines pin modes and controls the timing of each LED.
-
Run the Simulation:
Click the “Start Simulation” button. The LEDs will begin to turn on sequentially, creating the
roulette effect. The speed variation (if implemented) will simulate acceleration and deceleration.
-
Validate Behavior:
Observe that:
- Each LED turns ON and OFF correctly
- The sequence follows the programmed order
- The final stop occurs as expected (random or fixed)
-
Debug if Necessary:
If any LED does not behave correctly:
- Check wiring connections
- Verify correct GPIO pin assignment
- Review delays and logic in the code
Advantages of Simulation
- Prevents hardware damage by testing virtually
- Allows rapid iteration and debugging
- Validates logic before physical implementation
- Helps understand circuit behavior step-by-step
Using Wokwi significantly improves the development workflow by ensuring that both the circuit design
and the program logic are correct before assembling the real system.
Before designing the PCB, the system was simulated using Wokwi.
Steps:
- Create new ESP32 project.
- Select ESP32-C3 board.
- Add two servo components.
- Connect:
- Servo 1 → GPIO D9
- Servo 2 → GPIO D10
- 5V external power
- Common GND
- Upload and test Arduino code.
5. Programming in Arduino IDE
After validating the simulation, the firmware was developed in Arduino IDE.
Steps:
- Install ESP32 board support.
- Open Preferences and add ESP32 board URL.
- Install ESP32 board package.
- Install ESP32Servo library.
The program controls two servos using PWM signals and predefined movement sequences.
6. Installing Fab Academy KiCad Library
To follow Fab Academy PCB standards, the Fab library was installed.
- Download FabAcademy KiCad library files.
- Preferences → Manage Symbol Libraries → Add Existing Library.
- Select fab.kicad_sym.
- Preferences → Manage Footprint Libraries → Add Existing Library.
- Select fab.pretty folder.
This enables access to Fab-standard components such as resistors, capacitors, pin headers and microcontrollers.
7. Creating the Schematic
Schematic Design Process in KiCad – LED Roulette (XIAO ESP32-C3)
The schematic of the LED roulette system was developed using KiCad, an open-source
electronic design automation (EDA) tool. This stage is essential to define electrical connections
clearly before moving to PCB design or physical prototyping.
Step-by-Step Workflow
-
Create a New Project:
Open KiCad and create a new project. This generates the main files for schematic and PCB design.
-
Open Schematic Editor:
Launch the Schematic Editor to begin designing the circuit diagram.
-
Add Components:
Use the component library to insert:
- Microcontroller module (XIAO ESP32-C3 or generic ESP32 symbol)
- 7 LEDs
- 7 resistors (220Ω)
- Power symbols (GND)
-
Assign GPIO Pins:
Connect each LED to a specific GPIO pin:
- D0 → LED1
- D1 → LED2
- D2 → LED3
- D3 → LED4
- D4 → LED5
- D5 → LED6
- D6 → LED7
-
Wire the Circuit:
Draw connections between components:
- GPIO pin → LED anode (+)
- LED cathode (−) → resistor
- Resistor → GND
This ensures proper current flow and protection of the LEDs.
-
Add Labels and References:
Assign reference labels (R1–R7, LED1–LED7) and optionally name signals
to improve readability and organization.
-
Electrical Rules Check (ERC):
Run the ERC tool to detect errors such as unconnected pins, missing grounds,
or incorrect connections. Fix any issues before proceeding.
-
Assign Footprints:
Link each schematic component to a physical footprint (for PCB design),
such as SMD or through-hole LEDs and resistors.
-
Save and Prepare for PCB Layout:
Once the schematic is validated, it can be transferred to the PCB editor
for board design and routing.
Design Considerations
-
Current Limiting: Each LED must include a resistor to avoid overcurrent.
-
Clear Pin Mapping: Maintain consistency between schematic and code pin assignments.
-
Readability: Proper labeling and organization simplify debugging and future modifications.
-
Scalability: The design can be extended by adding more outputs or input controls.
This schematic design process ensures a clear and reliable representation of the circuit,
serving as the foundation for both simulation, PCB fabrication, and physical implementation.
8. Assigning Footprints
Open Tools → Assign Footprints.
- PinHeader_1x03 → Servo connectors
- PinHeader_1x07 → XIAO headers
- Capacitor_SMD → Filtering capacitor
Save and update PCB.
9. PCB Layout Design
Open PCB Editor.
Step 1: Define Board Outline
Use Edge.Cuts layer to draw rectangular board shape.
Step 2: Place Components
- XIAO centered
- Servo connectors at edge
- Power input accessible
10. Routing the PCB
- Signal width: 0.4mm
- Power traces: 0.6mm–0.8mm
- Keep traces short and clean
- Avoid sharp 90° angles
11. Ground Plane (Copper Fill)
- Select Add Filled Zone
- Choose F.Cu layer
- Select GND net
- Draw polygon around board
- Press B to refill zones
Benefits include reduced noise, better current return path and improved EMI performance.
12. Design Rule Check (DRC)
Run DRC and inspect clearance violations, overlapping pads and unconnected nets.
13. 3D View and Final Inspection
Open 3D Viewer and verify component placement, connector orientation and mechanical fit.
14. Generating Manufacturing Files- HERO SHOT
- Generate Gerber Files
- Generate Drill Files
- Plot F.Cu, B.Cu, Edge.Cuts, F.SilkS, F.Mask
Conclusions, Challenges, and Solutions
Conclusions
This assignment provided a comprehensive understanding of the complete workflow in electronics design,
from schematic creation in KiCad to PCB fabrication and embedded programming using the
XIAO ESP32-C3. It reinforced key concepts such as GPIO control, circuit design rules,
and the relationship between hardware and software.
Additionally, the integration of simulation tools, PCB design, and real-world testing allowed a better
understanding of how theoretical knowledge is applied in practical scenarios. The LED roulette system
demonstrated how multiple outputs can be controlled efficiently to generate dynamic behaviors.
Problems Encountered
-
Incorrect pin mapping: Initial confusion between GPIO numbering and board labeling
caused LEDs not to respond as expected.
-
PCB design errors: Some traces were too close or incorrectly routed, leading to potential
manufacturing issues.
-
Simulation vs reality differences: The circuit behaved correctly in simulation but required
adjustments when implemented physically.
-
Soldering and connections: Poor connections initially caused intermittent behavior in the circuit.
How the Problems Were Solved
-
Pinout verification: The official pinout diagram of the XIAO ESP32-C3 was reviewed to ensure
correct mapping between code and hardware.
-
Design rule checks (DRC/ERC): KiCad tools were used to identify and fix routing and connection errors.
-
Iterative testing: The system was tested step-by-step, first in simulation (Wokwi) and then on
physical hardware.
-
Improved assembly: Connections were reorganized and solder joints were corrected to ensure stability.
Final Reflection
Overcoming these challenges strengthened problem-solving skills and highlighted the importance of iterative
design, testing, and validation. The experience demonstrated that successful electronic system development
requires careful planning, attention to detail, and continuous debugging.