This document is Copyright © 2010-2024 by its contributors as listed below. You may distribute it and/or modify it under the terms of either the GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 or later, or the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), version 3.0 or later.

Tutti i marchi registrati all’interno di questa guida appartengono ai loro legittimi proprietari.

Collaboratori

Graham Keeth, Jon Evans, Glenn Peterson.

Traduzione

Marco Ciampa <[email protected]>, 2014-2021.

Collaboratori precedenti

David Jahshan, Phil Hutchinson, Fabrizio Tappero, Christina Jarron, Melroy van den Berg.

Feedback

The KiCad project welcomes feedback, bug reports, and suggestions related to the software or its documentation. For more information on how to submit feedback or report an issue, please see the instructions at https://www.kicad.org/help/report-an-issue/

Introduction to KiCad Version 8

KiCad è una suite software open source per la creazione di schemi di circuiti elettrici, circuiti stampati (PCB) e descrizioni delle parti associate. KiCad supporta flussi di lavoro di progettazione integrati in cui uno schema e un C.S, corrispondenti vengono progettati assieme, ma anche flussi di lavoro indipendenti per usi speciali. KiCad include anche diverse utilità per aiutare nella progettazione di schemi e C.S., tra cui una calcolatrice di C.S. per determinare le proprietà elettriche delle strutture dei circuiti, un visualizzatore file Gerber per l’ispezione dei file di produzione, un visualizzatore 3D per visualizzare la scheda finita e un simulatore SPICE integrato per il controllo del comportamento circuitale.

KiCad funziona su tutti i principali sistemi operativi e su un’ampia gamma di computer. Supporta circuiti stampati con un massimo di 32 strati rame ed è adatto a creare progetti di ogni tipo di complessità. KiCad viene sviluppato da un team di programmatori e progettisti elettronici volontari provenienti da tutto il mondo con la missione di creare un programma di progettazione elettronica (CAD) gratuito e libero per la progettazione professionale.

The latest documentation for KiCad is available at https://docs.kicad.org. This document applies to KiCad version 8.0.

Scaricamento e installazione di KiCad

KiCad funziona su molti sistemi operativi, inclusi Microsoft Windows, Apple macOS e molte delle principali distribuzioni Linux.

Per trovare istruzioni aggiornate e collegamenti per il download consultare l’indirizzo https://www.kicad.org/download/. Queste istruzioni non sono incluse in questo manuale in quanto possono cambiare nel tempo e con il rilascio degli aggiornamenti del sistema operativo.

I rilasci stabili di KiCad avvengono periodicamente secondo la https://dev-docs.kicad.org/" "en/rules-guidelines/release-policy/[Politica dei rilasci stabili di KiCad]. Nuove funzioni vengono aggiunte continuamente al ramo di sviluppo. Se si vuole sfruttare queste nuove caratteristiche e contemporaneamente aiutare a testarne lo sviluppo, scaricare l’ultimo pacchetto "nightly build" ovvero sperimentale, per la propria piattaforma. I pacchetti sperimentali possono presentare dei bachi tuttavia è l’obiettivo del team di sviluppo di KiCad mantenere il ramo di sviluppo più utilizzabile possibile anche durante lo sviluppo di nuove funzionalità.

Supporto

Se avete idee, commenti o domande o se vi serve solamente un aiuto:

Concetti di base e diagramma di flusso

Il flusso di lavoro tipico di KiCad consiste in due compiti principali: disegno di uno schema elettrico e progettazione di un circuito stampato.

Lo schema elettrico è una rappresentazione simbolica del circuito: esso indica che componenti vengono impiegati e quali sono le connessioni che vengono effettuate tra di essi. I simboli nello schema sono rappresentazioni grafiche dei componenti elettronici presenti in esso, come lo zigzag per una resistenza o un triangolo per un amplificatore operazionale. Lo schema contiene i simboli per ogni componente del progetto, con i fili che collegano i piedini nei simboli. In genere lo schema elettrico viene creato per primo, in seguito si dispone i componenti nel circuito stampato.

Schema elettrico di esempio

La scheda è la realizzazione fisica dello schema, con le impronte dei componenti posizionate sulla scheda e le tracce in rame che realizzano le connessioni descritte nello schema. Le impronte sono un insieme di aree di rame che corrispondono ai pin su un componente fisico. Quando la scheda viene prodotta e assemblata, il componente verrà saldato sulla sua impronta corrispondente sul circuito stampato.

Progetto di esempio

KiCad ha finestre separate per disegnare lo schema ("Editor dello schema"), disporre la scheda ("Editor del Circuito Stampato") e modificare simboli e impronte ("Editor dei simboli" e "Editor delle impronte"). KiCad viene fornito con un’ampia libreria di simboli e impronte di alta qualità forniti all’utente, ma è anche semplice creare nuovi simboli e impronte o modificare simboli e impronte esistenti.

Simbolo di esempio
Esempio di impronta

Infine, è importante capire che KiCad ha un flusso di lavoro basato sul progetto. Un progetto KiCad è una cartella con un file di progetto, uno schema, un layout o disposizione del circuito stampato e, facoltativamente, altri file associati come librerie di simboli e impronte, dati di simulazione, distinta di base dei componenti, ecc. Molte impostazioni relative al progetto, comprese le netclass e le regole di progettazione, vengono memorizzate a livello di progetto. L’apertura di una scheda al di fuori del progetto associato può comportare la mancanza di informazioni di progettazione, quindi è meglio assicurarsi di mantenere assieme tutti i file associati ad uno specifico progetto.

Il flusso di progettazione di C.S.

In genere, lo schema elettrico viene disegnato per primo. Ciò significa aggiungere simboli allo schema e tracciare le connessioni tra di loro. Potrebbe essere necessario creare simboli personalizzati se i simboli appropriati non sono già disponibili. In questa fase vengono anche selezionate le impronte per ogni componente, con impronte personalizzate create secondo necessità. Quando lo schema è completo e il progetto ha superato un controllo delle regole elettriche (ERC), le informazioni sul progetto nello schema vengono trasferite all’editor del circuito stampato e inizia la fase di layout.

Lo schema descrive quali componenti sono presenti nel progetto e come sono collegati; l’editor del circuito stampato usa queste informazioni per semplificare la disposizione e prevenire discrepanze tra lo schema e il C.S.. Il processo di layout richiede il posizionamento accurato di ciascuna impronta sul circuito stampato. Dopo il posizionamento dei componenti, le tracce di rame vengono tracciate tra i componenti in base alle connessioni nello schema e ad altre considerazioni elettriche, come resistenza di traccia, requisiti di impedenza controllata, diafonia, ecc.

Spesso lo schema dovrà essere aggiornato dopo l’inizio della disposizione; le modifiche allo schema possono essere facilmente riflesse nel progetto dello stampato. Spesso può accadere il contrario: qualsiasi modifica progettuale apportata al layout fisico della scheda può essere rimandata indietro allo schema per mantenere le due coerenti uno con l’altro.

