Skip to main content

KiCad Like a Pro – Getting Started (Extract)

Page 1

KiCad Like a Pro Getting Started

From Your First Design to a Finished PCB

● Peter Dalmaris


● © Copyright 2026 Elektor International Media 1st edition 2026

● All rights reserved.

The contributions published in this book, in particular all essays and articles, as well as all designs, plans, drawings, and illustrations, are protected by copyright. Their reproduction and distribution, even in part, is generally only permitted with the prior written consent of the publisher. The information in this book is published without regard to any potential patent protection. Software and hardware designations mentioned in this book may be registered trademarks, even if not specifically indicated. They belong to their respective trademark holders and are subject to legal regulations. The greatest care has been taken in compiling the texts and illustrations. Nevertheless, errors cannot be completely ruled out. The publisher, editors, and author cannot assume any legal responsibility or liability whatsoever for incorrect information and its consequences. The publisher and author are grateful for notification of any errors. The author, translator, and publisher have made every effort to ensure the accuracy of the information contained in this book. They accept no liability for any loss or damage caused by errors or omissions in this book, regardless of whether such errors or omissions are due to negligence, oversight, or any other cause, and hereby disclaim all liability to third parties.

● C over design: Elektor, Aachen Editor: Elektor Team

Printers: Ipskamp, Enschede, The Netherlands

● ISBN 978-3-89576-790-6 (Print)

978-3-89576-791-3 (eBook) 978-3-89576-792-0 (ePUB)

● Copyright 2026 Elektor International Media - www.elektor.com ●4


● Disclaimer: The projects and procedures described in this book involve electronic circuits and, in par-

ticular, vacuum tube equipment, which may contain hazardous voltages. Many devices operate directly from the mains supply and can retain dangerous high voltages in charged capacitors even after they have been switched off. Improper handling may result in serious personal injury, damage to property, or destruction of equipment. The procedures described in this book should therefore only be carried out by readers who possess the necessary technical knowledge or who fully understand the associated risks. Every effort has been made to ensure that the information, circuit descriptions, and recommendations in this book are accurate and reliable. However, no guarantee can be given that the contents are complete or free from errors. Any practical application of the information provided is entirely at the reader's own risk. The author accepts no liability for personal injury, property damage, financial loss, or any other damage arising directly or indirectly from the use of the information contained in this book, to the extent permitted by applicable law. When restoring or repairing vintage electronic equipment, you may encounter materials and components that are now considered hazardous to health or the environment. Examples include certain insulation materials, tar based compounds, older capacitors, and other components containing potentially harmful substances. Always follow the applicable safety regulations and use appropriate protective equipment when handling such materials. Throughout this book, I refer to specific companies and products that I personally use. This is solely intended to provide a starting point for your own decisions. There are always alternative products that may be better suited to your particular application. For the avoidance of doubt, I have never received, and will not receive, any commissions, gifts, or other incentives for mentioning any company, product, or service in this book. Please familiarize yourself with the applicable regulations governing the disposal of any chemicals used or mentioned in this book, and ensure that all relevant legal requirements are followed. All photographs in this book were taken by me and depict circuit boards and equipment from my own collection.

Elektor is the world's leading source of essential technical information and electronics products for pro engineers, electronics designers, and the companies seeking to engage them. Each day, our international team develops and delivers high-quality content — via a variety of media channels (including magazines, video, digital media, and social media) in several languages — relating to electronics design and DIY electronics. www.elektormagazine.com

●5


Contents How this book is organised ���������������������������������������������������������������������������������������14 How numbers work in this book �������������������������������������������������������������������������������14 Topics that continue in a later book �������������������������������������������������������������������������14 Introduction �������������������������������������������������������������������������������������������������������������15 What you will learn �������������������������������������������������������������������������������������������������15 How the book is laid out �����������������������������������������������������������������������������������������16 How to read this book ���������������������������������������������������������������������������������������������16 What you will need �������������������������������������������������������������������������������������������������17 Why KiCad? �����������������������������������������������������������������������������������������������������������17 Part A: Getting Started: Your First PCBs �������������������������������������������������������������������20 A1 What a PCB is and how it’s made �������������������������������������������������������������������������21 A1.1 PCB anatomy �������������������������������������������������������������������������������������������21 A1.1.1 A board is a sandwich of layers �����������������������������������������������������������22 A1.1.2 The substrate �����������������������������������������������������������������������������������22 A1.1.3 Copper: tracks and traces �������������������������������������������������������������������23 A1.1.4 Pads, holes, and the two ways to mount a part �������������������������������������23 A1.1.5 Vias �������������������������������������������������������������������������������������������������25 A1.1.6 Soldermask ���������������������������������������������������������������������������������������26 A1.1.7 Silkscreen �����������������������������������������������������������������������������������������27 A1.1.8 Surface finish �����������������������������������������������������������������������������������27 A1.1.9 Mounting holes, copper pours, and thermal relief �����������������������������������28 A1.2 The Design → Fabrication → Assembly Pipeline �������������������������������������������28 A1.2.1 Design: what you do in KiCad �������������������������������������������������������������29 A1.2.2 Fabrication: handing off to the factory �������������������������������������������������29 A1.2.3 Assembly: putting the parts on �����������������������������������������������������������29 A1.3 Installing KiCad �����������������������������������������������������������������������������������������30 A1.4 The Project Manager and the Apps ���������������������������������������������������������������30 A2 A Hands-On Tour: Schematic �������������������������������������������������������������������������������32 A2.1 The schematic workflow at a glance �������������������������������������������������������������33 A2.2 The 8-Step Pass ���������������������������������������������������������������������������������������33 A2.2.1 Step 1: Create the project and schematic ���������������������������������������������33 A2.2.2 Step 2: Place symbols �����������������������������������������������������������������������35 A2.2.3 Step 3: Annotate �������������������������������������������������������������������������������39 A2.2.4 Step 4: Set component values �������������������������������������������������������������40 A2.2.5 Step 5: Wire and label �����������������������������������������������������������������������41 A2.2.6 Step 6: Assign footprints �������������������������������������������������������������������42 A2.2.7 Step 7: Electrical rules check ���������������������������������������������������������������44 A2.2.8 Step 8: Hand off to layout �������������������������������������������������������������������46

●6


Contents A2.3 Explainer: How the blinker works ����������������������������������������������������������������46 A3 A Hands-On Tour: Layout �������������������������������������������������������������������������������������48 A3.1 The Layout Workflow at a Glance �����������������������������������������������������������������49 A3.2 The 8-Step pass to Gerbers �����������������������������������������������������������������������49 A3.2.1 Step 1: Import from the schematic �����������������������������������������������������49 A3.2.2 Step 2: Set up the board outline ���������������������������������������������������������52 A3.2.3 Step 3: Place components �������������������������������������������������������������������53 A3.2.4 Step 4: Route the tracks ���������������������������������������������������������������������56 A3.2.5 Step 5: Add copper fills ���������������������������������������������������������������������58 A3.2.6 Step 6: Design rules check �����������������������������������������������������������������60 A3.2.7 Step 7: Add text and silkscreen �����������������������������������������������������������62 A3.2.8 Step 8: Generate the Gerbers �������������������������������������������������������������63 A4 The concepts behind what you did �����������������������������������������������������������������������67 A4.1 Why KiCad splits the work in two �����������������������������������������������������������������67 A4.2 Two faces of a part, and a likeness �������������������������������������������������������������68 A4.3 Nets: how connectivity crosses from schematic to board �������������������������������69 A4.4 Why KiCad checks your work twice �������������������������������������������������������������70 A4.5 From your files to a board in your hand �������������������������������������������������������71 A5 The Two Workflows, Formalised �������������������������������������������������������������������������72 A5.1 The journey at a glance �����������������������������������������������������������������������������72 A5.2 The 8-step schematic workflow �������������������������������������������������������������������73 A5.2.1 Step 1: Create the project and schematic ���������������������������������������������73 A5.2.2 Step 2: Place symbols �����������������������������������������������������������������������73 A5.2.3 Step 3: Annotate �������������������������������������������������������������������������������74 A5.2.4 Step 4: Set component values �������������������������������������������������������������74 A5.2.5 Step 5: Wire and label �����������������������������������������������������������������������74 A5.2.6 Step 6: Assign footprints �������������������������������������������������������������������74 A5.2.7 Step 7: Electrical rules check ���������������������������������������������������������������74 A5.2.8 Step 8: Hand off to layout �������������������������������������������������������������������75 A5.3 The 8-Step Layout Workflow �����������������������������������������������������������������������75 A5.3.1 Step 1: Import from the schematic �����������������������������������������������������75 A5.3.2 Step 2: Set up the board outline ���������������������������������������������������������75 A5.3.3 Step 3: Place components �������������������������������������������������������������������75 A5.3.4 Step 4: Route the tracks ���������������������������������������������������������������������76 A5.3.5 Step 5: Add copper fills ���������������������������������������������������������������������76 A5.3.6 Step 6: Design rules check �����������������������������������������������������������������76 A5.3.7 Step 7: Add text and silkscreen �����������������������������������������������������������76 A5.3.8 Step 8: Generate the Gerbers �������������������������������������������������������������76 A5.4 Quick reference: both workflows �����������������������������������������������������������������77 A6 Finding, Importing, and Managing Parts �������������������������������������������������������������79 A6.1 The sourcing decision tree �������������������������������������������������������������������������79

●7


KiCad Like a Pro A6.2 Finding parts in the standard library �����������������������������������������������������������80 A6.3 Importing libraries from reliable sources �������������������������������������������������������81 A6.4 When the part isn’t in the standard library ���������������������������������������������������84 A6.5 Making your project self-contained �������������������������������������������������������������89 A7 Editor orientation �������������������������������������������������������������������������������������������������92 A7.1 The two editors are siblings �����������������������������������������������������������������������92 A7.2 Schematic editor essentials �������������������������������������������������������������������������93 A7.3 PCB editor essentials ���������������������������������������������������������������������������������95 A7.4 Preferences �����������������������������������������������������������������������������������������������98 A8 Project 1: Breadboard Power Supply �����������������������������������������������������������������100 A8.1 How the board works ������������������������������������������������������������������������������� 101 A8.2 Sourcing the parts ����������������������������������������������������������������������������������� 102 A8.3 Drawing the schematic ����������������������������������������������������������������������������� 103 A8.4 Finding and fixing a design defect ������������������������������������������������������������� 109 A8.5 Laying out the board ������������������������������������������������������������������������������� 111 A8.6 Going deeper: reference designs and further reading ����������������������������������� 131 A9 Project 2: Tiny Solar Power Supply �������������������������������������������������������������������132 A9.1 Sourcing the parts ����������������������������������������������������������������������������������� 133 A9.2 Drawing the schematic ����������������������������������������������������������������������������� 137 A9.3 Finding and fixing a design defect ������������������������������������������������������������� 148 A9.4 Laying out the board ������������������������������������������������������������������������������� 150 A10 Getting Your Board Made ���������������������������������������������������������������������������������164 A10.1 Exporting a BOM ����������������������������������������������������������������������������������� 164 A10.2 Generating Gerbers ������������������������������������������������������������������������������� 166 A10.3 DFM basics ������������������������������������������������������������������������������������������� 170 A10.4 Ordering a PCB ������������������������������������������������������������������������������������� 172 A11 Essential recipes (Beginner) ���������������������������������������������������������������������������176 A11.1 Silkscreen text ��������������������������������������������������������������������������������������� 176 A11.2 Shapes, logos, and graphics ������������������������������������������������������������������� 177 A11.3 Reshape the board outline ��������������������������������������������������������������������� 178 A11.4 Flip a part to the back ��������������������������������������������������������������������������� 178 A11.5 Measure a distance ������������������������������������������������������������������������������� 179 A11.6 Add a permanent dimension ������������������������������������������������������������������� 180 A11.7 Grid overrides ��������������������������������������������������������������������������������������� 182 A11.8 Board-Setup basics ������������������������������������������������������������������������������� 183 A11.9 Highlight a net (Cross-Probe) ����������������������������������������������������������������� 184 A11.10 Save a 3D snapshot ����������������������������������������������������������������������������� 186 A11.11 Export a schematic PDF ����������������������������������������������������������������������� 187 A11.12 Recover an earlier version ��������������������������������������������������������������������� 188 A11.13 Customise your hotkeys ����������������������������������������������������������������������� 189 A11.14 Plugin and content manager ����������������������������������������������������������������� 191 A11.15 Hop-over a wire crossing in the schematic ��������������������������������������������� 192

●8


