Custom STM32 Dev Board

A STM32F107RCTx-based development board with USB and SWD interfaces, designed for embedded prototyping.

Project Overview

The goal was to create a low-cost, compact STM32-based dev board with all essential interfaces exposed—USB, SWD, and mapped I/Os—along with three user/debug LEDs.

Technologies Used

  • KiCad PCB Design Suite
  • STM32CubeIDE

Schematic Design

Microcontroller Selection

STM32F107RCTx was selected for its integrated USB peripheral and rich I/O set.

Power Supply Unit (PSU)

Power Supply Unit Circuit

Linear PSU based on the ASM1117-3.3 voltage regulator was used to step down the +5V from the USB to 3.3V. C1 and C2 are the input and output smoothing capacitors. R1 is the 1.5kΩ current limiting resistor for the LED D1, which serves as the power indicator.

Microcontroller Decoupling Capacitors

Decoupling Capacitors

In this design C3, C4, C5, C6 and C7 are decoupling capacitors for the microcontroller. Their primary function is to stabilize the supply voltage by acting as local energy reservoirs. During operation the microcontroller can draw sudden bursts of current due to internal switching. This current can briefly dip the voltage on the power rail potentially leading the microcontroller to brown out or cause erratic behavior. C4, C5, C6 and C7 are 100nf ceramic capacitors chosen for their effectiveness in filtering high frequency noise, C3 is a complementary 10 nano-farad ceramic capacitors included to further filter the higher frequencies and transients.

VDDA Filtering

Analogue Voltage Stabilisation and Filtering

Ferrite beads and capacitors were used to stabilize the analog supply for precision components.

Crystal Oscillator Circuit

Crystal Oscillator Circuit

The crystal’s load capacitance (CL) was taken from the datasheet, which specifies a value of 30 pF. This is the capacitance required for the crystal to oscillate at its rated frequency. The stray capacitance (Cs), which includes PCB trace, pin, and parasitic capacitances, was estimated to be 5 pF.

Using the formula for two equal capacitors connected to ground, the required capacitor value is: CL = 2 × (CLo − Cs). Substituting the values gives:2 × (30 pF − 5 pF) = 50 pF.

The nearest standard capacitor value, 51 pF, was selected for C12 and C13.

UART Pull-ups

Communication Interfaces

USB FS and UART headers were included for both firmware upload and serial debugging.

Debug and LED Circuit

Debug and LED Circuit

The LEDs D2, D3, and D4 are included for quick debugging. Each LED is connected to the 3.3 V rail through its respective current-limiting resistor (R4, R5, and R6), and the cathodes are connected to microcontroller pins PB8, PA1, and PC0. Because the anodes are tied to 3.3 V, the LEDs are activated by driving the microcontroller pins low.

GPIO Mapping

I/O Mapping

Common GPIOs were routed to headers for flexibility in testing peripherals. The LEDs D2, D3, and D4 along with their limiting resistors R4, R5, and R65 were mapped accordingly.

PCB Layout

Footprint Assignment

Footprint Assignment

Components were selected for compactness and availability; footprints were verified in 3D view.

Layer Count & Dimensions

PCB Dimensions

A 2-layer PCB design was used to minimize cost. Final dimensions: 80mm x 50mm.

MCU Placement

MCU Placement

The microcontroller was centrally placed to reduce trace lengths to supporting components.

PCB Fabrication

Gerber Output

Gerber Files

Standard Gerber and drill files were generated and verified using Gerber Viewer.

Manufacturer

JLCPCB

JLCPCB was chosen for prototyping due to cost and turnaround time.

Fabrication Specs

Fabrication Specs

FR4, 1.6mm thickness, 1oz copper, green solder mask.

Cost & Delivery

Cost & Delivery

Total fabrication cost was under $10 with delivery within 7 business days.

Assembly & Testing

BOM & Component Sourcing

BOM Sourcing

Components sourced from LCSC and local distributors. Total BOM cost: approx. $15.

Soldering

Soldering

Hand-soldered under magnification using leaded solder for ease of rework.

Testing Code Snippet

Code Snippet

// Simple LED Blink Test
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_13);

Conclusion

Future Improvements

Future Improvements

Consider adding onboard debugger (ST-Link), USB-C, and additional protection circuits in future revisions.

My Role

My Role

I designed and developed the board end-to-end—from schematic and PCB layout to component sourcing, assembly, and firmware testing. I also documented the entire process for future iteration and reuse.