Quando il layout della scheda è completo e la scheda ha superato il controllo regole elettriche (DRC), vengono generati i file necessari per la fabbricazione in modo che la scheda possa essere prodotta dal fabbricante di circuiti stampati.

Tutorial parte 1: il progetto

La prima cosa da fare quando si inizia è creare un nuovo progetto. Aprendo KiCad si aprirà la finestra del progetto. Fare clic su FileNuovo progetto, individuare la posizione desiderata e assegnare un nome al progetto, ad esempio per-iniziare. Assicurati che la casella di controllo Crea una nuova cartella per il progetto sia selezionata, quindi fare clic su Salva. Questo creerà tuoi file di progetto in una nuova sottocartella con lo stesso nome del progetto.

Il gestore progetti dopo la creazione di un nuovo progetto

A sinistra, il riquadro File progetto elenca i file nel nuovo progetto. C’è un file progetto con estensione .kicad_pro, un file schema con estensione .kicad_sch e un file circuito stampato con estensione .kicad_pcb. Questi file condividono tutti lo stesso nome del progetto.

Potrebbe esserci anche una cartella -backups: KiCad creerà automaticamente il backup del progetto quando si salva, e opzionalmente, a intervalli di tempo fissi. Le impostazioni di backup sono configurabili andando su PreferenzePreferenze…​ComuniBackup progetto.

Opening the Preferences dialog may trigger a library table configuration dialog. This dialog is explained below.
Impostazioni di backup del progetto

A destra della finestra del progetto, ci sono dei pulsanti per avviare i vari strumenti forniti da KiCad. L’avvio di questi strumenti aprirà automaticamente il file di progettazione associato (dello schema o del C.S.) dal progetto corrente. Iniziare aprendo l’editor degli schemi elettrici.

Tutorial parte 2: schemi elettrici

Impostazione tabella librerie dei simboli

La prima volta che si apre l’editor degli schemi, viene visualizzata una finestra di dialogo che chiede come configurare la tabella della libreria dei simboli globale. La tabella delle librerie di simboli indica a KiCad quali librerie di simboli utilizzare e dove si trovano. Se si ha installato le librerie predefinite con KiCad, cosa consigliata, selezionare l’opzione predefinita: Copia la tabella librerie simbolo globale predefinita (raccomandato).

Se KiCad non riesce a trovare le librerie nella posizione di installazione prevista, questa opzione verrà disabilitata. In tal caso, si dovrebbe scegliere la seconda opzione, *Copia la tabella librerie simbolo globale personalizzata. Fare clic sul pulsante cartella in fondo, ed esplorare la cartella del percorso data. Selezionare il file sym-lib-table.

La posizione dei file tabella librerie predefinite dipende dal sistema operativo e può variare in base alla posizione di installazione. In basso le posizioni predefinite per ogni sistema operativo:

  • Windows: C:\Program Files\KiCad\8.0\share\kicad\template\

  • Linux: /usr/share/kicad/template/

  • macOS: /Applications/KiCad/KiCad.app/Contents/SharedSupport/template/

Configurazione tabella librerie simbolo

Basi dell’editor degli schemi elettrici

Per fare pan in giro per lo schema, fare clic e trascinare con il pulsante centrale o quello destro del mouse. Ingrandire e rimpicciolire con la rotellina or F1 e F2. Gli utenti dei portatili potrebbero trovare comodo cambiare i controlli del mouse per accordarli meglio con il touchpad; i controlli del mouse sono configurabili in PreferenzePreferenze…​Mouse e Touchpad.

Per impostazione predefinita, KiCad abilita un’impostazione del mouse denominata Centra e sposta il puntatore con lo zoom. Quando questa funzione è abilitata, il cursore del mouse si sposta automaticamente al centro dello schermo quando l’utente esegue lo zoom avanti o indietro. Ciò mantiene la regione ingrandita sempre centrata. Questa funzione può sembrare un po' strana all’inizio, ma molti utenti la trovano utile una volta abituati. Provare a ingrandire e rimpicciolire con il puntatore del mouse in diverse aree dell’area di lavoro. Se il comportamento dello zoom predefinito risulta scomodo, disabilitare la funzione nelle preferenze Mouse e Touchpad.

Preferenze mouse e touchpad

The toolbar at the left side of the schematic editor screen contains basic display settings. The toolbar at the right side of the screen contains tools for editing the schematic.

Alla maggior parte degli strumenti in KiCad sono assegnati comandi da tastiera predefiniti o possono essere assegnati comandi da tastiera personalizzati. Per visualizzare tutti i comandi da tastiera, andare su AiutoElenco tasti…​. I comandi da tastiera possono essere modificati in PreferenzePreferenze…​Comandi da tastiera.

Impostazione foglio schema

Prima di disegnare qualcosa nello schema, impostare il foglio dello schema stesso. Fare clic su FileImpostazioni pagina. Assegnare allo schema un titolo e una data e, se si vuole, modificare il formato della carta.

Impostazioni pagina schema

Aggiunta di simboli allo schema

Start making the circuit by adding some symbols to the schematic. Open the Choose Symbol dialog by clicking the Add Symbols button add component 24 on the right side of the window or pressing A.

This action will trigger the Footprint Library Table Setup dialog if it has not already been triggered. This dialog is equivalent to the Symbol Library Table Setup dialog explained earlier, but for footprints instead of symbols.

Di nuovo, selezionare l’opzione predefinita: Copia la tabella librerie impronta globale predefinita (raccomandato). Se questa opzione è disabilitata, selezionare la seconda opzione, Copia tabella librerie impronta globale personalizzata. Fare clic sul pulsante cartella in basso e passare la posizione indicata le istruzioni di configurazione della tabella della libreria dei simboli. Selezionare il file fp-lib-table e fare clic su OK.

La finestra di dialogo Scegli simbolo elenca le librerie di simboli disponibili e i simboli dei componenti in esse contenuti. I dispositivi di base come componenti passivi, diodi e altri simboli generici si trovano nella libreria Device. Dispositivi specifici, come un tipo particolare di LED, si trovano nelle altre librerie.

Scorrere verso il basso fino alla libreria "Device", espanderla e selezionare il simbolo "LED". Fare clic su OK e fare nuovamente clic per posizionare il simbolo nello schema.

Il simbolo LED nella finestra di dialogo Scegli simbolo

Quindi, aggiungere una resistenza di limitazione di corrente. Tornare al selettore dei simboli, ma questa volta provare a cercare una resistenza inserendo "R" nella casella del filtro in alto. Di nuovo, si trova nella libreria Device. Il dispositivo R è un simbolo di resistenza rettangolare in stile IEC. Un simbolo R_US è disponibile anche per gli utenti che preferiscono il simbolo a zigzag in stile ANSI. Selezionare un simbolo di resistenza e aggiungerlo allo schema.

