Week 6: Electronics design

This week focused on designing a PCB, by organizing the electronic schematic, verifying it with the ERC, and transitioning to the PCB layout.

Electronic Design

Electronic Design Automation (EDA) software is used to design, analyze, and manufacture electronic circuits and printed circuit boards (PCBs).
These tools allow engineers to:
  • Electrical diagrams
  • Assign real-world components
  • Design PCB layouts
  • Simulate circuits
  • Perform design rule checks
  • Generate manufacturing files
  • Manage multi-layer, high-speed, and complex designs
Two of the most recognized professional PCB design tools are: For further information about this topic and the laboratory materials, please consult this week’s group page.
Feature Altium Designer KiCad
Type Commercial, industry-grade EDA Open-source EDA
License Paid (high cost) Free
Target Users Professional engineers, companies Students, hobbyists, startups, professionals
Schematic Capture Advanced, highly integrated Powerful and fully capable
PCB Layout Industry-level tools for complex designs Professional-grade, constantly improving
Multi-layer Boards Full support (high-speed, HDI, impedance control) Full multi-layer support
High-Speed Design Tools Advanced signal integrity tools built-in Basic to intermediate (external tools may be needed)
Simulation Integrated (SPICE, signal analysis) Basic SPICE support
Component Management Enterprise-level library and lifecycle management Manual or community-based libraries
3D Visualization Advanced real-time 3D with MCAD integration Integrated 3D viewer
Collaboration Cloud collaboration and version control tools Git-compatible, manual collaboration workflows
Manufacturing Output Full professional manufacturing pipeline Full Gerber, BOM, pick-and-place export
Learning Curve Steep Moderate
Industry Adoption Widely used in professional hardware companies Increasingly adopted in startups and open hardware
In this case, we will focus on designing the board in KiCad, since it offers several advantages over Altium Designer for a shortcut keypad project like this one. Since this project does not require advanced high-speed signal integrity tools, enterprise component lifecycle management, or large team collaboration features, KiCad becomes a practical and efficient choice. It allows rapid prototyping and iteration without the overhead of enterprise-level software.
The circuit consists of the following main elements:
  • 4 push buttons for user input
  • 1 resistor
  • The main controller: a Seeed Studio XIAO RP2040, which acts as the processing core
  • A Wurth Elektronik 629105136821 (Micro USB socket), used to supply 5V from the computer to power the system
  • A AMS1117 voltage regulator (5V to 3.3V), ensuring proper logic-level operation
  • 2 WS2812B RGB LEDs, individually addressable for lighting effects
  • 4 SMD capacitors, used for voltage stabilization and noise filtering
  • 1 2N2222A transistor, acting as a switching device for external loads
  • 1 1N4007 diode, used as a flyback diode for motor protection
  • Pin headers, allowing external components (such as a vibration motor) to be connected

Kicad

KiCad main interface

From this central project manager window, you can access the core tools:
  • Schematic Editor – Used to create and edit the electrical schematic of the project.
  • Symbol Editor – Used to create or modify schematic symbols.
  • PCB Editor – Used to design and route the printed circuit board layout.
  • Footprint Editor – Used to create or modify PCB footprints
  • Gerber Viewer – Used to preview manufacturing Gerber files.
  • Image Converter – Converts bitmap images into schematic symbols or PCB footprints.
  • Calculator Tools – Provides electrical calculation utilities (resistors, trace width, etc.).
  • Worksheet Editor – Used to edit drawing frames and title blocks.
  • Plugin and Content Manager – Used to install additional libraries and third-party packages.
Fab termi

Creating a new project

To create a new project, you can Press Ctrl + N or go to the top menu -> File -> New Project, then choose the project name and save location. KiCad will automatically generate:
  • A project file (.kicad_pro)
  • A schematic file (.kicad_sch)
  • A PCB file (.kicad_pcb)
Fab termi
Fab termi

Adding a Library

You can download the FAB library by clicking on the dancing shrimp and:
  1. Place the downloaded files in a chosen folder.
  2. Go to: Preferences -> Configure Paths
  3. Here you define the directory path where the library files are stored.
    This step ensures KiCad can locate external resources.
  4. Importing Footprints
    • Go to: Preferences -> Manage Footprint Libraries
    • Click “Add Existing Library”
    • Select the folder containing the file .pretty and choose a name for the library.
