Been learning STM32 PCB design in KiCad and just finished laying out the board from Phil's Lab tutorial. Honestly not sure if it's any good so looking for honest feedback before I take it further. It's built around the microcontroller (U2) with USB (J1), SWD (J3), UART (J2) and I2C (J4) connectors, plus the BOOT switch (SW1), the voltage regulator (U1) and the external crystal (Y1). Decoupling caps are spread around the board and I put four mounting holes at the corners, with an open hardware logo and silkscreen labels on there too. Layout wise I tried to keep things tidy but I have a feeling I'm missing stuff, expecially around the regulator and the crystal. Anyone want to rip into it? Don't go easy on me, I'd rather hear the problems now than after I order boards. Also happy to share the KiCad files if that helps people look closer.
First STM32 board in KiCad, anything I missed before I go further?
Dec 01, 2026
Last reply: 17 hours ago
5 Replies
First reply
First thing, since you asked me to rip into it: you need ESD protection. A TVS diode on the output lines and a USBLC6-2 right at the USB connector. Right now a static zap through a cable goes straight into the microcontroller, and that is the kind of damage you only find out…
Read the full replyFirst thing, since you asked me to rip into it: you need ESD protection. A TVS diode on the output lines and a USBLC6-2 right at the USB connector. Right now a static zap through a cable goes straight into the microcontroller, and that is the kind of damage you only find out about when the board behaves strangely months later. It is a cheap fix at layout stage and an annoying one afterwards.
Second issue, and this one will bite you physically: move the USB receptacle to the board edge. If it sits inboard like that, a lot of cables have their overmould hit the board and never seat properly. Connectors that plug in from outside the board outline have to hang over the edge, no way around it.
Now the ground situation. From what you describe you are routing ground as traces, which is the habit to break. Pour GND copper on the top layer instead, and wherever a component needs ground, drop a via straight down to the ground plane rather than running a trace back to some point. Then stitch the top and bottom pours together with vias scattered across the board. Copper is free, there is no downside unless you are doing controlled impedance, and it makes everything quieter and easier to route. Also add test points. Power, GND, and the important GPIO signals at minimum. In theory every net would get one, in practice that is overkill, but when the board comes back and something does not work, you will thank yourself for having somewhere to probe.
On the areas you were worried about: yes, the regulator and crystal both want to be as close to the microcontroller as possible, and keep the bypass caps tight in there too. Use thicker traces or a copper pour for the power path rather than skinny signal-width traces. Otherwise it sounds like a solid learning effort, the mounting holes and silkscreen labels are good habits. And yes, share the KiCad files, people will spot things on the actual layout that words miss.
I remember when we did this stuff with tape and a light table, so take it from someone who has watched layouts change tools a few times: the decoupling caps being scattered around is the one habit from the old days that never held up. It was wrong then and it is wrong now, they belong right at the part. From how you describe it, sounds like yours are spread out, so group them by the supply pin they serve and keep the loop short. One thing I never see learners think about: before you finalize anything, print the layout 1:1 on paper and physically set the connectors and the switch on it to check the spacing feels right in the hand. Cheap sanity check, costs you a sheet of paper.
The ground pour advice matched my own experience exactly. When I started out I routed ground like any other trace and spent ages chasing weird behaviour that disappeared once I switched to a pour and vias. It honestly makes routing everything else easier too, since you stop thinking about where the ground return goes. I wish someone had told me that on my first board.
One thing that made the test point advice click for me: on my last little board I skipped them to save space, and when it came back half dead I had nothing to clip a probe to. Ended up scratching away solder mask to reach a pin, miserable. Now I drop a few test pads down before I even start routing, they cost nothing since they are just a dot of copper. Question for you though, from how you describe it, are those connectors only on the bottom layer or did you route them through the top too? That changes how you get everything back to the microcontroller.
The USB connector edge thing is the one that stung me most when I look back at my first board. I had the receptacle sitting well inside the outline, same as you're describing, and it only clicked when I acutally tried plugging a lead in and the overmould just wouldn't reach. Everything else on that board routed fine but the connector placement was decided before I ever started traces, so get that sorted first before you tidy anything else. Which of Phil's Lab videos are you working from, the USB one or the general STM32 intro? I found the general one easier to follow the ordering of steps.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required