Infine, aggiungere una batteria per alimentare il LED. La libreria Device ha il simbolo appropriato Battery_Cell.

Schema con simboli piazzati

Selezione e spostamento oggetti

Poi, posizionare i simboli correttamente l’uno rispetto all’altro, come mostrato nello screenshot. A tale scopo, selezionare, spostare e ruotare i simboli.

Schema con simboli spostati e ruotati

In KiCad 8.0, objects are selected by clicking on them. Additional objects can be added to the selection with Shift+click, or removed with Ctrl+Shift+click (macOS: Cmd+Shift+click). You can toggle an item’s selection state with Ctrl+click (macOS: Cmd+click).

È anche possibile trascinare la selezione; trascinando da sinistra a destra si selezionano gli oggetti che sono interamente racchiusi dalla casella di selezione, mentre trascinando da destra a sinistra si selezionano anche gli oggetti che sono parzialmente racchiusi dalla casella di selezione. Maiusc, Ctrl+Maiusc (Cmd+Maiusc), e Ctrl (Cmd) possono essere utilizzati anche con la selezione trascinata, rispettivamente per aggiungere, sottrarre o commutare dalla selezione.

Si noti che è possibile selezionare un intero simbolo (facendo clic sulla forma del simbolo stesso) o selezionare un campo di testo nel simbolo senza selezionare il resto del simbolo (facendo clic sul testo). Quando viene selezionato solo un campo di testo, qualsiasi azione eseguita agirà solo sul testo selezionato e non sul resto del simbolo.

Gli oggetti selezionati vengono spostati premendo M e ruotati premendo R. Il tasto comando G (trascinamento) può essere utilizzato anche per spostare gli oggetti. Per lo spostamento di simboli non collegati, G e M si comportano in modo identico, ma per i simboli con fili collegati, G sposta il simbolo e mantiene i fili collegati, mentre M sposta il simbolo e lascia i fili indietro. Gli oggetti selezionati possono essere cancellati con il tasto Canc.

Cablaggio dello schema

I pin dei simboli hanno tutti dei piccoli cerchi a indicare che non sono collegati. Risolvere disegnando fili tra i pin dei simboli come mostrato nella schermata. Fare clic sul pulsante Aggiungi un filo add line 24 sulla barra degli strumenti di destra o utilizzare il tasto comando W. Fare clic per iniziare a disegnare un filo e finire di disegnare il filo facendo clic sul pin di un simbolo o facendo doppio clic in un punto qualsiasi. Premendo Esc si annullerà il disegno del filo.

Un altro metodo conveniente per disegnare i fili è passare con il mouse su un pin scollegato. Il cursore del mouse cambierà per indicare che è possibile tracciare un filo a partire da quella posizione. Cliccando sul pin inizierà quindi a disegnare un filo automaticamente.

Schema con collegamenti cablati

Quindi, aggiungere i simboli di potenza e terra allo schema. Sebbene non siano strettamente necessari in uno schema così semplice, facilitano la comprensione di schemi di grandi dimensioni.

Nella libreria dei simboli Power sono disponibili numerosi simboli di potenza / alimentazione e terra. Tuttavia, esiste una scorciatoia per aggiungere questi simboli: fare clic sul pulsante Aggiungi un simbolo di potenza add power 24 o usare il tasto comando P. Verrà visualizzata la finestra di dialogo Scegli un simbolo, ma verranno visualizzate solo le librerie di simboli che contengono i simboli di potenza e alimentazione.

Aggiungere un simbolo VCC e un simbolo GND e quindi collegarli al circuito con dei fili.

Finally, add a label to the wire between the LED and resistor. Again, this may not be necessary in a simple circuit, but it is good practice to label important nets. Click the Draw Net Labels button add label 24 in the right toolbar (L), type a label name (led), and place the label into the schematic so that the square attachment point overlaps with the wire. Rotate and align the label as necessary.

Schema con collegamenti etichettati

Si noti che le etichette e le porte di alimentazione con lo stesso nome vengono considerate collegate assieme. Un’altra porta di alimentazione GND o un cavo etichettato led in questo foglio di schema verrebbe cortocircuitato con quello esistente, anche senza fili che li collegano visivamente.

Annotazione, proprietà simbolo, e impronte

Annotazione

Each symbol needs a unique reference designator assigned to it. This process is also known as annotation.

By default in KiCad 8.0, symbols are automatically annotated when they are added to the schematic. Automatic annotation can be enabled or disabled using the annotate 24 button in the left toolbar.

While it is not necessary for this guide, symbols can be manually annotated or reannotated using the Fill in schematic symbol reference designators button (annotate 24) in the top toolbar.

Proprietà del simbolo

Quindi, inserire i valori per ciascun componente. Selezionare il LED, fare clic con il pulsante destro del mouse e selezionare Proprietà…​ (E). Questo progetto utilizzerà un LED rosso, quindi cambiare il campo "Valore" in "rosso". In un progetto reale, potrebbe essere meglio scrivere qui il numero di parte del produttore del LED. Si noti che è possibile modificare i riferimenti individualmente nelle proprietà di ciascun simbolo.

Questo progetto userà una batteria a bottone al litio da 3 V, quindi cambiare il campo "Valore" di "BT1" in "3 V". Cambia il valore della resistenza in 1k.

Assegnamento impronte

Infine, assegnare un’impronta a ciascun componente. Ciò definirà come ogni componente si collegherà al C.S.. Alcuni simboli vengono forniti con impronte preassegnate, ma per molti componenti ci sono più impronte possibili, quindi l’utente dovrà selezionare quella appropriata.

Esistono diversi modi per assegnare le impronte; un modo comodo è usare lo strumento di assegnazione impronte facendo clic sul pulsante icon cvpcb 24 24 nella barra degli strumenti in alto.

The left pane of this window lists the available footprint libraries. The middle pane shows the symbols in the schematic. All of these symbols will get footprints assigned to them. The right pane shows the footprints that can be chosen for the symbol selected in the middle pane. To assign a footprint to a symbol, select the symbol in the middle pane and double click on the desired footprint in the right pane. You can preview a footprint by right-clicking the footprint’s name and selecting View selected footprint.

Strumento per l’assegnamento impronte

Molte impronte sono incluse in KiCad, quindi lo strumento di assegnazione delle impronte offre diversi modi per filtrare le impronte che non sono rilevanti per il simbolo in questione.