Contents A11.16 Recipes and Part A: a conclusion ����������������������������������������������������������� 193 Part B: Real Boards: Custom Parts, Setup, and Manufacturing �������������������������������195 B1 Creating Custom Symbols ���������������������������������������������������������������������������������196 B1.1 Symbol Editor ����������������������������������������������������������������������������������������� 197 B1.1.1 Pin Table ����������������������������������������������������������������������������������������� 203 B1.2 Symbol Fields ����������������������������������������������������������������������������������������� 206 B1.3 Multi-Unit Symbols ���������������������������������������������������������������������������������� 207 B1.4 Managing Your Symbol Library ����������������������������������������������������������������� 208 B1.5 Footprint Association ������������������������������������������������������������������������������� 209 B2 Creating Custom Footprints �������������������������������������������������������������������������������210 B2.1 Footprint Editor, Layer by Layer ����������������������������������������������������������������� 211 B2.2 The Footprint Wizard ������������������������������������������������������������������������������� 227 B2.3 The Exposed Thermal Pad and Its Pad Stacks (K9) ������������������������������������� 228 B2.4 An Aside: The Pad Rows, Faster, with the Grid Array ����������������������������������� 236 B2.5 The Courtyard and the Silkscreen ������������������������������������������������������������� 240 B2.6 Fields and the Embedded Datasheet ��������������������������������������������������������� 242 B2.7 3D-Shape Association ������������������������������������������������������������������������������ 243 B3 Board Setup �������������������������������������������������������������������������������������������������������249 B3.1 Stackup ������������������������������������������������������������������������������������������������� 249 B3.2 Design Rules ������������������������������������������������������������������������������������������� 251 B3.3 Net Classes ��������������������������������������������������������������������������������������������� 252 B3.4 Predefined Track and Via Sizes ����������������������������������������������������������������� 256 B3.5 Custom Rules (Intro) ������������������������������������������������������������������������������� 256 B3.6 Violation Severity ����������������������������������������������������������������������������������� 261 B3.7 Component Classes (K9) ������������������������������������������������������������������������� 263 B4 Copper Zones and Fills ���������������������������������������������������������������������������������������265 B4.1 Filled Zones ������������������������������������������������������������������������������������������� 265 B4.1.1 Creating a Zone ������������������������������������������������������������������������������� 266 B4.1.2 Zone Properties ������������������������������������������������������������������������������� 268 B4.1.3 Pad Connections and Thermal Relief ��������������������������������������������������� 270 B4.1.4 Via Stitching ����������������������������������������������������������������������������������� 273 B4.2 Keep-Outs ��������������������������������������������������������������������������������������������� 275 B4.3 The Zone Manager (K9/K10) ��������������������������������������������������������������������� 278 B5 Bill of Materials, In Depth ���������������������������������������������������������������������������������281 B5.1 The Built-in BOM ������������������������������������������������������������������������������������� 281 B5.2 BOM Plugins ������������������������������������������������������������������������������������������� 283 B5.3 When the Manufacturer Supplies the Template ������������������������������������������� 284 B5.4 Field-Name Templates ����������������������������������������������������������������������������� 287 B5.5 Design Variants and DNP (K10) ����������������������������������������������������������������� 289

●9


KiCad Like a Pro B6 Design for Manufacturing �����������������������������������������������������������������������������������292 B6.1 Manufacturability Analysis ����������������������������������������������������������������������� 293 B6.2 Gerber Viewer and Analysis ��������������������������������������������������������������������� 294 B6.3 A Closer Look at the DFM Tools ����������������������������������������������������������������� 295 B6.3.1 The Plugin ��������������������������������������������������������������������������������������� 295 B6.3.2 The Online Viewer ��������������������������������������������������������������������������� 298 B6.3.3 The Desktop Application ������������������������������������������������������������������� 299 B6.3.4 Running Them in Order ��������������������������������������������������������������������� 303 B6.4 Panelisation Concepts ������������������������������������������������������������������������������� 304 B6.5 Paste and Stencil ������������������������������������������������������������������������������������� 306 B6.6 DFM Rules ���������������������������������������������������������������������������������������������� 309 B7 Project (Warm-up): 4×8×8 LED Matrix Array ���������������������������������������������������311 B7.1 What This Project Teaches You ����������������������������������������������������������������� 314 B7.2 The Board We’re Building ������������������������������������������������������������������������� 315 B7.3 Sourcing the Parts ����������������������������������������������������������������������������������� 316 B7.4 Planning the Power Before You Draw ��������������������������������������������������������� 318 B7.5 The Process, With One Addition ����������������������������������������������������������������� 321 B7.6 Schematic: Setup ����������������������������������������������������������������������������������� 322 B7.7 Building the First Cell ������������������������������������������������������������������������������� 324 B7.8 Capturing the Cell as a Design Block ��������������������������������������������������������� 327 B7.9 MCU, Power, and Controls ������������������������������������������������������������������������� 329 B7.10 Stamping Out the Other Three ��������������������������������������������������������������� 331 B7.11 Annotate, Associate, and ERC ����������������������������������������������������������������� 333 B7.12 Board and Layout ����������������������������������������������������������������������������������� 338 B7.12.1 What the copy cannot make identical ����������������������������������������������� 369 B7.13 The KiCad 10 Features This Board Puts to Work ����������������������������������������� 384 B7.14 What You’ll Carry Into the Capstone ��������������������������������������������������������� 384 B8 Project (Capstone): DRV8833 Dual H-Bridge Motor Driver �������������������������������385 B8.1 What This Project Teaches You ����������������������������������������������������������������� 388 B8.2 The board we’re building ������������������������������������������������������������������������� 389 B8.3 The Custom Parts You Already Authored ����������������������������������������������������� 389 B8.4 Schematic: The Canonical Eight-Step Pass ������������������������������������������������� 391 B8.5 Board Setup for a Power Board ����������������������������������������������������������������� 405 B8.6 Sizing the Power net class ����������������������������������������������������������������������� 411 B8.7 Layout: Placement and the Board Outline ��������������������������������������������������� 416 B8.8 Routing the Power and Signal Nets ����������������������������������������������������������� 427 B8.9 Copper zones and thermal relief ��������������������������������������������������������������� 437 B8.9.1 The problem: thermal reliefs starve the pads that need copper most ����� 439 B8.9.2 The solution: a second zone that fills solid, at a higher priority ������������� 440 B8.9.3 Drawing the override zone and giving it priority ����������������������������������� 440 B8.9.4 Check the new via connections ��������������������������������������������������������� 442

● 10


Contents B8.10 DRC and cleanup ����������������������������������������������������������������������������������� 448 B8.11 Silkscreen and the 3D Check ������������������������������������������������������������������� 454 B8.11.1 Clear the remaining warnings ��������������������������������������������������������� 454 B8.11.2 Silkscreen factory limits ����������������������������������������������������������������� 457 B8.11.3 The board user interface ����������������������������������������������������������������� 458 B8.11.4 The 3D viewer check ��������������������������������������������������������������������� 460 B8.12 The Bill of Materials and the design variant ����������������������������������������������� 462 B8.12.1 Completing the Bill of Materials ������������������������������������������������������� 462 B8.12.2 Where to find part numbers ������������������������������������������������������������� 462 B8.12.3 The bill ����������������������������������������������������������������������������������������� 464 B8.12.4 Grouping, and what it does to this board ����������������������������������������� 464 B8.12.5 One project, two boards ����������������������������������������������������������������� 465 B8.12.6 How to check that the override is live ����������������������������������������������� 466 B8.12.7 Exporting both bills ����������������������������������������������������������������������� 467 B8.13 DFM ����������������������������������������������������������������������������������������������������� 468 B8.13.1 The check the silkscreen section left behind ������������������������������������� 468 B8.13.2 Specifying the surface finish: HASL or ENIG ������������������������������������� 469 B8.13.3 Paste coverage and the vias under the exposed pad ��������������������������� 471 B8.13.4 Plotting the Gerbers ����������������������������������������������������������������������� 473 B8.13.5 Generating the drill file ������������������������������������������������������������������� 475 B8.13.6 Generating the position file ������������������������������������������������������������� 476 B8.13.7 The stencil ������������������������������������������������������������������������������������ 477 B8.13.8 Sending it ������������������������������������������������������������������������������������� 478 B8.14 What This Board Taught You ������������������������������������������������������������������� 478 B8.15 The KiCad 10 Features This Board Puts to Work ����������������������������������������� 479 B8.16 What Comes Next ��������������������������������������������������������������������������������� 479 B9 Project (Extension): Four-Motor Driver with Two DRV8833s ���������������������������480 B9.1 Start from the board of Chapter B8 ����������������������������������������������������������� 480 B9.2 Learning objectives of this extension ��������������������������������������������������������� 481 B9.3 The four-motor board ������������������������������������������������������������������������������� 481 B9.4 Capturing the driver stage as a design block ����������������������������������������������� 482 B9.5 Placing the second stage ������������������������������������������������������������������������� 489 B9.6 Sharing power ����������������������������������������������������������������������������������������� 502 B9.7 The control header ����������������������������������������������������������������������������������� 507 B9.8 Layout: Two thermal fields on one board ��������������������������������������������������� 515 B9.9 One project, two boards ��������������������������������������������������������������������������� 522 B9.10 What Comes Next ��������������������������������������������������������������������������������� 525 B10 Intermediate Recipes ���������������������������������������������������������������������������������������526 B10.1 Buses ��������������������������������������������������������������������������������������������������� 526 B10.2 Teardrops ��������������������������������������������������������������������������������������������� 528 B10.3 Net Ties ����������������������������������������������������������������������������������������������� 530 B10.4 Bulk Edits ��������������������������������������������������������������������������������������������� 533

● 11


KiCad Like a Pro B10.5 The Symbol Fields Table ������������������������������������������������������������������������� 535 B10.6 Back-Annotation ����������������������������������������������������������������������������������� 536 B10.7 Geographical Reannotation ��������������������������������������������������������������������� 540 B10.8 Tables (K9) ������������������������������������������������������������������������������������������� 542 B10.9 Design Blocks (K9/K10) ������������������������������������������������������������������������� 545 B10.10 Multi-Channel Design (K9) ������������������������������������������������������������������� 557 B10.11 Embedded Files (K9) ��������������������������������������������������������������������������� 565 B10.12 Symbol Pin-Table CSV (K10) ����������������������������������������������������������������� 568 B10.13 Design Variants / DNP (K10) ����������������������������������������������������������������� 576 B10.14 Project Templates ��������������������������������������������������������������������������������� 579 B10.15 Importing a Fab’s Design Rules ������������������������������������������������������������� 586 B10.16 The Footprint Wizard ��������������������������������������������������������������������������� 588 B10.17 The Calculator Tools ����������������������������������������������������������������������������� 592 B10.18 Suggested Fixes for DRC Violations (K10) ����������������������������������������������� 596 B10.19 Reporting a KiCad Bug ������������������������������������������������������������������������� 600 B10.20 Recipes conclusion ������������������������������������������������������������������������������� 601 B11 Assembling the Board: Reflow or Hand Soldering �������������������������������������������602 B11.1 The reflow method: align, paste, place, reflow ������������������������������������������� 602 B11.2 The heat: getting the board to liquidus ����������������������������������������������������� 606 B11.3 Checking the reflowed board ������������������������������������������������������������������� 607 B11.4 Why the paste opening is split in two ������������������������������������������������������� 608 B11.5 The hand method: a soldering iron, and twelve holes ��������������������������������� 608 B11.6 Why the pad is not optional ��������������������������������������������������������������������� 612 B11.7 One board with two DRV8833 ����������������������������������������������������������������� 612 B11.8 Closing Part B ��������������������������������������������������������������������������������������� 612 Appendix �����������������������������������������������������������������������������������������������������������������613 Mini Encyclopedia ������������������������������������������������������������������������������������������������� 613 Index �����������������������������������������������������������������������������������������������������������������������619

● 12


NextPCB, Tech Explorations and KiCad: Connecting Design to Manufacturing NextPCB has been a proud sponsor of KiCad Like a Pro for several years, supporting Peter Dalmaris and Tech Explorations in their work to make professional PCB design knowledge accessible to practicing engineers, students, and hobbyists around the world. This partnership forms part of a broader commitment across NextPCB to the KiCad opensource ecosystem. As a Platinum KiCad sponsor, NextPCB supports the project not only through financial sponsorship, but also through direct development contributions and community initiatives such as hosting and organising KiCon Asia. NextPCB-supported developers have contributed to core KiCad projects including ODB++ output and the Zone Manager, while the wider team continues to explore new workflows, AI integrations, and tools around KiCad. NextPCB also works to make the transition from design to manufacturing easier, with support for KiCad design file inputs in its PCB ordering workflow and HQDFM software. At the heart of this relationship is a shared goal: making electronics design and manufacturing more accessible. KiCad provides designers with powerful open-source tools, KiCad Like a Pro helps users make the most of them, and NextPCB helps turn those designs into manufactured hardware.

● 13


How this book is organised This book brings together the first two volumes of KiCad Like a Pro, fifth edition, and presents them as two parts. Part A, Getting Started: Your First PCBs, is for readers who are new to PCB design, new to KiCad, or both. It takes you from a blank schematic sheet to two manufactured boards, and it teaches the two workflows that every later chapter relies on. Part B, Real Boards: Custom Parts, Setup, and Manufacturing, begins where Part A ends. It teaches you to draw your own parts, to set up a board’s rules for the current it carries and the factory that will make it, and to take an original design from a blank project to the files a manufacturer needs. Part B assumes everything Part A teaches, and it refers back to Part A often. The Introduction that follows this page describes both parts in more detail and suggests where you should start.

How numbers work in this book

Every chapter, section, figure and table number in this book begins with the letter of its part: • Chapter A9 is the ninth chapter of Part A, and Chapter B9 is the ninth chapter of Part B. • Section A9.1 is the first section of Chapter A9. • Figure A9.3 is the third figure in Chapter A9. Tables are numbered in the same way. The letter is part of the number wherever the number appears: in the table of contents, in the headings, in the captions and in the text. A chapter uses the letter even when it refers to itself or to another chapter in the same part. As a result, no two chapters, sections or figures share a number, and a reference such as “Figure A9.3” leads you to exactly one place in the book. The ‘Mini Encyclopedia’ at the back of the book serves both parts. When an entry ends with a pointer such as “See Chapter A4.”, that is the chapter where the term is taught.

