KiCad Tutorial
| KiCad Tutorial | |
|---|---|
| Competency | PCB Design |
| Difficulty | Beginner |
| Time Required | 3-6 hours (spread across multiple sessions) |
| Prerequisites | Electronics Fundamentals - Understanding of circuits, components, schematics |
| Materials Needed | KiCad (free download), computer, practice project (LED breakout board) |
| Next Steps | Design custom board for your robot, study SimpleBot PCB design, order boards from JLCPCB |
KiCad Tutorial is your complete guide to designing your first printed circuit board (PCB) from start to finish. This tutorial walks you through KiCad, a free and powerful PCB design tool, using a simple LED breakout board project.
By the end of this tutorial, you'll:
- Install and configure KiCad
- Create a schematic with components and connections
- Assign footprints to components
- Layout a PCB with proper trace routing
- Generate Gerber files for manufacturing
- Order your PCB from an online manufacturer
This tutorial is hands-on. You'll design a complete, manufacturable PCB that you can order and assemble.
Part 1: Installing KiCad
Download and Install
- Visit KiCad Downloads
- Download the latest stable version for your operating system
- Run the installer (accept defaults)
- Launch KiCad
Note: This tutorial uses KiCad 7.x or 8.x. Interface may differ slightly in older versions.
First Launch Setup
When you first launch KiCad:
- Select default library paths (click OK/Next)
- KiCad will download symbol and footprint libraries (this may take a few minutes)
- You'll see the KiCad project manager window
Understanding KiCad's Interface
KiCad has several tools (all launched from the project manager):
- Schematic Editor - Draw circuit diagrams
- Symbol Editor - Create/edit component symbols
- PCB Editor - Layout physical board
- Footprint Editor - Create/edit component footprints
- Gerber Viewer - Preview manufacturing files
Workflow: Schematic → Footprint Assignment → PCB Layout → Gerber Export
Part 2: Creating a New Project
Project: LED Breakout Board
We'll design a simple LED breakout board:
- Input: 5V and GND via screw terminal
- Components: Current-limiting resistor, LED, header pins for output
- Output: LED indicator, 5V/GND headers for connecting to other boards
This teaches fundamental PCB design skills without overwhelming complexity.
Create the Project
- Click File → New Project
- Name it:
led_breakout - Choose a location to save it
- Click Create
You'll see two files created:
led_breakout.kicad_sch- Schematic fileled_breakout.kicad_pcb- PCB layout file
Part 3: Schematic Design
Launch the Schematic Editor
- Double-click
led_breakout.kicad_schin the project manager - You'll see a blank grid with a title block in the corner
Adding Components (Symbols)
We need these components:
- 1× LED
- 1× Resistor (220Ω)
- 1× Screw terminal (2-position)
- 1× Pin header (1×3, for 5V/LED/GND output)
- Power symbols (VCC, GND)
Adding the LED:
- Press A (Add symbol shortcut) or click the "Place Symbol" icon
- Type "LED" in the search box
- Select Device:LED from the list
- Click to place it on the schematic (middle of the grid)
- Press ESC to exit placement mode
Adding the resistor:
- Press A again
- Type "R" in the search box
- Select Device:R (resistor)
- Place it to the left of the LED
- Press ESC
Adding the screw terminal:
- Press A
- Type "screw terminal" or "conn_01x02"
- Select Connector:Screw_Terminal_01x02 (2-position terminal)
- Place it on the far left
- Press ESC
Adding the output header:
- Press A
- Type "conn_01x03"
- Select Connector_Generic:Conn_01x03 (3-pin header)
- Place it on the far right
- Press ESC
Adding power symbols:
- Press P (Power symbol shortcut)
- Type "VCC"
- Select power:VCC
- Place above the screw terminal
- Press P again
- Type "GND"
- Select power:GND
- Place below the screw terminal and near the LED
Your schematic should have: screw terminal (left) → resistor → LED → header (right), with VCC/GND symbols.
Connecting Components (Wiring)
Now connect the components with wires (nets):
- Press W (Wire tool) or click "Place Wire" icon
- Click on the screw terminal pin 1 (top pin)
- Click on the VCC symbol (creates a connection)
- Press ESC to exit wire mode
Repeat for all connections:
- Screw terminal pin 1 → VCC symbol
- Screw terminal pin 2 → GND symbol (bottom)
- VCC → Resistor pin 1 (left side)
- Resistor pin 2 (right side) → LED anode (top pin, triangle side)
- LED cathode (bottom pin, bar side) → GND
- VCC → Header pin 1
- LED anode → Header pin 2 (LED output)
- GND → Header pin 3
Tips:
- Wires connect when you click directly on a pin (pink circle appears)
- Press ESC to cancel wire placement
- Move components with M (grab and move)
Annotating Components
Components need unique reference designators (R1, D1, J1):
- Click Tools → Annotate Schematic
- Click Annotate button (uses defaults)
- Click Close
Your components now have designators:
- J1 (screw terminal)
- R1 (resistor)
- D1 (LED)
- J2 (header)
Setting Component Values
Assign values to resistor and LED:
- Hover over R1 and press V (Value shortcut)
- Type "220" (220 ohms)
- Press Enter
- Hover over D1 and press V
- Type "Red LED" or just "LED"
- Press Enter
Adding Title Block Information
- Click File → Page Settings
- Fill in:
- Title: "LED Breakout Board"
- Date: (auto-filled)
- Revision: "1.0"
- Company: (your name or "BRS")
- Click OK
Electrical Rules Check (ERC)
Check for errors before moving to PCB layout:
- Click Inspect → Electrical Rules Checker
- Click Run ERC
- Review any errors or warnings
- Fix errors (warnings about unused pins are usually OK)
- Click Close
Common errors:
- Unconnected pins - Make sure all wires connect to pins (pink circle at connection)
- Missing power flags - Can ignore for this simple circuit
Save Your Schematic
- Press Ctrl+S or click File → Save
Your schematic is complete! Next: assign footprints.
Part 4: Footprint Assignment
Understanding Footprints
Schematic symbols show logical connections (how components connect). Footprints show physical layout (where pads/holes are on the PCB).
Each component needs a footprint:
- LED → 5mm through-hole LED footprint
- Resistor → Axial resistor footprint
- Screw terminal → 5mm pitch screw terminal
- Header → 2.54mm pin header
Open Footprint Assignment Tool
- In schematic editor, click Tools → Assign Footprints
- You'll see a list of components on the left, libraries in the middle, footprints on the right
Assigning Footprints
For each component, select it (left column), then double-click the footprint (right column):
J1 (Screw Terminal):
- Select J1 in left column
- Middle column: scroll to TerminalBlock_Phoenix
- Right column: double-click TerminalBlock_Phoenix_MKDS-1,5-2_1x02_P5.00mm_Horizontal
- This is a 2-position, 5mm pitch screw terminal
R1 (Resistor):
- Select R1
- Middle column: scroll to Resistor_THT
- Right column: double-click R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_Horizontal
- This is a standard through-hole resistor footprint
D1 (LED):
- Select D1
- Middle column: scroll to LED_THT
- Right column: double-click LED_D5.0mm
- This is a standard 5mm LED footprint
J2 (Header):
- Select J2
- Middle column: scroll to Connector_PinHeader_2.54mm
- Right column: double-click PinHeader_1x03_P2.54mm_Vertical
- This is a 3-pin, 2.54mm pitch (0.1") header
Verify Assignments
All components should now have footprints listed in the left column. If any show "No Footprint", assign one.
- Click OK to save footprint assignments
- Close the footprint assignment window
Save and Update PCB
- In schematic editor, press Ctrl+S to save
- Click Tools → Update PCB from Schematic (or press F8)
- Click Update PCB
- Click Close
This generates a netlist and sends it to the PCB editor.
Part 5: PCB Layout
Open PCB Editor
- In project manager, double-click
led_breakout.kicad_pcb - You'll see a blank workspace
Import Components from Schematic
If you followed the "Update PCB from Schematic" step, components should already be imported. If not:
- In PCB editor, click Tools → Update PCB from Schematic
- Click Update PCB
- All components appear in a cluster near the origin
Setting Up the Board
Before placing components, set up the PCB:
Set design rules:
- Click File → Board Setup
- Left panel: click Constraints
- Set minimum values (for JLCPCB/PCBWay standard):
- Minimum Clearance: 0.2mm
- Minimum Track Width: 0.2mm
- Minimum Via Diameter: 0.8mm
- Minimum Via Drill: 0.4mm
- Click OK
Select layers: For this beginner project, use 2 layers (F.Cu = top, B.Cu = bottom).
Drawing the Board Outline
Define the physical board shape:
- Select Edge.Cuts layer (dropdown in top toolbar)
- Click Draw a Rectangle tool (right toolbar)
- Click to start at (0, 0)
- Click to end at (40mm, 25mm) - creates a 40mm × 25mm rectangle
- This is your board outline
Tips:
- Grid helps with alignment (default 1mm is fine)
- Switch to mm units if needed (bottom status bar)
Placing Components
Arrange components logically on the board:
- Switch to F.Cu layer (top copper)
- Press M (move) and click a component to move it
- Press R while moving to rotate component
Suggested layout:
- J1 (screw terminal) - Left edge, centered vertically
- R1 (resistor) - Middle, horizontal orientation
- D1 (LED) - Right of resistor, vertical orientation
- J2 (header) - Right edge, vertical
Layout strategy:
- Inputs (screw terminal) on one side
- Outputs (header) on opposite side
- Flow left-to-right matches schematic
Routing Traces (Connecting Components)
Ratsnest lines (thin white lines) show which pads need to be connected.
- Select F.Cu layer
- Press X (Route tracks tool)
- Click on a pad to start a trace
- Follow the ratsnest line to the destination pad
- Click on destination pad to complete connection
- Press ESC to finish
Route all connections:
- J1 pin 1 → R1 left pad (this is the VCC net)
- R1 right pad → D1 anode (top pad)
- D1 cathode → J1 pin 2 (GND net)
- Branch VCC to J2 pin 1
- Branch LED anode to J2 pin 2
- Branch GND to J2 pin 3
Trace width:
- For this low-current circuit, default 0.25mm traces are fine
- To change: Press W while routing to cycle through widths
Tips:
- Route on F.Cu (top) layer when possible
- Use vias to switch layers if traces cross (press V while routing)
- Press / while routing to switch between 45° and free-angle modes
Adding a Ground Plane (Copper Pour)
A ground plane improves power distribution and reduces noise:
- Select F.Cu layer
- Press Ctrl+Shift+Z (Add filled zone tool) or click "Add Filled Zone" icon
- Click to start zone around the board edge
- Follow the board outline (click each corner)
- Double-click to close the zone
- In the dialog:
- Net: select GND
- Clearance: 0.3mm
- Minimum width: 0.2mm
- Click OK
The ground plane fills all unused copper with GND connection.
- Press B to rebuild all copper zones
Repeat for bottom layer (B.Cu) if desired (also connect to GND).
Adding Mounting Holes
Mounting holes let you attach the PCB to a chassis:
- Press Ctrl+Shift+A (Add footprint) or click "Add Footprint" icon
- Type "MountingHole"
- Select MountingHole:MountingHole_3.2mm_M3
- Place in four corners (inside the board outline)
Press ESC when done.
Adding Text (Silkscreen)
Add labels to identify the board:
- Select F.Silkscreen layer (front silkscreen)
- Press Ctrl+Shift+T (Add text) or click "Add Text" icon
- Type "LED Breakout v1.0"
- Click to place near top edge
- Press ESC
Add polarity labels:
- "+" near VCC connections
- "-" near GND connections
- "LED OUT" near J2 pin 2
Tips:
- Keep silkscreen text away from pads (0.5mm clearance)
- Use F.Silkscreen for top, B.Silkscreen for bottom
Design Rule Check (DRC)
Check for errors before manufacturing:
- Click Inspect → Design Rules Checker
- Click Run DRC
- Review errors and warnings:
- Errors (red) - Must fix
- Warnings (yellow) - Review, may be OK
- Fix any errors:
- Traces too close? Reroute with more spacing
- Unconnected nets? Route missing traces
- Re-run DRC until no errors
- Click Close
3D Preview
View your board in 3D:
- Click View → 3D Viewer (or press Alt+3)
- Rotate view with mouse (left-click drag)
- Inspect component placement and board appearance
- Close 3D viewer when satisfied
Part 6: Generating Gerber Files
Understanding Gerber Files
Gerber files are the industry-standard format for PCB manufacturing. They describe:
- Copper layers (traces and pads)
- Soldermask (green coating)
- Silkscreen (white text)
- Board outline (cut shape)
- Drill holes
Exporting Gerbers
- In PCB editor, click File → Fabrication Outputs → Gerbers (.gbr)
- In the dialog:
- Output directory:
gerbers/ - Layers to export: Check these:
- F.Cu (front copper)
- B.Cu (back copper)
- F.Paste (front solder paste - optional)
- B.Paste (back solder paste - optional)
- F.Silkscreen (front silkscreen)
- B.Silkscreen (back silkscreen)
- F.Mask (front soldermask)
- B.Mask (back soldermask)
- Edge.Cuts (board outline)
- Format: 4.6, unit mm (defaults are fine)
- Check "Use Protel filename extensions" (JLCPCB/PCBWay prefer this)
- Output directory:
- Click Plot
- Click Generate Drill Files
- Format: Excellon (default)
- Units: Millimeters
- Zeros: Decimal format
- Click Generate Drill File
- Click Close
You now have Gerber files in the gerbers/ folder.
Zipping Gerber Files
Manufacturers need all Gerbers in a single ZIP file:
- Navigate to your project folder →
gerbers/subfolder - Select all .gbr and .drl files
- Right-click → Send to → Compressed (zipped) folder
- Name it:
led_breakout_gerbers.zip
This ZIP file is ready to upload to a manufacturer.
Part 7: Ordering Your PCB
Choosing a Manufacturer
Recommended beginner-friendly manufacturers:
- JLCPCB - $2 for 5 boards, fast shipping (1-2 weeks)
- PCBWay - Similar pricing, good quality
- OSH Park - USA-based, $5 per sq inch, purple boards
This tutorial uses JLCPCB (most popular for hobbyists).
Ordering from JLCPCB
- Visit JLCPCB.com
- Click Instant Quote
- Click Add Gerber File and upload
led_breakout_gerbers.zip - JLCPCB auto-detects settings:
- Size: 40mm × 25mm (from your board outline)
- Layers: 2
- Quantity: 5 boards (default minimum)
- Select options:
- PCB Color: Green (cheapest), or choose Blue/Red/Black (+$2)
- Surface Finish: HASL (default, fine for through-hole)
- PCB Thickness: 1.6mm (default)
- Review price (typically $2-5 for 5 boards)
- Add shipping (varies by location, $5-20)
- Click Save to Cart
- Checkout and pay
Waiting for Delivery
- Production: 1-3 days
- Shipping: 1-2 weeks (standard), 3-7 days (expedited)
- Tracking: Emailed when shipped
Part 8: Assembling Your PCB
When your boards arrive:
Gather Components
Order components to match your design:
- 1× 220Ω resistor (1/4W through-hole)
- 1× 5mm red LED
- 1× 2-position 5mm screw terminal
- 1× 1×3 pin header (2.54mm pitch)
Where to buy:
- Mouser, Digikey (exact parts, fast shipping, minimum order fees)
- Amazon, eBay (component kits, slower shipping, no fees)
Soldering Components
Follow Soldering tutorial for technique. Assembly order:
- Resistor - Bend leads, insert, solder, trim
- LED - Mind polarity! Long leg = anode (+), short leg = cathode (-)
- Screw terminal - Insert, solder (requires more heat)
- Pin header - Insert, solder
Testing
- Connect 5V power supply to screw terminal (+ to top, - to bottom)
- LED should light up
- Measure voltage at header pins with multimeter:
- Pin 1: ~5V (VCC)
- Pin 2: ~2V (LED forward voltage)
- Pin 3: 0V (GND)
Troubleshooting:
- LED not lighting? Check polarity, test LED separately
- No voltage? Check solder joints for cold joints (dull, not shiny)
- Short circuit? Check for solder bridges between pads
Part 9: Next Steps
Congratulations! You've designed, ordered, and assembled your first PCB. Next:
Design a Custom Board for Your Robot
Apply your skills to a real project:
- Design a sensor breakout board for SimpleBot
- Create a motor driver board
- Design a main board integrating MCU, sensors, and power
Study Existing Designs
Learn from production-quality PCBs:
- SimpleBot PCB design (files in
./simplebot/kicad/)- Study component placement strategy
- Observe trace routing and ground plane usage
- Note silkscreen labeling
Learn Advanced Techniques
Expand your PCB design skills:
- SMD components - Surface-mount devices for compact boards
- 4-layer boards - Internal power and ground planes
- High-current traces - Calculate trace width for motor drivers
- Impedance control - High-speed signal integrity
- PCBA services - Let manufacturers assemble SMD boards
Contribute to the BRS community:
- Document your PCB on the wiki
- Share KiCad files on GitHub
- Write an Implementation page
- Help others learn PCB design
Common Beginner Mistakes
- Wrong footprint dimensions - Always verify footprints with calipers or datasheets before ordering
- Forgetting board outline - No Edge.Cuts layer = manufacturer can't cut your board
- Missing connections - Run DRC to find unrouted nets
- Traces too narrow - Use at least 0.2mm (wider for high current)
- No ground plane - Increases noise, makes routing harder
- Overlapping silkscreen - Text on pads won't print correctly
- Reversed component polarity - Double-check LED, capacitor, IC orientation
- Forgetting mounting holes - Can't attach board to chassis
Troubleshooting Tips
- Ratsnest lines everywhere? Press N to show/hide ratsnest (airwires)
- Can't route a trace? Switch layers with V (via) or rearrange components
- DRC errors won't clear? Zoom in closely - errors are marked with small icons
- Gerber upload fails? Ensure Edge.Cuts layer is included (board outline)
- Board too expensive? Reduce size to <100mm × 100mm for cheapest pricing
- Components don't fit? Verify footprints - measure physical parts with calipers
KiCad Keyboard Shortcuts Reference
Schematic Editor
- A - Add symbol (component)
- P - Add power symbol
- W - Wire (connect components)
- L - Label net (name wires)
- M - Move component
- R - Rotate component
- V - Edit value (resistor value, etc.)
- Ctrl+S - Save
- F8 - Update PCB from schematic
PCB Editor
- M - Move component
- R - Rotate component
- X - Route track (trace)
- V - Add via (while routing)
- W - Change track width (while routing)
- / - Change routing mode (45° / free angle)
- Ctrl+Shift+Z - Add filled zone (copper pour)
- B - Rebuild all copper zones
- N - Toggle ratsnest display
- Alt+3 - 3D viewer
Tools and Resources
Essential Software
- KiCad (Free) - Download
- PDF reader - View component datasheets
Component Suppliers
- Mouser - mouser.com (USA)
- Digikey - digikey.com (USA)
- LCSC - lcsc.com (China, cheap, slow shipping)
PCB Manufacturers
- JLCPCB - jlcpcb.com ($2 for 5 boards)
- PCBWay - pcbway.com
- OSH Park - oshpark.com (USA-based)
Learning Resources
- KiCad Official Documentation
- Contextual Electronics - KiCad video tutorials
- Phil's Lab - PCB design tutorials
- EEVblog KiCad Forum - Community support
Design Files for This Tutorial
If you want to compare your work or download a complete reference design:
- LED Breakout KiCad project (schematic, PCB, Gerbers)
- Available in BRS repository:
./pcb_examples/led_breakout/(if created)
Expanding Your Skills
After mastering this tutorial, try these progressively challenging projects:
Beginner+
- Power indicator board - Add multiple LEDs, different colors
- Sensor breakout - IR sensor + headers
- Button array - 4 buttons + pull-up resistors + header
Intermediate
- Motor driver board - TB6612FNG IC + terminal blocks + logic inputs
- Voltage regulator board - LM7805 IC + capacitors + heatsink
- Sensor array - 4× IR sensors + multiplexer IC
Advanced
- Robot main board - MCU + sensors + motor driver + power (like SimpleBot)
- SMD practice board - Recreate LED breakout with 0805 resistor, SMD LED
- Programmable board - ESP32 module + USB-to-serial + sensors
See Also
- PCB Design - Full competency overview
- Electronics - Understand circuits before designing PCBs
- Soldering - Assemble your PCBs after ordering
- SimpleBot - Study a production robot PCB design