Pulsanti filtro impronte
  • Il pulsante più a sinistra module filtered list 24 attiva i filtri che possono essere definiti in ogni simbolo. Ad esempio, un simbolo opamp potrebbe definire filtri che mostrano solo impronte SOIC e DIP. A volte quei filtri predefiniti mancano o sono troppo restrittivi, quindi può essere utile disattivare questo filtro in alcune situazioni.

  • Il pulsante centrale module pin filtered list 24 filtra in base al conteggio dei pin, in modo che vengano mostrate solo le impronte di 8 pad per i simboli a 8 pin. Questo filtro è quasi sempre utile.

  • Il pulsante destro module library list 24 filtra in base alla libreria selezionata. Le librerie sono selezionate nel riquadro di sinistra; le impronte non nella libreria selezionata verranno filtrate. Questo filtro è utile purché sia noto quale libreria contiene l’impronta corretta. Spesso è meglio usare questo filtro oppure i filtri simbolo, ma non entrambi.

  • La casella di testo filtra le impronte che non corrispondono al testo nella casella. Questo filtro è disabilitato quando la casella è vuota.

Using the filters, find each of the footprints shown in the central column in the screenshot above. Assign each footprint to a symbol by selecting the symbol in the central column and then double clicking the appropriate footprint in the right column. Once all of the footprints have been assigned, click OK.

There are other ways to assign footprints; one way is through the symbol properties window. For more information on assigning footprints, see the manual.

Controllo regole elettriche

The last remaining thing to do in the schematic is to check for electrical errors. KiCad’s Electrical Rules Checker (ERC) cannot make sure that the design in the schematic will work, but it can check for some common connection issues such as unconnected pins, two power outputs shorted together, or a power input that isn’t powered by anything. It also checks for some other mistakes like symbols that aren’t annotated and typos in net labels. To see the full list of electrical rules and to adjust their severity, go to FileSchematic Setup…​Electrical RulesViolation Severity. It is a good idea to run ERC before starting layout.

Eseguire un controllo delle regole elettriche facendo clic sul pulsante ERC erc 24 nella barra degli strumenti in alto e quindi facendo clic su Esegui ERC.

Anche in questo semplice schema, KiCad ha riscontrato due potenziali errori. Gli errori sono elencati nella finestra ERC e le frecce indicano le posizioni delle violazioni nello schema. Selezionando una violazione nella finestra ERC si evidenzia la freccia corrispondente.

Messaggi di violazione ERC

Le violazioni si possono ignorare (per l’esecuzione ERC corrente) o escludere (da tutte le future esecuzioni ERC) facendo clic con il pulsante destro del mouse su ciascun messaggio di errore. Tuttavia, di solito vale la pena affrontare le violazioni, anche se non sono veri e propri errori di progettazione, al fine di ottenere un rapporto ERC pulito ed evitare di farsi sfuggire dei problemi reali.

In questo caso, KiCad segnala "Pin di potenza in ingresso non pilotato da alcun pin di potenza in uscita" per entrambe le reti VCC e GND. Questo è un classico errore ERC di KiCad. I simboli porta di potenza sono impostati per richiedere un pin di potenza di uscita, come l’uscita di un regolatore di tensione, sulla stessa rete; altrimenti KiCad potrebbe pensare che il collegamento non sia pilotato. Per un essere umano, è ovvio che VCC e GND sono pilotati dalla batteria, ma è necessario indicarlo esplicitamente nello schema.

PWR_FLAG aggiunto allo schema

C’è uno speciale simbolo PWR_FLAG nella libreria dei simboli Power che viene usato per risolvere questo problema indicando a KiCad che i collegamenti sono effettivamente pilotati. Aggiungere questo simbolo alle net VCC e GND ed esegui nuovamente il controllo. Quando l’ERC passerà senza alcuna violazione, lo schema sarà completo.

Distinta di base

A final optional step is to generate a Bill of Materials listing all components used in the project. Click ToolsGenerate Bill of Materials…​.

Finestra di dialogo della DIBA

KiCad 8.0 has a GUI for BOM export. You can configure which symbol metadata will be exported, and how the symbols are grouped, in the Edit tab, and configure the output format in the Export tab.

For now, the default settings should be fine, but you can see a raw view of what will be exported in the preview pane. Specify an output file in the Export tab, then press the Export button.

The BOM should look like the below image when it is opened in a spreadsheet program.

DIBA generata

Tutorial parte 3: il circuito stampato

Con lo schema completato, tornare alla finestra del progetto e aprire l’editor del C.S. facendo clic sul pulsante Editor C.S. o aprendo il file dello stampato.

Funzioni di base di modifica del circuito stampato

La navigazione nell’editor di circuiti stampati è la stessa dell’editor schemi elettrici: il pan si fa trascinando con il pulsante centrale del mouse o con il pulsante destro del mouse e per ingrandire invece con la rotellina del mouse o tramite F1/F2.

La parte principale dell’editor dei circuiti stampati. è la zona disegnabile al centro su cui viene steso il progetto della scheda. La barra degli strumenti sul lato sinistro ha varie opzioni di visualizzazione per la scheda, incluse le unità di misura e le modalità di visualizzazione bordo/pieno per tracce, via, pad e zone. La barra degli strumenti a destra dell’area di disegno contiene gli strumenti per la progettazione dello stampato.

Alcuni pulsanti sulla barra degli strumenti a destra hanno un piccolo triangolo nell’angolo in basso a destra pcbnew palette buttons. Il triangolo indica che il pulsante ha una tavolozza espandibile contenente diversi strumenti correlati, ad esempio diversi tipi di dimensioni. Per selezionare uno strumento alternativo, fare clic e tenere premuto il pulsante finché non viene visualizzata la tavolozza, quindi fare clic sullo strumento alternativo. Un altro modo per utilizzare le tavolozze è fare clic sul pulsante e trascinare verso sinistra finché non viene visualizzata la tavolozza, quindi rilasciare il pulsante del mouse quando lo strumento desiderato viene evidenziato.

All’estrema destra c’è il pannello Aspetto e il filtro di selezione. Il pannello Aspetto viene utilizzato per modificare la visibilità, i colori e l’opacità di strati, oggetti e collegamenti dello stampato. Lo strato attivo viene modificato facendo clic sul nome dello strato.

Sotto il pannello Aspetto c’è il filtro di selezione, che abilita e disabilita la selezione di vari tipi di oggetti dello stampato. Ciò è utile per selezionare elementi specifici in un layout affollato.

Configurazione e impilamento della scheda

Prima di iniziare la progettazione dello stampato, impostare le dimensioni pagina e aggiungere informazioni al cartiglio. Fare clic su FileImpostazioni pagina…​, quindi scegliere un formato carta appropriato e inserire data, revisione e titolo.

Impostazioni pagina

Quindi, andare su FileImpostazione scheda…​ per definire come verrà prodotto il circuito stampato. Le impostazioni più importanti sono lo stackup, ovvero quali strati di rame e dielettrico avrà il PCB (e i loro spessori) e le regole di progettazione, ad es. dimensioni e spaziatura per tracce e via.

Per impostare lo stackup, aprire la pagina Stackup schedaStackup fisico della finestra Impostazione scheda. Per questa guida, lasciare il numero di strati di rame a 2, ma progetti chiaramente più complessi potrebbero richiedere un numero maggiore di strati.