Topics that continue in a later book

KiCad Like a Pro continues after this book. Some subjects come up in Parts A and B but need more space, or more experience, than these two parts can give them. In those places the text says that the subject is covered in a later book. These subjects include: • boards with more than two copper layers; • keeping a KiCad project under version control; • the full custom design rule language, including how KiCad decides between two rules that overlap; • scripting KiCad with Python; • panelising boards for production; • drawing your own 3D models in mechanical CAD; • high-speed design, including the dielectric properties of board materials and controlled impedance. That later book is still being written, and it is not yet available to buy. You can check its current status at techexplorations.com/kicad. Everything you need to design, check and order the boards in this book is in this book.

● 14


Introduction Welcome to KiCad Like a Pro. I have been designing PCBs with KiCad since version 4, and this book contains nearly everything I have learned along the way. Whether you are picking up a PCB design tool for the first time, or arriving from a different CAD application, my aim is to get you productive as quickly as possible, and then to make you independent. The book is in two parts. Part A takes you from no experience at all to two manufactured boards of your own. Part B continues from where Part A ended, and teaches you how to design an original board, with parts, rules and a layout that you create.

What you will learn

Part A is written for readers with little or no experience in PCB design, and it assumes no prior knowledge of KiCad. By the time you finish it, you will have taken two real circuits from blank schematic sheets to completed boards. The first project is a breadboard power supply. This is a compact board that takes 5 V from a USB-C cable and delivers it to your breadboard’s power rails through a two-pin header. On the way, the power passes through a resettable fuse that protects the USB port it comes from, and through an on/off switch, and an LED indicator shows when the power is on. The board needs no regulator, because USB already supplies a regulated 5 V. It is a useful thing to own, and it is a good first board. It has ten components, only one of them surface-mount, and a straightforward layout that fits in the palm of your hand. The second project is a small solar power supply. It adds a little more complexity in both the schematic and the layout, and gives you practice with the choices you face every time you sit down to design a new board. More important than the boards themselves are the two workflows they introduce. You will learn an 8-step schematic design workflow and an 8-step layout design workflow. I use these same workflows for every PCB I design. Once they are familiar, you can start any new project with a clear sequence of steps instead of a blank screen. By the end of Part B, you will be able to do three things that Part A does not teach. First, you will author your own parts, the symbols and footprints that no library has drawn for you. Second, you will set up a board with rules that match the current it carries and the factory that will build it, instead of accepting the defaults a new project opens with. And, third, you will take an original design, one that is yours and not a follow-along, all the way from a blank project to the files a manufacturer needs. The objective of Part A is to make you a competent user of other people’s parts and rules. The objective of Part B is to make you self-sufficient. Part B starts when a part you need does not exist. Think of finding a part as a short decision tree. First you look in the libraries you already trust. If the part is not there, you look to a reliable external source, such as a manufacturer’s download or a reputable repository. When neither has the part, or has it only in a form you do not want to use, you reach the third branch, and you author it yourself. Part A teaches the first two branches, and Part B teaches the third. Part B has two projects of its own. The first is a warm-up, a 4×8×8 LED matrix array. It is a board with a lot of parts, most of them identical, and it teaches you to work at scale and to reuse your layout instead of repeating it. The second is the capstone, a small dual H-bridge

● 15


KiCad Like a Pro

motor driver built around a chip called the DRV8833. It is an original board, and it gives you the opportunity to apply every main skill of Part B in practice.

How the book is laid out

Part A is roughly half concepts and half hands-on work. Chapters A1 to A5 lay the foundation. There, you will learn what a PCB is, how to read a schematic, how to read a layout, the key design concepts, and the two workflows themselves. Chapter A6 shows you how to find, import and manage parts, and Chapter A7 gives you a tour of the KiCad editors. Chapters A8 and A9 are the two projects, step by step. Chapter A10 covers getting your finished board manufactured, and Chapter A11 is a collection of recipes for tasks you will return to again and again. Part B changes that balance. Roughly 70 percent of it is project work and 30 percent is concepts. Chapters B1 to B6 are the concept chapters, and each one is also a build. They use a simple stand-in board built around the same custom DRV8833 part as the capstone, and you apply each technique to that board as you read about it. You author the parts, set up the board, pour the copper, build the bill of materials and check the design for manufacture, each in its own chapter. As a result, the custom symbol you draw in Chapter B1 and the footprint you draw in Chapter B2 are already in your own library when the capstone needs them. The projects follow, with the LED matrix warm-up in Chapter B7 and the DRV8833 capstone in Chapter B8. By the time you reach the capstone, it is a review of skills you already have, not a list of new ones to learn. Three more chapters complete Part B. Chapter B9 is an optional extension of the capstone. It expands the board to drive four motors with a second DRV8833, and it shows you how to reuse the part of a design that repeats, which is a relatively new capability of KiCad. Chapter B10 is a set of intermediate recipes. These recipes are short, standalone procedures that you can return to whenever a board needs one. Chapter B11 is an optional hands-on chapter that assembles the capstone board by two methods, with a stencil and heat or with a soldering iron. The concept chapters of Part B are comprehensive rather than brief. Each one goes deep on the single skill it teaches, and each assumes that you can already operate KiCad without help. The projects take up most of Part B’s pages, because producing a board, as opposed to following one, is a skill you build by doing. Part B moves faster than Part A did by design. At the back of the book you will find the ‘Mini Encyclopedia.’ This is a reference section, not reading material. It covers PCB terms and KiCad techniques in more depth than the chapters have space for, and the chapters point you to it whenever a term needs more explanation than the main text gives it. If you are curious about a particular term, the Mini Encyclopedia is the first place to look.

How to read this book

Where you start depends on what you already know. • New to PCB design. Start at Chapter A1 and read the chapters in order. Each chapter builds on the ones before it, and jumping ahead will leave gaps that become problems once the projects start. • Experienced with PCB design, but new to KiCad. You can move more quickly. Chapter A7, Editor Orientation, gives you a tour of the KiCad editors. From there you

● 16


Introduction

can go to the projects, and use the earlier concept chapters as a reference whenever you need specific background. • Already able to design a simple board in KiCad. If you can find a symbol, place it, wire a schematic, lay out a simple two-layer board and send it to be made, you can start at Part B. For a refresher on the workflow that Part B builds on, read Chapter A5, The Two Workflows, Formalised, along with the project in Chapter A9, Project 2: Tiny Solar Power Supply. Whichever way you enter it, read Part B in order. It is a single sequence, not a set of independent references, and each chapter assumes the one before it. Read this book with KiCad open. Everything in it is something you do, not something you memorise, and the fastest way to learn a technique is to try it on the screen as you read about it. All of the screenshots in this book were captured using KiCad 10, the version covered throughout. KiCad looks and behaves essentially the same on Windows, Mac, and Linux, so the images should match what you see regardless of your platform. Where Part B covers a feature that arrived recently, the section heading carries the tag “(K9)” or “(K10)”. The tag names the KiCad release that introduced the feature, so if you are running an older version, you will not find it.

What you will need

To follow along with the projects, you will need: • A computer running Windows, Mac OS, or Linux. • An internet connection, for downloading KiCad and searching for component data. • A mouse with at least two buttons and a scroll wheel. KiCad’s canvas relies on the scroll wheel for zoom; a trackpad is workable but less comfortable over a long session. • The ability to install software on your computer. • Time, and patience. You do not need special hardware, test equipment or a PCB mill. The design work stays entirely on your computer through the end of Chapter A9. If you choose to assemble the capstone board in Chapter B11, you will also need the soldering tools that chapter describes.

Why KiCad?

Why do I use KiCad? Because it is the perfect PCB software for my use. There is a good chance KiCad is perfect for you, too. I am an electrical engineer with a background in electronics and computer engineering, but above all I am a technology educator and hobbyist. Most of my PCB projects eventually find their way into my books and courses. My projects are modest in complexity, much like the kind of thing a serious hobbyist or solo developer would build. For that kind of work, KiCad proved to be exactly the right tool. Your situation may be different. You may be a university student completing an engineering degree, a hobbyist building something for fun, a solo developer putting together a prototype, or part of a team working on a commercial product. KiCad fits all of these well. Here is why I chose it, and why I keep choosing it.

● 17


KiCad Like a Pro

KiCad is free and open-source. The source code is available for anyone to download, inspect, and build. While I am not rigid about open-source versus commercial software, when a genuinely excellent open-source option exists, I take it. KiCad is one of those cases. Being free matters especially if you are a student or hobbyist. Professional-grade PCB software can run to hundreds of dollars a year on a subscription, and for most of us, those tools offer nothing that KiCad does not. KiCad is also unlimited, in the sense that there are no imposed restrictions on how anyone can use it. There is no “standard” tier, no “professional” tier, and no ceiling on board size or layer count that you must pay to lift. You download one installer and you get everything. Other tools offer free licences for hobbyists or students, but they always come with restrictions on board dimensions, on what you can do with the output, or on where you are allowed to manufacture. There is always the risk that the vendor changes the terms. KiCad carries none of those risks. It is unlimited and it is yours forever. I feel strongly enough about this that I make a yearly donation to CERN to support KiCad’s continued development. The feature set is professional grade. Interactive routing, differential pair routing, length matching, multi-sheet schematics, a configurable design rules checker, and a built-in SPICE simulator are all part of a standard installation. You probably will not need all of these in this book, but they are there when you do. KiCad can also be extended through a plugin system and through Python scripting, so if there is a workflow it does not support out of the box, you can add it. The community behind KiCad is large and active. Hundreds of thousands of people worldwide use and contribute to the project. Contributing organisations include CERN, the Raspberry Pi Foundation, Arduino LLC, and Digikey Electronics. Translations cover more than a dozen languages. PCB manufacturers have taken notice. Many of them now publish KiCad-specific ordering guides, and some accept the native KiCad project file directly, in addition to the industry-standard ‘Gerber’ format. Component libraries compatible with KiCad are available on major repositories such as SnapEDA and Octopart. KiCad runs on Windows, Mac, and Linux, and your project files are fully portable across all three platforms. I use it on all three myself and have never had a problem moving a project between machines. Your finished board files can be sent to any fabricator that accepts Gerber files, which covers every professional fabrication service I have ever used. And every file KiCad writes, schematic, board, symbol, and footprint alike, is plain text in an open, documented format called S-expressions, not a proprietary binary blob. You can open any of them in an ordinary text editor, keep them in version control and see exactly what changed between two revisions, and, if you are so inclined, write your own software to inspect or edit them. That openness is why a whole ecosystem of external tools exists around KiCad. KiCad’s development now follows a yearly release cycle, which means you can count on a predictable schedule of improvements. Each new major version has been more polished and capable than the last. KiCad 10, which this book is based on, is the most fully featured version yet. For all of these reasons, KiCad is the tool I reach for every time I sit down to design a PCB, and it is the tool I have chosen to teach with in this book.

● 18


Introduction

If you are coming from another CAD application, I ask one thing: an open mind. KiCad looks and behaves differently from other tools. The easiest way to learn it is to set aside your expectations and approach it the way a first-time user would. As the Borg (from the Star Trek Universe) famously warned, “resistance is futile.” In learning, as in so many other things, you are much better off going with the flow. Let’s begin! Turn to Part A, where the first chapter looks at what a printed circuit board actually is.

● 19


Part A: Getting Started: Your First PCBs

● 20


A1 What a PCB is and how it’s made Before you touch a single tool, it helps to know exactly what you are setting out to build. In this chapter, I’ll show you what a printed circuit board really is. You will learn what a PCB what it’s made of, what each part does, and the names we use for those parts. Then we’ll follow a design from an idea on your screen all the way to a finished board in your hand, install KiCad 10 on your computer, and take a quick look around the KiCad workspace so the rest of the book feels familiar. This is the most “reading” you’ll do for a while; from the next chapter on, you’ll be doing.

A1.1 PCB anatomy

As a child, my interest in electronics grew from admiration of what clever engineers had come up with into plain curiosity about how those things actually worked. That curiosity led me to take an old screwdriver to anything electronic with a screw that fit. A record player, a VCR, and a radio were only a few of my “victims.” I am still surprised I never got electrocuted, though I did at least have the good sense to unplug things from the mains first. Inside those devices I found all sorts of wonders: resistors, transformers, integrated circuits, coils, and power supplies. The engineers had attached all those parts to small boards (Figure A1.1). A board like that is a ‘printed circuit board,’ or ‘PCB’ for short. It is the flat green (or red, or blue, or black) slab that almost every electronic device is built around. Its job is twofold: to hold the components in place, and to wire them together electrically without a single loose strand of hook-up wire. Let’s look at what a PCB is made of, what each part is called, and why it’s there. The example I’ll use throughout this section is a simple board I designed for this book (Figure A1.1).

Figure A1.1: The top side of our example board, with the main features we’ll meet in this section labelled.

● 21


KiCad Like a Pro

