4.5 KiB
KiCad PCB Design Analysis Guide
This guide explains how to use the PCB design analysis features in the KiCad MCP Server.
Overview
The PCB design analysis functionality allows you to:
- Extract and analyze information from schematics
- Validate projects for completeness and correctness
- Get insights about components and connections
- Understand PCB layout characteristics
Quick Reference
Task | Example Prompt |
---|---|
Get schematic info | What components are in my schematic at /path/to/project.kicad_sch? |
Validate project | Validate my KiCad project at /path/to/project.kicad_pro |
Analyze PCB | Analyze the PCB layout at /path/to/project.kicad_pcb |
Using PCB Analysis Features
Schematic Information
To extract information from a schematic:
What components are in my schematic at /path/to/project.kicad_sch?
This will provide:
- A list of all components in the schematic
- Component values and footprints
- Connection information
- Basic schematic structure
Example output:
# Schematic: my_project.kicad_sch
## Components (Estimated Count: 42)
(symbol (lib_id "Device:R") (at 127 87.63 0) (unit 1)
(symbol (lib_id "Device:C") (at 142.24 90.17 0) (unit 1)
(symbol (lib_id "MCU_Microchip_ATmega:ATmega328P-PU") (at 170.18 88.9 0) (unit 1)
... and 39 more components
Project Validation
To check a project for issues:
Validate my KiCad project at /path/to/project.kicad_pro
The validation checks for:
- Missing project files
- Required components (schematic, PCB)
- Valid file formats
- Common structural issues
This is useful for identifying problems before opening files in KiCad.
PCB Layout Analysis
To analyze a PCB layout:
Analyze the PCB layout at /path/to/project.kicad_pcb
This will provide information about:
- Board dimensions
- Layer structure
- Component placement
- Trace characteristics
- Via usage
Available Resources
The server provides several resources for accessing design information:
kicad://schematic/{schematic_path}
- Information from a schematic filekicad://pcb/{pcb_path}
- Information from a PCB file
These resources can be accessed programmatically by other MCP clients or directly referenced in conversations.
Tips for Better Analysis
Focus on Specific Elements
You can ask for analysis of specific aspects of your design:
What are all the resistor values in my schematic at /path/to/project.kicad_sch?
Show me all the power connections in my schematic at /path/to/project.kicad_sch
Integration with Other Features
Combine analysis with other features for better insights:
- Analyze a schematic first to understand component selection
- Check the BOM for component availability and cost
- Run DRC checks to find design rule violations
- View the PCB thumbnail for a visual overview
Common Analysis Tasks
Finding Specific Components
To locate components in your schematic:
Find all decoupling capacitors in my schematic at /path/to/project.kicad_sch
This helps with understanding component usage and ensuring proper design practices.
Identifying Signal Paths
To trace signals through your design:
Trace the clock signal path in my schematic at /path/to/project.kicad_sch
This helps with understanding signal flow and potential issues.
Board Metrics
To get metrics about your PCB:
What are the dimensions of my PCB at /path/to/project.kicad_pcb?
How many vias are in my PCB at /path/to/project.kicad_pcb?
Troubleshooting
Schematic Reading Errors
If the server can't read your schematic:
- Verify the file exists and has the correct extension (.kicad_sch)
- Check if the file is a valid KiCad schematic
- Ensure you have read permissions for the file
- Try the analysis on a simpler schematic to isolate the issue
PCB Analysis Issues
If PCB analysis fails:
- Check if the PCB file exists and has the correct extension (.kicad_pcb)
- Ensure the PCB file is not corrupted
- Check for complex features that might cause parsing issues
- Try a simplified PCB to isolate the problem
Advanced Usage
Design Reviews
Use the analysis features for comprehensive design reviews:
Review the power distribution network in my schematic at /path/to/project.kicad_sch
Check my PCB at /path/to/project.kicad_pcb for potential EMI issues
Custom Analysis Scripts
For advanced users:
- Use the schematic and PCB analysis tools to extract data
- Ask for specific analytical insights on that data
- Request recommendations based on the analysis