Stackup fisico

Successivamente, andare alla pagina Regole di progettazioneVincoli. Le impostazioni in questa pagina specificano le regole di progettazione prioritarie per tutto il progetto della scheda. Ai fini di questa guida, le impostazioni predefinite vanno bene. Tuttavia, per un progetto reale, queste dovrebbero essere impostate in base alle capacità e caratteristiche del fabbricante di circuiti stampati in modo che il progetto del circuito stampato sia realizzabile.

Vincoli

Infine, aprire la pagina Regole di progettazioneNetclass. Una netclass è un insieme di regole di progettazione associate a un gruppo specifico di collegamenti. Questa pagina elenca le regole di progettazione per ciascuna netclass nel progetto e consente di associare specifici collegamenti a determinate netclass.

Netclass

Larghezze e spaziature piste possono essere gestite manualmente dal progettista durante la stesura del C.S., ma l’uso delle netclass è consigliato perché forniscono un modo automatico per gestire e controllare le regole di progettazione.

In questo progetto, non è stato specificata nessuna net class perciò tutti i collegamenti appartengono alla netclass predefinita Default. Altri progetti possono avere più netclass, ciascuna con regole di progettazione diverse. Ad esempio, una scheda potrebbe avere una netclass Alta corrente con piste larghe, o una netclass 50 Ohm con regole di larghezza e distanza specifiche per tracce a impedenza controllata di 50 Ohm.

Importazione cambiamenti dallo schema

Lo schema è completo, ma non ci sono ancora componenti nell layout. Per importare i dati di progettazione dallo schema nel C.S., fare clic su StrumentiAggiorna il C.S. dallo schema…​ o premere F8. C’è anche un pulsante update pcb from sch 24 nella barra strumenti in alto.

Leggere i messaggi nella finestra Modifiche da applicare, che diranno che i tre componenti nello schema verranno aggiunti alla scheda. Fare clic su Aggiorna C.S., Chiudi e fare clic sull’area di disegno per posizionare le tre impronte. La posizione di ciascuna impronta rispetto alle altre verrà modificata in seguito.

Aggiornare il C.S. dallo schema
Impronte aggiunte

In KiCad, l’aggiornamento del C.S. con le modifiche allo schema è un processo manuale: il progettista decide quando è opportuno aggiornare il C.S. con le modifiche allo schema. Ogni volta che lo schema viene modificato, il progettista deve utilizzare lo strumento Aggiorna il C.S. dallo schema per mantenere lo schema e il layout sincronizzati.

Disegnare il bordo scheda

Ora i tre componenti sono stati posizionati, ma la scheda stessa non è stata definita. La scheda viene definita disegnando il bordo scheda sul livello Edge.Cuts.

Spesso è utile disegnare il borso scheda con una griglia grossolana, rendendo facile ottenere numeri interi per le dimensioni della scheda. Passare a una griglia grossolana selezionando 1mm nel menu a discesa Griglia sopra la zona di lavoro.

griglia 1mm

To draw on the Edge.Cuts layer, click Edge.Cuts in the Layers tab of the Appearance panel at right. Choose the rectangle tool add rectangle 24 in the right toolbar, click on the canvas to place the first corner, then click again to place the opposite corner so that the rectangle roughly surrounds the three footprints. The other graphic tools (line add line 24, arc add arc 24, circle add circle 24, polygon add graphical polygon 24, or a combination of them) could also be used to define the board outline; the only requirement is that the outline is a single closed shape that doesn’t intersect itself.

Edge Cuts

Piazzamento impronte

Il passaggio successivo nel processo di layout è disporre le impronte sulla scheda. In generale, ci sono diverse considerazioni per il posizionamento delle impronte:

  • Alcune impronte possono avere requisiti esatti per la loro posizione, come connettori, indicatori o pulsanti e interruttori.

  • Potrebbe essere necessario posizionare alcuni componenti in base a considerazioni elettriche. I condensatori filtro devono essere vicini ai pin di alimentazione dell’IC associato e i componenti analogici sensibili devono essere lontani da interferenze digitali.

  • Quasi tutti i componenti hanno un "ingombro" (o due se sono definiti sia il fronte che il retro). Generalmente gli ingombri non devono intersecarsi.

  • Otherwise components should be positioned for ease of routing. Connected components should generally be close together, and arranged to minimize routing complexity. The ratsnest (the thin lines indicating connections between pads) is useful for determining how best position footprints relative to other footprints.

For the purposes of this guide, the only placement goal is to make the routing process as simple as possible.

Start by moving the battery holder BT1 onto the back side of the board. Click it to select it, then press M to move it. Press F to flip it to the opposite side; it now appears mirrored and its pads have changed from red to blue.

BT1 flipped to the back

All PCB layers are viewed from front side of the board. Footprints on the bottom of the board are therefore upside down and appear mirrored.

Each PCB layer has a unique color, which is shown by the swatches in the Layers tab of the Appearance panel. In the default color scheme, items on the F.Cu (Front Copper) layer are red, while items on the B.Cu (Back Copper) are blue.

Now place the other two components. One at a time, select each component, then move and rotate it with M and R. Watch the ratsnest lines between each pad to choose the simplest arrangement of components; a good arrangement will leave the lines untangled. One possible arrangement is shown in the screenshot below.

Impronte posizionate ottimamente

Sbroglio piste

With the components in place, it’s time to connect the pads with copper traces.

The first trace will be drawn on the front of the board, so change the active layer to F.Cu in the Layers tab of the Appearance panel.

Click Route Tracks add tracks 24 in the right-hand toolbar or press X. Click on the led pad of D1. The ratsnest line indicates there is an unrouted connection to the led pad of R1, so click on that pad to draw a trace connecting the two pads. Clicking on the second pad completes the trace. The ratsnest line between the led pins is no longer drawn because the connection has been made in copper.

First connection routed

Now draw a trace between the GND pads of BT1 and D1, starting with the BT1 pad on the back of the board. Notice that the active layer automatically changed to B.Cu after clicking on the BT1 pad. Click on the D1 pad to finish the track.

While BT1 has surface mount pads that are only on the bottom of the board, D1 has through hole pads that can connect to tracks on both the front and back. Through hole pads are one way to make a connection between multiple layers. In this case, D1 is a component on the front side of the board, but its through hole pads are used to connect to a trace on the back of the board.

Another way to make a connection across layers is with a via. Start routing at the VCC pad of BT1 on the back of the board. Press V and click halfway between BT1 and R1 to insert a via, which also switches the active layer to F.Cu. Complete the track on the top side of the board by clicking on the VCC pad of R1.

Tutte le connessioni sbrogliate

At this point, all connections are routed. This can be confirmed by looking at the status screen in the bottom left of the window, where the number of unrouted nets is given as 0.

Placing Copper Zones

