Manuel de référence
Copyright
Ce document est la propriété des contributeurs ci-dessous, copyright © 2010-2016. Vous pouvez le distribuer et/ou le modifier selon les termes de la GNU General Public License (http://www.gnu.org/licenses/gpl.html), version 3 ou ultérieure ou bien selon la licence Creative Commons Attribution (http://creativecommons.org/licenses/by/3.0/), version 3.0 ou ultérieure.
Toutes les marques apparaissant dans ce document appartiennent à leurs propriétaires respectifs.
Contributeurs
Jean-Pierre Charras, Fabrizio Tappero, Marc Berlioux.
Traduction
Marc Berlioux <marc.berlioux@gmail.com>, 2015-2016.
Retours
Merci de signaler vos corrections de bugs, suggestions ou nouvelles versions ici :
-
Documentation de KiCad : https://github.com/KiCad/kicad-doc/issues
-
Bugs logiciel KiCad : https://bugs.launchpad.net/kicad
-
Traductions de KiCad : https://github.com/KiCad/kicad-i18n/issues
Date de publication et version du logiciel
17 mars 2014.
1. Introduction à Pcbnew
1.1. Description
Pcbnew est un outil logiciel puissant de création de circuits imprimés disponible pour les systèmes d’exploitation Linux, Microsoft Windows et Apple OS X. Pcbnew est utilisé en combinaison avec le programme de saisie de schéma Eeschema pour créer des circuits imprimés.
Pcbnew gère des librairies d’empreintes. Chaque empreinte est le dessin d’un composant physique, incluant les pastilles qui établissent les connexions sur le circuit. Les empreintes nécessaires sont automatiquement chargées lors de la lecture de la Netliste. Toute modification des sélections d’empreintes ou de l’annotation peut être effectuée dans le schéma et mise à jour dans Pcbnew par la régénération de la netliste et sa relecture dans Pcbnew.
Pcbnew fournit un outil de vérification des règles de conception (DRC), qui évite les problèmes de distance entre les pistes ou les pastilles, et qui évite également les mauvaises ou les non-connexions de lignes électriques. Lors de l’utilisation du routeur interactif, il vérifie en permanence les règles de conception et vous aide à tracer automatiquement des pistes individuelles.
Pcbnew fournit un affichage du chevelu, montrant les liaisons des broches d’empreintes qui sont connectées sur le schéma. Ces connexions suivent dynamiquement le déplacement des empreintes et le tracé des pistes.
Pcbnew a un autorouteur simple mais efficace, pour aider à la production du circuit imprimé. L’Export/Import au format dsn SPECCTRA lui permet également l’utilisation d’autres auto-routeurs plus avancés.
Pcbnew fournit des fonctions spécifiquement prévues pour la production de circuits micro-ondes à ultra hautes fréquences (comme les pastilles de formes trapézoïdales ou complexes, le tracé automatique de bobines sur le circuit imprimé, etc…).
1.2. Principales Fonctionnalités de Dessin
La plus petite unité dans Pcbnew est de 1 nanomètre. Toutes les dimensions sont stockées sous forme de nanomètres.
Pcbnew peut générer jusqu'à 32 couches de cuivre, 14 couches techniques (sérigraphies, masques de soudure, adhésif de composant, pâte à souder et découpes des contours), plus 4 couches auxiliaires (dessins ou commentaires), et il gère en temps réel l’affichage du chevelu des pistes manquantes (rats nest).
L’affichage des éléments du PCB (pistes, pastilles, textes, dessins …) est personnalisable :
-
En mode plein ou en mode contour.
-
Avec ou sans le bon espacement des pistes.
Sur des circuits complexes, on peut choisir de cacher des couches, des zones ou les composants pour plus de clarté à l'écran. Les pistes peuvent aussi être mises en surbrillance pour fournir un contraste élevé.
Les empreintes peut être orientées sous n’importe quel angle, avec une résolution de 0.1 degré.
Pcbnew inclut un éditeur d’empreintes qui permet d'éditer individuellement les empreintes d’un PCB ou celles d’une librairie.
L'éditeur d’empreinte apporte plusieurs outils permettant de gagner du temps :
-
La numérotation rapide des pastilles, en faisant simplement glisser la souris au dessus de celles-ci dans l’ordre de la numérotation que vous désirez.
-
La génération aisée de réseaux rectangulaires ou circulaires de pastilles, pour les empreintes comme les LGA/BGA ou les empreintes circulaires.
-
L’alignement semi-automatique de rangées ou de colonnes de pastilles.
Les pastilles d’empreintes ont un ensemble de propriétés ajustables. Les pastilles peuvent être rondes, rectangulaires, ovales ou trapézoïdales. Pour les composants traversants, les perçages peuvent être décalés à l’intérieur des pastilles et être de forme ronde ou en forme de rainure. Les pastilles individuelles peuvent aussi être orientées et avoir des masques de soudure, de net, ou de pâte propres. Les pastilles peuvent également avoir une connexion pleine ou une connexion thermique pour faciliter la fabrication. Toute combinaison de pastilles individuelles peut être placée à l’intérieur d’une empreinte.
Pcbnew génère de façon aisée les fichiers nécessaires à la production :
-
Fichiers de fabrication :
-
Fichiers pour les phototraçeurs au format GERBER RS274X.
-
Fichiers de perçage au format EXCELLON.
-
-
Fichier de tracé aux formats HPGL, SVG, DXF.
-
Fichiers de tracé et de perçage au format POSTSCRIPT.
-
Impressions locales.
1.3. Remarques générales
Du fait du grand besoin de précision et de contrôle nécessaire, il est grandement suggéré d’utiliser une souris 3 boutons dans Pcbnew. Beaucoup de fonctions, comme les déplacements, le zoom, etc.. requièrent une souris 3 boutons.
Dans cette nouvelle version de KiCad, Pcbnew a vu des changements radicaux apportés par les développeurs du CERN. Ceci inclut des fonctionnalités telles qu’un nouveau moteur de rendu (modes OpenGL et Cairo), un routeur interactif "push and shove", le routage et l’ajustage des tracés différentiels et des méandres, un éditeur d’empreinte retravaillé, et beaucoup d’autres fonctions. Veuillez noter que la plupart de ces nouvelles fonctionnalités existent uniquement dans les nouveaux modes d’affichage OpenGL et Cairo.
2. Installation
2.1. Installation du logiciel
L’installation est décrite dans la documentation de KiCad.
2.2. Modification de la configuration par défaut
Un fichier de configuration par défaut kicad.pro est fourni dans kicad/share/template. Ce fichier est utilisé comme configuration initiale de tous les nouveaux projets.
Ce fichier peut être modifié pour configurer les librairies à charger.
Pour ce faire :
-
Lancez Pcbnew par kicad ou directement. Sous Windows c’est C:\kicad\bin\pcbnew.exe et sous Linux vous pouvez lancer /usr/local/kicad/bin/kicad ou /usr/local/kicad/bin/pcbnew si les exécutables sont situés dans /usr/local/kicad/bin.
-
Sélectionnez Préférences - Librairies et Dossiers.
-
Modifiez à votre convenance.
-
Sauvegardez la configuration modifiée (Sauver Préférences) vers kicad/share/template/kicad.pro.
2.3. Gestion des Librairies d’Empreintes : anciennes versions
Vous avez accès à la liste des librairies initiales à partir du menu Préférences :

L’image ci-dessous montre la fenêtre qui permet de paramétrer la liste des librairies :

Vous pouvez l’utiliser pour ajouter toutes les librairies contenant les empreintes nécessaires à votre projet. Vous devez également supprimer les librairies inutilisées des nouveaux projets, pour éviter des problèmes avec les noms d’empreintes. Il faut noter qu’il y a un problème avec la liste des librairies d’empreintes lorsque des noms d’empreintes en double existent dans plus d’une librairie. Dans ce cas là, l’empreinte sera chargée à partir de la première librairie trouvée dans la liste. Si ce problème survient (vous ne pouvez pas charger l’empreinte désirée), il convient de modifier l’ordre de la liste des librairies en utilisant les boutons "Monter" et "Descendre" dans la fenêtre ci-dessus, ou de donner à l’empreinte un nom unique en utilisant l'éditeur d’empreintes.
2.4. Gestion des Librairies d’Empreintes : dépôts .pretty
À partir de la version 4.0, Pcbnew utilise une nouvelle implémentation de table de librairies pour gérer les librairies d’empreintes. Les informations données dans la section précédentes ne sont donc plus valides. On accède au gestionnaire des librairies d’empreintes par :

L’image ci-dessous montre la fenêtre d'édition de la table des librairies d’empreintes qui s’ouvre par le menu "Préférences", "Gestionnaire des Librairies d’Empreintes".

La table des librairies d’empreintes est utilisée pour attribuer un pseudonyme à chaque librairie d’empreintes, de chaque type supporté. Ce pseudo sera utilisé pour rechercher des empreintes, en remplacement de la méthode précédente, qui ordonnait les librairies par leur chemin. Ceci permet à Pcbnew d’accéder à des empreintes ayant le même nom dans différentes librairies, en s’assurant que ce soit l’empreinte correcte qui est chargée à partir de la librairie appropriée. Il permet également à Pcbnew d’utiliser des librairies provenant d’autres logiciels de PCB tels que Eagle ou GEDA.
2.4.1. Table des Librairies Globales
La table des librairies globales d’empreintes contient la liste des librairies qui sont toujours disponibles, quel que soit le fichier de projet actuellement chargé. La table est enregistrée dans un fichier fp-lib-table dans le dossier personnel de l’utilisateur. L’emplacement de ce dossier dépend du système d’exploitation utilisé.
2.4.2. Table des Librairies Spécifiques au Projet
La table des librairies spécifiques au projet contient la liste des librairies d’empreintes qui sont disponibles spécifiquement pour le projet actuellement chargé. Cette table ne peut être modifiée que quand elle est chargée en même temps que le fichier de circuit imprimé du projet. Si aucun fichier n’est chargé, ou s’il n’y a pas de fichier de table de librairies d’empreintes dans le dossier du projet, une table vide sera créée, et pourra être éditée et enregistrée plus tard, avec le fichier d’affectation des empreintes.
2.4.3. Configuration Initiale
Quand PcbNew ou CvPcb sont lancés pour la première fois, et que le fichier table des librairies d’empreintes globales fp-lib-table n’a pas été trouvé dans le dossier personnel de l’utilisateur, ils tenteront de copier le fichier fp-lib-table par défaut, du dossier système KiCad / template dans le dossier personnel de l’utilisateur. Si le fichier fp-lib-table ne peut être trouvé, une table de librairies d’empreintes vide sera créée dans le dossier personnel de l’utilisateur. Dans ce cas, l’utilisateur pourra copier fp-lib-table manuellement, ou configurer la table à la main. La table des librairies d’empreintes par défaut inclut toutes les librairies d’empreintes standards, qui sont installées en même temps que KiCad.
2.4.4. Ajouter des Entrées dans la Table
Pour utiliser une librairie d’empreintes, elle doit d’abord être ajoutée à l’une ou l’autre des tables, globale ou spécifique au projet. La table spécifique au projet est utilisable uniquement lorsque vous avez un fichier circuit ouvert. Chaque entrée de la table doit avoir un pseudo unique. Ce pseudo n’a pas besoin d'être lié au nom réel du fichier ou au chemin de la librairie. Le caractère : ne peut pas être utilisé dans le pseudo. Chaque entrée de librairie doit avoir un chemin d’accès et/ou un nom de fichier valides, suivant le type de librairie. Les chemins peuvent être définis comme absolus, relatifs, ou par la substitution d’une variable d’environnement. Le plugin approprié doit être sélectionné pour que la librairie soit lue correctement. Pcbnew prend actuellement en charge en lecture les librairies d’empreintes : anciennes KiCad, nouvelles KiCad Pretty, Eagle, et GEDA. Il y a aussi un champ description pour ajouter une description de l’entrée de librairie. Le champ option n’est pas utilisé pour l’instant, donc les options ajoutées n’auront aucun effet lors du chargement des librairies. Veuillez noter que vous ne pouvez pas avoir des pseudos de librairies en double dans la même table. Cependant, vous pouvez avoir des surnoms de librairies en double dans les deux tables globale et spécifique au projet. L’entrée d’une table spécifique au projet aura préséance sur celle de la table globale dans le cas de noms dupliqués. Lorsque des entrées sont définies dans la table spécifique au projet, un fichier fp-lib-table contenant les entrées sera écrit dans le dossier du fichier netliste actuellement ouvert.
2.4.5. Substitution d’une Variable d’Environnement
Une des fonctionnalités les plus puissantes de la table des librairies d’empreintes est la substitution de variables d’environnement. Ceci permet d’avoir des chemins personnalisés dans des variables d’environnement, pour définir où vos librairies sont stockées. La substitution de variables d’environnement est supportée en utilisant la syntaxe ${ENV_VAR_NAME} dans le chemin de la librairie d’empreintes. Par défaut, au lancement, Pcbnew définit la variable d’environnement $KISYSMOD. Celle-ci pointe vers le dossier où ont été installées les librairies fournies avec KiCad. Vous pouvez redéfinir $KISYSMOD, ce qui vous permet de remplacer les librairies d’empreintes par défaut de KiCad par vos propres librairies. Quand un fichier de PCB est chargé, Pcbnew définit aussi $KIPRJMOD en utilisant le chemin du fichier du circuit. Cela vous permet de stocker des librairies dans le dossier du projet, sans avoir à définir leur chemin absolu dans la table des librairies spécifiques au projet.
2.4.6. Utilisation du Plugin GitHub
Le plugin GitHub est un plugin spécial, qui fournit un interface d’accès en lecture seule à un dépôt GitHub distant, constitué de librairies d’empreintes au format pretty (le nom du format de fichier d’empreinte de KiCad) et fournit accessoirement un support «Copy On Write» (COW) permettant d'éditer des empreintes lues à partir du dépôt GitHub, et de les enregistrer localement. Par conséquent, le "plugin GitHub" est pour l’accès à distance et en lecture seule des librairies d’empreintes au format pretty depuis https://github.com. Pour ajouter une entrée GitHub à la table des librairies d’empreintes, le champ «Chemin Librairie» de l’entrée dans la table doit pointer vers une URL GitHub valide.
Par exemple :
https://github.com/liftoff-sr/pretty_footprints
Typiquement, les URL GitHub ont cette forme :
https://github.com/nom_utilisateur/nom_dépot
Le "Type de Plugin" doit être réglé sur "Github". Pour activer le "Copy On Write", une option allow_pretty_writing_to_this_dir doit être ajoutée dans le champ "Options" de l’entrée. Cette option donne le "Chemin de Librairie" pour le stockage local des empreintes modifiées, lues depuis le dépôt GitHub. Les empreintes enregistrées dans ce chemin sont combinées avec la partie en lecture seule du dépôt GitHub pour créer la librairie d’empreinte. Si cette option est manquante, alors la librairie GitHub est en lecture uniquement. Si l’option est présente pour une librairie GitHub, alors toute écriture vers cette librairie hybride se fera dans le répertoire *.pretty local. Notez que la partie résidant sur github.com de cette librairie COW hybride est toujours en lecture seule, ce qui signifie que vous ne pouvez pas modifier ou supprimer quelque empreinte que ce soit directement dans le dépôt GitHub. Le type de ces librairies hybrides restera «GitHub» dans les paragraphes à venir, mais il se compose à la fois de la portion locale en lecture/écriture et de la portion distante en lecture seule.
Le tableau ci-dessous montre une entrée de table de librairies d’empreintes sans option allow_pretty_writing_to_this_dir :
Pseudo nom | Chemin Librairie | Type de Plugin | Options | Description. |
---|---|---|---|---|
github |
Github |
Empreintes Liftoff’s GH |
Le tableau ci-dessous montre une entrée de table de librairies d’empreintes avec une option COW. Notez, pour exemple seulement, l’utilisation de la variable d’environnement ${HOME}. Le dossier github.pretty est situé dans le chemin ${HOME}/pretty/. Chaque fois que vous utilisez l’option allow_pretty_writing_to_this_dir, vous devez créer ce dossier manuellement au préalable, et il doit se terminer par l’extension .pretty.
Pseudo nom | Chemin Librairie | Type de Plugin | Options | Description. |
---|---|---|---|---|
github |
Github |
allow_pretty_writing_to_this_dir=${HOME}/pretty/github.pretty |
Empreintes Liftoff’s GH |
Le chargement des empreintes donnera toujours la priorité aux empreintes locales trouvées dans le chemin donné par l’option allow_pretty_writing_to_this_dir. Une fois que vous avez enregistré une empreinte dans le dossier local de la librairie COW avec l'éditeur de l’empreinte, aucune empreinte GitHub mise à jour ne sera visible lorsque vous chargerez une empreinte avec le même nom qu’une empreinte enregistrée localement.
Ayez toujours un dossier local *.pretty distinct pour chaque librairie GitHub, et ne les combinez jamais en vous référant plus d’une fois au même dossier. Également, n’utilisez pas le même dossier COW (*.pretty) dans une entrée de table de librairies d’empreintes. Ça pourrait foutre le bordel. La valeur de l’option allow_pretty_writing_to_this_dir substituera toute variable d’environnement utilisant la notation ${} pour désigner le chemin, de la même façon que pour le champ "Chemin Librairie".
Quelle est la finalité du système COW ? Il est là pour booster le partage des empreintes. Si vous envoyez périodiquement vos modifications d’empreintes pretty COW au mainteneur du dépôt GitHub, vous aiderez à mettre à jour la copie GitHub. Envoyez simplement les fichiers individuels *.kicad_mod que vous aurez dans vos dossiers COW au mainteneur du dépôt GitHub. Une fois que vous aurez reçu la confirmation que vos modifications ont été validées, vous pourrez supprimer en toute sécurité vos fichiers COW, et l’empreinte mise à jour de la librairie GitHub la remplacera. Votre objectif doit être de garder le dossier COW local aussi petit que possible en contribuant souvent aux copies maîtresses partagées sur https://github.com.
Enfin, Nginx peut être utilisé comme cache du serveur github pour accélérer le chargement des empreintes. Il peut être installé localement ou sur un serveur réseau. Il y a un exemple de configuration dans les sources de KiCad : pcbnew/github/nginx.conf. La façon la plus directe mettre ceci en marche est d'écraser le fichier nginx.conf par défaut avec celui-ci, et export KIGITHUB=http://my_server:54321/KiCad, où my_server est l’adresse IP ou le nom de domaine de la machine faisant tourner le serveur nginx.
2.4.7. Scénarios d’Utilisation
Les librairies d’empreintes peuvent être définies comme globales, ou spécifiques au projet courant. Les librairies d’empreintes définies dans la table globale de l’utilisateur sont toujours disponibles, et sont décrites dans le fichier fp-lib-table du dossier personnel de l’utilisateur. Les librairies d’empreintes globales sont toujours accessibles, même s’il n’y a pas de fichier netliste ouvert. La table des librairies spécifiques au projet n’est active que pour le fichier netliste courant ouvert. La table des librairies spécifiques au projet est enregistrée dans le fichier fp-lib-table, dans le chemin du fichier netliste actuellement ouvert. Vous êtes libres de définir des librairies dans chaque table.
Chaque méthode présente des avantages et des inconvénients.
-
Vous pouvez définir toutes vos librairies dans la table globale, ce qui signifie qu’elles seront toujours disponibles quand vous en aurez besoin.
-
L’inconvénient, c’est que vous devrez parfois parcourir beaucoup de librairies pour trouver l’empreinte que vous cherchez.
-
-
Vous pouvez aussi définir toutes vos librairies sur une base spécifique par projet.
-
L’avantage, c’est que vous aurez uniquement à définir les librairies nécessaires pour le projet, ce qui réduit la recherche.
-
L’inconvénient c’est que vous devrez toujours vous rappeler d’ajouter chaque librairie d’empreintes dont vous avez besoin, pour chaque projet.
-
-
Vous pouvez aussi définir à la fois des librairies d’empreintes globales, et des librairies spécifiques au projet.
Un autre scénario d’utilisation est de définir vos librairies les plus couramment utilisées de façon globale et les librairies seulement nécessaires pour le projet courant dans la table des librairies spécifiques. Il n’y a aucune restriction à la façon dont vous définissez vos librairies.
3. Opérations Générales
3.1. Barres d’Outils et Commandes
Dans Pcbnew, il est possible d’exécuter des commandes de plusieurs façons :
-
Menus textes situés au sommet de la fenêtre principale.
-
Barre d’outils supérieure.
-
Barre d’outils latérale droite.
-
Barre d’outils latérale gauche.
-
Boutons de la souris (options de menu). Plus particulièrement :
-
Le bouton droit de la souris affiche un menu contextuel dont le contenu dépend de l'élément sous le curseur de la souris.
-
-
Clavier (Touches de fonctions F1, F2, F3, F4, Shift, Suppr/Del, +, -, Page Haut, Page Bas et Barre d'espace). La touche Echap annule généralement l’opération en cours.
L’image ci-dessous montre certains moyens d’accéder à ces opérations :

3.2. Commandes à la souris
3.2.1. Commandes de base
-
Bouton gauche
-
Un simple clic affiche les caractéristiques de l’empreinte, ou du texte sous le curseur, dans la barre d'état du bas.
-
Un double-clic affiche la fenêtre d'édition de l'élément sous le curseur (si l'élément est éditable).
-
-
Molette de la souris
-
Zoom rapide, et certaines commandes dans le gestionnaire de couches.
-
Bouton du milieu enfoncé et dessin d’un rectangle pour zoomer sur la zone décrite. La rotation de la molette permet le zoom avant-arrière.
-
-
Bouton droit
-
Affiche le menu contextuel.
-
3.2.2. Opérations sur les blocs
Les opérations de déplacement, inversion (miroir), copie, rotation et suppression de blocs sont toutes disponibles via le menu contextuel. On peut également zoomer sur la zone décrite par le bloc.
Le cadre du bloc est tracé en déplaçant la souris tout en maintenant le bouton gauche enfoncé. L’opération est exécutée lorsque le bouton est relâché.
En maintenant une des touches Shift ou Ctrl, ou Shift et Ctrl ensemble, pendant le tracé du bloc, les fonctions inverser, tourner, ou supprimer sont automatiquement sélectionnées comme indiqué dans le tableau ci-dessous :
Action | Effet |
---|---|
Bouton gauche de la souris enfoncé |
Trace le cadre pour déplacement du bloc |
Shift + Bouton gauche enfoncé |
Trace le cadre pour inversion du bloc |
Ctrl + Bouton gauche enfoncé |
Trace le cadre pour rotation du bloc de 90° |
Shift + Ctrl + Bouton gauche enfoncé |
Trace le cadre pour suppression du bloc |
Bouton central de la souris enfoncé |
Trace le cadre pour zoom sur le bloc |
Lors du déplacement d’un bloc :
-
Déplacer le bloc à sa nouvelle position et cliquer du bouton gauche pour déposer les éléments.
-
Pour annuler l’opération, utilisez le bouton droit et choisissez Annuler bloc dans le menu (ou appuyez sur la touche Echap).
Autrement, si aucune touche du clavier n’est enfoncé lors du tracé du bloc, utilisez le bouton droit pour afficher le menu contextuel et choisissez l’opération désirée.
Pour chaque opération sur un bloc, une fenêtre de sélection permet de limiter l’action à certains éléments.
3.3. Sélection de la taille de grille
Pendant la mise en place des éléments, le curseur se déplace sur une grille. La grille peut être activée ou désactivée à l’aide d’une icône de la barre d’outils de gauche.
Chacune des tailles de grille prédéfinies, ou une taille de grille définie par l’utilisateur, peuvent être choisies à l’aide du menu contextuel, ou par le menu déroulant de la barre d’outils du haut. La définition d’une taille de grille par l’utilisateur se fait en utilisant le menu Dimensions → Grille.
3.4. Réglage du niveau de zoom
Le niveau de zoom peut être changé par les méthodes suivantes :
-
Ouvrir le menu contextuel (bouton droit de la souris), et sélectionner le niveau de zoom désiré.
-
Utiliser les touches de fonctions suivantes :
-
F1 : Agrandir (zoom avant)
-
F2 : Réduire (zoom arrière)
-
F3 : Raffraîchir l’affichage
-
F4 : Centrer la vue sur la position du curseur
-
-
Tourner la molette de la souris.
-
Tracer un rectangle avec le bouton du milieu de la souris enfoncé pour zoomer sur la zone délimitée.
3.5. Affichage des coordonnées du curseur
Les coordonnées du curseur sont affichées en inches ou en millimètres, suivant la sélection faite par les icônes In ou mm de la barre d’outils de gauche.
Quelle que soit l’unité sélectionnée, Pcbnew travaille toujours avec une précision de 1/10000 d’inch.
La barre d'état au bas de la fenêtre affiche :
-
Le niveau de zoom actuel.
-
La position absolue du curseur.
-
La position relative du curseur (dx,dy). Notez que l’origine des coordonnées relatives du curseur peut être remis à zéro (0,0) à n’importe quelle position en appuyant sur la barre d’espace. La position relative du curseur est ensuite affichée en fonction du nouvel origine.
De plus, la position relative du curseur peut être affichée en utilisant des coordonnées polaires (angle + rayon). Ceci peut être activé ou désactivé par une icône de la barre d’outils de gauche.

3.6. Commandes au Clavier - Raccourcis
Beaucoup de commandes sont accessibles directement par le clavier, majuscules ou minuscules. La plupart des raccourcis sont affichés dans les menus. Certains n’apparaissant pas sont :
-
Suppr : supprime une empreinte ou une piste. (Disponible uniquement si les modes Empreinte ou Piste sont actifs)
-
V : si l’outil Piste est actif, change de couche, ou place une via quand un tracé de piste est en cours.
-
+ et - : sélectionne la couche suivante ou précédente.
-
? : affiche la liste des raccourcis clavier.
-
Espace : remet à zéro l’origine des coordonnées relatives.
3.7. Opérations sur les blocs
Les opérations de déplacement, inversion (miroir), copie, rotation et suppression de blocs sont toutes disponibles via le menu contextuel. On peut également zoomer sur la zone décrite par le bloc.
Le cadre du bloc est tracé en déplaçant la souris tout en maintenant le bouton gauche enfoncé. L’opération est exécutée lorsque le bouton est relâché.
En maintenant une des touches Shift ou Ctrl, ou Shift et Ctrl ensemble, ou Alt, pendant le tracé du bloc, les fonctions inverser, tourner, supprimer ou copier sont automatiquement sélectionnées comme indiqué dans le tableau ci-dessous :
Action | Effet |
---|---|
Bouton gauche de la souris enfoncé |
Déplacement du bloc |
Shift + Bouton gauche enfoncé |
Inversion du bloc |
Ctrl + Bouton gauche enfoncé |
Rotation du bloc de 90° |
Shift + Ctrl + Bouton gauche enfoncé |
Suppression du bloc |
Alt + Bouton gauche enfoncé |
Copie du bloc |
Quand une opération est faite sur un bloc, une fenêtre de sélection apparaît, qui permet de choisir les éléments concernés par l’action.
Toutes les commandes ci-dessus peuvent être annulées par cette fenêtre, ou en appuyant sur la touche Echap.

3.8. Unités utilisées dans les fenêtres
Les unités utilisées pour afficher les dimensions sont en pouces (inches) et
en mm. L’unité souhaitée est sélectionnée en cliquant sur une des icônes de
la barre d’outils de gauche :
. Mais on peut aussi entrer l’unité utilisée
pour définir une valeur, lors de la saisie d’une nouvelle valeur.
Les unités acceptées sont :
1 in |
1 pouce (inch) |
1 " |
1 pouce (inch) |
25 th |
25 thou (millième de pouce) |
25 mi |
25 mils (identique au thou) |
6 mm |
6 mm |
Les règles sont :
-
Les espaces entre nombre et unités sont autorisés.
-
Seules les deux premières lettres sont significatives.
-
Pour les pays utilisant un autre séparateur décimal que la virgule, le point (.) peut également être utilisé. Ainsi 1,5 et 1.5 seront identiques pour les français.
3.9. Barre de menus
La barre des menus du haut permet d’accéder aux fichiers (chargement et enregistrement), aux options de configuration, d’impression, de tracé, et aux fichiers d’aide.

3.9.1. Menu Fichiers

Le menu Fichiers permet le chargement, la sauvegarde des fichiers de circuits imprimés, ainsi que l’impression et le tracé du circuit imprimé. Il permet l’exportation (au format GenCAD 1,4) du circuit pour l’utilisation avec des testeurs automatiques.
3.9.2. Menu Editer
Permet quelques actions d'édition globales :

3.9.3. Menu Affichage

Fonctions de Zoom et d’affichage du circuit en 3D.
3D Visualisateur
Ouvre le visualisateur 3D. Exemple :

Commutation d’affichages
Permet de commuter l’affichage :
-
mode de base (défaut)
-
mode OpenGL
-
mode Cairo
3.9.4. Menu Placer
On y retrouve les fonctions de la barre d’outils de droite.

3.9.5. Menu Routage
Fonctions de routage.

3.9.6. Menu Préférences

Permet :
-
Sélection des librairies d’empreintes.
-
Afficher/Cacher le Gestionnaire de Couches (sélection des couleurs pour l’affichage des couches et autres éléments. Permet aussi d’afficher/cacher les éléments).
-
Paramétrage des options générales (unités, etc…).
-
Paramétrage des options d’affichage
-
Création, édition (et relecture) du fichier des raccourcis clavier.
3.9.7. Menu Dimensions

Un menu important, qui permet le réglage :
-
De la taille de grille utilisateur.
-
Des tailles des textes et de l'épaisseur de ligne des tracés.
-
Des dimensions et caractéristiques des pads (pastilles).
-
Des valeurs globales pour les couches des masques de soudure et de pâte à souder.
3.9.8. Menu Outils

3.9.9. Menu Règles de Conception

Permet d’accéder à deux boites de dialogues :
-
Éditeur des Règles de Conception (dimensions des pistes et vias, distances d’isolation).
-
Options Couches (nombre de couches, activation et noms des couches).
3.9.10. Menu Aide
Permet d’accéder aux manuels utilisateur et aux informations de version.
3.10. Barre d’Outils Supérieure
Cette barre d’outils donne accès aux principales fonctions de Pcbnew.

|
Création d’un nouveau circuit imprimé. |
|
Ouverture d’un circuit imprimé existant. |
|
Sauvegarde d’un circuit imprimé. |
|
Ajustage de la feuille de dessin, et modification des propriétés du fichier. |
|
Ouvre l'éditeur des empreintes des librairies ou du circuit. |
|
Ouvre le visualisateur des empreintes des librairies ou du circuit. |
|
Défaire/Refaire les dernières commandes (jusqu'à 10). |
|
Affiche la fenêtre d’impression du circuit. |
|
Affiche la fenêtre de tracé du circuit. |
|
Zoom avant et Zoom arrière (relativement au centre de l'écran). |
|
Rafraîchit l'écran. |
|
Ajuste le zoom au circuit. |
|
Recherche d’une empreinte ou d’un texte. |
|
Opérations sur les Netlistes (sélection, lecture, test et compilation). |
|
Contrôle automatique des pistes : DRC (Design Rule Check). |
|
Sélection de la couche de travail. |
|
Sélection d’une paire de couches (pour les vias). |
|
Mode Empreinte : si enfoncé, active certaines options d’empreintes du menu contextuel. |
|
Mode Routage : si enfoncé, active certaines options de routage du menu contextuel. |
|
Accès direct au routeur Freerouter. |
|
Affiche/Cache la console de scripting Python. |
3.10.1. Barre d’Outils Auxiliaire
|
Sélection d’une largeur de piste déjà en utilisation. |
|
Sélection d’une taille de via déjà en utilisation. |
|
Largeur de piste automatique : si activée lors de la création d’une nouvelle piste, débutant depuis une piste existante, la largeur de la nouvelle piste est la même que celle existante. |
|
Sélection de la taille de grille. |
|
Sélection du facteur de zoom. |
3.11. Barre d’Outils Latérale Droite
Cette barre d’outils contient les outils d'édition pour modifier le circuit affiché dans Pcbnew.
|
|
Sélectionne le mode standard. |
|
Surbrillance de l'équipotentielle sélectionnée en cliquant sur une piste ou une pad. |
|
|
Affichage du chevelu local (Pad ou Empreinte). |
|
|
Ajoute une empreinte depuis une librairie. |
|
|
Placement de pistes et vias. |
|
|
Placement de zones cuivrées remplies. |
|
|
Placement de zones d’exclusion (sur couches cuivrées). |
|
|
Tracé de lignes sur couches techniques (couches non cuivrées). |
|
|
Tracé de cercles sur couches techniques (couches non cuivrées). |
|
|
Tracé d’arcs de cercles sur couches techniques (couches non cuivrées). |
|
|
Placement de textes. |
|
|
Tracé de dimensions sur couches techniques (couches non cuivrées). |
|
|
Ajout de mires de superposition (visibles sur toutes les couches). |
|
|
Suppression de l'élément pointé par le curseur. Note : lors d’une suppression, si plusieurs éléments pointés sont superposés, la priorité est donnée au plus petit (dans l’ordre décroissant des priorités pistes, textes, empreintes). La fonction "Défaire" de la barre d’outils du haut permet l’annulation de la dernière suppression d'élement. |
|
|
Ajustage du point d’origine du perçage et du placement d’empreintes. |
|
|
Origine de la grille. Utile principalement pour l'édition et le placement d’empreintes. Peut aussi être réglé dans le menu Dimensions/Grille. |
-
Placement d’empreintes, pistes, zones remplies, textes, etc…
-
Surbrillance d'équipotentielles.
-
Création de notes, d'éléments graphiques, etc…
-
Deleting elements.
3.12. Barre d’Outils Latérale Gauche
La barre d’outils de gauche contient les options de contrôle et d’affichage qui agissent sur l’interface de Pcbnew.
|
|
Active/Désactive le DRC (Design Rule Checking). Attention: quand le DRC est arrêté, des connexions incorrectes peuvent être réalisées. |
|
Affiche/Cache la grille. Note : une grille fine peut ne pas être affichée en dessous d’un niveau de zoom suffisant. |
|
|
Affichage des coordonnées relatives polaires dans la barre d'état. |
|
|
Affichage/Saisie des coordonnées ou des dimensions en inches ou en millimeters. |
|
|
Change la forme du curseur. |
|
|
Affiche le chevelu général (connexions incomplètes entre empreintes). |
|
|
Affiche le chevelu dynamiquement pendant le déplacement. |
|
|
Active/Désactive la suppression automatique d’une piste pendant son redessin. |
|
|
Affiche les zones remplies. |
|
|
N’affiche pas les zones remplies. |
|
|
Affiche seulement le contour des zones remplies. |
|
|
Affichage des pads en mode contour ou normal. |
|
|
Affichage des vias en mode contour ou normal. |
|
|
Affichage des pistes en mode contour ou normal. |
|
|
Mode d’affichage haut contraste ou normal. Dans ce mode la couche active est affichée normalement, tandis que les autres couches sont affichées en gris. Utile pour le travail sur les circuits multi-couches. |
|
|
Affiche/Cache le Gestionnaire de Couches. |
|
|
Accès aux outils de micro-ondes. En cours de développement. |
3.13. Menus contextuels et édition rapide
Un clic droit de la souris ouvre un menu contextuel dont le contenu dépend de l'élément pointé par le curseur.
Celui-ci donne accès au :
-
Changement d’affichage (centrer l’affichage sur le curseur, zoom avant-arrière, sélection du facteur de zoom).
-
Changement de taille de grille.
-
Également, un clic droit sur un élément permet d’en modifier les paramètres les plus courants.
Les captures d'écrans plus bas montrent à quoi ressemblent ces menus contextuels.
3.14. Modes disponibles
Il y a 3 modes lors de l’utilisation des menus contextuels. Ces modes ajoutent ou suppriment certaines commandes spécifiques dans les menus contextuels.
|
Mode Normal |
|
Mode Empreinte |
|
Mode Pistes |
3.14.1. Mode Normal
-
Menu contextuel sans sélection :

-
Menu contextuel avec une piste sélectionnée :

-
Menu contextuel avec une empreinte sélectionnée :

3.14.2. Mode Empreinte
Mêmes cas en Mode Empreinte (
activé)
-
Menu contextuel sans sélection :

-
Menu contextuel avec une piste sélectionnée :

-
Menu contextuel avec une empreinte sélectionnée :

3.14.3. Mode Pistes
Mêmes cas en Mode Pistes (
activé)
-
Menu contextuel sans sélection :

-
Menu contextuel avec une piste sélectionnée :

-
Menu contextuel avec une empreinte sélectionnée :

4. Implémentation Schématique
4.1. Lier un schéma à un circuit imprimé
D’une manière générale, une feuille schématique est liée à un circuit imprimé au moyen d’un fichier netliste, qui est normalement produit par l'éditeur utilisé pour faire le schéma. Pcbnew accepte des fichiers de netliste faits avec Eeschema ou Orcad PCB 2. Le fichier netliste, généré à partir du schéma, ne contient généralement pas les empreintes associées aux différents composants. Par conséquent, une étape intermédiaire est nécessaire. Au cours de cette étape intermédiaire, l’association des composants schématiques avec des empreintes physiques est effectuée. Dans KiCad, c’est CvPcb qui est utilisé pour créer cette association et un fichier nommé *.cmp est produit. CvPcb met également à jour le fichier netliste en utilisant ces informations.
CvPcb peut également produire un "fichier stuff" *.stf, qui peut servir à la rétro-annotation du champ F2 de chaque composant dans le schéma, épargnant ainsi la tâche de ré-assignation d’empreintes à chaque passe d'édition du schéma. Dans Eeschema, la copie d’un composant copiera également l’affectation de l’empreinte, et marquera la référence comme non affectée pour l’annotation auto-incrémentielle qui suivra.
Pcbnew lit le fichier netliste .net modifié et, s’il existe, le fichier .cmp. Dans le cas d’une empreinte ayant été changée directement dans Pcbnew, le fichier .cmp est automatiquement mis à jour, évitant ainsi l’obligation d’exécuter CvPcb à nouveau.
Reportez-vous à la figure du manuel "Getting Started in KiCad" (Démarrer avec KiCad), section Échanges de données dans KiCad qui illustre le flux des données de KiCad, et comment sont obtenus les fichiers intermédiaires utilisés par les différents outils logiciels qui composent KiCad.
4.2. Processus de création d’un circuit imprimé
Après avoir créé votre schéma dans Eeschema :
-
Générez la netliste depuis Eeschema.
-
Associez, à chaque composant du fichier netliste, l’empreinte correspondante qui sera utilisée sur le circuit imprimé, avec CvPcb.
-
Lancez Pcbnew, et lisez le fichier netliste. Ceci lira également le fichier .cmp contenant les associations d’empreintes.
Pcbnew chargera alors automatiquement toutes les empreintes nécessaires. Les empreintes pourront alors être placées sur la carte, manuellement ou automatiquement, et les pistes tracées.
4.3. Processus de mise à jour d’un circuit imprimé
Si le schéma est modifié, après qu’un circuit imprimé ait été généré, les étapes suivantes doivent être répétées :
-
Générez une nouvelle netliste depuis Eeschema.
-
Si les modifications apportées au schéma contiennent de nouveaux composants, les empreintes correspondantes devront être associées à l’aide de CvPcb.
-
Lancez Pcbnew, et lisez le fichier netliste modifié. Ceci relira également le fichier .cmp contenant les associations d’empreintes.
Pcbnew chargera alors automatiquement les nouvelles empreintes, ajoutera les nouvelles connexions et supprimera les connexions redondantes. Ce processus, appelé annotation "vers l’avant" (forward annotation), est un processus très courant quand un PCB est réalisé et mis à jour.
4.4. Lecture du fichier Netliste - Chargement d’empreintes
4.4.1. Boite de dialogue
Accessible par l’icône

4.4.2. Options disponibles
Sélection Empreinte |
Lien entre composants et empreintes correspondantes sur le circuit : le lien normal est par la Référence (option normale). Le timestamp peut être utilisé, après une réannotation du schéma, si l’annotation précedente a été détruite (option spéciale) |
Échange Empreinte |
Si une empreinte a changé dans la netliste : garder l’ancienne ou changer pour la nouvelle. |
Pistes non Connectées |
Garder les pistes existantes, ou supprimer les pistes erronées |
Empreintes Supplémentaires |
Supprimer les empreintes du circuit qui ne sont plus en netliste. Les empreintes avec l’attribut "Verrouillé" ne seront pas supprimées. |
Nets avec Pad Unique |
Supprime les nets avec pad unique . |
4.4.3. Chargement de nouvelles empreintes
Avec le backend GAL (Graphics Abstraction Layer), quand de nouvelles empreintes sont trouvées dans le fichier netliste, elles seront chargées, étalées, et prêtes à être placées en un groupe où vous le souhaiterez.

Avec l’ancien backend, quand de nouvelles empreintes sont trouvées dans le fichier netliste, elles sont automatiquement chargées et placées aux coordonnées (0,0).

Les nouvelles empreintes peuvent être déplacées et disposées une par une. Une meilleure façon est de les déplacer automatiquement :
Activez le Mode Empreinte (
)
Déplacez le curseur sur une zone appropriée (vide de tous composants), et cliquez sur le bouton droit :

-
Place Automatiquement Nouvelles Empreintes, s’il y a déjà un circuit avec des empreintes existantes.
-
Place Automatiquement toutes les Empreintes, la première fois (à la création du circuit).
L’image suivante vous montre le résultat :

5. Layers
5.1. Introduction
Pcbnew can work with 50 different layers:
-
Between 2 and 32 copper layers for routing tracks.
-
14 fixed-purpose technical layers:
-
12 paired layers (Front/Back): Adhesive, Solder Paste, Silk Screen, Solder Mask, Courtyard, Fabrication
-
2 standalone layers: Edge Cuts, Margin
-
-
4 auxiliary layers that you can use any way you want: Comments, E.C.O. 1, E.C.O. 2, Drawings
5.2. Setting up layers
To open the Layers Setup from the menu bar, select Design Rules → Layers Setup.
The number of copper layers, their names, and their function are configured there. Unused technical layers can be disabled.

5.3. Layer Description
5.3.1. Copper Layers
Copper layers are the usual working layers used to place and re-arrange tracks. Layer numbers start from 0 (the first copper layer, on Front) and end at 31 (Back). Since components cannot be placed in inner layers (number 1 to 30), only layers number 0 and 31 are component layer.
The name of any copper layer is editable. Copper layers have a function attribute that is useful when using the external router Freerouter. Example of default layer names are F.Cu and In0 for layer number 0.

5.3.2. Paired Technical Layers
12 technical layers come in pairs: one for the front, one for the back. You can recognize them with the "F." or "B." prefix in their names. The elements making up a footprint (pad, drawing, text) of one of these layers are automatically mirrored and moved to the complementary layer when the footprint is flipped.
The paired technical layers are:
- Adhesive (F.Adhes and B.Adhes)
-
These are used in the application of adhesive to stick SMD components to the circuit board, generally before wave soldering.
- Solder Paste (F.Paste and B.Paste)
-
Used to produce a mask to allow solder paste to be placed on the pads of surface mount components, generally before reflow soldering. Usually only surface mount pads occupy these layers.
- Silk Screen (F.SilkS and B.SilkS)
-
They are the layers where the drawings of the components appear. That’s where you draw things like component polarity, first pin indicator, reference for mounting, …
- Solder Mask (F.Mask and B.Mask)
-
These define the solder masks. All pads should appear on one of these layers (SMT) or both (for through hole) to prevent the varnish from covering the pads.
- Courtyard (F.CrtYd and B.CrtYd)
-
Used to show how much space a component physically takes on the PCB.
- Fabrication (F.Fab and B.Fab)
-
Footprint assembly (?).
5.3.3. Independant Technical Layers
- Edge.Cuts
-
This layer is reserved for the drawing of circuit board outline. Any element (graphic, texts…) placed on this layer appears on all the other layers. Use this layer only to draw board outlines.
- Margin
-
Board’s edge setback outline (?).
5.3.4. Layers for general use
These layers are for any use. They can be used for text such as instructions for assembly or wiring, or construction drawings, to be used to create a file for assembly or machining. Their names are:
-
Comments
-
E.C.O. 1
-
E.C.O. 2
-
Drawings
5.4. Selection of the active layer
The selection of the active working layer can be done in several ways:
-
Using the right toolbar (Layer manager).
-
Using the upper toolbar.
-
With the pop-up window (activated with the right mouse button).
-
Using the + and - keys (works on copper layers only).
-
By hot keys.
5.4.1. Selection using the layer manager

5.4.2. Selection using the upper toolbar

This directly selects the working layer.
Hot keys to select the working layer are displayed.
5.4.3. Selection using the pop-up window

The Pop-up window opens a menu window which provides a choice for the working layer.

5.5. Selection of the Layers for Vias
If the Add Tracks and Vias icon is selected on the right hand toolbar, the Pop-Up window provides the option to change the layer pair used for vias:

This selection opens a menu window which provides choice of the layers used for vias.

When a via is placed the working (active) layer is automatically switched to the alternate layer of the layer pair used for the vias.
One can also switch to an other active layer by hot keys, and if a track is in progress, a via will be inserted.
5.6. Using the high-contrast mode
This mode is entered when the tool (in the left toolbar) is activated:
When using this mode, the active layer is displayed like in the normal mode, but all others layers are displayed in gray color.
There are two useful cases:
5.6.1. Copper layers in high-contrast mode
When a board uses more than four layers, this option allows the active copper layer to be seen more easily:
Normal mode (back side copper layer active):

High-contrast mode (back side copper layer active):

5.6.2. Technical layers
The other case is when it is necessary to examine solder paste layers and solder mask layers which are usually not displayed.
Masks on pads are displayed if this mode is active.
Normal mode (front side solder mask layer active):

High-contrast mode (front side solder mask layer active):

6. Créer et modifier un circuit
6.1. Création d’un circuit
6.1.1. Dessin du contour du circuit
C’est en général une bonne idée de définir en premier le contour du circuit. Le contour est tracé comme une séquence de segments de ligne. Sélectionnez Edge.Cuts comme couche active et utilisez l’outil Addition de lignes ou polygones graphiques pour tracer le bord, en cliquant à la position de chaque sommet, et double-cliquez pour terminer le contour. Les circuits ayant généralement des dimensions très précises, il peut être nécessaire d’utiliser l’affichage des coordonnées du curseur tout en traçant le contour. Rappelez-vous que les coordonnées relatives peuvent être mises à zéro à tout moment en utilisant la barre d’espace, et que l’on peut changer les unités par Ctrl-U. Les coordonnées relatives permettent le dessin de dimensions très précises. Il est aussi possible de dessiner un contour circulaire (ou arc) :
-
Sélectionnez l’outil Addition de graphiques (Cercle) ou Addition de graphiques (Arc de Cercle)
-
Cliquez pour placer le centre du cercle
-
Ajustez le rayon en déplaçant la souris
-
Terminez en cliquant à nouveau.
Note
|
L'épaisseur du contour peut être réglée dans le menu Paramètres (largeur recommandée = 150 en 1/10 de mils) ou via les Options, mais ce ne sera pas visible à moins que les graphiques ne soient affichés dans un autre mode que le mode contour. |
Le contour résultant peut ressembler à ceci :

6.1.2. Utilisation d’un dessin DXF pour le contour du circuit
Un autre moyen de dessiner le contour est d’importer un dessin au format DXF.
L’utilisation de cette fonctionnalité permet de dessiner des circuits aux formes beaucoup plus complexes qu’avec les possibilités de dessin de Pcbnew.
Par exemple, un logiciel de CAO mécanique peut être utilisé pour définir un circuit qui s’insère dans un boîtier particulier.
Préparation d’un dessin DXF pour l’importation dans KiCad
Les capacités d’importation de DXF dans KiCad ne supportent pas les éléments DXF comme POLYLINES ou ELLIPSES, et les fichiers DXF qui utilisent ces fonctionnalités ont besoin de quelques étapes de conversion pour les préparer à l’importation.
Un logiciel comme LibreCAD peut être utilisé pour faire ces conversions.
La première étape consiste à briser (Explode) les POLYLINES en formes plus simples. Dans LibreCAD, suivez ces étapes :
-
Ouvrez une copie du fichier DXF.
-
Sélectionnez la forme du circuit (les formes sélectionnées sont affichées avec des pointillés).
-
Dans le menu Modifier, choisissez Explode.
-
Appuyez sur Entrée.
L'étape suivante consiste à diviser les courbes complexes comme les ELLIPSES, en segments de ligne qui s’approchent de la forme requise. Cela se fait automatiquement lorsque le fichier DXF est exporté ou enregistré dans l’ancien format DXF R12 (comme le format R12 ne supporte pas les formes de courbes complexes, les programmes de CAO convertissent ces formes en segments de ligne. Certaines applications de CAO permettent la configuration du nombre ou de la longueur des segments de ligne utilisés). Dans LibreCAD la longueur des segments est généralement suffisamment petite pour les utiliser dans les contours de cartes.
Dans LibreCAD, utilisez les étapes suivantes pour exporter vers le format de fichier DXF R12 :
-
Dans le menu Fichier, cliquez sur Enregistrer Sous…
-
Au bas de la fenêtre Save Drawing As, il y a un menu déroulant Files of type:. Choisissez Drawing Exchange DXF R12.
-
Donnez éventuellement un autre nom au fichier dans le champ File name:.
-
Cliquez sur Save
Votre DXF est maintenant prêt à être importé dans KiCad.
Importation du dessin DXF dans KiCad
Les étapes suivantes décrivent l’importation d’un contour de circuit dans KiCad à partir du fichier DXF préparé. Notez que le comportement d’importation est légèrement différent selon le mode de canvas utilisé.
Utilisation du mode canvas par "défaut" :
-
Dans le menu Fichier, choisissez Importer, puis Fichier DXF.
-
Dans la fenêtre Importation Fichier DXF cliquez sur Examiner et sélectionnez le fichier DXF préparé à importer.
-
Dans Placer l’origine DXF (0,0) au point: sélectionnez le positionnement de l’origine du DXF par rapport aux coordonnées du circuit (le circuit Kicad a pour (0,0) le coin supérieur gauche). Pour l’option «Position définie par l’utilisateur", entrez les coordonnées dans les champs «Position X» et «Position Y '.
-
Dans le menu déroulant Couche, sélectionnez la couche du circuit à remplir avec l’importation. Edge.Cuts doit être choisi pour le contour du circuit.
-
Cliquez sur Valider.
Utilisation des modes canvas "OpenGL" ou "Cairo" :
-
Dans le menu Fichier, choisissez Importer, puis Fichier DXF.
-
Dans la fenêtre Importation Fichier DXF cliquez sur Examiner et sélectionnez le fichier DXF préparé à importer.
-
Les options Placer l’origine DXF (0,0) au point: sont ignorées dans ce mode.
-
Dans le menu déroulant Couche, sélectionnez la couche du circuit à remplir avec l’importation. Edge.Cuts doit être choisi pour le contour du circuit.
-
Cliquez sur Valider.
-
Le contour est maintenant attaché au curseur de la souris et peut être déplacé dans la zone de dessin du circuit.
-
Cliquez pour poser le contour.
Exemple de forme DXF importée
Exemple d’un import DXF avec un contour ayant plusieurs segments elliptiques remplacés par un certain nombre de segments approchants :

6.1.3. Lecture de la netliste générée à partir du schéma
Cliquez sur l’icône
pour afficher la
fenêtre de Netliste :

Si le nom (chemin) de netliste est incorrect, utilisez le bouton Examiner pour choisir le fichier de netliste souhaité. Puis cliquez sur Lire Netliste Courante. Tous les empreintes non déjà chargées apparaîtront, empilées les unes sur les autres (nous verrons ci-dessous comment les déplacer automatiquement).

Si aucune des empreintes n’ont été placées, toutes les empreintes apparaîtront sur le circuit au même endroit, ce qui les rend difficiles à reconnaître. Il est possible de les étaler automatiquement (en utilisant la commande «Étalement et placement globaux' accessible par le bouton droit de la souris). Voici le résultat d’un tel étalement automatique :

Note
|
Si un circuit est modifié, en remplaçant une empreinte existante par une nouvelle dans CvPcb (par exemple, pour passer une résistance de 1/8W à 1/2W), il sera nécessaire de supprimer le composant existant avant que Pcbnew ne charge l’empreinte de remplacement. Toutefois, si une empreinte doit être remplacée par une empreinte existante, il est plus facile de le faire en utilisant le menu d’empreinte accessible en cliquant sur le bouton droit de la souris au-dessus de l’empreinte en question. |
6.2. Correction d’un circuit
Il est souvent nécessaire de modifier un circuit après un changement dans le schéma.
6.2.1. Étapes à suivre
-
Créez une nouvelle netliste à partir du schéma modifié. Si de nouveaux composants ont été ajoutés, associez les à leurs empreintes correspondantes dans CvPcb.
-
Lisez la netliste dans Pcbnew.
6.2.2. Destruction de pistes incorrectes
Pcbnew est capable de supprimer automatiquement les pistes qui sont devenues incorrectes à la suite de modifications. Pour ce faire, cochez l’option "Supprimer" dans la case Pistes non connectées de la fenêtre de netliste :

Toutefois, il est parfois plus rapide de corriger manuellement ces pistes (l’outil DRC permet leur identification).
6.2.3. Composants supprimés
Pcbnew peut supprimer les empreintes correspondant à des composants ayant été supprimés du schéma. Ceci est facultatif.
Cela est nécessaire car il y a souvent des empreintes (par exemple les trous de vis de fixation) qui sont ajoutées au PCB mais qui n’apparaissent pas dans le schéma.

Si l’option Supprimer des "Empreintes Supplémentaires" est cochée, les empreintes correspondant à des composants non trouvés dans la netliste seront supprimées, sauf si elles ont l’option "Verrouillée" activée. C’est une bonne idée d’activer cette option pour les empreintes "mécaniques":

6.2.4. Empreintes modifiées
Si une empreinte est changée dans la netliste (en utilisant CvPcb), mais que l’empreinte a déjà été placée, elle ne sera pas modifiée par Pcbnew, sauf si l’option Changer de Échange empreinte a été cochée dans la fenêtre de netliste :

Le changement d’une empreinte (par exemple, le remplacement d’une résistance par une autre de taille différente), peut être effectué directement en éditant l’empreinte.
6.2.5. Options avancées - sélection par horodatage
Quelquefois, l’annotation du schéma est modifiée, sans qu’aucun changement matériel ne soit fait sur le circuit (cela concerne les références - comme R5, U4 …). Le PCB est donc inchangé (sauf éventuellement pour les marquages sérigraphiques). Néanmoins, en interne, les composants et les empreintes y sont représentés par leur référence. Dans ce cas, l’option Timestamp de la boîte de dialogue netliste peut être choisie avant la relecture de la netliste :

Avec cette option, Pcbnew n’identifiera plus les empreintes par leurs références, mais par leur horodatage (timestamp). Le timestamp est automatiquement généré par Eeschema (c’est la date et l’heure à laquelle le composant a été placé dans le schéma).
Attention
|
Le plus grand soin doit être apporté quand on utilise cette option (enregistrez le fichier avant !). Ceci parce que cette technique est compliquée dans le cas de composants contenant des unités multiples (ex : le 7400 a 4 portes dans un seul boîtier). Dans ce cas le timestamp n’est pas défini de façon unique (pour le 7400, il y en aura 4, un par unité). Néanmoins, l’option timestamp permet habituellement de résoudre les problèmes de ré-annotation. |
6.3. Échange direct d’empreintes déjà placées sur le circuit
Le changement d’une empreinte (ou plusieurs empreintes identiques) vers une autre est très utile, et très facile :
-
Double-Cliquez sur une empreinte pour ouvrir la fenêtre d'édition.
-
Cliquez sur Changer Empreinte.

Options de Changer Empreinte(s) :

Il faut choisir un nouveau nom d’empreinte et utiliserc:
-
Changer l’empreinte de xx pour l’empreinte courante.
-
Changer empreintes yy pour changer toutes les empreintes identiques à celle courante.
-
Changer empreinte ayant même valeur pour toutes les empreintes identiques à l’empreinte courante avec limitation aux composants de même valeur.
-
Mettre à jour toutes les empreintes du PCB pour recharger toutes les empreintes du circuit.
7. Footprint placement
7.1. Assisted placement
Whilst moving footprints the footprint ratsnest (the net connections) can be
displayed to assist the placement. To enable this the icon
of the left toolbar must be activated.
7.2. Manual placement
Select the footprint with the right mouse button then choose the Move command from the menu. Move the footprint to the required position and place it with the left mouse button. If required the selected footprint can also be rotated, inverted or edited. Select Cancel from the menu (or press the Esc key) to abort.
Here you can see the display of the footprint ratsnest during a move:

The circuit once all the footprints are placed may be as shown:

7.3. General re-orientation of footprints
Initially all footprints inherit the same orientation that they had in the library (normally 0).
If an alternative orientation is required for an individual footprint, or all footprints (for example all vertical) use the menu option AutoPlace/Orient All Footprints. This orientation can be selective (for example to relate only to the footprints whose reference starts with "IC".

7.4. Automatic Footprint Distribution
Generally speaking, footprints can only be moved if they have not been "Fixed". This attribute can be turned on and off from the pop-up window (click right mouse button over footprint) whilst in Footprint Mode, or through the Edit Footprint Menu.
As stated in the last chapter, new footprints loaded during the reading of the netlist appear piled up at a single location on the board. Pcbnew allows an automatic distribution of the footprints to make manual selection and placement easier.
-
Select the option "Footprint Mode" (Icon
on the upper toolbar).
-
The pop-up window activated by the right mouse button becomes:
If there is a footprint under the cursor:

If there is nothing under the cursor:

In both cases the following commands are available:
-
Spread out All Footprints allows the automatic distribution of all the footprints not Fixed. This is generally used after the first reading of a netlist.
-
Spread out Footprints not Already on Board allows the automatic distribution of the footprints which have not been placed already within the PCB outline. This command requires that an outline of the board has been drawn to determine which footprints can be automatically distributed.
7.5. Automatic placement of footprints
7.5.1. Characteristics of the automatic placer
The automatic placement feature allows the placement of footprints onto the 2 faces of the circuit board (however switching a footprint onto the copper layer is not automatic).
It also seeks the best orientation (0, 90, -90, 180 degrees) of the footprint. The placement is made according to an optimization algorithm, which seeks to minimize the length of the ratsnest, and which seeks to create space between the larger footprints with with many pads. The order of placement is optimized to initially place these larger footprints with many pads.
7.5.2. Preparation
Pcbnew can thus place the footprints automatically, however it is necessary to guide this placement, because no software can guess what the user wants to achieve.
Before an automatic placement is carried out one must:
-
Create the outline of the board (It can be complex, but it must be closed if the form is not rectangular).
-
Manually place the components whose positions are imposed (Connectors, clamp holes, etc).
-
Similarly, certain SMD footprints and critical components (large footprints for example) must be on a specific side or position on the board and this must be done manually.
-
Having completed any manual placement these footprints must be "Fixed" to prevent them being moved. With the Footprint Mode icon
selected right click on the footprint and pick "Fix Footprint" on the Pop-up menu. This can also be done through the Edit/Footprint Pop-up menu.
-
Automatic placement can then be carried out. With the Footprint Mode icon selected, right click and select Glob(al) Move and Place - then Autoplace All Footprints.
During automatic placement, if required, Pcbnew can optimize the orientation of the footprints. However rotation will only be attempted if this has been authorized for the footprint (see Edit Footprint Options).
Usually resistors and non-polarized capacitors are authorized for 180 degrees rotation. Some footprints (small transistors for example) can be authorized for +/- 90 and 180 degrees rotation.
For each footprint one slider authorizes 90 degree Rot(ation) and a second slider authorizes 180 degree Rot(ation). A setting of 0 prevents rotation, a setting of 10 authorizes it, and an intermediate value indicates a preference for/against rotation.
The rotation authorization can be done by editing the footprint once it is placed on the board. However it is preferable to set the required options to the footprint in the library as these settings will then be inherited each time the footprint is used.
7.5.3. Interactive auto-placement
It may be necessary during automatic placement to stop (press Esc key) and manually re-position a footprint. Using the command Autoplace Next Footprint will restart the autoplacement from the point at which it was stopped.
The command Autoplace new footprints allows the automatic placement of the footprints which have not been placed already within the PCB outline. It will not move those within the PCB outline even if they are not "fixed".
The command Autoplace Footprint makes it possible to re-place the footprint pointed to by the mouse, even if its fixed attribute is active.
7.5.4. Additional note
Pcbnew automatically determines the possible zone of placement of the footprints by respecting the shape of the board outline, which is not necessarily rectangular (It can be round, or have cutouts, etc).
If the board is not rectangular, the outline must be closed, so that Pcbnew can determine what is inside and what is outside the outline. In the same way, if there are internal cutouts, their outline will have to be closed.
Pcbnew calculates the possible zone of placement of the footprints using the outline of the board, then passes each footprint in turn over this area in order to determine the optimum position at which to place it.
8. Setting routing parameters
8.1. Current settings
8.1.1. Accessing the main dialog
The most important parameters are accessed from the following drop-down menu:

and are set in the Design Rules dialog.
8.1.2. Current settings
Current settings are displayed in the top toolbar.

8.2. General options
The General options menu is available via the top toolbar link Preferences → General dialog.

The dialog looks like the following:

For the creation of tracks the necessary parameters are:
-
Tracks 45 Only: Directions allowed for track segments are 0, 45 or 90 degrees.
-
Double Segm Track: When creating tracks, 2 segments will be displayed.
-
Tracks Auto Del: When recreating tracks, the old one will be automatically deleted if considered redundant.
-
Magnetic Pads: The graphic cursor becomes a pad, centered in the pad area.
-
Magnetic Tracks: The graphic cursor becomes the track axis.
8.3. Netclasses
Pcbnew allows you to define different routing parameters for each net. Parameters are defined by a group of nets.
-
A group of nets is called a Netclass.
-
There is always a netclass called "default".
-
Users can add others Netclasses.
A netclass specifies:
-
The width of tracks, via diameters and drills.
-
The clearance between pads and tracks (or vias).
-
When routing, Pcbnew automatically selects the netclass corresponding to the net of the track to create or edit, and therefore the routing parameters.
8.3.1. Setting routing parameters
The choice is made in the menu: Design Rules → Design Rules.
8.3.2. Netclass editor
The Netclass editor allows you to:
-
Add or delete Netclasses.
-
Set routing parameters values: clearance, track width, via sizes.
-
Group nets in netclasses.

8.3.3. Global Design Rules
The global design rules are:
-
Enabling/disabling Blind/buried Vias use.
-
Enabling/disabling Micro Vias use.
-
Minimum Allowed Values for tracks and vias.
A DRC error is raised when a value smaller than the minimum value specified is encountered. The second dialog panel is:

This dialog also allows to enter a "stock" of tracks and vias sizes.
When routing, one can select one of these values to create a track or via, instead of using the netclass’s default value.
Useful in critical cases when a small track segment must have a specific size.
8.3.4. Via parameters
Pcbnew handles 3 types of vias:
-
Through vias (usual vias).
-
Blind or buried vias.
-
Micro Vias, like buried vias but restricted to an external layer to its nearest neighbor. They are intended to connect BGA pins to the nearest inner layer. Their diameter is usually very small and they are drilled by laser.
By default, all vias have the same drill value.
This dialog specifies the smallest acceptable values for via parameters. On a board, a via smaller than specified here generates a DRC error.
8.3.5. Track parameters
Specify the minimum acceptable track width. On a board, a track width smaller than specified here generates a DRC error.
8.3.6. Specific sizes

One can enter a set of extra tracks and/or vias sizes. While routing a track, these values can be used on demand instead of the values from the current netclass values.
8.4. Examples and typical dimensions
8.4.1. Track width
Use the largest possible value and conform to the minimum sizes given here.
Units | CLASS 1 | CLASS 2 | CLASS 3 | CLASS 4 | CLASS 5 |
---|---|---|---|---|---|
mm |
0.8 |
0.5 |
0.4 |
0.25 |
0.15 |
mils |
31 |
20 |
16 |
10 |
6 |
8.4.2. Insulation (clearance)
Units | CLASS 1 | CLASS 2 | CLASS 3 | CLASS 4 | CLASS 5 |
---|---|---|---|---|---|
mm |
0.7 |
0.5 |
0.35 |
0.23 |
0.15 |
mils |
27 |
20 |
14 |
9 |
6 |
Usually, the minimum clearance is very similar to the minimum track width.
8.5. Exemples
8.5.1. Rustic
-
Clearance: 0.35mm (0.0138 inches).
-
Track width: 0.8mm (0.0315 inches).
-
Pad diameter for ICs and vias: 1.91mm (0.0750 inches ).
-
Pad diameter for discrete components: 2.54mm (0.1 inches).
-
Ground track width: 2.54mm (0.1 inches).

8.5.2. Standard
-
Clearance: 0.35mm (0.0138 inches).
-
Track width: 0.5mm (0.0127 inches).
-
Pad diameter for ICs: make them elongated in order to allow tracks to pass between IC pads and yet have the pads offer a sufficient adhesive surface (1.27 x 2.54 mm -→0.05x 0.1 inches).
-
Vias: 1.27mm (0.0500 inches).

8.6. Manual routing
Manual routing is often recommended, because it is the only method offering control over routing priorities. For example, it is preferable to start by routing power tracks, making them wide and short and keeping analog and digital supplies well separated. Later, sensitive signal tracks should be routed. Amongst other problems, automatic routing often requires many vias. However, automatic routing can offer a useful insight into the positioning of footprins. With experience, you will probably find that the automatic router is useful for quickly routing the obvious tracks, but the remaining tracks will best be routed by hand.
8.7. Help when creating tracks
Pcbnew can display the full ratsnest, if the button
is activated.
The button
allows one to highlight a
net (click to a pad or an existing track to highlight the corresponding
net).
The DRC checks tracks in real time while creating them. One cannot create a track which does not match the DRC rules. It is possible to disable the DRC by clicking on the button. This is, however, not recommended, use it only in specific cases.
8.7.1. Creating tracks
A track can be created by clicking on the button
. A new track must start on a pad or on
another track, because Pcbnew must know the net used for the new track (in
order to match the DRC rules).

When creating a new track, Pcbnew shows links to nearest unconnected pads, link number set in option "Max. Links" in General Options.
End the track by double-clicking, by the pop-up menu or by its hot key.

8.7.2. Moving and dragging tracks
When the button
is active, the track
where the cursor is positioned can be moved with the hotkey M. If you
want to drag the track you can use the hotkey G.
8.7.3. Via Insertion
A via can be inserted only when a track is in progress:
-
By the pop-up menu.
-
By the hotkey V.
-
By switching to a new copper layer using the appropriate hotkey.
8.8. Select/edit the track width and via size
When clicking on a track or a pad, Pcbnew automatically selects the corresponding Netclass, and the track size and vias dimensions are derived from this netclass.
As previously seen, the Global Design Rules editor has a tool to insert extra tracks and vias sizes.
-
The horizontal toolbar can be used to select a size.
-
When the button
is active, the current track width can be selected from the pop-up menu (accessible as well when creating a track).
-
The user can utilize the default Netclasses values or a specified value.
8.8.1. Using the horizontal toolbar

|
Track width selection. The symbol * is a mark for default Netclass value selection. |
|
Selecting a specific track width value. The first value in list is always the netclass value. Others values are tracks widths entered from the Global Design Rules editor. |
|
Via size selection. The symbol * is a mark for default Netclass value selection. |
|
Selecting a specific via dimension value. The first value in list is always the netclass value. Others values are vias dimensions entered from the Global Design Rules editor. |
|
When enabled: Automatic track width selection. When starting a track on an existing track, the new track has the same width as the existing track. |
|
Grid size selection. |
|
Zoom selection. |
8.8.2. Using the pop-up menu
One can select a new size for routing, or change to a previously created via or track segment:

If you want to change many via (or track) sizes, the best way is to use a specific Netclass for the net(s) that must be edited (see global changes).
8.9. Editing and changing tracks
8.9.1. Change a track
In many cases redrawing a track is required.
New track (in progress):

When finished:

Pcbnew will automatically remove the old track if it is redundant.
8.9.2. Global changes
Global tracks and via sizes dialog editor is accessible via the pop-up window by right clicking on a track:

The dialog editor allows global changes of tracks and/or vias for:
-
The current net.
-
The whole board.

9. Interactive Router
The Interactive Router lets you quickly and efficiently route your PCBs by shoving off or walking around items on the PCB that collide with the trace you are currently drawing.
Following modes are supported:
-
Highlight collisions, which highlights all violating objects with a nice, shiny green color and shows violating clearance regions.
-
Shove, attempting to push and shove all items colliding with the currently routed track.
-
Walk around, trying to avoid obstacles by hugging/walking around them.
9.1. Setting up
Before using the Interactive Router, please set up these two things:
-
Clearance settings To set the clearances, open the Design Rules dialog and make sure at least the default clearance value looks sensible.

-
Enable OpenGL mode By selecting View→Switch canvas to OpenGL menu option or pressing F11.

9.2. Laying out tracks
To activate the router tool press the Interactive Router button
or the X key. The
cursor will turn into a cross and the tool name, will appear in the status
bar.
To start a track, click on any item (a pad, track or a via) or press the X key again hovering the mouse over that item. The new track will use the net of the starting item. Clicking or pressing X on empty PCB space starts a track with no net assigned.
Move the mouse to define shape of the track. The router will try to follow the mouse trail, hugging unmovable obstacles (such as pads) and shoving colliding traces/vias, depending on the mode. Retreating the mouse cursor will cause the shoved items to spring back to their former locations.
Clicking on a pad/track/via in the same net finishes routing. Clicking in empty space fixes the segments routed so far and continues routing the trace.
In order to stop routing and undo all changes (shoved items, etc.), simply press Esc.
Pressing V or selecting Place Through Via from the context menu while routing a track attaches a via at the end of the trace being routed. Pressing V again disables via placement. Clicking in any spot establishes the via and continues routing.
Pressing / or selecting Switch Track Posture from the context menu toggles the direction of the initial track segment between straight or diagonal.
Note
|
By default, the router snaps to centers/axes of the items. Snapping can be disabled by holding Shift while routing or selecting items. |
9.3. Setting track widths and via sizes
There are several ways to pre-select a track width/via size or to change it during routing:
-
Use standard KiCad shortcuts.
-
Press W or select Custom Track Width from the context menu to type in a custom track width/via size.
-
Pick a predefined width from the Select Track Width sub-menu of the context menu.
-
Select Use the starting track width in the Select Track Width menu to pick the width from the start item (or the traces already connected to it).
9.4. Dragging
The router can drag track segments, corners and vias. To drag an item, click on it with Ctrl key pressed, hover the mouse and press G or select Drag Track/Via from the context menu. Finish dragging by clicking again or abort by pressing Esc.
9.5. Options
The router behavior be configured by pressing E or selecting Routing Options from the context menu while in the Track mode. It opens a window like the one below:
The options are:

-
Mode - select how the router handles DRC violation (shoving, walking around, etc.)
-
Shove vias - when disabled, vias are treated as un-movable objects and hugged instead of shoved.
-
Jump over obstacles - when enabled, the router tries to move colliding traces behind solid obstacles (e.g. pads) instead of "reflecting" back the collision
-
Remove redundant tracks - removes loops while routing (e.g. if the new track ensures same connectivity as an already existing one, the old track is removed). Loop removal works locally (only between the start and end of the currently routed trace).
-
Automatic neckdown - when enabled, the router tries to break out pads/vias in a clean way, avoiding acute angles and jagged breakout traces.
-
Smooth dragged segments - when enabled, the router attempts to merge several jagged segments into a single straight one (dragging mode).
-
Allow DRC violations (Highlight collisions mode only) - allows to establish a track even if is violating the DRC rules.
-
Optimizer effort - defines how much time the router shall spend optimizing the routed/shoved traces. More effort means cleaner routing (but slower), less effort means faster routing but somewhat jagged traces.
10. Création de zones cuivrées remplies
Copper zones are defined by an outline (closed polygon), and can include holes (closed polygons inside the outline). A zone can be drawn on a copper layer or alternatively on a technical layer.
10.1. Creating zones on copper layers
Pad (and track) connections to filled copper areas are checked by the DRC engine. A zone must be filled (not just created) to connect pads. Pcbnew currently uses track segments or polygons to fill copper areas.
Each option has its advantages and its disadvantages, the main disadvantage being increased screen redraw time on slower machines. The final result is however the same.
For calculation time reasons, the zone filling is not recreated after each change, but only:
-
If a filling zone command is executed.
-
When a DRC test is performed.
Copper zones must be filled or refilled after changes in tracks or pads are made. Copper zones (usually ground and power planes) are usually attached to a net.
In order to create a copper zone you should:
-
Select parameters (net name, layer…). Turning on the layer and highlighting this net is not mandatory but it is good practice.
-
Create the zone limit (If not, the entire board will be filled.).
-
Fill the zone.
Pcbnew tries to fill all zones in one piece, and usually, there will be no unconnected copper blocks. It can happen that some areas remain unfilled. Zones having no net are not cleaned and can have insulated areas.
10.2. Creating a zone
10.2.1. Creating the limits of a zone
Use the tool
. The active layer must be a
copper layer. When clicking to start the zone outline, the following dialog
box will be opened.

You can specify all parameters for this zone:
-
Net
-
Layer
-
Filling options
-
Pad options
-
Priority level
Draw the zone limit on this layer. This zone limit is a polygon, created by a left-clicking at each corner. A double-click will end and close the polygon. If the starting point and ending point are not at the same coordinate, Pcbnew will add a segment from the end point to the start point.
Note
|
|
In the following image you can see an example of a zone limit (polygon in thin hatched line):

10.2.2. Priority level
Sometimes a small zone must be created inside a large zone.
This is possible if the small zone has a higher priority level than the large zone.
Level setting:

Here is an example:

After filling:

10.2.3. Filling the zone
When filling a zone, Pcbnew removes all unconnected copper islands. To access the zone filling command, right-click on the edge zone.

Activate the "Fill Zone" command. Below is the filling result for a starting point inside the polygon:

The polygon is the border of the filling area. You can see a non-filled area inside the zone, because this area is not accessible:
-
A track creates a border, and
-
There is no starting point for filling in this area.
Note
|
You can use many polygons to create cutout areas. Here you can see an example: |

10.3. Filling options

When you fill an area, you must choose:
-
The mode for filling.
-
The clearance and minimum copper thickness.
-
How pads are drawn inside the zone (or connected to this zone).
-
Thermal relief parameters.
10.3.1. Filling mode
Zones can be filled using polygons or segments. The result is the same. If you have problems with polygon mode (slow screen refresh) you should use segments.
10.3.2. Clearance and minimum copper thickness
A good choice for clearance is a grid that is a bit bigger than the routing grid. Minimum copper thickness value ensures that there are no too small copper ares.
Attention
|
if this value is too large, small shapes like thermal stubs in thermal reliefs cannot be drawn. |
10.3.3. Pad options
Pads of the net can either be included or excluded from the zone, or connected by thermal reliefs.
-
If included, soldering and un-soldering can be very difficult due to the high thermal mass of the large copper area.

-
If excluded, the connection to the zone will not be very good.
-
The zone can be filled only if tracks exists to connect zones areas.
-
Pads must be connected by tracks.
-

-
A thermal relief is a good compromise.
-
Pad is connected by 4 track segments.
-
The segment width is the current value used for the track width.
-

10.3.4. Thermal reliefs parameters

You can set two parameters for thermal reliefs:

10.3.5. Choice of parameters
The copper width value for thermal reliefs must be bigger than the minimum thickness value for the copper zone. If not, they cannot be drawn.
Additionally, a too large value for this parameter or for antipad size does not allow one to create a thermal relief for small pads (like pad sizes used for SMD components).
10.4. Adding a cutout area inside a zone
A zone must already exist. To add a cutout area (a non-filled area inside the zone):
-
Right-click on an existing edge outline.
-
Select Add Cutout Area.

-
Create the new outline.

10.5. Outlines editing
An outline can be modified by:
-
Moving a corner or an edge.
-
Deleting or adding a corner.
-
Adding a similar zone, or a cutout area.
If polygons are overlapping they will be combined.

To do that, right-click on a corner or on an edge, then select the proper command.
Here is a corner (from a cutout) that has been moved:

Here is the final result:

Polygons are combined.
10.5.1. Adding a similar zone
Adding the similar zone:

Final result:

10.6. Editing zone parameters
When right-clicking on an outline, and using Edit Zone Params the Zone params Dialog box will open. Initial parameters can be inputted . If the zone is already filled, refilling it will be necessary.
10.7. Final zone filling
When the board is finished, one must fill or refill all zones. To do this:
-
Activate the tool zones via the button
.
-
Right-click to display the pop-up menu.
-
Use Fill or Refill All Zones:
Attention
|
Calculation can take some time if the filling grid is small. |
10.8. Change zones net names
After editing a schematic, you can change the name of any net. For instance VCC can be changed to +5V.
When a global DRC control is made Pcbnew checks if the zone net name exists, and displays an error if not.
Manually editing the zone parameters will be necessary to change the old name to the new one.
10.9. Creating zones on technical layers
10.9.1. Creating zone limits
This is done using the button . The active layer must be a technical layer.
When clicking to start the zone outline, this dialog box is opened:

Select the technical layer to place the zone and draw the zone outline like explained previously for copper layers.
Note
|
|
10.10. Creating a Keepout area
Select the tool
The active layer should be a copper layer.
After clicking on the starting point of a new keepout area, the dialog box is opened:

One can select disallowed items:
-
Tracks.
-
Vias.
-
Copper pours.
When a track or a via is inside a keepout which does not allow it, a DRC error will be raised.
For copper zones, the area inside a keepout with no copper pour will be not filled. A keep-out area is a like a zone, so editing its outline is analogous to copper zone editing.
11. Files for circuit fabrication
Let us see now what are the steps necessary for the creation of the necessary files for the production of your printed circuit board.
All files generated by KiCad are placed in the working directory which is the same directory that contains the xxxx.brd file for the printed circuit board.
11.1. Final preparations
The generation of the necessary files for the production of your printed circuit board includes the following preparatory steps.
-
Mark any layer (e.g., top or front and bottom or back) with the project name by placing appropriate text upon each of the layers.
-
All text on copper layers (sometimes called solder or bottom) must be mirrored.
-
Create any ground planes, modifying traces as required to ensure they are contiguous.
-
Place alignment crosshairs and possibly the dimensions of the board outline (these are usually placed on one of the general purpose layers).
Here is an example showing all of these elements, except ground planes, which have been omitted for better visibility:

A color key for the 4 copper layers has also been included:
11.2. Final DRC test
Before generating the output files, a global DRC test is very strongly recommended.
Zones are filled or refilled when starting a DRC. Press the button
to launch the following DRC dialog:

Adjust the parameters accordingly and then press the "Start DRC" button.
This final check will prevent any unpleasant surprises.
11.3. Setting coordinates origin
Set the coordinates origin for the photo plot and drill files, one must
place the auxiliary axis on this origin. Activate the icon
. Move the auxiliary axis by
left-clicking on the chosen location.

11.4. Generating files for photo-tracing
This is done via the Files/Plot menu option and invokes the following dialog:

Usually, the files are in the GERBER format. Nevertheless, it is possible to produce output in both HPGL and POSTSCRIPT formats. When Postscript format is selected, this dialog will appear.

In these formats, a fine scale adjust can be used to compensate for the plotter accuracy and to have a true scale of 1 for the output:

11.4.1. GERBER format
For each layer, Pcbnew generates a separate file following the GERBER 274X standard, by default in 4.6 format (each coordinate in the file is represented by 10 digits, of which 4 are before the decimal point and 6 follow it), units in inches, and a scale of 1.
It is normally necessary to create files for all of the copper layers and, depending on the circuit, for the silkscreen, solder mask, and solder paste layers. All of these files can be produced in one step, by selecting the appropriate check boxes.
For example, for a double-sided circuit with silkscreen, solder mask and solder paste (for SMD components), 8 files should be generated (xxxx represents the name of the .brd file).
-
xxxx-F_Cu.gbr for the component side.
-
xxxx-B_Cu.gbr for the copper side.
-
xxxx-F_SilkS.gbr for the component-side silkscreen markings.
-
xxxx-B_SilkS.gbr for the copper-side silkscreen markings.
-
xxxx-F_Paste.gbr for the component-side solder paste.
-
xxxx-B_Paste.gbr for the copper-side solder paste.
-
xxxx-F_Mask.gbr for the component-side solder mask.
-
xxxx-B_Mask.gbr for the copper-side solder mask.
GERBER file format:
The format used by Pcbnew is RS274X format 4.6, Imperial, Leading zero omitted, Abs format. These are very usual settings.
11.4.2. POSTSCRIPT format
The standard extension for the output files is .ps in the case of postscript output. As for HPGL output, the tracing can be at user-selected scales and can be mirrored. If the Org = Centre option is active, the origin for the coordinates of the tracing table is assumed to be in the centre of the drawing.
If the Print Sheet Ref option is active, the sheet cartridge is traced.
11.4.3. Plot options
Gerber format:

Other formats:

GERBER format specific options:
Use Protel filename extensions |
Use .gbl .gtl .gbs .gts .gbp .gtp .gbo .gto instead of .gbr for file name extensions. |
Include extended attributes |
Output extended attributes to file. |
Subtract soldermask from silkscreen |
Remove all Silk from solder paste areas. |
11.4.4. Other formats
The standard extension depends on the output file type.
Some options are not available for some formats.
The plot can be done at user-selected scales and can be mirrored.
The Print Drill Opt list offers the option of pads that are filled, drilled to the correct diameter or drilled with a small hole (to guide hand drilling).
If the Print Sheet Ref option is active, the sheet cartridge is traced.
11.5. Global clearance settings for the solder stop and the solder paste mask
Mask clearance values can be set globally for the solder mask layers and the solder paste layers. These clearances can be set at the following levels.
-
At pads level.
-
At footprint level.
-
Globally.
And Pcbnew uses by priority order.
-
Pad values. If null:
-
Footprint values. If null:
-
Global values.
11.5.1. Access
The menu option for this is available via the Dimensions menu:

The dialog box is the following:

11.5.2. Solder mask clearance
A value near to 0.2 mm is usually good. This value is positive because the mask is usually bigger than the pad.
One can set a minimum value for the solder mask width, between 2 pads.
If the actual value is smaller than the minimum value, the 2 solder mask shapes will be merged.
11.5.3. Solder paste clearance
The final clearance is the sum of the solder paste clearance and a percentage of the pad size.
This value is negative because the mask is usually smaller than the pad.
11.6. Generating drill files
The creation of a drill file xxxx.drl following the EXCELLON standard is always necessary.
One can also produce an optional drill report, and an optional drill map.
-
The drill map can be plotted using several formats.
-
The drill report is a plain text file.
The generation of these files is controlled via:
-
"Create Drill File" button, or
-
Files/Fabrication Outputs/Drill file menu selection.
The Drill tools dialog box will be the following:

For setting the coordinate origin, the following dialog box is used:

-
Absolute: absolute coordinate system is used.
-
Auxiliary axis: coordinates are relative to the auxiliary axis, use the icon (right toolbar) to set it.
11.7. Generating wiring documentation
To produce wiring documentation files, the component and copper silkscreen layers can be traced. Usually, just the component-side silkscreen markings are sufficient for wiring a PCB. If the copper-side silkscreen is used, the text it contains should be mirrored in order to be readable.
11.8. Generation of files for automatic component insertion
This option is accessed via the Postprocess/Create Cmp file menu option. However, no file will be generated unless at least one footprint has the Normal+Insert attribute activated (see Editing Footprints). One or two files will be produced, depending upon whether insertable components are present on one or both sides of the PCB. A dialogue box will display the names of the file(s) created.
11.9. Advanced tracing options
The options described below (part of the Files/Plot dialogue) allow for fine-grained control of the tracing process. They are particularly useful when printing the silkscreen markings for wiring documentation.

The available options are:
Plot sheet reference on all layers |
Trace sheet outline and the cartridge. |
Plot pads on silkscreen |
Enables/disables printing of pad outlines on the silkscreen layers (if the pads have already been declared to appear on these layers). Prevents any pads from being printed in the disabled mode. |
Plot footprint values |
Enables printing of VALUE text on the silkscreen. |
Plot footprint references |
Enables printing of the REFERENCE text on the silkscreen. |
Force plotting of invisible values/references |
Forces printing of fields (reference, value) declared as invisible. In combination with Plot footprint values and Plot footprint references, this option enables production of documents for guiding wiring and repair. These options have proven necessary for circuits using components that are too small (SMD) to allow readable placement of two separate text fields. |
Do not tent vias |
Delete the mask over the vias. |
Exclude PCB edge layer from other layers |
GERBER format specific. Do not plot graphic items on edge layer. |
Use Protel filename extensions |
GERBER format specific. When creating files, use specific extensions foe each file. If disabled the Gerber file extension is .gbr. |
12. Footprint Editor - Managing Libraries
12.1. Overview of Footprint Editor
Pcbnew can simultaneously maintain several libraries. Thus, when a footprint is loaded, all libraries that appear in the library list are searched until the first instance of the footprint is found. In what follows, note that the active library is the library selected within the Footprint Editor, the program will now be described
Footprint Editor enables the creation and the editing of footprints:
-
Adding and removing pads.
-
Changing pad properties (shape, layer) for individual pads or globally for all pads of a footprint.
-
Editing graphic elements (lines, text).
-
Editing information fields (value, reference, etc.).
-
Editing the associated documentation (description, keywords).
Footprint Editor allows the maintenance of the active library as well by:
-
Listing the footprints in the active library.
-
Deletion of a footprint from the active library.
-
Saving a footprint to the active library.
-
Saving all of the footprints contained by a printed circuit.
It is also possible to create new libraries.
The library extension is .mod.
12.2. Accessing Footprint Editor
The Footprint Editor can be accessed in two different ways:
-
Directly, via the icon
in the main toolbar of Pcbnew.
-
In the edit dialog for the active footprint (see figure below: accessed via the context menu), there is the button Footprint Editor.

In this case, the active footprint of the board will be loaded automatically in Footprint Editor, enabling immediate editing or archiving.
12.3. Footprint Editor user interface
By calling Footprint Editor the following window will appear:

12.4. Top toolbar in Footprint Editor

From this toolbar, the following functions are available:
|
Select the active library. |
|
Save the current footprint to the active library, and write it to disk. |
|
Create a new library and save the current footprint in it. |
|
Open the Footprint Viewer |
|
Access a dialog for deleting a footprint from the active library. |
|
Create a new footprint. |
|
Create a footprint using a wizard |
|
Load a footprint from the active library. |
|
Load (import) a footprint from the printed circuit board. |
|
Export the current footprint to the printed circuit board. when the footprint was previously imported from the current board. It will replace the corresponding footprint on the board (i.e., respecting position and orientation). |
|
Export the current footprint to the printed circuit board. It will be copied on to the printed circuit board at position 0. |
|
Import a footprint from a file created by the Export command. |
|
Export a footprint. This command is essentially identical to that for creating a library, the only difference being that creates a library in the user directory, while creates a library in the standard library directory (usually kicad/modules). |
|
Undo and Redo |
|
Invokes the footprint properties dialog. |
|
Call the print dialog. |
|
Standard zoom commands. |
|
Call the pad editor. |
|
Perform a check of footprint correctness |
12.5. Creating a new library
The creation of a new library is done via the button
, in this case the file is created by
default in the library directory or via the button
, in which case the file is created by
default in your working directory.
A file-choosing dialog allows the name of the library to be specified and its directory to be changed. In both cases, the library will contain the footprint being edited.
Attention
|
If an old library of the same name exists, it will be overwritten without warning. |
12.6. Saving a footprint in the active library
The action of saving a footprint (thereby modifying the file of the active
library) is performed using this button
. If a footprint of the same name
already exists, it will be replaced. Since you will depend upon the accuracy
of the library footprints, it is worth double-checking the footprint before
saving.
It is recommended to edit either the reference or value field text to the name of the footprint as identified in the library.
12.7. Transferring a footprint from one library to another
-
Select the source library via the button
.
-
Load the footprint via the button
.
-
Select the destination library via the button
.
-
Save the footprint via the button
You may also wish to delete the source footprint.
-
Reselect the source library with
-
Delete the old footprint via the button
12.8. Saving all footprints of your board in the active library
It is possible to copy all of the footprints of a given board design to the active library. These footprints will keep their current library names. This command has two uses:
-
To create an archive or complete a library with the footprints from a board, in the event of the loss of a library.
-
More importantly, it facilitates library maintenance by enabling the production of documentation for the library, as below.
12.9. Documentation for library footprints
It is strongly recommended to document the footprints you create, in order to enable rapid and error-free searching.
For example, who is able to remember all of the multiple pin-out variants of a TO92 package? The Footprint Properties dialog offers a simple solution to this problem.

This dialog accepts:
-
A one-line comment/description.
-
Multiple keywords.
The description is displayed with the component list in Cvpcb and, in Pcbnew, it is used in the footprint selection dialogs.
The keywords enable searches to be restricted to those footprints corresponding to particular keywords.
When directly loading a footprint (the icon
of the right-hand Pcbnew toolbar), keywords may be entered in the dialog
box. Thus, entering the text =CONN will cause the display of the list of
footprints whose keyword lists contain the word CONN.
12.10. Documenting libraries - recommended practice
It is recommended to create libraries indirectly, by creating one or more auxiliary circuit boards that constitute the source of (part of) the library, as follows: Create a circuit board in A4 format, in order to be able to print easily to scale (scale = 1).
Create the footprints that the library will contain on this circuit board. The library itself will be created with the File/Archive footprints/Create footprint archive command.

The "true source" of the library will thus be the auxiliary circuit board, and it is on this circuit that any subsequent alterations of footprints will be made. Naturally, several circuit boards can be saved in the same library.
It is generally a good idea to make different libraries for different kinds of components (connectors, discretes,…), since Pcbnew is able to search many libraries when loading footprints.
Here is an example of such a library source:

This technique has several advantages:
-
The circuit can be printed to scale and serve as documentation for the library with no further effort.
-
Future changes of Pcbnew may require regeneration of the libraries, something that can be done very quickly if circuit-board sources of this type have been used. This is important, because the circuit board file formats are guaranteed to remain compatible during future development, but this is not the case for the library file format.
12.11. Footprint Libraries Management
The list of footprint libraries in Pcbnew can be edited using the Footprint Libraries Manager. This allows you to add and remove footprint libraries by hand, and also allows you to invoke the Footprint Libraries Wizard by pressing the "Append With Wizard" button.
The Footprint Libraries Wizard can also be invoked through the Preferences menu, and can automatically add a library (detecting its type) from a file or from a Github URL. The URL for the official libraries is: https://github.com/KiCad
More details about footprint library tables and the Manager and Wizard can be found in the CvPcb Reference Manual in the section Footprint Library Tables.
12.12. 3D Shapes Libraries Management
The 3D shape libraries can be downloaded by 3D Shape Libraries Wizard. It can be invoked from the menu Preferences → 3D Shapes Libraries Downloader.
13. Éditeur d’empreintes - Création et Modification d’Empreintes
13.1. Aperçu de l'Éditeur d’Empreintes
Footprint Editor is used for editing and creating PCB footprints. This includes:
-
Adding and removing pads.
-
Changing pad properties (shape, layer), for individual pads or for all the pads in a footprint.
-
Adding and editing graphic elements (contours, text).
-
Editing fields (value, reference, etc.).
-
Editing the associated documentation (description, keywords).
13.2. Éléments d’empreintes
A footprint is the physical representation (footprint) of the part to be inserted in the PCB and it must be linked to the relative component in your schematic. Each footprint includes three different elements:
-
The pads.
-
Graphical contours and text.
-
Fields.
In addition, a number of other parameters must be correctly defined if the auto-placement function will be used. The same holds for the generation of auto-insertion files.
13.2.1. Pastilles
Two pad properties are important:
-
Geometry (shape, layers, drill holes).
-
The pad number, which is constituted by up to four alphanumeric characters. Thus, the following are all valid pad numbers: 1, 45 and 9999, but also AA56 and ANOD. The pad number must be identical to that of the corresponding pin number in the schematic, because it defines the matching pin and pad numbers that Pcbnew links pins and pads with.
13.2.2. Contours
Graphical contours are used to draw the physical shape of the footprint. Several different types of contour are available: lines, circles, arcs, and text. Contours have no electrical significance, they are simply graphical aids.
13.2.3. Champs
These are text elements associated with a footprint. Two are obligatory and always present: the reference field and the value field. These are automatically read and updated by Pcbnew when a netlist is read during the loading of footprints into your board. The reference is replaced by the appropriate schematic reference (U1, IC3, etc.). The value is replaced by the value of the corresponding part in the schematic (47K, 74LS02, etc.). Other fields can be added and these will behave like graphical text.
13.3. Lancement de l'éditeur et sélection d’une empreinte à modifier
Footprint Editor can be started in two ways:
-
Directly via the
icon from the main toolbar of Pcbnew. This allows the creation or modification of a footprint in the library.
-
Double-clicking a footprint will launch the Footprint Properties menu, which offers a Go to Footprint Editor button. If this option is used, the footprint from the board will be loaded into the editor, for modification or for saving.
13.4. Barres d’outils de l'éditeur d’empreintes
Calling Footprint Editor will launch a new window that looks like this:

13.4.1. Barre d’outils d'édition (côté droit)
This toolbar contains tools for:
-
Placing pads.
-
Adding graphic elements (contours, text).
-
Positioning the anchor.
-
Deleting elements.
The specific functions are the following:
|
No tool. |
|
Add pads. |
|
Draw line segments and polygons. |
|
Draw circles. |
|
Draw circular arcs. |
|
Add graphical text (fields are not managed by this tool). |
|
Position the footprint anchor. |
|
Delete elements. |
|
Grid origin. (grid offset). Useful for placement of pads. The grid origin can be put on a given location (the first pad to place), and after the grid size can be set to the pad pitch. Placing pads is therefore very easy |
13.4.2. Barre d’outils d’affichage (côté gauche)
These tools manage the display options in Footprint Editor:
|
Display the grid. |
|
Display polar coordinates. |
|
Use units of mm or inch |
|
Toggle cursor crosshair shape |
|
Display pad in outline mode. |
|
Display text in outline mode. |
|
Display contours in outline mode. |
|
Toggle high-contrast mode |
13.5. Menus Contextuels
The right mouse button calls up menus that depend upon the element beneath the cursor.
The context menu for editing footprint parameters:

The context menu for editing pads:

The context menu for editing graphic elements:

13.6. Fenêtre des propriétés des empreintes
This dialog can be launched when the cursor is over a footprint by clicking on the right mouse button and then selecting Edit Footprint.

The dialog can be used to define the main footprint parameters.
13.7. Création d’une nouvelle empreinte
A new footprint can be created via the button
. The name of the new footprint will
be requested. This will be the name by which the footprint will be
identified in the library.
This text also serves as the footprint value, which is ultimately replaced by the real value (100uF_16V, 100_0.5W, …).
The new footprint will require:
-
Contours (and possibly graphic text).
-
Pads.
-
A value (hidden text that is replaced by the true value when used).
Alternative method:
When a new footprint is similar to an existing footprint in a library or a circuit board, an alternative and quicker method of creating the new footprint is as follows:
-
Load the similar footprint (
,
or
).
-
Modify the "Footprint Name in Library" field in order to generate a new identifier (name).
-
Edit and save the new footprint.
13.8. Ajout et modification de pastilles
Once a footprint has been created, pads can be added, deleted or modified. Modification of pads can be local, affecting only the pad under the cursor, or global, affecting all pads of the footprint.
13.8.1. Ajout de pastilles
Select the
icon from the right hand
toolbar. Pads can be added by clicking in the desired position with the left
mouse button. Pad properties are predefined in the pad properties menu.
Do not forget to enter the pad number.
13.8.2. Réglage des propriétés des pastilles
This can be done in three different ways:
-
Selecting the
icon from the horizontal toolbar.
-
Clicking on an existing pad and selecting Edit Pad. The pad’s settings can then be edited.
-
Clicking on an existing pad and selecting Export Pad Settings. In this case, the geometrical properties of the selected pad will become the default pad properties.
In the first two cases, the following dialog window will be displayed:

Care should be taken to define correctly the layers to which the pad will belong. In particular, although copper layers are easy to define, the management of non-copper layers (solder mask, solder pads…) is equally important for circuit manufacture and documentation.
The Pad Type selector triggers an automatic selection of layers that is generally sufficient.
Pastilles rectangulaires
For SMD footprints of the VQFP/PQFP type which have rectangular pads on all four sides (both horizontal and vertical) it is recommended to use just one shape (for example, a horizontal rectangle) and to place it with different orientations (0 for horizontal and 90 degrees for vertical). Global resizing of pads can then be done in a single operation.
Rotation de pastilles
Rotations of -90 or -180 are only required for trapezoidal pads used in microwave footprints.
Pastilles traversantes non-métallisées
Pads can be defined as Non-Plated Through Hole pads (NPTH pads).
These pads must be defined on one or all copper layers (obviously, the hole exists on all copper layers).
This requirement allows you to define specific clearance parameters ( for instance clearance for a screw).
When the pad hole size is the same as the pad size, for a round or oval pad, this pad is NOT plotted on copper layers in GERBER files.
These pads are used for mechanical purposes, therefore no pad name or net name is allowed. A connection to a net is not possible.
Pastilles sur couches non-cuivrées
These are unusual pads. This option can be used to create fiducials or masks on technical layers.
Paramètres de décalage
Pad 3 has an offset Y = 15 mils:

Paramètre de Delta (pastilles trapézoïdales
Pad 1 has its parameter Delta X = 10 mils

13.8.3. Setting clearance for solder mask and solder paste mask layers
Setting a clearance can be made at 3 levels:
-
Global level.
-
Footprint level.
-
Pad level.
Pcbnew uses the following to calculate clearances:
-
Pad settings. If null,
-
Footprint settings. If null,
-
Global settings.
Remarks
The solder mask pad shape is usually bigger than the pad itself. So the clearance value is positive. The solder paste mask pad shape is usually smaller than the pad itself. So the clearance value is negative.
Solder paste mask parameters
For solder paste mask there are two parameters:
-
A fixed value.
-
A percentage of the pad size.
The real value is the sum of these two values.
Footprint level settings:

Pad level settings:

13.9. Fields Properties
There are at least two fields: reference and value.
Their parameters (attribute, size, width) must be updated. You can access the dialog box from the pop-up menu, by double clicking on the field, or by the footprint properties dialog box:

13.10. Automatic placement of a footprint
If the user wishes to exploit the the full capabilities of the auto-placement functions, it is necessary to define the allowed orientations of the footprint (Footprint Properties dialog).

Usually, rotation of 180 degrees is permitted for resistors, non-polarized capacitors and other symmetrical elements.
Some footprints (small transistors, for example) are often permitted to rotate by +/- 90 or 180 degrees. By default, a new footprint will have its rotation permissions set to zero. This can be adjusted according to the following rule:
A value of 0 makes rotation impossible, 10 allows it completely, and any intermediate value represents a limited rotation. For example, a resistor might have a permission of 10 to rotate 180 degrees (unrestrained) and a permission of 5 for a +/- 90 degree rotation (allowed, but discouraged).
13.11. Attributes
The attributes window is the following:

-
Normal is the standard attribute.
-
Normal+Insert indicates that the footprint must appear in the automatic insertion file (for automatic insertion machines). This attribute is most useful for surface mount components (SMDs).
-
Virtual indicates that a component is directly formed by the circuit board. Examples would be edge connectors or inductors created by a particular track shape (as sometimes seen in microwave footprints).
13.12. Documenting footprints in a library
It is strongly recommended to document newly created footprints, in order to facilitate their rapid and accurate retrieval. Who is able to recall the multiple pin-out variants of a TO92 footprint?
The Footprint Properties dialog offers a simple and yet powerful means for documentation generation.

This menu allows:
-
The entry of a comment line (description).
-
Multiple keywords.
The comment line is displayed with the component list in CvPcb and in the footprint selection menus in Pcbnew. The keywords can be used to restrict searches to those parts possessing the given keywords.
Thus, while using the load footprint command (icon in the right-hand toolbar in Pcbnew), it is possible to type the text =TO220 into the dialog box to have Pcbnew display a list of the footprints possessing the keyword TO220
13.13. 3-dimensional visualisation
A footprint may have been associated with a file containing a three-dimensional representation of itself. In order to associate such a file with a footprint, select the 3D Settings tab. The options panel is the following:

The data information should be provided:
-
The file containing the 3D representation (created by the 3D modeler Wings3D, in vrml format, via the export to vrml command).
-
The default path is kicad/modules/package3d. In the example, the file name is discret/to_220horiz.wrl, using the default path)
-
The x, y and z scales.
-
The offset with respect to the anchor point of the footprint (usually zero).
-
The initial rotation in degrees about each axis (usually zero).
Setting scale allows:
-
To use the same 3D file for footprints which have similar shapes but different sizes (resistors, capacitors, SMD components…)
-
For small (or very large) packages, a better use of the Wings3D grid is to scale 0.1 inch in Pcbnew = 1 grid unit in Wings3D.
If such a file has been specified, it is possible to view the component in 3D.

The 3D model will automatically appear in the 3D representation of the printed circuit board.
13.14. Saving a footprint into the active library
The save command (modification of the file of the active library) is
activated by the
button.
If a footprint of the same name exists (an older version), it will be overwritten. Because it is important to be able to have confidence in the library footprints, it is worth double-checking the footprint for errors before saving.
Before saving, it is also recommended to change the reference or value of the footprint to be equal to the library name of the footprint.
13.15. Saving a footprint to the board
If the edited footprint comes from the current board, the button
will update this footprint on
the board.
14. Advanced PCB editing tools
There are some more advanced editing tools available in Pcbnew and Footprint Editor, which can help you to efficiently lay out components on the canvas.
14.1. Duplicating items
Duplication is a method to clone an item and pick it up in the same action. It is broadly similar to copy-and-pasting, but it allows you to "sprinkle" components over the PCB and it allows you to manually lay out components using the "Move Exact" tool (see below) more easily.
Duplication is done by using the hotkey (which defaults to Ctrl-D) or the duplicate item option in the context menu. In the legacy renderer, these appear as below, depending on the item type:
14.2. Moving items exactly
The "Move Exact" tool allows you to move an item (or group of items) by a certain amount, which can be entered in Cartesian or polar formats and which can be entered in any supported units. This is useful when it would otherwise be cumbersome to switch to a different grid, or when a feature is not spaced according to any existing grids.
To use this tools, select the items you wish to move and then use either the hotkey (defaults to Ctrl-M) or the context menu items to invoke the dialog. You can also invoke the dialog with the hotkey when moving or duplicating items, which can make it easy to repeatedly apply an offset to multiple components.
Move exact with Cartesian move vector entry

Move exact with polar move vector entry

The checkbox allows you to switch between Cartesian and polar co-ordinate systems. Whatever is currently in the form will be converted automatically to the other system.
Then you enter the desired move vector. You can use the units indicated by the labels ("mm" in the images above) or you can specify the units yourself (e.g. "1 in" for an inch, or "2 rad" for 2 radians).
Pressing OK will apply the translation to the selection, and cancel will close the dialog and the items will not be moved. If OK is pressed, the move vector will be saved and pre-filled next time the dialog is opened, which allows repeated application of the same vector to multiple objects.
14.3. Array tools
Pcbnew and the Footprint Editor both have assistants for creating arrays of features and components, which can be used to easily and accurately lay out repetitive elements on PCBs and in footprints.
14.3.1. Activating the array tool
The array tool acts on the component under the cursor, or, in GAL mode, on a selection. It can be accessed either via the context menu for the selection or by a keyboard shortcut (defaults to Ctrl-N). In legacy mode, the context menu icons indicate an array of the selected type:
The array tool is presented as a dialog window, with a pane for the types of array. There are two type of array supported so far: grid, and circular.
Each type of array can be fully specified on the respective panes. Geometric options (how the grid is laid out) go on the left; numbering options (including how the numbers progress across the grid) on the right.
14.3.2. Grid arrays
Grid arrays are arrays that lay components out according to a 2-dimensional square grid. This kind of array can also produce a linear array by only laying out a single row or column.
The settings dialog for grid arrays look like this:

Geometric options
The geometric options are as follow:
-
Horrizontal count: the number of "columns" in the grid.
-
Vertical count: the number of "rows" in the grid.
-
Horizontal spacing: the horizontal distance from item to the item in the same row and next column. If this is negative, the grid progresses from right to left.
-
Vertical spacing: the vertical distance from one item to the item in the same column and the next row. If this is negative, the grid progress bottom to top.
-
Horizontal offset: start each row this distance to the right of the previous one
-
Vertical offset: start each column this distance below the previous one

-
Stagger: add an offset to every set of "n" rows/columns, with each row progressing by 1/n’th of the relevant spacing dimension:


Numbering options
-
Numbering Direction: Determines whether numbers proceed along rows and then moves to the next row, or down columns and then to the next column. Note that the direction on numbering is defined by the sign of the spacing: a negative spacing will result in right-to-left or bottom-to-top numbering. i
-
Reverse numbering on alternate rows or columns: If selected, the numbering order (left-to-right or right-to-left, for example) on alternate rows or columns. Whether rows or columns alternate depends on the numbering direction. This option is useful for packages like DIPs where the numbering proceeds up one side and down the other.
-
Restart numbering: if laying out using items that already have numbers, reset to the start, otherwise continue if possible from this items number
-
Numbering Scheme
-
Continuous: the numbering just continues across a row/column break - if the last item in the first row is numbered "7", the first item in the second row will be "8".
-
Coordinate: the numbering uses a two-axis scheme where the number is made up of the row and column index. Which one comes first (row or column) is determined by the numbering direction.
-
-
Axis numberings: what "alphabet" to use to number the axes. Choices are
-
Numerals for normal integer indices
-
Hexadecimal for base-16 indexing
-
Alphabetic, minus IOSQXZ, a common scheme for electronic components, recommended by ASME Y14.35M-1997 sec. 5.2 (previously MIL-STD-100 sec. 406.5) to avoid confusion with numerals.
-
Full alphabet from A-Z.
-
14.3.3. Circular arrays
Circular arrays lay out items around a circle or a circular arc. The circle is defined by the location of the selection (or the centre of a selected group) and a centre point that is specified. Below is the circular array configuration dialog:

Geometric options
-
Horizontal center, Vertical center: The centre of the circle. The radius field below will update automatically when you adjust these.
-
Angle: The angular difference between two adjacent items in the array. Set this to zero to evenly divide the circle with "count" elements.
-
Count: Number of items in the array (including the original item)
-
Rotate: Rotate each item around its own location. Otherwise, the item will be translated but not rotated (for example, a square pad will always remain upright if this option is not set).
Numbering options
Circular arrays have only one dimension and a simpler geometry than grids. The meanings of the available options are the same as for grids. Items are numbered clockwise - for an anticlockwise array, specify a negative angle.
15. KiCad Scripting Reference
L’usage de scripts permet d’automatiser certaines tâches de KiCad au moyen du langage Python.
Voyez aussi la documentation de doxygen sur Python Scripting Reference.
Vous pouvez obtenir l’aide du module python en tapant pydoc pcbnew dans votre terminal.
Avec des scripts vous pouvez créer des :
-
Plugins : ce type de script est chargé au démarrage de KiCad. Exemples :
-
Assistants d’Empreintes : Pour vous faciliter la fabrication d’empreintes en remplissant des paramètres. Voir ci-dessous la section dédiée Assistants d’Empreintes.
-
Fichier I/O (en projet) : Pour vous permettre d'écrire des plugins d’import/export d’autres types de fichiers.
-
Actions (en projet) : Pour associer des actions de scripts à des événements, ou ajouter de nouveaux menus ou icônes de barres d’outils.
-
-
Scripts en Ligne de Commande : ces scripts, utilisables en ligne de commande, peuvent charger des circuits ou des librairies, les modifier, et produire en sortie des rendus ou de nouveaux circuits.
Il faut noter que la seule application de KiCad qui permette l’utilisation de scripts est Pcbnew. Il est prévu de pouvoir le faire avec Eeschema aussi dans le futur.
15.1. Objets de KiCad
L’API de scripting reflète la structure interne des objets dans KiCad/Pcbnew. BOARD est l’objet principal. Il a un jeu de propriétés et un jeu de MODULEs, TRACKs/SEGVIAs, TEXTE_PCB, DIMENSION, DRAWSEGMENT. Les MODULEs ont ensuite des D_PADs, EDGEs, etc…
-
Voir la section BOARD ci-dessous.
15.2. Référence de Base de l’API
Toute l’API de Pcbnew est contenue dans le module python "pcbnew". La méthode GetBoard() qui renvoie le PCB courant ouvert dans l'éditeur, est utile pour des commandes tapées dans l’environnement de scripting intégré à Pcbnew ou pour les plugins d’actions.
15.3. Charger et Sauvegarder un Circuit
-
LoadBoard(nom_du_fichier) : charge un circuit depuis un fichier et retourne un objet de type BOARD, en utilisant le format de fichier correspondant à l’extension du fichier.
-
SaveBoard(nom_du_fichier,circuit) : sauvegarde un objet BOARD dans le fichier, en utilisant le format de fichier correspondant à l’extension du fichier.
-
circuit.Save(nom_du_fichier) : identique au précédent, mais cette fois par la méthode de l’objet BOARD.
#!/usr/bin/python import sys from pcbnew import * filename=sys.argv[1] pcb = LoadBoard(filename) for module in pcb.GetModules(): print "* Module: %s"%module.GetReference() module.GetValueObj().SetVisible(False) # set Value as Hidden module.GetReferenceObj().SetVisible(True) # set Reference as Visible pcb.Save("mod_"+filename)
15.4. Lister et Charger des Librairies
#!/usr/bin/python from pcbnew import * libpath = "/usr/share/kicad/modules/sockets.mod" lst = FootprintEnumerate(libpath) for name in lst: m = FootprintLoad(libpath,name) print name,"->",m.GetLibRef(), m.GetReference() for p in m.GetPads(): print "\t",p.GetPadName(),p.GetPosition(),p.GetPos0(), p.GetOffset()
15.5. BOARD
BOARD est l’objet de base dans Pcbnew de KiCad, c’est le document.
BOARD contient un jeu de listes d’objets qui peuvent être atteintes par les méthodes suivantes, qui retournent des listes itérables pouvant être itérées en utilisant "for obj in list:"
-
circuit.GetModules() : retourne la liste des objets de type MODULE. Tous les modules présents sur le circuit y seront représentés.
-
circuit.GetDrawings() : retourne la liste des BOARD_ITEMS qui sont des éléments graphiques du circuit.
-
circuit.GetTracks() : retourne la liste des objets de type TRACKs et SEGVIAs d’un objet BOARD.
-
circuit.GetSegZones() : retourne la liste des SEGZONEs.
-
circuit.GetFullRatnest() : retourne la liste des ratsnets (connexions encore non routées).
-
circuit.GetLocalRatsnest() : retourne la liste des ratsnets d’une empreinte en cours de déplacement (pendant qu’elle est tirée).
-
circuit.GetNetClasses() : retourne la liste des net classes.
-
circuit.GetCurrentNetClassName() : retourne la net class courante.
-
circuit.GetViasDimensionsList() : retourne la liste des dimensions des vias disponibles dans le circuit.
-
circuit.GetTrackWidthList() : retourne la liste des largeurs de piste disponibles dans le circuit.
#!/usr/bin/python import sys from pcbnew import * filename=sys.argv[1] pcb = LoadBoard(filename) ToUnits=ToMils FromUnits=FromMils print "LISTING VIAS:" for item in pcb.GetTracks(): if type(item) is SEGVIA: pos = item.GetPosition() drill = item.GetDrillValue() width = item.GetWidth() print " * Via: %s - %f/%f "%(ToUnits(pos),ToUnits(drill),ToUnits(width)) elif type(item) is TRACK: start = item.GetStart() end = item.GetEnd() width = item.GetWidth() print " * Track: %s to %s, width %f" % (ToUnits(start),ToUnits(end),ToUnits(width)) else: print "Unknown type %s" % type(item) print "" print "LISTING DRAWINGS:" for item in pcb.GetDrawings(): if type(item) is TEXTE_PCB: print "* Text: '%s' at %s"%(item.GetText(),item.GetPosition()) elif type(item) is DRAWSEGMENT: print "* Drawing: %s"%item.GetShapeStr() # dir(item) else: print type(item) print "" print "LIST MODULES:" for module in pcb.GetModules(): print "* Module: %s at %s"%(module.GetReference(),ToUnits(module.GetPosition())) print "" print "LIST ZONES:" for zone in pcb.GetSegZones(): print zone print "" print "RATSNEST:",len(pcb.GetFullRatsnest())
15.6. Exemples
15.6.1. Changer la marge du masque de soudure des pins d’un composant
b = pcbnew.GetBoard() u304 = b.FindModuleByReference('U304') pads = u304.GetPads() for p in pads: print p.GetPadName(), pcbnew.ToMM(p.GetLocalSolderPasteMargin()) id = int(p.GetPadName()) if id<15: p.SetLocalSolderPasteMargin(0)
15.7. Assistants d’Empreintes
Les assistants d’empreintes sont une collection de scripts python auxquels on accède par l’intermédiaire de l'éditeur d’empreintes. Si vous faites apparaître la boîte de dialogue de l’empreinte, vous sélectionnez un assistant donné qui vous permet de voir le rendu de l’empreinte, et quelques paramètres qui peuvent être modifiés.
Si les plugins ne sont pas tous installés pour votre système, vous pouvez trouver les dernières versions dans les sources de KiCad sur launchpad.
Ils devront être enregistrés par exemple dans C:\Program Files\KiCad\bin\scripting\plugins.
Sous Linux, vous pouvez aussi stocker vos plugins utilisateur dans $HOME/.kicad_plugins.
#!/usr/bin/python from pcbnew import * class FPCFootprintWizard(FootprintWizardPlugin): def __init__(self): FootprintWizardPlugin.__init__(self) self.name = "FPC" self.description = "FPC Footprint Wizard" self.parameters = { "Pads": {"*n":40, # not internal units preceded by "*" "pitch": FromMM(0.5), "width": FromMM(0.25), "height": FromMM(1.6)}, "Shield": {"shield_to_pad": FromMM(1.6), "from_top": FromMM(1.3), "width": FromMM(1.5), "height": FromMM(2)} } self.ClearErrors() # build a rectangular pad def smdRectPad(self,module,size,pos,name): pad = D_PAD(module) pad.SetSize(size) pad.SetShape(PAD_RECT) pad.SetAttribute(PAD_SMD) pad.SetLayerMask(PAD_SMD_DEFAULT_LAYERS) pad.SetPos0(pos) pad.SetPosition(pos) pad.SetPadName(name) return pad # This method checks the parameters provided to wizard and set errors def CheckParameters(self): p = self.parameters pads = p["Pads"]["*n"] errors = "" if (pads<1): self.parameter_errors["Pads"]["n"]="Must be positive" errors +="Pads/n has wrong value, " p["Pads"]["n"] = int(pads) # make sure it stays as int (default is float) pad_width = p["Pads"]["width"] pad_height = p["Pads"]["height"] pad_pitch = p["Pads"]["pitch"] shl_width = p["Shield"]["width"] shl_height = p["Shield"]["height"] shl_to_pad = p["Shield"]["shield_to_pad"] shl_from_top = p["Shield"]["from_top"] return errors # build the footprint from parameters def BuildFootprint(self): print "parameters:",self.parameters #self.ClearErrors() #print "errors:",self.parameter_errors module = MODULE(None) # create a new module self.module = module p = self.parameters pads = int(p["Pads"]["*n"]) pad_width = p["Pads"]["width"] pad_height = p["Pads"]["height"] pad_pitch = p["Pads"]["pitch"] shl_width = p["Shield"]["width"] shl_height = p["Shield"]["height"] shl_to_pad = p["Shield"]["shield_to_pad"] shl_from_top = p["Shield"]["from_top"] size_pad = wxSize(pad_width,pad_height) size_shld = wxSize(shl_width,shl_height) module.SetReference("FPC"+str(pads)) # give it a reference name module.m_Reference.SetPos0(wxPointMM(-1,-2)) module.m_Reference.SetPosition(wxPointMM(-1,-2)) # create a pad array and add it to the module for n in range (0,pads): pad = self.smdRectPad(module,size_pad,wxPoint(pad_pitch*n,0),str(n+1)) module.Add(pad) pad_s0 = self.smdRectPad(module, size_shld, wxPoint(-shl_to_pad,shl_from_top), "0") pad_s1 = self.smdRectPad(module, size_shld, wxPoint((pads-1)*pad_pitch+shl_to_pad,shl_from_top), "0") module.Add(pad_s0) module.Add(pad_s1) e = EDGE_MODULE(module) e.SetStartEnd(wxPointMM(-1,0),wxPointMM(0,0)) e.SetWidth(FromMM(0.2)) e.SetLayer(EDGE_LAYER) e.SetShape(S_SEGMENT) module.Add(e) module.SetLibRef("FPC"+str(pads)) # create our footprint wizard fpc_wizard = FPCFootprintWizard() # register it into pcbnew fpc_wizard.register()