Fab termi
Fab termi
Fab termi

Workspace

When we open the project in the Schematic Editor, we will find an interface with a main menu and several toolbars surrounding the workspace. This section is where electronic components are placed and connected using schematic symbols. The most important icons are highlighted below.
Fab termi
To move from the Schematic Editor to the PCB Editor, once the schematic has been verified and is free of electrical errors, the next step is to click on PCB Editor, where the physical board design is carried out.
Fab termi

Add a component

A shortcut to access the components menu is the "a" key. Once there, we search for the component and choose our preferred size, in this case 1206.
To modify its name and other parameters, double-click on it.
Fab termi
Fab termi
After organizing the workspace using net labels and clearly defining functional sections, the schematic should look structured and easy to read.
The ultimate objective is to design a PCB that will eventually serve as the core (the “brain”) of a compact macro keypad. Therefore, the next stage involves shaping and defining the physical layout of the PCB.
Fab termi

Electrical Rules Checker

Before switching to the PCB Editor, it is necessary to go to Inspect -> Electrical Rules Checker (ERC).
Running the ERC allows us to verify the logical integrity of the schematic before generating the board layout. In this case, the ERC reports 23 errors. These correspond to intentionally unconnected pins within the design. Although classified as errors, we understand why these pins are not connected and therefore they can be consciously ignored in this specific context.
Fab termi
Fab termi
If the editing of the schematic has finished, we can go to the "PCB editor", remembering that we can always return to the schematic to make changes.
Fab termi
Fab termi

PCB editor

Once we are in the "PCB Editor", it is necessary to select "Update PCB from Schematic", which will open a new window where it shows us all the schematic elements that are going to be imported.
By pressing "OK" in the previous step, we place all the components but in an unordered way.
Fab termi
We must order all the components according to our requirements, as well as the position of the inputs and outputs of the board. Below is the distribution with which our board was designed.
Fab termi
Important

We can always return to the "Schematic" to make changes to the design or add new components. Whenever changes are made, it is important to select again in the "PCB Editor" "Update PCB from Schematic" to import the new components.

Edge.Cuts

If the distribution of the components is correct, we can place a cutting edge, which is done by selecting "Edge.Cuts" and a type of stroke.
Fab termi
Fab termi

Copper pour

For greater efficiency and electrical reliability, a copper pour (also known as a copper fill or copper zone) is added to the PCB.
A copper pour consists of filling a defined area of the board with copper connected to a specific net, typically GND. This serves multiple important purposes:
  • It improves electrical grounding by creating a low-impedance ground plane.
  • It reduces electrical noise and electromagnetic interference.
  • It enhances heat dissipation by spreading thermal energy across a larger surface.
  • It reduces the amount of routed traces required, simplifying layout.
  • It optimizes manufacturing by balancing copper distribution on the board.
In this particular design, the copper pour was assigned to the GND net, allowing all ground connections of the components to be automatically connected through the plane. This significantly reduces routing time and results in a cleaner layout.
How to add a copper pour
  1. Click on the “Add Filled Zone” icon in the right-side toolbar.
  2. Select the desired copper layer (for example, F.Cu for the top layer or B.Cu for the bottom layer).
  3. Fab termi
  4. Assign the zone to the GND net (or the desired net).
  5. Fab termi
  6. Draw the polygon by outlining the board area, typically following the Edge.Cuts boundary.
  7. Close the polygon shape.
  8. Fab termi
  9. Press the B key to fill (or refill) the copper zone.
  10. Fab termi
    The software will automatically calculate clearances and connect pads that belong to the selected net.
Important

Every time changes are made to the PCB like adding new traces or removing or moving components or modifying routing, you must press the B key again to refill and update the copper zone.

Fab termi
After press the "DRC" icon; This will opens a new window, and we press "OK".
When we do this, the design rules compare our design and show us all the violations and errors that exist, when we click on each error, it marks the place in the "Layout", where the error is located, so that the correction can be made. There are errors that we can omit under our consideration and based on knowledge of electronics.
Fab termi
Fab termi
Fab termi
Fab termi
To visualize what the PCB would look like, we go to the "View - 3D Viewer" menu.
Fab termi
Fab termi

Results

Kicad

Fab termi
Fab termi

Download files

For download 3D and others files, just click on the dancing shrimp.