Copper zones are regions of copper with an associated net. Zones automatically connect to copper objects belonging to the same net and avoid objects belonging to other nets. Zones are often used for ground and power connections because they provide a lower impedance connection than traces.

Add a GND zone on the bottom of the board by switching to the bottom copper layer and clicking the Add a filled zone button add zone 24 in the right toolbar. Click on the PCB to place the first corner of the zone.

In the Copper Zone Properties dialog that appears, select the GND net and make sure that the B.Cu layer is selected. Click OK, then click to place the other three corners of the zone. Double click when placing the last corner to complete the zone.

Zone outline

The zone outline is displayed on the canvas, but the zone is not yet filled — there is no copper in the zone area, and therefore the zone is not making any electrical connections. Fill the zone with EditFill All Zones (B). Copper has been added to the zone, but it doesn’t connect to the VCC or led pads and traces, and is clipped by the board edge. It overlaps with the GND trace drawn earlier, and it connects to the GND pads through thin traces. These are thermal reliefs, which make the pads easier to solder. Thermal reliefs and other zone settings can be modified in the zone properties dialog.

Filled copper zone

In KiCad, zones are not filled automatically when they are first drawn or modified, or when footprints within them are moved. Zones are refilled by manually filling them and when running DRC. Make sure zone fills are up-to-date before generating fabrication outputs.

Sometimes filled zones can make it hard to see other objects in a crowded board design. Zones can be hidden except for their boundaries using the Show only zone boundaries button show zone disable 24 on the left-hand toolbar. Zones retain their filled status when only their outlines are shown — hiding a zone fill is not the same as unfilling it.

Zones can also be made transparent using the Appearance panel, and inactive layers can also be hidden or dimmed using the Layer Display Options in the Appearance Panel.

Regole di progettazione

Design Rule Checking is the layout equivalent of Electrical Rule Checking for the schematic. DRC looks for design mistakes like mismatches between the schematic and layout, copper regions that have insufficient clearance or are shorted together, and traces that do not connect to anything. Custom rules can also be written in KiCad 8.0. To view the full list of design rules that are checked and to adjust their severity, go to FileBoard Setup…​Design RulesViolation Severity. Running DRC and fixing all errors is strongly advised before generating fabrication outputs.

Run a DRC check with InspectDesign Rules Checker, or use the button erc 24 in the top toolbar. Click Run DRC. When the checks are complete, no errors or warnings should be reported. Close the DRC window.

Now intentionally cause a DRC error by moving the resistor footprint to overlap the filled area of the zone. Use D (Drag) to move the resistor footprint slightly while keeping the traces attached to its pads. This creates a clearance violation because the VCC and led pads of the resistor are shorted to the GND zone fill. Ordinarily this would be fixed by refilling the zone, but don’t refill the zone yet.

Resistor footprint moved to violate clearance

Run DRC again, but make sure to uncheck the Refill all zones before performing DRC checkbox. DRC reports 6 violations: for each pad of R1, there is a clearance violation between the pad and the zone, another clearance violation between the pad’s through hole and the zone, and a third violation where the pad’s solder mask opening exposes the copper of two different nets (the GND fill and the trace connected to the pad). Arrows point to each violation in the canvas. Clicking on each violation message zooms in on the respective violation.

DRC errors due to clearance violation between R1 and GND

Close the DRC dialog, press B to refill the zone, and re-run DRC. Alternatively, check the Refill all zones before performing DRC checkbox and re-run DRC. All violations are fixed.

Visualizzatore 3D

KiCad offers a 3D viewer that is useful for inspecting the PCB. Open the 3D viewer with View3D Viewer. Pan by dragging with the middle mouse button, and orbit by dragging with the left mouse button. Orbit around the PCB to see the LED and resistor on the top, and the battery holder on the bottom.

A raytracing mode is available, which is slower but offers more accurate rendering. Switch to the raytracing mode with PreferencesRaytracing.

Raytraced view of the PCB

Many of the footprints in KiCad’s library come with 3D models, including all of the footprints used in this guide. Some footprints do not come with 3D models, but users can add their own.

Fabrication Outputs

With the board design finished, the final step is to generate fabrication outputs so the board can be manufactured.

Open the Plot dialog with FilePlot…​. This dialog can plot the design in several formats, but Gerber is usually the right format for ordering from a PCB fabricator.

Specify an output directory so that the plotted files will be collected in a folder. Otherwise, the default settings are fine, but make sure all the necessary layers are checked: include the copper layers (*.Cu), board outline (Edge.Cuts), soldermask (*.Mask), and silkscreen (*.Silkscreen). The paste layers (*.Paste) are useful for manufacturing solder paste stencils. The Adhesive layers (*.Adhesive) are needed only if any components will be glued to the board during assembly. Other layers may be useful to plot, but are not typically necessary for PCB fabrication.

Finestra di dialogo tracciatura

Click Plot to generate the Gerber files. Also click Generate Drill Files…​ and then Generate Drill File to create files specifying the location of all holes that will be drilled in the board. Finally, close the Plot dialog. The design is finished.

Finestra di dialogo genera file forature

Tutorial parte 4: simboli e impronte personalizzati

The circuit would be improved by adding a switch to turn the LED on and off. The process to add this switch will require creating a new symbol and footprint library, drawing a switch symbol, and creating a footprint for the switch.

The specific switch that will be used in this guide is the NKK M2011S3A1W03, an SPST toggle switch. Many other switches could be used, but the pin numbering and footprint dimensions may need to be adjusted.

Library and Library Table Basics

Symbols and footprints are organized into libraries. A library can hold symbols or footprints, but not both.

KiCad keeps track of the user’s symbol libraries and footprint libraries in the symbol library table and footprint library table, respectively. Each library table is a list of library names and the location of where each library exists on disk.

In addition to global symbol and footprint library tables, there are also project library tables for symbols and footprints. Symbols and footprints that are added to the global tables are available in all projects, while symbols and footprints in the project-specific tables are available only for that specific project. Users can add their own libraries to the global library tables or to project-specific tables.

The symbol library tables can be viewed or edited with PreferencesManage Symbol Libraries…​ in the Schematic Editor or Symbol Editor windows. The footprint library tables can be viewed or edited with PreferencesManage Footprint Libraries…​ in the Board Editor or Footprint Editor. Both library tables can also be accessed from the Project Manager.

symbol library table

Often, paths to libraries are defined with path substitution variables. This enables a user to move all of their libraries to a new location without modifying the library tables. The only thing that needs to change is to redefine the variable to point to the new location. KiCad’s path substitution variables are edited with PreferencesConfigure Paths…​ in the Project Manager or any of the Editor windows.

One useful path substitution variable is ${KIPRJMOD}. This variable always points at the current project directory, so it can be used for including project-specific libraries that are stored inside the project directory.