A1.1.1 A board is a sandwich of layers The easiest way to picture a PCB is as a sandwich (Figure A1.2). At its core is an insulating board that gives the PCB its strength and shape. Onto that core, the manufacturer bonds a thin sheet of copper and then carves the copper away until only the wiring you designed remains. Over the copper goes a protective coating, and on top of that, some printed lettering. Stack those up and you have a board: • the ‘substrate’, the rigid insulating core; • the ‘copper’, the conductive wiring, bonded to the substrate; • the ‘soldermask’, a thin protective coating over the copper; • the ‘silkscreen’, printed text and graphics on the very outside. A simple board like the one you will design later in this book, has copper on just two faces, a ‘top’ layer and a ‘bottom’ layer, so we call it a ‘two-layer board.’ The coating and the lettering repeat on both faces too, so the stack is a mirror image of itself about the core. More complex boards bury extra copper layers inside the sandwich; four, six, and more are common, and we’ll get to those in later books. For now, two layers is all we need.

Figure A1.2: A two-layer PCB in cross-section. Copper sits on both faces of the insulating substrate, the soldermask covers the copper and opens over the pads, and the silkscreen prints on top of that. The copper, soldermask and silkscreen are all drawn far thicker than life so you can see them; on a real board the core is most of the 1.6 mm.

A1.1.2 The substrate The substrate is the board you can hold. By far the most common material is a fiberglass-andepoxy laminate the industry calls ‘FR-4,’ and it’s what your first boards will almost certainly be made of. It’s cheap, strong, and a good electrical insulator. The standard thickness is 1.6 mm (about the thickness of two stacked credit cards), but manufacturers will happily make boards from roughly 0.4 mm up to 2.0 mm if you ever need thinner or thicker stock. FR-4 is not the only option. Boards meant to bend are built on a thin, flexible plastic film instead (‘flex’ PCBs). Boards that have to shed a lot of heat, such as high-power LED lighting,

● 22


A1 What a PCB is and how it’s made

are sometimes built on an aluminium or copper core. And boards for very high-frequency radio work use specialised materials such as PTFE-based laminates. You don’t need any of these to get started, and we’ll only reach for them much later in the series, but it’s worth knowing FR-4 is a choice, not the only possibility.

Figure A1.3: Our example board is a standard 1.6 mm-thick FR-4 board.

A1.1.3 Copper: tracks and traces The wiring on a PCB is made of copper. The thin copper lines you can see snaking across the board are called ‘tracks’, or ‘traces’. The two words mean the same thing, and you’ll hear both in the field. A track carries current from one point on the board to another, exactly as a piece of wire would, and you control how wide each one is in your design. Wider tracks carry more current; we’ll come back to that idea when a project actually needs it.

Figure A1.4: The copper lines connecting points on the board are tracks (also called traces).

A1.1.4 Pads, holes, and the two ways to mount a part Components don’t solder to bare track; they solder to ‘pads,’ small exposed areas of copper sized to match a component’s connections. How a part attaches to its pads depends on which of the two main component styles it is: ‘through-hole’ or ‘surface-mount.’ A through-hole part (often abbreviated ‘THT,’ for through-hole technology) has wire leads or pins that you push through holes drilled in the board, then solder on the other side (Figure A1.5). Those holes run all the way from the top face to the bottom and are plated on the inside with metal, so the copper on the top connects electrically to the copper on the bottom. The plated ring of copper around each hole is the pad; the more precise name for that ring is the ‘annular ring.’

● 23


KiCad Like a Pro

Figure A1.5: A through-hole component sits in plated holes and solders on the far side.

How does a drilled hole end up conducting? Right after the holes are drilled, the factory plates their inside walls with a thin layer of copper, building a continuous metal ‘barrel’ that joins the top copper to the bottom copper. That barrel gets the same surface finish as the pads, which is why, when you peer into a finished through-hole, you see a bright, solderable sleeve rather than bare brown fibreglass (Figure A1.6). It is this plating, not the component’s lead, that carries current from one side of the board to the other.

Figure A1.6: Inside each through-hole, a plated copper barrel — here finished bright with solder — joins the top and bottom copper.

A surface-mount part (‘SMD,’ for surface-mount device) has no leads to poke through the board. Instead it sits flat on the surface and solders directly onto flat pads (Figure A1.7), using just enough solder to bridge the part’s connector to the pad beneath it (Figure A1.8). Surface-mount parts are smaller and are what most modern electronics use. Beginners often start with through-hole parts because they’re a little more forgiving to solder by hand, and that’s a perfectly good place to begin. But don’t let the small size scare you off: with a little practice, surface-mount parts are every bit as manageable, and you can also have a fab house assemble them for you (more on that shortly).

● 24


A1 What a PCB is and how it’s made

Figure A1.7: Bare surface-mount pads — flat exposed copper — with tracks and vias around them, before any component is soldered on.

Figure A1.8: A surface-mount component solders flat onto pads on the board’s surface.

A1.1.5 Vias Look closely and you’ll spot tiny holes scattered across the board that have no component in them (Figure A1.9). These are called ‘vias.’ A via looks like a mounting hole but does a different job. It lets a track jump from one copper layer to another. If a track on the top layer needs to continue on the bottom layer (perhaps to get around something in its way), it dives into a via, crosses to the other side, and carries on. On a two-layer board that’s the whole story. Boards with more layers can use fancier vias that connect only some of the layers (‘blind’ and ‘buried’ vias), but you won’t need those until much later.

● 25


KiCad Like a Pro

Figure A1.9: Vias are small plated holes that carry a track from one layer to another.

A1.1.6 Soldermask That coloured coating over most of the board is the ‘soldermask’. On our example board it happens to be green, but soldermask comes in a whole menu of colours these days. Green is the classic, but red, blue, black, white, yellow, and purple are all standard options from most manufacturers at no real extra cost. The colour is up to you; the job it does is the same regardless. The soldermask does two important things. First, it seals the copper away from the air. Bare copper slowly oxidises, and oxidised copper conducts poorly, so the mask keeps your tracks healthy over time. Second, it makes the board far easier to solder. The mask coats everything except the pads, and because solder won’t stick to the mask, it stays where you want it, on the pads, instead of wandering between them. That matters because pads can sit very close together, and the tip of a soldering iron is often as wide as a pad or wider. Without soldermask it’s easy to accidentally join two neighbouring pads with a blob of solder, a defect called a ‘solder bridge’ (Figure A1.10). The mask doesn’t make bridges impossible, but it makes them much less likely.

● 26


A1 What a PCB is and how it’s made

Figure A1.10: A solder bridge, a defect that soldermask helps prevent.

A1.1.7 Silkscreen The text and line art printed on the outside of the board is the ‘silkscreen,’ usually in white ink (Figure A1.11). The silkscreen carries no electricity; it’s there purely for the humans who build and use the board. We use it to outline where each component goes, to label pins and connectors, to print the board’s name and version number, and to add logos or other markings. It’s a good habit to give every board a name and a version on the silkscreen, so that a year later you can tell at a glance which board you’re holding. Silkscreen can go on the top, the bottom, or both.

Figure A1.11: The white lettering and outlines are the silkscreen.

A1.1.8 Surface finish There’s one more layer most people never notice. Bare copper pads would oxidise just like bare tracks, so the exposed pads get a thin protective ‘surface finish’ that keeps them solderable. You’ll choose a finish when you order a board, so it’s worth recognising the common names. The cheapest and most common is ‘HASL’ (hot-air solder levelling), now usually offered in a lead-free version. A slightly more expensive finish called ‘ENIG’ coats the pads with a

● 27


KiCad Like a Pro

microscopically thin layer of gold over nickel; it gives beautifully flat, gold-coloured pads and has become quite affordable. A third option, ‘OSP,’ is a thin organic coating. For your first boards, the standard lead-free HASL is perfectly fine, but when you see “ENIG” or “gold” offered, now you’ll know what it means.

A1.1.9 Mounting holes, copper pours, and thermal relief A few more features round out the board. Sometimes you’ll want to bolt your PCB down inside a case, so you add a ‘mounting hole’, much like the holes for through-hole parts, except it carries no electrical connection and doesn’t need to be plated. A screw and nut through it hold the board in place. You’ll also often see large open areas of copper rather than thin tracks (Figure A1.12). This is a ‘copper pour’ (or ‘copper fill’), and it’s commonly used to spread a ground or power connection across a wide region of the board. Where a pad connects to one of these large copper areas, you’ll frequently notice the connection is made through a few short, narrow spokes rather than solid metal. That little spoked connection is called a ‘thermal relief.’ It exists to make soldering easier: without it, the big copper area would whisk heat away from your soldering iron faster than you could warm the joint. The thermal relief deliberately pinches the connection so the heat stays put long enough to make a clean joint.

Figure A1.12: A thermal relief connects a pad to a surrounding copper pour through narrow spokes.

That’s a complete tour of the board in your hand. Here’s the encouraging part: getting a board like this made is no longer the expensive, industrial affair it once was. Manufacturers will produce a handful of small two-layer boards for you for only a few dollars, in your choice of colour and finish, and ship them within a week or two, some far faster. Designing the board is now the interesting part, and that’s exactly what KiCad is for. So how does the design on your screen become the board on your bench? That’s the pipeline we’ll look at next.

A1.2 The Design → Fabrication → Assembly Pipeline

Turning an idea into a working board happens in three stages. Typically, different people and tools own each one. You, the designer, designs the board, a factory fabricates it, and then someone, maybe you, again, or maybe a machine, assembles the components onto it.

● 28


A1 What a PCB is and how it’s made

A1.2.1 Design: what you do in KiCad Design is the part this book is about, and it’s the part KiCad handles. Designing a PCB means creating the plans for a board; it is not the same as manufacturing one. As the designer, you decide what the circuit is, what it’s built from, and how everything is laid out physically. It’s a procedural, iterative craft with a real element of personal style; over time, your boards will start to look recognisably yours. You don’t need to be a manufacturing expert, but you do need a rough sense of what a factory can and can’t do, so your design stays buildable. In KiCad, design happens in two big steps (we’ll spend whole chapters on each, so this is just the map): 1.

2.

Schematic design. First you draw a ‘schematic’, a diagram of your circuit that captures what connects to what, without worrying yet about physical placement. You build it from ‘symbols,’ where each symbol is a stand-in for a real component (a resistor, a chip, a connector) and represents its function, not its physical shape. Layout design. Then you create the ‘layout’, the physical board itself. Here every symbol gets paired with a ‘footprint,’ the real-world pattern of pads and holes that the actual part will solder to. You arrange those footprints on the board, draw the copper tracks that connect them, define the board’s outline, and add the mounting holes, silkscreen, and other features you met in the previous section.

The same schematic can become many different layouts, which is why we separate the two. KiCad also checks your work at each step, an ‘Electrical Rules Check’ on the schematic and a ‘Design Rules Check’ on the layout, to catch mistakes early, while they’re cheap to fix.

A1.2.2 Fabrication: handing off to the factory When the layout is finished, you export it in the format a manufacturer understands. The industry standard is a set of files called ‘Gerber’1 files. These are plain text files, one per layer of your board, describing exactly where the copper, soldermask, silkscreen, and holes go. Because these files are text, you can even keep them under version control, which we’ll do in a later book. You upload those files to a PCB manufacturer (a ‘fab house’) and a couple of weeks later a stack of finished boards arrives. This is where modern hobby electronics has changed the most. Services such as OSH Park and NextPCB will make small two-layer boards for only a few dollars, in your choice of colour and surface finish, with quick turnaround. It is possible to etch boards yourself at home with chemicals, but it’s messy, smelly, and mildly hazardous, and the results rarely match a factory’s. For the price, I don’t bother, and I don’t recommend you do either when you’re starting out. I’ve done this once and immediately decided to never do it again.

A1.2.3 Assembly: putting the parts on A bare board from the fab is just the board with no components on it. ‘Assembly’ is the step that solders the actual components onto it. For a simple through-hole board you can do this yourself with a soldering iron in an afternoon. For surface-mount boards, you can still handsolder with a little practice, or you can have the fab house assemble the board for you: many now offer an assembly service where they source the parts, place them by machine, and ship a finished, populated board. Either way, assembly is a separate stage from both design and

1 The format is maintained by a company called Ucamco; you never have to read a Gerber file by hand, but it’s good to know the name.

● 29


KiCad Like a Pro

fabrication, and the boundary matters, because it’s where your job as the designer ends and the factory’s begins. With the big picture in place, it’s time to get the tool. Let’s install KiCad.

A1.3 Installing KiCad

KiCad is free, open-source, and runs on Windows, macOS, and Linux. This book is built on KiCad 10, so that’s the version to install, but the same process works with any version of KiCad. I won’t walk through every click of every installer; the KiCad team has polished the process to the point where it works like any other well-made application, and the official download pages always carry the current, correct instructions for each platform. Rather than reproduce screenshots that would go stale, I’ll point you to the official source and tell you what to choose. Head to the official KiCad download page and pick your operating system: • Windows: https://www.kicad.org/download/windows/, download the stable installer, run it, and follow the wizard. • macOS: https://www.kicad.org/download/macos/, download the stable .dmg and install it the usual way. • Linux: https://www.kicad.org/download/linux/, follow the instructions for your distribution (Ubuntu, Fedora, and others each have their own). You’ll notice each platform also offers a ‘nightly’ build. Nightly builds contain the very latest, in-progress code and are labelled “unstable” for good reason: they can behave oddly and occasionally crash. They’re fun to explore, but don’t do work you care about in one. For everything in this book, install the stable release. The download is the whole KiCad suite: every application, the documentation, and the standard libraries of symbols, footprints, and templates, even a few demo projects. Once it’s installed, start KiCad to confirm it’s up and running. The window that greets you is the project manager, and that’s exactly where we’re headed next.

A1.4 The Project Manager and the Apps

