#
Kicad Tips & Tricks
Summary
KiCad Custom Components KiCad Ground Plane Create a USB plug from the PCB
#
KiCad Custom Components
Version: 9.0
Scope: Schematic Editor (Eeschema)
Target Component: MCU (e.g., WCH CH552G - SOP16 Package)
#
1. Library Initialization
Before creating a symbol, it is best practice to create a project-specific library to keep dependencies portable.
- Open the Symbol Editor from the main KiCad project window.
- Go to File > New Library.
- Select "Project" in the dialog box (this ensures the library is saved within the project folder).
- Name the library (e.g.,
NetRun_Components.kicad_sym) and save it. - The new library will appear in the left-hand list.
#
2. Creating the Symbol
- Right-click on your new library (
NetRun_Components) in the list. - Select New Symbol.
- Symbol Properties configuration:
- Symbol Name:
CH552G - Default Reference Designator:
U(Standard for ICs/MCUs). - Derive from existing symbol: Leave empty (start from scratch).
- Click OK.
- Symbol Name:
#
3. Drawing the Body
- Select the Add Rectangle tool (or press
S). - Draw a rectangle centered on the crosshair anchor.
- Tip: Ensure the rectangle is large enough to accommodate 16 pins with readable spacing.
- Right-click the rectangle > Properties to adjust the background fill (optional: "Fill with body background color").
#
4. Defining Pins (Pin Table Method)
The most efficient way to add pins is using the Pin Table rather than placing them one by one.
- Click the Pin Table icon (looks like a spreadsheet) in the toolbar.
- Add all 16 pins according to the datasheet.
- Crucial Configuration: Set the Electrical Type correctly for ERC (Electrical Rules Check).
Note: Pins 12/13 (USB) are essentially Data pairs, often marked as Bidirectional.
#
5. Finalizing and Saving
- Close the Pin Table.
- Arrange the pins visually if needed (drag and drop).
- Position the Value (
CH552G) and Reference (U) text fields outside the rectangle. - Press
Ctrl+Sto save.
#
6. Integration
- Open your main Schematic Editor.
- Press
Ato add a component. - Search for
CH552G(it should appear under yourNetRun_Componentslibrary). - Place it on the sheet.
#
KiCad Ground Plane
Version: 9.0
Scope: PCB Editor (Pcbnew)
Objective: Create a global GND plane to automatically connect all GND pads via thermal reliefs.
#
1. Prerequisite
Ensure your schematic has been updated to the PCB (F8) and that you have a Net named GND in your netlist.
#
2. Defining the Zone
- Select the Add Filled Zone tool from the right toolbar (shortcut:
Ctrl+Shift+Z). - Click on one corner of your board outline (outside or exactly on the
Edge.Cutsline). - The Copper Zone Properties dialog will open. Configure as follows:
- Layer: Select
F.Cu(Front Copper) and/orB.Cu(Back Copper).- Note: For a 2-layer board, it is common practice to flood both layers with GND.
- Net: Search for and select
GND. - Smoothing:
Fillet(Optional, for rounded corners). - Electrical Properties:
- Clearance:
0.2mm(or typically follows Design Rules). - Pad Connections:
Thermal relief(Makes soldering easier by not dissipating heat too fast).
- Clearance:
- Layer: Select
- Click OK.
#
3. Drawing the Outline
- Your cursor is now in drawing mode.
- Trace a rough polygon around your entire PCB.
- You do not need to be precise; you can draw a large rectangle outside the PCB
Edge.Cuts. KiCad will automatically clip the copper to the board edge. - Double-click to close the polygon loop.
#
4. Filling the Zone
- At this stage, you only see the hatched outline (the zone is empty).
- Press the
Bkey on your keyboard (Refill all zones). - KiCad will calculate the geometry and flood the board with copper.
#
5. Verification
- Check Connectivity: Look at your
GNDpads (e.g., on the USB port or MCU). They should now be connected to the surrounding copper by 4 small spokes (Thermal Reliefs). - Check Ratnest: The thin white lines indicating unconnected GND nets should disappear.
- Visibility: If the filled copper makes it hard to see tracks, you can toggle the display of zone fills using the "Show only zone boundaries" button on the left toolbar.
#
6. Troubleshooting
- Islands (Dead Copper): If a part of the zone is not connected to the main GND point, KiCad might remove it (depending on settings) or leave it floating.
- Fix: Use "Vias" to stitch the Top GND plane to the Bottom GND plane to ensure continuity everywhere.
- DRC Errors: Run the Design Rules Checker to ensure the copper pour doesn't create shorts or violate clearance rules.
#
Create a USB plug from the PCB
Version: 9.0
Scope: PCB Editor (Pcbnew)
Objective: Create a USB plug from the PCB
First you need to open the Symbol Editor, then create a new library [global]. Once you're on the Symbol Editor, you can create a new symbol.
#
Add Pins
- Click on the pin tool
- Add pins with the following properties:
- Add rectangle and fill it with background color
- Add extra text for later use.
#
Create Footprint
- Footprint Editor
- Create a new library [global]
- Create a new footprint
- Add pads with the following properties:
Typo in the footprint
I messed up the PIN order on the screenshot, you need to invert pin 2 and 3.
#
Create PCB
- Add the USB symbol to the schematic
- Link the footprint to the symbol
- Open the PCB Designer
- Import Schematics to the PCB
For this example, I created a rectangle using the Edge Cuts of the PCB of 40mm x 12.2mm.