On first run, KiCad prompts the user to set up the symbol library table and footprint library table. To go through this setup again, delete or rename the symbol library table or footprint library table files. Make a backup of the tables before deleting them.

The location of the symbol and footprint library table files depends on operating system.

  • Windows: %APPDATA%\kicad\8.0\sym-lib-table and %APPDATA%\kicad\8.0\fp-lib-table

  • Linux: ~/.config/kicad/8.0/sym-lib-table and ~/.config/kicad/8.0/fp-lib-table

  • macOS: ~/Library/Preferences/kicad/8.0/sym-lib-table and ~/Library/Preferences/kicad/8.0/fp-lib-table

Creating New Global or Project Libraries

The first step in drawing a new symbol or footprint is to choose a library in which to store it. For this guide, the switch symbol and footprint will go into new project-specific libraries.

Open the Symbol Editor from the Project Manager. Click FileNew Library, and select Project. Choose a name for the new library (e.g. getting-started.kicad_sym) and save it in the project directory. The empty new library is now selected in the Libraries pane at left, and has been automatically added to the project library table (check the Project Specific Libraries tab in PreferencesManage Symbol Libraries…​).

Creating New Symbols

Now create the switch symbol in the new library. With the getting-started library selected in the Libraries pane, click FileNew Symbol…​. In the Symbol name field, enter the part number: M2011S3A1W03. Switch symbols should have reference designators that start with SW, so change the Default reference designator field to SW. All other fields can remain as the defaults.

In the Libraries pane, the M2011S3A1W03 symbol now appears under the getting-started library. In the canvas, a cross indicates the center of the footprint, and text has been added for the reference designator. For now, move the text away from the center of the symbol to get it out of the way.

Symbol Pins

Start drawing the symbol by adding a pin. Click the Add a pin button pin 24 on the right toolbar. The Pin Properties dialog will appear. Set Pin name to A, Pin number to 2, Electrical type to Passive, and Orientation to Right. Set X Position to -200 mils and Y Position to 0. Click OK, then click on the canvas to place the pin. If the pin moved after clicking OK, it might be necessary to edit the pin’s properties again (double click the pin, or right click on the pin → Properties…​) to set the position correctly.

It is strongly recommended to always use mils (or inches) in the Schematic Editor and Symbol Editor, particularly for symbol pins. Mixing imperial and metric units will result in symbol pins that cannot be properly connected because they do not align with wires or other pins. The KiCad libraries use a 50 mil grid for their pins; using a different unit system will prevent your symbols and schematics from connecting with KiCad’s builtin symbols. Note that unlike in the PCB editor, units in the schematic have no physical meaning.
proprietà del piedino

Add a second pin, but this time don’t use the Add a pin tool. Instead, press Insert. A new pin numbered 3 is added to the symbol, just below pin 2.

In many places in KiCad, pressing Insert will repeat the last action. The location of the new item will be shifted and the numbering incremented automatically, as applicable. In the Symbol Editor, this can be used to place a large number of pins quickly. In the Schematic Editor, it can be used to repeatedly place a component, or to label a large component’s pins with numbered labels. Insert can be useful in the Footprint and Board Editors as well.

We want Pin 3 to be on the right side of the switch symbol, so edit the properties of pin 3 and change X position to 200 mils, Y position to 0, and Orientation to Left. Also, change Pin name to B.

Graphical Features

With the pins placed, use the circle add circle 24 and line add line 24 tools to make the symbol look like an SPST switch. For this step, it will be useful to switch to a finer grid: right click the canvas and select a smaller grid in the Grid submenu. After adding the graphical shapes, switch back to a 50 mil grid.

Small grids are useful for graphical features, but symbol pins must always be placed on a 50 mil (1.27 mm) grid. Pins which are not aligned to a 50 mil grid will not be able to connect to wires in the schematic.
symbol drawn

Proprietà del simbolo

Now edit the properties for the whole symbol with FileSymbol Properties, or by double clicking on the canvas. Change the Value field to M2011S3A1W03, and add spst switch toggle to the Keyword field to make it easier to find the symbol by searching. For this symbol, the pin names do not add any useful information, so uncheck Show pin name to make the symbol visually simpler.

After clicking OK, move the value field’s text lower so that it does not overlap with the symbol graphics.

proprietà del simbolo

The symbol is now complete. Save it and move on to creating a footprint.

Creating New Footprints

Open the Footprint Editor and create a new project-specific footprint library named getting-started.pretty (FileNew Library…​). As with symbol libraries, the new footprint library is added to the project library table. With the new library selected in the Libraries pane, create a new footprint (FileNew Footprint…​). Set the name to Switch_Toggle_SPST_NKK_M2011S3A1x03 and the type to Through hole.

Piazzole impronte

The switch has two pins, numbered in the datasheet as 2 and 3, and spaced 4.7 mm apart. For ease of placement, adjust the grid to match the pad spacing. Open the grid settings by clicking PreferencesPreferences…​Footprint EditorGrids, or by right-clicking the grid 24 button in the left toolbar and selecting Edit Grids…​. Add a new grid with the plus button at the bottom. Set the new grid’s X size to 4.7 mm. Accept the dialog, go back to the editing canvas, and then switch to the new grid in the grid dropdown in the top toolbar, if it is not already selected.

By convention, through-hole footprints have pin 1 located at (0,0) and are oriented with pin 1 in the top left. The SPST version of this switch does not have pin 1, so the footprint will leave (0,0) empty and place pads 2 and 3 at (0, 4.7 mm) and (0, 9.4 mm). Note that in KiCad’s default coordinate system, the positive Y-axis is oriented downwards.

Use the Add a pad tool pad 24 in the right toolbar to place a pad one grid division below the origin, which is (0, 4.7 mm). Press Esc to exit the pad tool, then double click on the pad to edit its properties. Change the pad number to 2 and verify that the position is correct. The switch pins are 1.17 mm x 0.8 mm, which gives a diagonal (maximum pin dimension) of 1.42 mm. Therefore set the hole diameter to 1.42 mm + 0.2 mm = 1.62 mm, and the pad diameter to 1.62 mm + 2*0.15 mm = 1.92 mm to provide a sufficient annular ring.

proprietà delle piazzole

Now use the Add a pad tool again to place the other pad at (0, 9.4 mm). Notice that the pad number is automatically incremented and the properties including pad size and hole size are copied from the previous pad.

With both pads placed, the annular rings look slightly small. The switch will be easier to solder and mechanically more robust if the annular rings are made larger. Increase the annular ring thickness from 0.15 mm to 0.3 mm by editing pad 2 and changing the pad size to 1.62 mm + 2*0.3 mm = 2.22 mm. Do not change the hole size. Note that the pad size field accepts mathematical expressions, so 1.62+2*0.3 can be entered directly and will evaluate to 2.22 mm.

Many text boxes in KiCad support mathematical expressions, including unit conversions.