KiCad is not a single program. It’s a suite of applications that work together, and the window you see first (the ‘project manager’) is the hub that launches them and keeps your project’s files in one place (Figure A1.13). You don’t need to learn every corner of it today; I just want the workspace to feel familiar before you start using it in earnest in the next chapter.

● 30


A1 What a PCB is and how it’s made

Figure A1.13: The KiCad project manager, the hub that launches the other applications.

The project manager has three regions. A toolbar for creating, opening, and archiving projects; a file browser in the middle showing everything inside your project folder; and a set of buttons that launch the individual applications. You can open most editors straight from here, either by clicking their button or by double-clicking the matching file in the browser. You won’t touch all of these applications in Part A, but it’s worth knowing they exist so the names aren’t a mystery later: • Schematic Editor. Where you draw the schematic: the circuit diagram built from symbols. It’s the first app you’ll use on any project. This is the focus of the next chapter. • PCB Editor. Where you design the physical layout: placing footprints, routing copper tracks, and shaping the board. It includes an interactive router and a built-in 3D Viewer that shows you a realistic rendering of the finished board. • Symbol Editor and Footprint Editor. For creating or modifying the symbols and footprints that represent your components. You’ll lean on the standard libraries for now and learn to author your own parts in Part B. • Gerber Viewer. A quality-control tool that lets you inspect the Gerber files before you send them to a fab house, layer by layer, so you don’t pay for a board with a mistake in it. • Image Converter, Calculator Tools, and the Drawing Sheet Editor. These are handy extras that allow you to do things like turning a logo into a footprint, working out track widths and other quantities, and customising the title block on your schematic sheet. We’ll meet these at the point where a project actually needs them. • Plugin and Content Manager. Where you install add-ons and extra content from KiCad’s official and third-party repositories, for example an autorouter. KiCad’s official documentation covers every one of these in depth and stays current with the software, so I’ll link to it rather than duplicate it whenever you want to go deeper. That’s the lay of the land. You now know what a PCB is made of, how a design becomes a finished board, and where the tools live. That’s enough reading. In the next chapter we’ll open the Schematic Editor and make something. Let’s begin.

● 31


A2 A Hands-On Tour: Schematic Enough reading. In this chapter you will open the Schematic Editor and draw a real circuit, the same way you would on a paying job, only smaller. By the end you will have a finished, error-checked ‘schematic’ for a little blinking-LED board, ready to be turned into a real PCB in the next chapter. Think of this as a gentle, guided first lap. I will tell you exactly which button to click and why, and you will follow along. The deeper ideas behind what you are doing come later. Chapter A4 explains why it all works, and Chapter A5 turns these steps into a checklist you will reuse on every future project. For now, we act first and understand later. The Schematic Editor is a fully featured, powerful tool, and it is where all PCB design begins. Professionals draw schematics with hundreds of parts spread across many sheets in this same editor. We are going to use a small, focused slice of it today, and you will grow into the rest over the course of the book. So we will leave the advanced corners alone for now. Features like multi-sheet and hierarchical designs, creating your own symbols and libraries, importing schematics from other tools, design blocks, the built-in simulator, and buses, are very useful but not necessary for the kind of board you are about to design. KiCad’s official documentation covers every one of those in depth when you are ready. Here is what we are building (Figure A2.1). It is a classic circuit, a 555 timer wired as an ‘astable multivibrator,’ which is a fancy way of saying it switches on and off all by itself, over and over. We use that steady on-off signal to flash an LED a couple of times a second. If you leave the button unpressed, nothing happens. If you press the button to power it up, it blinks. It is the kind of circuit that has launched a million electronics hobbies, and it is the perfect size for a first tour. It only has a handful of parts, a few connections, and nothing exotic.

Figure A2.1: The finished schematic for our 555 blinker. This is where we are headed.

The circuit uses only parts from KiCad’s standard libraries, so you will not have to hunt anything down on the internet. It is built from: • a 555 timer chip, the brain of the blinker; • three resistors: two that set how fast it blinks, and one that protects the LED;

● 32


A2 A Hands-On Tour: Schematic

• two capacitors: one that sets the blink rate with the resistors, and one that steadies the chip; • an LED, the part that actually lights up; • a 2-pin connector where a battery plugs in (a 9 V block, or four AA cells, suits the 555 well). Don’t worry if you can’t yet read the circuit or work out the blink rate. That is electronics, not KiCad, and it is not what this chapter is about. Our job here is to learn the editor, by drawing this circuit step by step.

A2.1 The schematic workflow at a glance

Drawing a schematic in KiCad makes sense if you recognise that there is a natural order to it. Following that order keeps you out of trouble. Throughout this book we will lean on the same eight steps, in the same sequence, for every schematic we draw. Here they are, so you have the whole map before we zoom in on any one part: 1. 2. 3. 4. 5. 6. 7. 8.

Create the project and schematic. Make a home for your design and open the editor. Place symbols. Drop a ‘symbol’ onto the sheet for each part in the circuit. Annotate. Let KiCad give every part a unique number (R1, R2, U1, and so on). Set component values. Tell each part what it actually is (10 kΩ, 10 nF, and so on). Wire and label. Connect the symbols’ pins, and give the important connections names. Assign footprints. Tell each symbol which physical part it will become on the board. Electrical rules check. Ask KiCad to find your mistakes while they are still free to fix. Hand off to layout. Save, and pass the design to the PCB Editor.

Don’t try to memorise the list. You will have walked all eight by the end of this chapter, and we will pin them down properly as a reusable checklist in Chapter A5. For now, just notice the shape: you build the circuit, you check it, then you hand it on. Let’s walk through it.

A2.2 The 8-Step Pass

A2.2.1 Step 1: Create the project and schematic Every KiCad design lives inside a ‘project,’ a folder that holds the schematic, the board, and a handful of supporting files, all sharing one name. We met the project manager in the previous chapter; now we will use it. Start KiCad so the project manager window appears. Choose “File” then “New Project,” pick a sensible folder, and give the project a name. I am calling mine ch02-blinky, but any name without spaces will do. KiCad creates the folder for you and, inside it, the project file along with an empty schematic and an empty board, all named to match (Figure A2.2). You will see them appear in the file browser on the left of the window: the .kicad_pro project file at the top, with the .kicad_pcb board and the .kicad_sch schematic nested under it.

● 33


KiCad Like a Pro

Figure A2.2: A fresh project. KiCad makes the schematic and board files for you, and lists the editors you can open on the right.

Now open the Schematic Editor. You can click its button on the right of the project manager, or simply double-click the schematic file (the one ending in .kicad_sch) in the file browser. The editor opens onto a large blank sheet (Figure A2.3). This is your drawing canvas, and it is where the circuit will take shape.

Figure A2.3: The Schematic Editor, ready for a new design. The numbered callouts mark the parts you will use today.

Take ten seconds to get your bearings; we will explore the editor properly in Chapter A7, so a quick orientation is all you need now. Four areas are worth knowing, and they are numbered

● 34


A2 A Hands-On Tour: Schematic

in Figure A2.3. The toolbar across the top (1) carries the everyday commands: save, undo, zoom, and the check tools you will meet later. The toolbar down the left edge (2) controls how things look: the grid, the measurement units, and the cursor. The tall toolbar down the right edge (3) holds the tools you use to build a circuit: add a symbol, draw a wire, place a label, and so on. Down in the bottom-right corner sits the title block (4), where a design records its name, date, and revision. Two movements will serve you for the whole tour. To pan around the sheet, press and hold the middle (or right) mouse button and drag. To zoom, roll the mouse wheel; the view zooms toward wherever the pointer sits. If you ever lose your drawing off the edge of the screen, press the “Home” key to fit everything back into view. One last thing worth knowing before we place a part: the canvas has a ‘grid,’ an invisible lattice that your parts and wires snap to. The standard schematic grid is 50 ‘mil’ (a mil is onethousandth of an inch), and you should leave it alone. KiCad 10 reports the grid in millimetres down in the status bar, where you will see grid 1.27 mm; that is the same spacing, since 1.27 mm equals exactly 50 mil (Figure A2.3). The grid matters more than it looks: KiCad only treats two things as connected when their ends land on exactly the same point, and keeping everything on the grid is what makes that happen reliably. We will see why that is handy in Step 5.

A2.2.2 Step 2: Place symbols A schematic is built from ‘symbols.’ A symbol is a small drawing that stands for a real component. Symbols represent components like a resistor, an LED, or a chip. Each symbol shows the part’s ‘pins,’ the points where wires attach. Our first real job is to drop a symbol onto the sheet for every part in the blinker. To add a symbol, press the “A” hotkey, or choose “Place Symbols” from the “Place” menu, or click the symbol button (the one that looks like an op-amp triangle) at the top of the right toolbar. The two arrows in Figure A2.4 point to the menu entry and the toolbar button; any of the three routes opens the ‘symbol chooser,’ the window you use to find a part and preview it before placing it (Figure A2.5).

Figure A2.4: Three ways to start placing a symbol: the “A” hotkey, the “Place” menu’s “Place Symbols” entry, or the symbol button on the right toolbar.

● 35


KiCad Like a Pro

Figure A2.5: The symbol chooser, here searching for the 555 timer.

The chooser packs a lot into one window, so let me point out the parts you will use (the numbers match the callouts in Figure A2.5). You search for a part by typing a few letters of its name in the search box (1); as you type, the list below narrows to symbols whose name or description matches. Click an item in the list, here NE555P (2), and it appears in the symbol preview pane (3) so you can confirm it is the part you want. The lower-right pane (4) previews a physical ‘footprint’ for the part, and the dropdown just above it (5) lets you choose which one; we will ignore footprints for now and pick them later, in Step 6, so leave that dropdown alone. When the part is the one you want, click “OK” (6). Two checkboxes sit along the bottom: leave “Place all units” ticked, and you can ignore “Place repeated copies” for now. Let’s place the 555 first, since it sits at the heart of the circuit. Type NE555 in the search box, click the NE555P symbol so it shows in the preview, and click “OK” (or just double-click the part in the list). The window closes and the symbol is now glued to your mouse pointer. Move it to a roomy spot near the middle of the sheet and left-click once to drop it (Figure A2.6). Give it plenty of space; this chip has eight pins and you will be running several wires to it. Notice that the part arrives carrying the name U?: the letter tells you its family (a U is an integrated circuit), and the question mark is a placeholder for a number it does not have yet. We will deal with that in Step 3.

● 36


A2 A Hands-On Tour: Schematic

Figure A2.6: The 555 placed near the middle of the sheet. Its name reads U?, and the status bar at the foot of the window echoes the part’s reference, value, and other details.

A couple of handy moves while a symbol is on your cursor, or after it is placed and selected (you will see a faint blue halo around a selected part). Press “R” to rotate it, which is often the quickest way to make the wiring tidy later. To move a part you have already placed, hover over it and drag with the left mouse button held down. To deselect, left-click any empty space. Now add the rest of the parts the same way. Press “A,” search, place, and repeat: • the LED: search for LED and choose the plain LED from the Device library; • the three resistors: search for R and choose the R symbol from Device (place it three times); • the timing capacitor: search for CP and choose the polarised capacitor CP (this is the electrolytic one); • the steadying capacitor: search for C and choose the plain C; • the power connector: search for Conn_01x02 and choose that 2-pin connector. A small time-saver for the three resistors: place the first one, then with it still selected press “Ctrl+D” (“Cmd+D” on macOS) to drop an identical copy, and press it once more for the third. Duplicating this way also copies anything you have already configured on the part, such as its value or footprint, so the same trick saves even more time later when you are repeating a part you have already set up. When you are done placing a part, press “Esc” to put the tool down. If you grab the wrong part, no harm done. Select it and press the “Delete” key, then place the right one. You can also turn on the interactive delete tool from the right toolbar and click items to remove them. Mistakes here cost you nothing, so place freely and tidy up after. There is one more kind of symbol our circuit needs, and it works a little differently: the ‘power symbol.’ A power symbol is a small flag that marks a pin as connected to a power rail, such as the positive supply (we will call ours VCC) or the ground (GND). It is not a physical component; it is a label that says “this pin belongs to the power net.” Power symbols have a tool of their own. Click the “Add Power Symbol” button on the right toolbar (1 in Figure A2.7),

● 37


KiCad Like a Pro

or press “P,” to open a chooser much like the one for ordinary symbols. Type a name in the search box (2), pick the symbol from the list (3), here GND, and click “OK” (4). Place a few GND flags near the pins that go to ground, then search for VCC and place a few near the pins that need the positive supply. Don’t worry about exact positions yet; we will wire them up later.

Figure A2.7: The power-symbol chooser. Power symbols mark which pins connect to the supply and to ground.

With every part and a scattering of power symbols on the sheet, your drawing will look busy and unconnected (Figure A2.8). That is exactly right; right now it is just a collection of parts. Look closely and you will see that every component still has a question mark in place of a number: R?, C?, D?, J?, and the U? we already met. The letter marks the kind of part (R for a resistor, C for a capacitor, D for a diode or LED, J for a connector, U for a chip), and the question mark means KiCad has not yet given it a number of its own. Before we wire anything, we will turn those question marks into real, unique names like R1 and C2, because every part needs a label that no other part shares. That is what lets you, and KiCad’s own tools, point to one exact part without ambiguity when you wire, check, and build the board. Giving out those names is the very next step.

Figure A2.8: All the parts are on the sheet, not yet connected and not yet numbered. Every one still shows a question mark (R?, C?, U?) instead of a unique designator.

