Week 06 - Electronics Design¶
This week focuses on understanding electronics fundamentals, learning how to use electronic test equipment, and designing a custom microcontroller development board using KiCad (Installing).
Week 06 Outcome¶
By the end of this week, I expected I will learn the following checklist:
- Use lab equipment to analyze embedded boards.
- Understand fundamental electronics principles from shared resources.
- Design a microcontroller development board in KiCad software after downloading installing and use d/t addons.
- Apply design constraints correctly and draw initial sketches.
Reminders from Rico¶
- Update DAYG & Nueval
- Update SSTM

- Update Final Project Progress & Tracking Page
- Using the shared resources like book and videos to undertand electronics design
- Download and start using Kicad https://www.kicad.org/download/windows/
- Maintain proper documentation & communication
Local session week06¶
Unlike previous weeks where the focus was mainly on programming embedded systems, this week shifts toward hardware design — understanding, measuring, designing, and producing the physical circuit board that runs our code. I learn from the session fundamental of the electronics design and methods, softwares and tools used in the process.
Shared resource to learn basics of electronics design
Some session local class on the electronics design with Rico

Key Concepts from Getting Started in Electronics¶
By Forrest M. Mims III Source: local instructor, Rico This book is the fundamental and basic for somen who started from the bottom to understand and work with electronics design, the following is something I learned.
DIRECT CURRENT (DC) ELECTRICITY¶
Direct Current (DC) is electricity that flows in one direction only.
It may be steady or pulsed, but it does not reverse polarity.

Current (I)¶
The flow of electrons through a circuit.
Measured in amperes (A).

For more defenetion visit the Electronics vocabulary for this week
Personal Understanding¶
This section helped me understand that:
- Electricity is not only energy — it is also information https://archive.org/details/getting-started-in-electronics/page/n27/mode/2up
- Signals are controlled patterns of voltage over time.
- Noise management is critical in PCB design.
- Pulses and waves form the foundation of digital electronics.
Weekly Assignment (on progress)¶
Group assignment (link wil be avail soon) here it is: week06 Group assignment
Individual Assignment¶
The following is concept but the full process will be uploaded after installing Kicad
Objective¶
Use an EDA tool (KiCad) to:
- Design a development board
- USE Kicad to produce it (PCB)
What is a Development Board?¶
A development board is a PCB designed to simplify working with a microcontroller.
It typically includes:
- Power regulation
- Power LED indicator
- Debug LED
- Reset button
- Programming header (FTDI / ISP / UPDI)
- Extra GND and VCC pins
- Communication headers
It makes prototyping and testing much easier than using only the bare microcontroller.
Circuit Design Workflow¶
This structured workflow ensures a correct and manufacturable board design.
I started working on the paper after my local session with Rico on MCU, ESP32C2 for fabacademy inventory please refer to this … https://inventory.fabcloud.io/?purpose=Electronics%20Design
Define Functionality:¶
Clearly describe what the board should do.
Examples:
- Blink an LED
- Read a button
- Send serial data… digital and analog pins …
- Control a motor or other design concep
- Interface with sensors
Without clear functionality, the design becomes unfocused.
. Select Components¶
Choose:
- Microcontroller, my case (ESP32C3)
- Resistors
- Capacitors
- LEDs
- Connectors
- Programming interface
Ensure compatibility of voltage and package types.
Test the Circuit¶
Optional but recommended:
- Breadboard prototype
- Simulation This reduces design errors before PCB layout.
Create Schematic¶
The schematic is the electrical blueprint. It shows:
- Logical connections
- Power distribution
- Signal routing
- Component relationships A correct schematic ensures electrical correctness.
Specify Design Rules¶
Based on milling machine constraints:
- Minimum trace width: 0.4 mm
- Minimum clearance: 0.4 mm These constraints ensure the PCB can be successfully milled.
6. Create Board Layout¶
Convert schematic into physical layout.
Tasks:
- Arrange components logically
- Route copper traces
- Ensure accessibility
- Optimize spacing Good layout improves performance and manufacturability.
KiCad Design Workflow (instalation on progress) ---- Now done¶
The following notes is taken from the shared resources from Rico… and ownership is to the video owners.
My installation late due to internet problem to finish downloading (My problem)¶
may this nignt will get good connection
Now finished and installed fully functioning Kicad

I installed Eagle too, but just kicad for now…

Done and Lets go¶
ESP32-C3 PCB Design Guide¶
KiCad 9.0 – Standard Hierarchical Workflow¶
ESP32-C3 Custom Board from the datasheet to own designed one