Make the same annular ring modification to the other pad as well. As a shortcut, right click on pad 2, click Push Pad Properties to Other Pads…​, and then click Change Pads on Current Footprint.

Footprint Graphics

A good footprint will have the exact part outline drawn on the fabrication layer (F.Fab), a slightly larger outline on the silkscreen layer (F.Silkscreen), and a courtyard (F.Courtyard) surrounding the entire footprint to prevent overlaps with other footprints.

Switch to the front fabrication layer by clicking F.Fab in the Layers panel at right. The fabrication outline should precisely match the physical dimensions of the part, which is 7.9 mm wide and 13 mm tall. Use the line add line 24, rectangle add rectangle 24, or polygon add graphical polygon 24 tools to draw the outline of the part as shown in the screenshot below. One way to precisely place the outline is to create a new grid with an X spacing of 7.9 mm and a Y spacing of 13 mm. Then adjust the grid origin by right-clicking the grid 24 button and selecting Grid Origin…​. Set the X origin is 7.9 mm / 2 = 3.95 mm and the Y origin to 4.7 mm - (13 mm / 2) = -1.8 mm.

fab outline coordinates

Next, switch to the F.Silkscreen layer. The silkscreen outline should be just outside of the part outline, so the silkscreen lines are moved outwards from the fabrication drawing by 0.11 mm (half of 0.10 mm fab line width, plus half of the 0.12 mm silkscreen line width). The exact coordinates are shown in the screenshot below, and helpful grid settings are:

  • X grid: 7.9 mm + 2 * 0.11 mm = 8.12 mm

  • Y grid: 13 mm + 2 * 0.11 mm = 13.22 mm

  • X origin: 8.12 mm / 2 = 4.06 mm

  • Y origin: -1.8 mm - 0.11 mm = -1.91 mm

silk outline coordinates

Finally, select the F.Courtyard layer. The courtyard outline should surround the part with a 0.25 mm clearance.

Use a different strategy to draw this layer. Switch to a 1mm grid instead of a custom grid, and draw a rectangle roughly surrounding the footprint. Double click on the rectangle to edit its properties, and enter the corner coordinates of the rectangle directly — they are shown in the screenshot below.

courtyard outline coordinates

After completing the outlines, position the text as shown below. The footprint is complete.

completed switch footprint

Convenzioni librerie KiCad

To maintain high-quality symbol and footprint libraries, KiCad has a KiCad Library Conventions document, which is a set of guidelines for symbols and footprints. It is not necessary to follow these conventions for personal libraries, but they are a good starting point. Footprints and symbols in the official library are required to follow KLC. KLC is used as a basis for the symbol and footprint in this guide.

Add Switch to Schematic

Now that the footprint is complete, the switch symbol can be modified so that the matching footprint is used for it by default.

Go back to the symbol editor and open the switch symbol. Edit the Symbol Properties. Click in the Footprint field, then click the library book icon small library 16 that appears. Browse to the project footprint library and double click on the switch footprint. Save the symbol.

The switch footprint is now assigned to this symbol by default; the footprint does not need to be manually selected each time the symbol is added to a schematic.

switch footprint set as default for symbol

Open the schematic, add a new symbol, and select the new switch symbol. Wire it to connect or disconnect the LED and the battery.

It isn’t necessary to manually choose a footprint for the switch, because the switch symbol already specifies a footprint. Run ERC to make sure that the modified schematic doesn’t violate any electrical rules.

schematic edited to include switch

Add Switch to Layout

Make sure the schematic is saved, then open the Board Editor to add the symbol to the layout. Update the PCB with the schematic changes using ToolsUpdate PCB from Schematic…​ and place the switch footprint onto the board as shown.

board with switch added, before routing

The ratsnest shows the new connections that need to be routed. Additionally, the connection between the battery and the resistor needs to be deleted.

First, delete the unneeded traces. Select one of the traces between the battery and the resistor — it doesn’t matter which. Press U several times to expand the selection to include all the segments between the battery and resistor. Press Delete to remove the connection.

Route the new traces between the battery and the switch, and between the switch and the resistor. Press B to refill the zones.

Finally, re-run DRC to make sure the modified board doesn’t violate any design rules.

board with switch added, before routing

Linking Symbols, Footprints, and 3D Models

Symbols and Footprints

As described in the footprint assignment section, each symbol in the schematic needs to have a footprint assigned to it during the schematic entry process. The name of the footprint assigned to each symbol is stored in the Footprint field of the symbol’s properties.

footprint field in symbol properties

Symbols can specify a preselected footprint. Footprints do not need to be manually assigned to such symbols, because a footprint was chosen when the symbol was created. Users can override the preselected footprint during the footprint assignment process as normal. Defining a default footprint is a good idea for symbols that will usually or always have the same footprint assigned to it, for example a component which is only available in one package. The switch footprint was set as the default for its matching symbol.

Symbols can also specify footprint filters, which can be used to hide footprints that are incompatible with the symbol. For example, the 74HC00 symbol has footprint filters that result in only the applicable DIP and SO14 footprints being displayed in the assign footprints tool.

footprint filters for 74HC00

The KLC requirements for footprint filters contain some useful tips for effective footprint filters.

Footprints and 3D Models

3D models for components are stored in separate files. Filenames for the component’s 3D model(s) are saved in the footprint. Any number of 3D models can be added to each footprint. 3D model filenames, along with model scale, rotation, offset, and opacity, are set in the 3D Models tab of the Footprint Properties.

footprint 3D model properties

Both STEP (.step) and VRML (.wrl) 3D model formats are supported. STEP files are useful where dimensional accuracy is needed, while VRML files can be used for more visually attractive renders. Many footprints in KiCad’s library have associated 3D models; these models are provided in both VRML and STEP formats. Only one of the two models needs to be listed in the footprint (typically the VRML filename is given). KiCad can automatically substitute the STEP version when exporting a 3D model of the board for mechanical CAD purposes.

Not all footprints in KiCad’s library are provided with 3D models, but all footprints list a 3D model filename even if the 3D model does not exist. This is so 3D models can be added at a later date without needing to edit the footprint.

FreeCAD together with the StepUp Workbench are useful for creating component 3D models; they are used for many of the models in KiCad’s library. StepUp is used to generate STEP and VRML files with correct placement, scaling, and rotation.

Where To Go From Here

More Learning Resources

For more information on how to use KiCad, see the manual.

Other resources include the official KiCad user forum, Discord or IRC, and additional learning resources from the KiCad community.

To see more of what’s possible with KiCad, browse the Made With KiCad section of the website, or open the demo projects included with KiCad (FileOpen Demo Project…​).

Help Improve KiCad

To report a bug or request a feature, please use HelpReport a Bug or open an issue on Gitlab.

To contribute to KiCad’s development, please see the Developer Contribution page. Users can also help by contributing to the libraries or documentation and translation. Finally, consider financially supporting continued development of KiCad.