● 38


A2 A Hands-On Tour: Schematic

A2.2.3 Step 3: Annotate Every part is on the sheet, and every one still carries a question mark in its name: R?, C?, U?. Giving each part a unique label, like R1, R2, or U1, is called ‘annotation,’ and KiCad can do it for you in one click. We do it now, before wiring, so that every part already has the name we will use to talk about it while we connect and check the circuit. Depending on your settings, KiCad may have been numbering parts automatically as you placed them, in which case you will already see R1, R2, and so on. Either way, it is good practice to run the annotation tool once to make sure every part is numbered cleanly and none was missed. Open the tool from the “Tools” menu by choosing “Annotate Schematic,” or click its button on the top toolbar. The dialogue (Figure A2.9) offers a few choices about how to number, such as sorting the parts by their X or Y position on the sheet, but the defaults are sensible and you can leave them. Click “Annotate,” and every question mark turns into a real number (Figure A2.10). That is all there is to it.

Figure A2.9: The Annotate Schematic dialogue. The defaults are sensible, so just click “Annotate.”

● 39


KiCad Like a Pro

Figure A2.10: Every question mark is now a real, unique number (R1, R2, R3, C1, C2, D1, U1, J1). The parts still carry their generic values, which we set next.

Why bother, and why now? Because from here on, every part needs a unique name so we can refer to it without ambiguity, both to each other and to KiCad’s own tools. The wiring you are about to draw is easier to follow when you can say “the wire from U1 pin 3 to R3”; the check we run in Step 7 reports each finding by designator; and the board we build in the next chapter relies on each part having one. Annotation is quick, and doing it before wiring keeps the rest of the workflow smooth.

A2.2.4 Step 4: Set component values Numbering tells the parts apart; now we say what each one actually is. Look at your resistors and capacitors and you will see they still wear the generic value they were born with: a resistor that just reads R, a capacitor that just reads C. Setting the ‘value’ field turns the schematic into a precise description of the circuit, the difference between “a resistor” and “a 10 kΩ resistor.” To set a value, double-click a part (or select it and press “E”) to open its Properties, and type into the “Value” field. Work through the parts that need one: • R1: 10k • R2: 47k • R3: 470 • C1: 10nF • C2: 10uF The 555 (U1), the LED (D1), and the connector (J1) have no value to set in this sense; their name already says what they are. If you would rather set them all in one place, the Symbol Fields Table from the “Tools” menu lays every part’s value out in a grid. Where these particular numbers come from, and why they make the LED blink at the rate it does, is the subject of “Going Deeper” at the end of the chapter; for the tour, just enter them. With every part valued, the sheet reads as a precise shopping list (Figure A2.11), and we are ready to wire.

● 40


A2 A Hands-On Tour: Schematic

Figure A2.11: Every resistor and capacitor now declares its value (10k, 47k, 470, 10 nF, 10 µF). The sheet now says exactly what the circuit is made of.

A2.2.5 Step 5: Wire and label Now we draw the connections. In a schematic, a wire is not really a drawing of a physical wire; it is a way of declaring that two pins are electrically joined. Draw a wire from one pin to another and you have told KiCad, “these two points are the same node.” That node has a name (KiCad calls it a ‘net’), and in the next chapter the board will use those nets to know what to connect to what. To start wiring, press the “W” hotkey, or click the wire tool (the green diagonal line) on the right toolbar. Move the pointer to the end of a pin (you will see the cursor snap to it) and leftclick to begin a wire. Click again at each corner you want, and finish on the destination pin. Double-click, or press “Esc,” to end the wire. As you connect pins, notice the small squares that sit at the unconnected end of every pin: when a wire properly lands on a pin, that little square disappears. Those squares are a quiet, reliable hint. If you finish wiring and a square is still showing, something there is not actually connected, even if it looks close. Work your way around the circuit, following the finished schematic in Figure A2.1 as your guide. Connect the 555’s pins to the resistors and capacitors, run the output through the LED’s resistor to the LED, and bring the connector to the supply. Where a wire crosses a spot that another wire already occupies and the two should join, KiCad drops a small ‘junction’ dot automatically to show they are connected. Where wires merely cross without a junction dot, they are not connected, which is how you draw two signals that pass over each other without touching. A few moves make wiring painless: • To move a part without breaking its wires, hover over it and press “G” (the drag tool). The wires stretch and stay attached. • To move a part and leave its wires behind, press “M” (the move tool) instead. Use “G” most of the time; it keeps the circuit intact. • If a wire ever refuses to connect, it is almost always because an end is a hair off the grid. Nudge the wire or the part slightly so everything lands on the grid, and the connection will take. This is the payoff of the grid we met in Step 1.

● 41


KiCad Like a Pro

That handles every connection except the ones we drew as power symbols, and here is a small piece of magic worth pausing on. You placed several GND symbols around the sheet, near different pins, without any wire running between them. KiCad treats every pin attached to a GND symbol as part of the same ground net, by name, even though no wire visibly joins them. The same goes for VCC. That is why power symbols exist. Power symbols let you connect the supply and ground all over a busy sheet without dragging long wires across the whole drawing. Connecting by name, instead of by a drawn line, keeps the schematic readable. That same trick has a manual version called a ‘net label,’ and it is something you will use constantly. A net label is a name you attach onto a wire. Any two wires that carry the same label are connected, by name, just like the power symbols. Let’s name the wire that carries the blinking signal from the 555’s output to the LED’s resistor. Press the “L” hotkey (or click the label tool on the right toolbar); a small Label Properties dialogue opens where you type the name (Figure A2.12). Type BLINK, click “OK,” and drop the label onto that wire. The wire now has a friendly name, which makes the schematic easier to read and, later, easier to find that same signal over on the board.

Figure A2.12: Naming the output net “BLINK” in the Label Properties dialogue, with the wiring taking shape behind it.

Take your time here. Wiring is the part of schematic work that rewards a little patience, and it is far and away the most satisfying once it clicks. When every pin’s little square has vanished and the drawing matches Figure A2.1, the circuit is complete. Save your work with “Ctrl+S.” The circuit is drawn, numbered, valued, and named; next we tell each symbol which physical part it will become.

A2.2.6 Step 6: Assign footprints Here we reach the bridge between the circuit and the physical board. Every symbol on your sheet stands for a part’s function. A resistor’s symbol is the same zig-zag whether the real resistor is a tiny surface-mount chip or a fat through-hole part with long legs. Before we can lay out a board, we have to tell each symbol which physical part it will actually become. That physical pattern of pads and holes is the ‘footprint,’ and pairing a symbol with one is called ‘assigning a footprint.’ We will dig into why symbols and footprints are kept separate

● 42


A2 A Hands-On Tour: Schematic

in Chapter A4; for now, just know that the board cannot be built until each symbol knows its footprint. The most convenient way to assign footprints to a whole circuit at once is the Footprint Assignment tool. Open it from the “Tools” menu by choosing “Assign Footprints,” or from its button on the top toolbar (1 in Figure A2.13). A three-pane window appears: the available footprint libraries on the left (2), your symbols and their assignments in the middle (4), and the footprints inside the selected library on the right (3). To make an assignment, click a symbol in the middle, find a suitable footprint on the right, and double-click it.

Figure A2.13: The Footprint Assignment tool pairs each symbol with a physical footprint.

A few of the window’s controls make the job quicker, and they are numbered in Figure A2.13. The footprint filters at the top (5) narrow the long list on the right: type part of a name, here c_disc, and only the matching footprints remain, so you are not scrolling through thousands. The viewer button on the tool’s own toolbar (6) opens a window that draws the selected footprint at full size, a good habit for confirming you have the right pad pattern before you commit to it. As you work, “Apply, Save Schematic & Continue” (7) saves your progress without closing the tool. When every symbol has a footprint, click “OK” (8) to save the assignments and return to the schematic.

● 43


KiCad Like a Pro

Because every part in our blinker is a through-hole component (the friendlier kind to solder by hand, as we saw in Chapter A1), the footprints are easy to choose. Use exactly these: Symbol

What it is

U1 R1, R2, R3

The 555 (8-pin DIP)

C1 C2 D1 J1

Footprint

Package_DIP:DIP-8_W7.62mm Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_ P5.08mm_Horizontal Small ceramic (10 nF) Capacitor_THT:C_Disc_D3.0mm_W2.0mm_P2.50mm Electrolytic (10 µF) Capacitor_THT:C_Radial_D4.0mm_H5.0mm_ P1.50mm 5 mm LED LED_THT:LED_D5.0mm 2-pin pin header Connector_PinHeader_2.54mm:PinHeader_1x02_ P2.54mm_Vertical Axial resistors

If you ever want to assign a footprint to a single part instead of the whole circuit, you can: double-click the symbol on the sheet (or select it and press “E”) to open its Properties, and set the “Footprint” field there. The Footprint Assignment tool is just the faster way when you have several parts to do at once.

A2.2.7 Step 7: Electrical rules check Before we hand the design to the board, we ask KiCad to check our work. The ‘Electrical Rules Check,’ or ERC, reads the whole schematic and flags the kinds of mistakes that are easy to make and easy to miss. Common errors that the ERC finds and flags are pins left unconnected, power inputs with nothing driving them, or two outputs wired together. The ERC cannot tell you whether your circuit is a good idea, but it is excellent at catching the slips that would otherwise follow you onto the board. One small piece of housekeeping comes first, and it is one almost every board needs. Our blinker takes its power in through the connector, J1, not from a chip that flags itself as a supply, so KiCad cannot tell that the VCC and GND rails are properly fed by a power source. If you don’t do anything, the check would raise the error flag “power input with nothing driving it” I mentioned a moment ago. The fix is a small marker (a special-purpose symbol) called a PWR_FLAG, which simply tells the checker “real power enters the net here.” You add it just as you added VCC and GND. Open the power-symbol chooser (the “Add Power Symbol” button, or press “P”), search for PWR_FLAG, and drop one on the VCC net and one on GND, near the connector. With those in place, the check comes back clean. We will not make more of the ERC than that today; in a later project, on a busier board, we will slow down and walk through a couple of the violations it most often reports and how to read them. Open the ERC from the button on the top toolbar (1 in Figure A2.14), or from the “Inspect” menu by choosing “Electrical Rules Check,” then click “Run ERC” (2) in the window that appears. On a clean schematic the Violations tab reads zero and the “Errors” and “Warnings” counts both show 0 (3), and you can move on. The neighbouring “Ignored Tests” tab lists a handful of checks KiCad skips by default; leave it as it is. If you do see violations, don’t worry; that is the tool doing its job.

● 44


A2 A Hands-On Tour: Schematic

Figure A2.14: A clean ERC. No errors, no warnings.

It is worth seeing the ERC catch something, so let’s break the circuit on purpose. Go back to the sheet, select the wire that joins C1 to the 555’s CONT pin (pin 5), and delete it. Now re-run the ERC. This time it reports two violations (Figure A2.15), both reading “Pin not connected”. One violation is on C1 pin 1, and one on U1 pin 5, the two ends the deleted wire used to join. Click a violation in the list, and the editor pans in the background to the exact spot and drops a marker arrow on the trouble, so you can see precisely where the problem is. There is no guessing.

Figure A2.15: With a wire missing, the ERC points straight at the two unconnected pins, C1 pin 1 and U1 pin 5 (CONT).

Now, let’s fix it. Redraw the wire you deleted and run the ERC once more. The violations clear. This is the habit to build, run the ERC, click each violation, fix it, and re-run until the report is clean. Do it now, while the circuit is small and the fixes take seconds. One note on warnings (as opposed to errors). You may sometimes see a yellow warning rather than a red error, for example a wire end sitting slightly off the grid, or a part with a spare unit you didn’t use. Warnings are KiCad pointing at something it wants you to look at, not necessarily something broken. Read each one, and once you understand it and are sure it does not affect your circuit, it is safe to let it stand. The skill is not making the report empty at all costs; it is understanding every line in it.

● 45


KiCad Like a Pro

A2.2.8 Step 8: Hand off to layout The schematic is complete. Every part placed, numbered, and valued, every connection drawn, the important net named, footprints assigned, and the ERC clean. Save the design one more time with “Ctrl+S.” You have just completed the first half of designing a PCB, and it is genuinely the half that matters most. The schematic is the source of truth for the entire project; everything the board does, it does because the schematic said so. What remains is to carry this design across to the PCB Editor and start placing the real parts. KiCad makes the handoff a single command. From the “Tools” menu, choose “Update PCB from Schematic.” KiCad opens the board editor and brings every part and every connection across, so you never have to re-enter any of it. We will not actually lay out the board in this chapter; that is the whole of the next one. But it is worth seeing where the bridge is, because you will cross it on every project from here on.

A2.3 Explainer: How the blinker works