Overview¶
This guide explains step-by-step how to I tried to design my first MCU (ESP32-C3) usind Kicad:
My hand sketch and basic understanding of the elecronics symbols and connection methods

- Create a custom ESP32-C3 symbol
- Design a clean schematic using hierarchy
- Assign footprints correctly
PART 1 — Creating a Custom ESP32-C3 Symbol¶

1. Open Symbol Editor¶
- Open KiCad 9.0
- Click Symbol Editor

2. Create a Custom Library¶
- File → New Library
- Choose Global Library
- Name it:
My_ESP32_Library - Save
3. Create New Symbol¶
- Right-click your library → New Symbol
- Name:
ESP32-C3-WROOM - Reference: U
- Value: ESP32-C3
4. Draw Symbol Body¶
- Use Rectangle Tool (Shift + R)
- Create a clean rectangular body
- Adjust thickness in Properties
5. Add Pins (Important Step)¶
Press P to add pins.
From ESP32-C3 datasheet add:
Power Pins¶
- 3V3 → Power Input
- GND → Power Input
- EN → Input
UART¶
- TXD
- RXD
GPIO (D, Tx, RX, MISO, MOSI in my case)¶
-D1–D10 (as required)
Electrical Types¶
Set correctly: - Power Input → 5V, 3V3, GND - Input → EN, Boot - Bidirectional → GPIO - Output → TX

Correct pin types prevent ERC errors.
6. Organize Pins¶
- Left side → Inputs
- Right side → Outputs
- Bottom → Power
- Keep clean spacing
7. Save Symbol¶
- Save frequently
- Close Symbol Editor
PART 2 — Schematic Design¶
Open Schematic Editor

Project Structure¶
Footprint Assignment¶

Open Footprint Assignment Tool¶
Match: Confirm pad sizes match datasheet for pins (here is the ESP32C3 MCU Pins map).
Update PCB¶
Tools → Update PCB from Schematic
Press F8

Component Placement Strategy¶
Follow this order:
- Place ESP32 center
- Place decoupling capacitors VERY close to VDD
- Place LDO near power input
- Place USB near board edge, if neeed
- Place buttons accessible
- Place headers at edges
- Place LEDs visible
Generally¶
This document covers:
- Custom symbol creation
- Clean hierarchical schematic
- Correct footprint assignment
- Professional PCB design
Final¶
Need to debug and update on the errors

The MCU is intgrated to the component shared by Rico and the source is ,Rico(Local instructor) for the sketch bellow


Correction and update by Rico¶
All the a bove was my practice and the following with great improvement is after Rico add more local session.
- Download and integrating fab library
https://gitlab.fabcloud.org/pub/libraries/electronics/kicad

- Start on the design for schematic and tip and tricks all the methods revised by Local instractor Rico

check for electric rules¶

All steps Like: follow the datasheet,
- Bring the appropraite footprints and pins or even MCU development board, after connect correctlty and debug

- update and prepare for PCB and connecting them in the PCB edeting mode
Update is most after on the keyboard f8, update it to the current schematic mode¶
- save to the format needed

- 3D view possibpe ctr+shift+F3 will bring and do it to 3d

- Prepare for cut/print or next job for the hardware in my case https://www.aniwaa.com/product/3d-printers/botfactory-sv2/ so paste, and ink things for pick and put (PNP) more considered than cut and drills

