| KNOWLEDGE BASE

A rich source of expert knowledge

Learn from experts in the world of embedded systems

KiCad STM32 + RF + USB Hardware Design - Phil's Lab #5

Overview of STM32, RF, and USB hardware design, schematic creation, and PCB layout and routing in KiCad using a real-world example project.

Various tips on controlled impedance routing, differential pairs, USB, and RF layout. Correction in schematic: NRF24 IREF pin needs to be pulled low to GND via a 10k resistor (not to 3V3 as shown in the video!). Fix has been pushed to GitHub.
Chapters:
  • 00:00System overview, component selection
  • 03:15STM32 pin-out and peripheral selection
  • 04:10Schematic sectioning
  • 04:48Power supply (power via USB, filtering, USB decoupling caps)
  • 06:45STM32 microcontroller (USB connections and terminations, SPI, LEDs, decoupling)
  • 09:55SWD (Serial Wire Debug) connector
  • 10:45USB connector and ESD protection
  • 13:11NRF24 RF transceiver
  • 14:40Extern crystal (load capacitor calculation)
  • 15:57RF antenna matching circuit
  • 17:31Component selection and sizing
  • 19:24Rough layout and sectioning (USB, power, microcontroller, and RF)
  • 20:37Component placement order (most 'critical' components first)
  • 21:30USB ESD protection placement
  • 21:42RF layout
  • 22:16Determining board outline (size and rounded edges)
  • 22:42Fine-tuning the layout
  • 23:24Layer stack-up (4 layer board)
  • 24:16Sectioning (USB, power, microcontroller, and RF), track widths, and clearance
  • 25:17Power and ground via connections to copper pours
  • 26:00Ground and power planes
  • 26:43Power supply routing
  • 27:26STM32 routing
  • 28:15Crystal routing
  • 29:40RF and USB routing (trace impedance, differential routing, ground pours)
  • 36:53RF guard ring
  • 38:45Clearance between traces
  • 39:25Via-in-pad
  • 40:05Labelling and logo
  • 40:40Marking 'pin 1' locations
  • 40:53Marking diode polarity
  • 41:42Checking your work
  • 42:00Gerber and drill file export
  • 42:25Footprint positions file (for assembly)
  • 42:49Bill of materials (BOM)
  • 43:10Gerber file check (via GerbView)