Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.
KiCad Raspberry Pi Library: Pi 4, Pico, Zero & CM4 Footprints
Designing custom PCBs for Raspberry Pi boards has become increasingly popular as makers move beyond breadboard prototypes to polished products. Whether you’re creating a HAT for the Raspberry Pi 4, building a carrier board for the CM4, designing around the compact Pi Zero, or embedding the powerful Pico module, finding reliable KiCad Raspberry Pi footprints makes the difference between a successful first spin and frustrating rework.
Unlike some microcontroller ecosystems, the Raspberry Pi Foundation has actually released official KiCad design files for several of their products. The CM4 IO Board KiCad files are fully open source, and reference designs for RP2040 projects include proper symbols and footprints. Combined with well-maintained community libraries, you can find everything needed for virtually any Raspberry Pi KiCad project.
This guide covers the complete landscape of Raspberry Pi footprints for KiCad, from the 40-pin GPIO header shared across most Pi boards to the specialized Hirose connectors on the CM4 to the castellated pads on the Pico.
Understanding Raspberry Pi Form Factors for KiCad
Before selecting libraries, understanding which Raspberry Pi variant you’re designing for helps narrow down what footprints you actually need.
Raspberry Pi Board Comparison
Board
Footprint Type
Connector
Mounting Holes
Primary Use Case
Pi 4 Model B
40-pin GPIO
2×20 header
4x M2.5
HAT/shield design
Pi Zero / Zero W
40-pin GPIO
2×20 header
4x M2.5
uHAT/pHAT design
Pico / Pico W
Castellated pads
40 edge pins
4x M2
Module integration
CM4
Hirose connectors
2x 100-pin BTB
4x M2.5
Carrier board design
RP2040 (chip)
QFN-56
56 pads
N/A
Custom MCU boards
Each form factor requires different footprint approaches. HAT designs for Pi 4 and Zero use the standard GPIO header, while Pico projects might use through-hole headers or surface-mount castellated connections. CM4 carrier boards need the specialized Hirose DF40C-100DP connectors.
Raspberry Pi Pico KiCad Library Options
The Raspberry Pi Pico has become enormously popular for embedded projects, and several excellent KiCad library options exist for integrating it into your designs.
Official Raspberry Pi Pico Design Files
Raspberry Pi provides reference KiCad files that include Pico footprints:
VGA Demo Board KiCad Files: The VGA reference project (datasheets.raspberrypi.com/rp2040/VGA-KiCAD.zip) includes KiCad symbols and footprints for soldering a Pico directly to your PCB.
Minimal RP2040 Design Example: For designs using the bare RP2040 chip rather than the Pico module, Raspberry Pi provides KiCad files (datasheets.raspberrypi.com/rp2040/Minimal-KiCAD.zip) with proper symbol and footprint for the QFN-56 package.
Ki-Lime Pi Library (Recommended)
The most comprehensive Raspberry Pi Pico KiCad library is the Ki-Lime Pi project (github.com/recursivenomad/ki-lime-pi-to-go). This library stands out for several reasons:
Included Variants:
Pico Variant
Symbol
Footprint
Notes
Pico (original)
Yes
Yes
Through-hole and SMD
Pico W
Yes
Yes
WiFi version
Pico H
Yes
Yes
Pre-soldered headers
Pico WH
Yes
Yes
WiFi with headers
The library supports multiple mounting options:
Through-hole pads for using pin headers
SMD pads for castellated edge soldering
Combined TH+SMD for maximum flexibility
ncarandini KiCad-RP-Pico Library
This library (github.com/ncarandini/KiCad-RP-Pico) adds a key feature many others lack: a detailed 3D model. The VRML file enables accurate mechanical clearance checking in KiCad’s 3D viewer, though the large model file can slow performance on older computers.
Pico Footprint Dimensions
Measurement
Value
Board length
51mm
Board width
21mm
Pin pitch
2.54mm (0.1″)
Row spacing
17.78mm
Mounting holes
4x 2.1mm diameter
Castellated pads
40 total
RP2040 KiCad Symbol and Footprint
For custom board designs using the bare RP2040 chip rather than a Pico module, you need the chip-level footprint.
Official RP2040 KiCad Files
The RP2040 datasheet package includes official KiCad files. These come from Raspberry Pi’s reference designs and represent the most accurate source.
RP2040 Package Specifications:
Parameter
Value
Package
QFN-56
Body size
7mm x 7mm
Pitch
0.4mm
Pad count
56 + exposed pad
Thermal pad
3.2mm x 3.2mm
RP2040 Design Considerations
The RP2040 requires careful attention to:
Power Supply Sequencing: The chip needs 1.1V core supply and 3.3V I/O supply with proper sequencing.
Crystal Placement: The 12MHz crystal should sit close to the chip with short, matched traces.
Flash Memory: External QSPI flash connects via dedicated pins with controlled impedance traces.
The Hardware Design with RP2040 guide from Raspberry Pi provides detailed recommendations. For complex designs, consider starting from their minimal design example rather than creating footprints from scratch.
RP2040-Based Module Libraries
Beyond the original Pico, several RP2040 modules have community-created KiCad libraries:
The Raspberry Pi 4 Model B shares the same physical footprint as the Pi 3B+, meaning HAT designs work across both platforms.
Raspberry Pi 4 KiCad GPIO Header
The 40-pin GPIO header footprint is straightforward since it’s a standard 2×20 pin header at 2.54mm pitch. KiCad’s built-in library includes this as “Pin_Header_Straight_2x20” in the Connector_PinHeader library.
However, for HAT designs, you typically need the socket (female) version since your board sits on top of the Pi. Use “Socket_Strip_Straight_2x20” from the Connector_PinSocket library.
HAT Mechanical Specifications
Specification
Value
Board size (HAT)
65mm x 56.5mm
Board size (uHAT)
65mm x 30mm
Mounting hole spacing
58mm x 49mm
Mounting hole diameter
2.75mm (M2.5)
GPIO header offset
3.5mm from edge
Standoff height
10-12mm typical
Community HAT Templates
Several well-maintained KiCad templates provide correctly positioned components:
Xess Corp HAT Template: The original HAT template (widely forked on GitHub) includes the curved PCB outline, mounting holes with soldermask pullbacks, and GPIO socket positioned correctly.
Freetronics Library: The Freetronics KiCad library (github.com/freetronics/freetronics_kicad_library) includes Arduino shield footprints plus Raspberry Pi HAT components, making it useful for projects targeting both platforms.
Raspberry Pi 4 Specific Library
For designs needing the full Pi 4 board footprint (carrier boards or enclosure integration), TheRoam’s library (github.com/TheRoam/Raspberry-Pi-4-library-for-kicad) provides schematic symbols and 3D footprints for the complete Pi 4 board.
Raspberry Pi Zero KiCad Library
The Raspberry Pi Zero KiCad footprint shares the 40-pin GPIO header with larger Pi models but uses a much smaller board outline for the uHAT (micro-HAT) form factor.
Pi Zero Mechanical Specifications
Specification
Value
Board size
65mm x 30mm
Mounting hole spacing
58mm x 23mm
Mounting hole diameter
2.75mm (M2.5)
GPIO header position
Same as full-size Pi
Pi Zero uHAT Template
The kicad-rpiz-uhat-template (github.com/rkprojects/kicad-rpiz-uhat-template) provides:
Correct 65x30mm board outline
Pre-positioned GPIO 40-pin header
Mounting holes at proper locations
No POE keepout (not applicable to Zero)
PiZeroHat Library (USB Access)
The PiZeroHat project (github.com/vasya-zh/PiZeroHat) solves a common Pi Zero challenge: accessing USB directly on HAT boards. It includes:
Standard 2×20 GPIO connector footprint
Pogo pin contact points for USB D+/D- lines
Power input pads for proper USB power delivery
Fixture holes for M2.5 standoffs
This library is particularly valuable for creating standalone Pi Zero devices with onboard USB peripherals.
Raspberry Pi CM4 KiCad Library
The Compute Module 4 represents Raspberry Pi’s most versatile platform for custom designs. Unlike HAT-style add-ons, CM4 carrier boards require specific high-density connectors.
Official CM4 KiCad Design Files
Raspberry Pi released the complete CM4 IO Board design in KiCad format. Download from the CM4 IO Board product page (raspberrypi.com/products/compute-module-4-io-board/).
What’s Included:
Complete schematic with hierarchical sheets
PCB layout with all components
Symbol library for CM4 module
Footprint library including Hirose connectors
3D models (note: CM4 STEP file is 60MB+)
The official files require KiCad 6.0 or later due to the new file format.
CM4 Connector Specifications
Connector
Part Number
Position
Primary (J501)
Hirose DF40C-100DS-0.4V
100-pin, PCIe/USB/power
Secondary (J502)
Hirose DF40C-100DS-0.4V
100-pin, GPIO/display/camera
Both connectors are identical Hirose board-to-board types with 0.4mm pitch. The mating connector on your carrier board is DF40HC-100DP-0.4V(51).
USB 2.0 Routing: The CM4 provides USB 2.0 differential pairs that require 90-ohm impedance matching. KiCad’s pcb_calculator tool helps determine trace width and spacing for your stackup.
PCIe x1: The single PCIe lane supports add-in cards but requires careful attention to high-speed layout rules.
Display/Camera: MIPI DSI and CSI interfaces use fine-pitch flex cables. Position connectors to minimize trace length from the CM4.
Jon Kivinen’s CM4 Carrier Collection
The cm4-carriers repository (github.com/jkiv/cm4-carriers) contains multiple carrier board designs:
Template board for custom designs
cm4-carrier-net: Ethernet + USB-C + microSD
Application-specific variants
These KiCad projects demonstrate real-world CM4 integration and serve as excellent references.
Installing Raspberry Pi KiCad Libraries
Installation methods vary depending on library format and KiCad version.
Method 1: Plugin and Content Manager (KiCad 7+)
Some libraries are available through KiCad’s PCM:
Open KiCad → Plugin and Content Manager
Search for “Raspberry” or “Pico”
Install desired libraries
Libraries appear with “PCM_” prefix
Method 2: Manual Installation
For GitHub-hosted libraries:
Symbol Library:
Download or clone the repository
Go to Preferences → Manage Symbol Libraries
Click folder icon to add existing library
Select the .kicad_sym file
Set an appropriate nickname
Footprint Library:
Go to Preferences → Manage Footprint Libraries
Click folder icon to add existing library
Select the .pretty folder
Use matching nickname for easy association
Method 3: Project-Specific Libraries
For one-off projects, keep libraries in your project folder:
Copy library files to a “libraries” subfolder
Add to Project Specific Libraries tab instead of Global
Use relative paths for portability
Verifying Raspberry Pi Footprints
Never trust downloaded footprints without verification, especially for high-density connectors like the CM4’s Hirose interfaces.
Verification Checklist
Check
Method
Pin spacing
Compare to official mechanical drawings
Mounting holes
Measure against actual board
Connector mating
Test with actual connector if possible
3D clearance
Check in KiCad 3D viewer
DRC clean
Run Design Rules Check
Print Test for GPIO Headers
For HAT and Pico designs:
Print PCB at 1:1 scale on paper
Place actual board/module on printout
Verify all pins align with pads
Check mounting holes alignment
CM4 Connector Verification
The Hirose DF40C connectors are expensive, so verifying footprints before manufacturing is critical:
Where can I find an official Raspberry Pi Pico KiCad footprint?
Raspberry Pi provides official KiCad files in their reference designs. The VGA Demo project (datasheets.raspberrypi.com/rp2040/VGA-KiCAD.zip) includes Pico footprints for soldering the module directly to your board. For the most comprehensive community library with through-hole and SMD options, use the Ki-Lime Pi project from GitHub (github.com/recursivenomad/ki-lime-pi-to-go).
Does KiCad include RP2040 in its standard libraries?
As of KiCad 8, the RP2040 is included in the official symbol libraries. However, for the most accurate footprint matching Raspberry Pi’s reference designs, download the Minimal Design example from Raspberry Pi’s documentation site. The official files ensure compatibility with their tested layouts and manufacturing recommendations.
How do I get the CM4 KiCad footprint for carrier board design?
Download the CM4 IO Board KiCad files from the Raspberry Pi website (raspberrypi.com/products/compute-module-4-io-board). These official files include the complete carrier board design with symbols and footprints for the CM4 module and Hirose connectors. For a simpler starting point, use Shawn Hymel’s carrier template (github.com/ShawnHymel/rpi-cm4-carrier-template) which extracts just the essential components.
Can I use the same KiCad footprint for Raspberry Pi Zero and Pi 4 HAT designs?
Yes, the 40-pin GPIO header is identical between Pi Zero, Pi 3, Pi 4, and Pi 5. The same socket footprint works for all. However, the board outline differs: standard HATs are 65×56.5mm while uHATs for the Pi Zero are 65x30mm. Use the appropriate template for your target form factor, but the GPIO connector footprint itself is interchangeable.
What KiCad version do I need for Raspberry Pi CM4 design files?
The official CM4 IO Board KiCad files require KiCad 6.0 or later due to the new .kicad_sch and .kicad_pcb file formats introduced in version 6. Earlier versions cannot open these files directly. If you’re stuck on KiCad 5, community libraries like Kedarius/RPi-CM4-Kicad provide converted versions, though using KiCad 6+ is strongly recommended for CM4 projects.
Building Professional Raspberry Pi Designs
The Raspberry Pi ecosystem’s commitment to open hardware has produced excellent KiCad resources. Official design files for the CM4 IO Board and RP2040 reference designs give you manufacturer-verified starting points, while community libraries fill gaps for specific modules and form factors.
Start with official sources when available, verify footprints against mechanical drawings before manufacturing, and leverage the community templates to accelerate your design process. Whether you’re creating a simple Pi Zero HAT, a custom RP2040 board, or a complex CM4 carrier, the KiCad libraries covered here provide everything needed for successful Raspberry Pi PCB designs.
Inquire: Call 0086-755-23203480, or reach out via the form below/your sales contact to discuss our design, manufacturing, and assembly capabilities.
Quote: Email your PCB files to Sales@pcbsync.com (Preferred for large files) or submit online. We will contact you promptly. Please ensure your email is correct.
Notes: For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format. For PCB assembly, we require PCB design file in above mentioned format, drilling file and BOM. Click to download BOM template To avoid file missing, please include all files into one folder and compress it into .zip or .rar format.