Simulation (Wokwi)¶
ESP32 – 3 Lane Traffic Light (T-junction)¶
Objective¶
Simulate a 3-lane traffic light system using an ESP32 in Wokwi. code is generated from ChatGPT with promt “give bsic code for trafic light with three lanes”.
Learning and understanding from this:¶
- GPIO (Genral Purpose input/output) configuration on ESP32
- Digital output control
- Sequential timing logic
- Wokwi simulation workflow
- Safe LED interfacing with microcontrollers
Each lane has: - 🔴 Red - 🟡 Yellow - 🟢 Green
Only one lane is green at a time. Board used in simulation: ESP32 Dev Module (Wokwi default based on ESP32)
Platform¶
Simulation is done using: - Wokwi Online Simulator (https://wokwi.com) , might be needed to create account/free - ESP32 (Arduino framework compatible)
Step 1: Create Project¶
- Go to https://wokwi.com
- Click New Project
- Select ESP32
- Rename project to:
ESP32_3_Lane_Traffic_Light
Step 2: Add Components¶
Add the following components from the Wokwi parts menu:
- 1 × ESP32
- 9 × LEDs
- 3 Red
- 3 Yellow
- 3 Green
- 9 × Resistors (220Ω recommended)
Step 3: Wiring Connections¶
Standard LED Connection Rule¶
GPIO → 220Ω Resistor → LED (Anode / Long Leg)
LED (Cathode / Short Leg) → GND
Each LED must have its own resistor.
All LED cathodes connect to GND.
Lane 1 Connections¶
| Color | GPIO |
|---|---|
| Red | 23 |
| Yellow | 22 |
| Green | 21 |
Lane 2 Connections¶
| Color | GPIO |
|---|---|
| Red | 19 |
| Yellow | 18 |
| Green | 5 |
Lane 3 Connections¶
| Color | GPIO |
|---|---|
| Red | 17 |
| Yellow | 16 |
| Green | 4 |
Pin Summary Table¶
| Lane | Red | Yellow | Green |
|---|---|---|---|
| Lane 1 | 23 | 22 | 21 |
| Lane 2 | 19 | 18 | 5 |
| Lane 3 | 17 | 16 | 4 |
Step 4: Code (sketch.ino)¶
Replace the default code with:
// Lane 1
#define L1_RED 23
#define L1_YELLOW 22
#define L1_GREEN 21
// Lane 2
#define L2_RED 19
#define L2_YELLOW 18
#define L2_GREEN 5
// Lane 3
#define L3_RED 17
#define L3_YELLOW 16
#define L3_GREEN 4
const int GREEN_TIME = 5000;
const int YELLOW_TIME = 2000;
void setup() {
pinMode(L1_RED, OUTPUT);
pinMode(L1_YELLOW, OUTPUT);
pinMode(L1_GREEN, OUTPUT);
pinMode(L2_RED, OUTPUT);
pinMode(L2_YELLOW, OUTPUT);
pinMode(L2_GREEN, OUTPUT);
pinMode(L3_RED, OUTPUT);
pinMode(L3_YELLOW, OUTPUT);
pinMode(L3_GREEN, OUTPUT);
allRed();
}
void loop() {
lane1();
lane2();
lane3();
}
void allRed() {
digitalWrite(L1_RED, HIGH);
digitalWrite(L2_RED, HIGH);
digitalWrite(L3_RED, HIGH);
digitalWrite(L1_YELLOW, LOW);
digitalWrite(L2_YELLOW, LOW);
digitalWrite(L3_YELLOW, LOW);
digitalWrite(L1_GREEN, LOW);
digitalWrite(L2_GREEN, LOW);
digitalWrite(L3_GREEN, LOW);
}
void lane1() {
allRed();
digitalWrite(L1_RED, LOW);
digitalWrite(L1_GREEN, HIGH);
delay(GREEN_TIME);
digitalWrite(L1_GREEN, LOW);
digitalWrite(L1_YELLOW, HIGH);
delay(YELLOW_TIME);
digitalWrite(L1_YELLOW, LOW);
digitalWrite(L1_RED, HIGH);
}
void lane2() {
allRed();
digitalWrite(L2_RED, LOW);
digitalWrite(L2_GREEN, HIGH);
delay(GREEN_TIME);
digitalWrite(L2_GREEN, LOW);
digitalWrite(L2_YELLOW, HIGH);
delay(YELLOW_TIME);
digitalWrite(L2_YELLOW, LOW);
digitalWrite(L2_RED, HIGH);
}
void lane3() {
allRed();
digitalWrite(L3_RED, LOW);
digitalWrite(L3_GREEN, HIGH);
delay(GREEN_TIME);
digitalWrite(L3_GREEN, LOW);
digitalWrite(L3_YELLOW, HIGH);
delay(YELLOW_TIME);
digitalWrite(L3_YELLOW, LOW);
digitalWrite(L3_RED, HIGH);
}
Step 5: Run Simulation¶
Click Start Simulation ▶️
Observe the traffic sequence:
- Lane 1 → Green → Yellow → Red
- Lane 2 → Green → Yellow → Red
- Lane 3 → Green → Yellow → Red
The cycle repeats continuously.
System Logic Explanation¶
- At startup, all lanes are set to RED
- Each lane turns GREEN for 5 seconds
- Then YELLOW for 2 seconds
- Then back to RED
- Only one lane is GREEN at any time
Electrical Notes¶
- Use 220Ω or 330Ω resistors
- ESP32 operates at 3.3V logic level
- Do NOT connect LEDs directly without a resistor
- Ensure correct LED polarity (long leg = Anode +)
- Use rename or recoloring of the componnent whenever needed