This section is optional, but I thought you might be curious to learn how the blinker circuit works. The tour is about the editor, not the electronics, and you can turn to Chapter A3 without reading a word of it. Inside the chip are two voltage comparators2 and a memory element called a flip-flop. The timing capacitor, C2, charges up through the two timing resistors, R1 and R2, toward the supply voltage. The moment it reaches two-thirds of the supply, the chip flips its output (pin 3) low and quietly drains the capacitor back down, this time through R2 alone. When the capacitor falls to one-third of the supply, the chip flips the output high and lets it charge again. That endless climb-and-drain is the “astable” in “astable multivibrator”. You don’t need a button, or trigger to do this, just a circuit that will not sit still. The LED, wired off the output through R3, lights while the output is high and goes dark while it is low, and so it blinks. The two timing resistors and the capacitor set the speed, by a tidy rule worth knowing: the blink frequency, in hertz, is about 1.44 ÷ ((R1 + 2 × R2) × C2). The values you set in Step 4 are a classic, friendly choice. We use R1 = 10 kΩ, R2 = 47 kΩ, and C2 = 10 µF to blink the LED a little over once a second. Halve C2 to blink twice as fast; double it to blink half as fast. R3, the LED’s resistor, is not fussy (470 Ω is safe across the whole supply range), and C1, the small capacitor on pin 5, steadies an internal reference, for which 10 nF is the usual value. The part you placed, the NE555, is the original bipolar chip, and it prefers a supply of about 4.5 V and up, so a 9 V battery or four AA cells suits it well. If you would rather run the blinker from something smaller, such as a pair of AA cells or a coin cell, swap the NE555 for a CMOS version such as the TLC555 or ICM7555. It is pin-for-pin identical, drops straight into the same footprint, and works down to around 2 V. Nothing else in the circuit changes. None of it is original to this book; the 555 astable is one of the most reproduced circuits in all of electronics, and it is worth meeting the primary sources. The 555’s own datasheet is the authority. The chip was designed by Hans Camenzind at Signetics in the early 1970s, and the astable circuit you drew is, almost pin for pin, the 2 A voltage comparator is a circuit with two inputs and one output that answers a single question: which of the two input voltages is higher? If the voltage on the + input is above the one on the - input, the output goes high; if it is below, the output goes low. There is no in-between, which is what separates a comparator from an amplifier. In the 555, one comparator watches for the capacitor reaching two-thirds of the supply and the other watches for it falling to one-third, and between them they tell the flip-flop when to switch.

● 46


A2 A Hands-On Tour: Schematic

“astable operation” figure from that original datasheet. Texas Instruments still publishes the modern descendant (the very document your schematic already links to), and it carries the same frequency formula and the timing curves that go with it. Read it at https://www.ti.com/ lit/ds/symlink/ne555.pdf. Forrest M. Mims III’s “555 Timer IC Circuits” is the hobbyist’s classic. Mims’s hand-drawn mini-notebooks taught a generation of makers, and his LED flasher is, near enough, the board you are building. If any single source is “the original” a maker would point to, it is this one; it began life as a Radio Shack “Engineer’s Mini-Notebook” and is still in print today. Everything described here (the capacitor climbing and draining, the output snapping between high and low) is just what a circuit simulator draws for you as a moving graph: the output a square wave, the timing capacitor a sawtooth swinging between one-third and two-thirds of the supply. KiCad has a built-in simulator that will do exactly that, but it is a more advanced tool than this first tour needs, and driving it means first attaching a simulation model to the 555, which the stock symbol does not carry. KiCad’s official documentation covers the simulator in full when you are ready for it. You have drawn a complete, checked schematic in the KiCad Schematic Editor, following the same eight steps you will use forever. Not bad for a first lap. In the next chapter we take this design into the PCB Editor and turn it into a real, manufacturable board. Let’s go make a board.

● 47


Index Symbols 3D models 14, 63, 89, 90, 127, 131, 132, 138, 160, 161, 242, 243, 244, 245, 246, 381, 382, 615 3D-shape association 565 3D viewer 31, 48, 63, 68, 69, 76, 79, 81, 89, 98, 100, 127, 128, 129, 134, 159, 162, 178, 179, 185, 186, 235, 236, 244, 246, 278, 381, 383, 384, 424, 425, 443, 460, 522, 545, 565, 609, 614 555 timer 32, 36, 47, 531 A Add a permanent dimension 180 Annotate 33, 39, 74, 77, 104, 137, 140, 181, 321, 325, 329, 333, 391, 395, 491, 492, 537, 541, 542, 554 Annotation 40, 74, 95 Annular ring 23, 171, 233, 251, 293, 309, 341, 534, 586, 597, 613, 614 Assembly 28, 29, 63, 71, 164, 165, 174, 175, 181, 280, 283, 284, 285, 286, 289, 292, 299, 301, 304, 305, 383, 434, 440, 454, 465, 469, 476, 477, 478, 524, 541, 544, 578, 594, 602, 616, 617 Assign footprints 33, 42, 43, 74, 77, 108, 146, 321, 334, 391, 402 B Back-annotation 536, 537, 539, 540, 541, 542, 613, 615 Bill of materials (BOM) 613 Bill of Materials, In Depth 281, 388, 462, 464, 465, 522, 536, 576 Board and Layout 338, 417 Board outline 49, 52, 63, 75, 77, 97, 115, 116, 153, 170, 171, 178, 260, 295, 340, 344, 345, 372, 416, 500, 523, 556, 564, 578, 583 Board setup 249, 357, 378, 379, 428, 431, 433, 437, 445, 451, 457, 482, 502, 505 Board-Setup basics 183 Breadboard power supply 15, 99, 100, 104, 113, 164, 249 Building the First Cell 321, 324 Bulk Edits 533 Buses 32, 95, 365, 526, 533 C Calculator tools 31, 252, 320, 411, 412, 416, 504, 592 Capacitors 5, 33, 40, 41, 53, 81, 101, 102, 104, 106, 107, 133, 134, 139, 153, 157, 281, 282, 283, 284, 313, 314, 315, 324, 331, 333, 351, 354, 357, 358, 375, 376, 380, 383, 392, 394, 395, 399, 403, 419, 420, 421, 422, 430, 440, 462, 480, 482, 503, 535, 536, 540 Capturing the Cell as a Design Block 321, 327 Capturing the driver stage as a design block 482, 503, 512, 515 Checking the reflowed board 607 Check the new via connections 442 Clearance 54, 61, 62, 116, 122, 151, 157, 158, 171, 183, 240, 242, 251, 252, 253, 256, 260, 262, 263, 265, 267, 268, 269, 271, 293, 308, 309, 316, 323, 357, 363, 364, 370, 373, 393, 406, 407, 408, 409, 412, 413, 416, 431, 432, 435, 437, 438, 440, 447,

● 619


KiCad Like a Pro 450, 451, 452, 454, 458, 478, 479, 481, 515, 516, 520, 529, 584, 586, 595, 596, 597, 598, 613, 614, 616, 617 Clear the remaining warnings 454 Completing the Bill of Materials 462 Component classes 249, 263, 481, 519, 561 Component placement 422 Component values 33, 40, 74, 77, 103, 107, 141, 321, 391, 396, 592 Copper 14, 16, 22, 23, 24, 25, 26, 27, 28, 29, 31, 48, 49, 50, 51, 52, 54, 56, 57, 58, 59, 60, 62, 63, 64, 67, 69, 70, 71, 76, 77, 97, 113, 118, 119, 120, 121, 122, 127, 128, 150, 151, 152, 155, 156, 157, 158, 159, 160, 164, 169, 170, 171, 173, 179, 181, 184, 185, 201, 209, 210, 214, 217, 221, 222, 223, 224, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 241, 242, 246, 248, 249, 250, 251, 252, 254, 257, 258, 259, 262, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 292, 293, 294, 295, 297, 300, 302, 303, 304, 306, 307, 308, 309, 310, 319, 320, 323, 339, 341, 342, 343, 351, 353, 356, 357, 358, 360, 362, 364, 365, 366, 370, 372, 373, 374, 375, 376, 377, 383, 385, 388, 389, 390, 405, 409, 410, 411, 412, 413, 414, 415, 419, 420, 422, 426, 427, 428, 429, 430, 431, 433, 434, 435, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 450, 451, 452, 454, 457, 458, 459, 461, 466, 468, 469, 470, 471, 473, 474, 478, 479, 481, 482, 485, 489, 494, 498, 499, 500, 501, 504, 505, 515, 517, 518, 519, 521, 523, 524, 525, 526, 528, 529, 530, 531, 532, 533, 534, 536, 546, 578, 580, 586, 587, 588, 592, 593, 594, 595, 596, 597, 602, 605, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618 Copper fills 49, 58, 76, 77, 120, 121, 372 Copper layers 14, 22, 50, 51, 63, 76, 97, 152, 170, 214, 228, 229, 230, 231, 232, 233, 249, 250, 257, 268, 276, 295, 342, 351, 356, 372, 411, 441, 474, 587, 588, 594, 617 Copper zones 58, 97, 121, 122, 156, 230, 265, 266, 268, 372, 373, 375, 437, 440, 449, 450, 529 Courtyard 54, 112, 210, 214, 216, 217, 229, 231, 240, 241, 242, 247, 262, 263, 316, 341, 377, 379, 385, 409, 410, 416, 419, 424, 425, 427, 431, 432, 433, 478, 615 Creating a Zone 266 Cross-probing 97, 98, 132, 153, 154, 184, 185, 186, 485, 614 Custom design rules 48, 388, 478, 580, 584, 613 Custom footprints 210, 390, 565, 588, 591 Custom Rules (Intro) 256 Custom symbols 196, 390 D Datasheets 146, 583 Design blocks 32, 314, 329, 384, 389, 481, 482, 542, 546, 551 Design for manufacturing (DFM) 614 Design rules check (DRC) 72, 293, 614 Design variants 289, 388, 389, 465, 478, 479, 522, 523, 524, 536, 576, 614 Design: what you do in KiCad 29 DFM basics 170 DFM Rules 309, 310 Dimensions 18, 52, 153, 163, 173, 181, 210, 214, 219, 221, 222, 228, 230, 239, 245, 247, 267, 298, 313, 339, 341 DNP (do not populate) 281, 282, 283, 286, 289, 290, 465, 467, 468, 474, 522, 523, 524, 525, 535, 536, 537, 576, 577, 578, 579, 614 Drawing the override zone and giving it priority 440

● 620


Index Drawing the schematic 103, 137, 210 DRC and cleanup 448 Drill files 64, 65, 129, 130, 166, 167, 170, 294, 295, 474, 475 DRV8833 16, 196, 197, 199, 200, 201, 205, 206, 207, 208, 209, 210, 211, 212, 213, 216, 222, 228, 229, 234, 249, 252, 273, 274, 275, 281, 295, 301, 302, 306, 307, 308, 309, 346, 385, 387, 389, 390, 394, 396, 397, 398, 401, 411, 416, 419, 433, 440, 454, 462, 464, 466, 471, 472, 479, 480, 482, 483, 485, 489, 490, 491, 493, 497, 502, 503, 504, 506, 507, 512, 532, 568, 569, 570, 574, 576, 579, 588, 598, 602, 607, 612 E Editor orientation 16, 92 Electrical Rules Check (ERC) 72, 202, 615 Embedded files 89, 242, 479, 565, 615 ENIG 27, 28, 469, 470, 474, 617 Essential recipes (Beginner) 176 Explainer: How the blinker works 46 Export a schematic PDF 187 Exporting a BOM 164 Exporting both bills 467 Exposed thermal pad 201, 209, 210, 211, 214, 228, 292, 295, 306, 385, 389, 411, 591 F Fabrication 18, 28, 29, 30, 63, 71, 214, 220, 230, 231, 233, 243, 266, 283, 289, 292, 294, 304, 309, 341, 346, 418, 456, 468, 469, 473, 474, 476, 521, 523, 524, 525, 529, 576, 577, 598, 616 Field-name templates 287 Fields and the Embedded Datasheet 242 Filled zones 97, 265 Finding and fixing a design defect 109, 148 Finding, Importing, and Managing Parts 79, 102, 103, 133, 136, 316 Finding parts in the standard library 80 Flip a part to the back 178 Footprint assignment 43, 44, 95, 108, 146, 209, 317, 334, 335 Footprint Association 209, 390 Footprint editor 31, 89, 210, 211, 217, 227, 228, 243, 316, 390, 588, 589 Footprint libraries 43, 146, 211, 322, 328 Footprint wizard 227, 588, 589 FR-4 22, 23, 615, 617 From your files to a board in your hand 71 G Generate the Gerbers 49, 63, 76, 77 Generating Gerbers 65, 166 Generating the drill file 475 Generating the position file 476 Geographical reannotation 537, 538, 540, 541, 542, 554, 615 Gerber files 18, 31, 63, 76, 129, 164, 167, 168, 230, 235, 294, 473, 615 Gerber viewer 31, 167, 294, 295, 298, 300, 306, 307, 468, 578 Getting Your Board Made 65, 164, 478

● 621


