Skip to content

Week 6 - Electronics Design

Header

Published on: March 11, 2025


This week was all about PCB design!

To start off, I decided to dive into some recommended reading: the RP2040 Hardware Design Guide. Before going through this document, I wasn't entirely sure which components were essential for designing my first custom development board. However, this guide provided valuable insights, helping me understand the importance of different components and their connections.

As always you will find our group assignment on our group documentation page.


Hardware Design

One of the most helpful aspects of the guide was the minimal design example, which served as a great starting point for my own project. The fundamental components required for a basic RP2040 board include:

Minimal RP2040 Design Example

  • Micro USB Connector – Provides 5V power input.
  • Decoupling Capacitors – Help filter out power supply noise and prevent voltage drops during rapid current demand changes.
  • Voltage Regulator – Requires 1μF capacitors near both the VREG_IN and VREG_OUT pins to ensure a stable 1.1V power supply.
  • Flash Storage – Stores the program code.
  • 12MHz Crystal Oscillator – While the RP2040 has an internal oscillator, it is recommended to use an external crystal oscillator for precise frequency stability. Factors such as temperature changes can cause the internal oscillator's frequency to fluctuate, making USB applications and other time-sensitive tasks unreliable.
  • I/O Pins – For connecting external peripherals.
  • USB stabilization
  • I/O headers

Alternative: XIAO Seeed ESP32

Instead of designing a PCB completely from scratch, I explored existing RP2040-based and ESP32 alternatives and found the Seeed Studio XIAO ESP32 to be a great option that is allowed to use by Fab Academy. Thanks to Adrian Torres' FabXIAO documentation, I decided to take a simplified approach for my first PCB, focusing on adapting an existing design rather than starting from zero with a dual layer PCB.

XIAO ESP32

XIAO Overview


Creating a Circuit Board with KiCad

Creating a circuit board with KiCad involves designing the schematic, defining the board layout, and preparing the files for fabrication.

KiCad Start Interface

This image shows the KiCad start interface, where I began by creating a new project. From here, I accessed the schematic editor to design the circuit and later used the PCB editor to layout the board. This step marks the beginning of the PCB design process in KiCad.

Importing Libraries in KiCad

To use the XIAO modules, I imported the required KiCad libraries from: Seeed Studio KiCad Library

Importing Libraries

You can also find footprints at DigiKey or SnapMagic and import them to your project. It is important that you add them as symbol and footprint library.

Footprint Libraries

Editing the Schematic File

Press A to open the symbol library. Search for ESP32 — I selected the ESP32S3 from XIAO because that's the microcontroller I would like to use in my final project.

Symbol Library Search

ESP32S3 Selected

I searched for the required components in the KiCad library and added them one by one to the schematic editor, ensuring that all necessary parts for the circuit were included.

In my case, I added only the essential components to the schematic editor: the microcontroller, three pin headers, an LED, and a resistor. Next, I added the power sources and used the "Draw Wires" function to connect the components, ensuring proper electrical connections in the schematic.

Schematic Wiring

The finalized schematic, with all components and connections in place, is shown below.

Finalized Schematic


PCB Editor and Routing

Next, I switched to the PCB Editor to begin the layout process. All components from the schematic were imported, and I started arranging them on the board to optimize the placement for routing the connections efficiently.

PCB Editor Layout

I defined the PCB outline by drawing a rectangular boundary around the components using specific dimensions. This outline represents the final shape and size of the board, ensuring all components fit within the designated area.

PCB Outline

The 'Draw Filled Zones' function in KiCad allows the creation of copper pours, which are used to fill large areas of the PCB with a conductive material. This is commonly used for ground (GND) or power (VCC) planes, improving electrical performance and simplifying routing by reducing the need for multiple traces.

Draw Filled Zones

The Copper Zone Properties window in KiCad is used to configure and define copper pour areas on a PCB. The Layer Selection allows the user to choose on which PCB layer the copper zone should be applied, such as F.Cu for the top copper layer or B.Cu for the bottom layer. The Net Assignment section specifies which electrical net the copper zone should connect to, such as GND for ground or VCC for power. If "no net" is selected, the copper zone will be isolated and not connected to any circuit.

In the General Settings, the user can optionally name the copper zone and set its priority level, which determines how overlapping zones interact. The Shape and Display settings include options for outline display, such as a hatched or solid representation, and allow for corner smoothing to round off sharp edges.

The Electrical Properties define important design parameters such as clearance, which sets the minimum distance between the copper pour and other components, and minimum width, which determines the smallest copper trace width within the zone. In the Pad Connections section, thermal reliefs can be enabled to ensure pads are not directly connected to large copper areas, which aids in solderability by preventing excessive heat dissipation. Parameters such as thermal relief gap and spoke width fine-tune these connections.

Lastly, the Fill Options allow users to choose between a solid fill or a hatched pattern. The smoothing effort and amount control how smooth the edges appear, and the remove islands setting helps eliminate small, unconnected copper sections that could cause unwanted electrical behavior. These settings ensure that the copper zones are properly connected and optimized for both electrical performance and manufacturability.

Copper Zone Properties

I used the "Draw Filled Zones" function to create a copper pour, which helps optimize electrical performance and reduce interference. I assigned the appropriate net to this zone to connect ground traces.

Copper Pour Assigned

I then configured the copper zone properties, adjusting parameters such as clearance and fill type.

Copper Zone Configuration

After defining the copper pour, I filled the board with copper planes and confirmed that all necessary connections were made.

Board Filled with Copper

I then routed the necessary traces, ensuring proper connectivity between all components. Each trace follows the designated net, maintaining signal integrity while avoiding unnecessary overlaps.

Routed Traces

Additionally, I placed vias to connect the ground planes on both layers of the PCB, ensuring a continuous and stable ground connection. This step helps reduce electromagnetic interference and improves overall circuit performance.

Vias Placed

To verify the design, I used the 3D viewer to check the final PCB layout. This visualization helps in identifying any placement issues and ensures that all components fit correctly on the board.

3D Viewer


Downloads