KiCad Like a Pro Grid 35, 40, 41, 45, 52, 53, 54, 55, 57, 74, 92, 94, 99, 107, 115, 116, 117, 141, 153, 165, 182, 203, 204, 210, 213, 217, 218, 219, 222, 223, 224, 225, 226, 228, 232, 233, 235, 236, 237, 238, 240, 247, 273, 274, 275, 278, 290, 294, 307, 317, 331, 338, 339, 340, 345, 346, 347, 348, 349, 350, 351, 384, 417, 418, 421, 422, 427, 500, 515, 535, 536, 545, 568, 577, 589, 590, 591 Grid array 236, 591 Ground plane 49, 121, 156, 157, 428, 444, 472, 580, 610, 612 Grouping, and what it does to this board 464 H Hand off to layout 33, 46, 75, 321, 391 Hand soldering 390, 440, 444, 472, 602 HASL 27, 28, 173, 469, 470, 617 H-bridge motor driver 15, 196, 252, 385, 506, 579, 598, 602 Highlight a net (Cross-Probe) 184 Hop-over a wire crossing in the schematic 192 Hotkeys 95, 97, 99, 189, 190, 528 I Import from the schematic 49, 75, 77, 343 Importing a Fab’s Design Rules 251, 341, 405, 586 Importing libraries 81 Installing KiCad 30 Intermediate Recipes 16, 242, 251, 252, 263, 278, 341, 384, 405, 416, 479, 488, 523, 526, 601 J Junctions 192 K Keep-Outs 275 KiCad project manager 31, 138, 167, 177, 191 L Layer stackup 50 Laying out the board 111, 150 Layout: Two thermal fields on one board 515 Learning objectives of this extension 481 LED matrix array 15, 339 Libraries 15, 18, 30, 31, 32, 43, 63, 69, 79, 81, 82, 83, 84, 89, 102, 104, 137, 138, 146, 160, 191, 196, 199, 208, 209, 211, 240, 244, 262, 287, 315, 322, 328, 382, 391, 483, 547, 570, 597, 615 M Managing Your Symbol Library 208 Manufacturability analysis 293 Manufacturing files 65, 75, 98, 100, 132, 164, 169, 175, 292 MCU, Power, and Controls 321, 329 Measure a distance 179 Mounting holes 28, 382

● 622


Index Multi-channel design 263, 278, 384, 542, 556, 557, 558, 565, 616 Multi-unit symbols 207, 208 N Net classes 48, 156, 183, 248, 249, 250, 252, 253, 256, 261, 263, 265, 281, 314, 321, 322, 323, 324, 336, 341, 343, 363, 385, 386, 388, 389, 392, 393, 398, 405, 406, 410, 411, 416, 495, 506, 579, 580, 583, 584, 585, 586, 587, 596, 597, 614 Net labels 139, 490, 493, 511, 527 Nets 41, 48, 61, 69, 70, 71, 74, 96, 97, 110, 137, 142, 143, 144, 145, 156, 183, 185, 192, 249, 250, 252, 253, 254, 255, 256, 259, 260, 263, 265, 269, 271, 274, 281, 314, 315, 320, 323, 326, 327, 332, 336, 337, 338, 357, 373, 378, 389, 393, 394, 399, 402, 404, 405, 410, 412, 413, 427, 428, 430, 433, 434, 435, 436, 437, 438, 448, 478, 482, 485, 490, 494, 495, 496, 497, 499, 507, 511, 514, 522, 526, 527, 529, 530, 531, 541, 554, 580, 585, 614, 616 Net ties 530, 532 O Ordering a PCB 172 P Pad connections 242, 269, 270, 280, 373, 438, 441, 450, 532 Pads 22, 23, 24, 25, 26, 27, 28, 29, 42, 52, 58, 60, 64, 68, 71, 74, 76, 79, 82, 86, 97, 102, 103, 123, 124, 128, 154, 157, 158, 159, 161, 169, 170, 171, 173, 179, 182, 210, 213, 214, 217, 218, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 235, 236, 237, 238, 239, 240, 241, 243, 246, 247, 257, 259, 265, 269, 270, 271, 272, 273, 275, 276, 279, 292, 294, 297, 299, 306, 307, 308, 316, 317, 330, 340, 350, 351, 352, 356, 357, 361, 362, 363, 371, 389, 390, 406, 408, 409, 415, 422, 427, 429, 430, 431, 434, 435, 437, 439, 440, 441, 442, 444, 445, 446, 447, 449, 450, 451, 453, 468, 469, 472, 475, 478, 482, 486, 489, 494, 499, 508, 509, 516, 518, 521, 522, 524, 528, 529, 530, 532, 536, 584, 589, 590, 591, 602, 605, 607, 608, 609, 612, 614, 615, 616, 617, 618 Pad stacks 231, 233, 234, 479, 591 Panelisation 292, 299, 304, 305, 306 Paste and Stencil 293, 306 Paste layer 295, 306, 474, 478, 602 PCB anatomy 21 PCB editor 31, 33, 46, 47, 48, 49, 50, 67, 75, 92, 95, 96, 98, 99, 110, 112, 113, 150, 151, 166, 169, 177, 182, 184, 185, 186, 211, 247, 254, 257, 283, 296, 297, 302, 317, 321, 340, 343, 347, 350, 351, 355, 385, 391, 403, 405, 410, 485, 523, 537, 540, 541, 542, 545, 553, 577 PCB ordering 13 Pin table 201, 203, 204, 227, 289, 401, 568, 569, 571, 572, 573, 575, 576, 617 Place components 49, 53, 75, 77 Placing the second stage 489 Planning the Power Before You Draw 318 Plotting the Gerbers 473 Plugin and content manager 31, 191, 295, 296, 306, 592 Plugins 191, 283, 592 Position files 289, 468, 469, 477, 602 Power distribution 529 Power net class 252, 258, 264, 320, 411, 506

● 623


KiCad Like a Pro Preferences 82, 83, 84, 89, 93, 98, 99, 138, 153, 182, 186, 188, 189, 190, 208, 244, 287, 288, 323, 340, 347, 351, 391, 492, 528, 570, 580, 581, 597 Project templates 288, 579 Q Quick reference: both workflows 77 R Recover an earlier version 188 Reference designators 125, 126, 137, 140, 159, 263, 290, 313, 321, 325, 355, 358, 379, 396, 454, 455, 457, 498, 520, 533, 535, 537, 540, 546, 549, 613, 615 reporting a KiCad bug 488 Routing 18, 31, 53, 56, 58, 69, 70, 76, 97, 154, 157, 171, 182, 183, 188, 229, 249, 252, 256, 257, 258, 259, 260, 263, 266, 305, 326, 338, 350, 358, 359, 360, 363, 364, 365, 367, 368, 371, 372, 374, 375, 376, 384, 408, 410, 415, 416, 422, 426, 427, 429, 430, 435, 448, 452, 475, 501, 507, 515, 518, 529, 534, 545, 546, 550, 554, 555, 556, 557, 562, 563, 565, 580, 585, 614, 616, 617 Running Them in Order 303, 468 S Save a 3D snapshot 186 Schematic editor 93 Schematic: Setup 321, 322 Schematic: The Canonical Eight-Step Pass 391 Schematic workflow 33, 72, 73, 75, 77, 103, 137, 321 Sending it 478 Shapes, logos, and graphics 177 Sharing power 502, 517 Silkscreen 22, 27, 29, 48, 49, 61, 62, 63, 68, 71, 76, 77, 97, 113, 125, 126, 159, 170, 176, 177, 179, 181, 210, 214, 218, 220, 229, 231, 240, 241, 242, 247, 249, 260, 262, 293, 294, 300, 316, 341, 342, 353, 379, 380, 383, 406, 407, 434, 448, 453, 454, 455, 456, 457, 458, 459, 460, 461, 468, 474, 485, 487, 489, 499, 500, 509, 515, 524, 535, 542, 545, 563, 565, 589, 592, 597, 609, 615, 617 Solar power supply 15, 131, 132, 137 Soldermask 22, 26, 27, 29, 63, 71, 76, 97, 173, 176, 615, 617 Solder paste stencil 292, 616 Sourcing the parts 102, 133 Stamping Out the Other Three 321, 331 Suggested Fixes for DRC Violations (K10) 596 Surface finish 24, 27, 29, 71, 173, 297, 299, 469, 472, 617 Surface-mount devices (SMD) 24, 166, 223, 224, 229, 230, 231, 232, 234, 243, 297, 299, 334, 381, 382, 383, 477, 528, 532, 533, 589, 618 Symbol editor 31, 89, 197, 198, 199, 206, 207, 209, 211, 390, 568, 569, 570, 573 Symbol fields 40, 74, 107, 141, 146, 165, 206, 281, 284, 286, 287, 290, 396, 402, 462, 463, 465, 467, 492, 521, 522, 535, 536, 577, 578 Symbol libraries 82, 83, 84, 138, 208, 391, 570 Symbol Pin-Table CSV (K10) 568 Symbols 15, 29, 30, 31, 32, 33, 35, 36, 37, 38, 42, 43, 69, 73, 77, 79, 81, 82, 84, 89, 94, 104, 105, 106, 134, 137, 138, 139, 140, 142, 165, 191, 196, 197, 199, 207, 208, 209, 281, 282, 283, 290, 316, 321, 322, 323, 324, 325, 327, 328, 331, 336, 355, 390,

● 624


Index 391, 394, 403, 404, 416, 464, 465, 466, 467, 468, 474, 477, 483, 484, 485, 489, 491, 492, 496, 498, 508, 510, 523, 533, 535, 536, 545, 546, 554, 569, 570, 571, 573, 575, 579, 583, 598, 599 T Tables 14, 82, 83, 89, 104, 191, 196, 208, 316, 322, 426, 542 Teardrops 48, 528, 529, 530, 587, 618 Thermal relief 28, 59, 151, 152, 156, 157, 158, 230, 264, 269, 270, 271, 272, 406, 437, 439, 441, 447, 448, 449, 610, 618 Through-hole technology (THT) 23, 44, 108, 166, 230, 334, 382, 618 Tracks 23, 25, 26, 27, 28, 29, 31, 49, 50, 53, 56, 57, 58, 70, 76, 77, 92, 97, 119, 120, 152, 155, 157, 158, 169, 170, 179, 182, 184, 209, 229, 252, 261, 265, 266, 267, 268, 269, 272, 275, 276, 278, 292, 297, 319, 320, 339, 340, 356, 357, 359, 361, 362, 367, 368, 373, 374, 375, 376, 389, 407, 410, 412, 413, 414, 415, 427, 428, 429, 432, 458, 485, 487, 489, 499, 504, 508, 515, 518, 529, 530, 533, 534, 535, 553, 555, 559, 561, 563, 580, 583, 585, 593, 594, 597 Track widths 31, 119, 155, 183, 256, 281, 297, 314, 406, 580 Two faces of a part, and a likeness 68 U USB-C 15, 100, 101, 104, 105, 106, 107, 111, 112, 113, 117, 127, 128, 129, 131, 133, 165, 166, 174, 312, 313, 315, 319, 322, 329, 335, 353, 361, 363 V Vias 25, 26, 48, 97, 98, 170, 182, 210, 218, 223, 228, 229, 231, 232, 233, 236, 247, 250, 272, 273, 274, 275, 276, 278, 279, 307, 309, 323, 340, 357, 358, 365, 366, 367, 374, 375, 389, 390, 415, 433, 439, 440, 443, 445, 446, 447, 450, 471, 472, 475, 478, 482, 485, 486, 487, 489, 499, 506, 515, 519, 521, 528, 529, 530, 595, 596, 597, 611, 614, 616, 618 Via sizes 155, 252, 256, 393, 405, 506, 579, 580, 583, 587, 596 Via stitching 273, 375 Violation severity 249, 260, 261, 262, 272, 341 W Where to find part numbers 462 Wire and label 33, 41, 74, 77, 321, 391 Wire crossing 106, 192 Wiring 22, 23, 37, 39, 40, 41, 42, 49, 53, 67, 74, 75, 95, 103, 106, 107, 108, 109, 137, 141, 142, 143, 144, 145, 148, 192, 316, 325, 327, 330, 337, 339, 353, 360, 361, 364, 365, 366, 367, 371, 386, 394, 400, 403, 425, 434, 458, 500, 507, 508, 511, 512, 513, 531, 545, 546, 553 Z Zone manager 13, 269, 272, 278, 279, 441 Zone Properties 58, 121, 122, 156, 266, 268, 372, 373, 440, 450

● 625


KiCad Like a Pro – Getting Started From Your First Design to a Finished PCB Turn your PCB ideas into real, working hardware with KiCad 10. Whether you are designing your first circuit board or looking to take your next steps with KiCad, this practical, hands-on guide walks you from schematic capture to pro-quality boards ready for manufacturing. This book teaches printed circuit board design with KiCad 10, the free, open-source and unrestricted PCB suite used by hobbyists, students, and professional engineers alike. It assumes no previous experience. By the end of it, you will be designing original boards with parts, rules and layouts of your own. Part A takes you from a blank schematic sheet to two manufactured boards: a USB-C breadboard power supply and a tiny solar power supply. Along the way you learn two 8-step workflows, one for the schematic and one for the layout, which you can apply to every board you design afterwards.

Peter Dalmaris is an electrical engineer, a technology educator, and the founder of Tech Explorations. Peter has designed PCBs with KiCad since version 4, and is the author of KiCad Like a Pro, now in its fifth edition, and of a family of video courses on KiCad.

Part B makes you self-sufficient. You draw the symbols and footprints that no library has for you, set up a board for the current it carries and the factory that will build it, and finish with an original capstone project: a dual H-bridge motor driver built around the DRV8833. Topics include:

> schematic capture, annotation, ERC and footprint assignment > layout, routing, DRC and manufacturing outputs > finding, importing and managing parts > custom symbols and footprints > net classes, custom design rules and copper zones > bills of materials, design variants and DNP parts > design for manufacturing > design reuse on a 4×8×8 LED matrix and a four-motor driver > assembly by reflow or with a soldering iron > a Mini Encyclopedia of PCB terms and KiCad techniques

Scan the QR code (www.elektor.com/21370) to continue your journey in PCB design with Elektor.

Elektor International Media www.elektor.com


Turn static files into dynamic content formats.

Create a flipbook
KiCad Like a Pro – Getting Started (Extract) by Elektor - Issuu