Manuale di riferimento
Copyright
Questo documento è coperto dal Copyright © 2010-2015 dei suoi autori come elencati in seguito. È possibile distribuirlo e/o modificarlo nei termini sia della GNU General Public License (http://www.gnu.org/licenses/gpl.html), versione 3 o successive, che della Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0/), versione 3.0 o successive.
Tutti i marchi registrati all’interno di questa guida appartengono ai loro legittimi proprietari.
Collaboratori
Jean-Pierre Charras, Fabrizio Tappero, Wayne Stambaugh.
Traduzione
Marco Ciampa <ciampix@libero.it>, 2014-2015.
Feedback
Inviare qualsiasi commento o suggerimento concernente questo documento alla mailing list di KiCad: https://launchpad.net/~kicad-developers
Data di pubblicazione e versione del software
Pubblicato il 22 maggio, 2015.
1. Introduzione a CvPcb
CvPcb è uno strumento che permette di associare i simboli (componenti) di uno schema elettrico ai disegni usati durante la progettazione di un circuito stampato (impronte). Questa associazione viene aggiunta al file dell’elenco delle connessioni (netlist) creato dal programma di disegno elettrico Eeschema.
Il file di netlist generato da Eeschema specifica quale impronta di circuito stampato è associata ad ogni componente nello schema elettrico solo quando il campo impronta del componente è stato inizializzato.
Questo accade quando sono associati componenti a impronte durante la stesura dello schema elettrico impostando il campo impronta nel componente o quando questo è già impostato nella libreria dei componenti e viene caricato assieme al caricamento del simbolo.
CvPcb offre un metodo comodo per associare le impronte ai componenti durante la modifica dello schema elettrico. Esso fornisce un elenco filtrabile di impronte, la visualizzazione delle impronte e la visualizzazione 3D del modello del componente, per aiutare nella verifica della corretta associazione dell’impronta al componente.
I componenti possono essere assegnati alle loro impronte corrispondenti manualmente o automaticamente creando i file di equivalenze (file .equ). I file delle equivalenze sono tabelle di corrispondenza che associano ogni componente alla sua impronta.
Questo approccio interattivo è più semplice e meno soggetto a errori che l’associazione diretta delle impronte nell’editor dello schema elettrico.
CvPcb permette di visionare l’elenco delle impronte disponibili e di mostrarle sullo schermo per verificare che si stia associando l’impronta corretta.
CvPcb può essere eseguito solo da Eeschema, dalla barra degli strumenti principale, sia quando Eeschema viene eseguito dal gestore dei progetti di KiCad che quando Eeschema viene eseguito come applicazione indipendente.
L’esecuzione di CvPcb da Eeschema fatto partire a sua volta dal gestore dei progetti di KiCad è generalmente da preferire perché:
-
Cvpcb necessita del file di configurazione del progetto per sapere le librerie di impronte da caricare.
-
Cvpcb inizializza i campi impronte dei componenti dello schema del progetto corrente. Ciò è possibile solo quando il file del progetto è nello stesso percorso dello schema elettrico aperto.
L’esecuzione di CvPcb da una sessione di Eeschema eseguito dal gestore dei progetti di KiCad garantisce automaticamente tutto ciò.
Avvertenza
|
Comunque si può eseguire CvPcb da una sessione autonoma di Eeschema malgrado, si noti, che ad un qualsiasi schema elettrico aperto che non abbia nello stesso percorso un file di progetto potrebbero mancare componenti a causa delle librerie mancanti che non vengono rilevate da CvPcb. Inoltre se non c'è un file fp-lib-table nello stesso percorso dello schema elettrico aperto, non saranno disponibili le librerie impronte specifiche del progetto. |
2. Caratteristiche di CvPcb
2.1. Associazione manuale o automatica
CvPcb permette l’assegnamento interattivo (manuale) come quello automatico tramite i file delle equivalenze.
3. Invocazione di CvPcb
CvPcb viene invocato solo dal programma di cattura schemi elettrici Eeschema, attraverso lo strumento:
Eeschema passa automaticamente i dati corretti (l’elenco componenti e impronte) a CvPcb. Non c'è aggiornamento da fare (a meno che non ci siano dei nuovi componenti non ancora annotati), basta solo eseguire Cvpcb.
4. Comandi CvPcb
4.1. Schermo principale
L’immagine sottostante mostra la finestra principale di CvPcb.
Il pannello di sinistra contiene l’elenco dei nomi di file delle librerie di impronte disponibili associate al progetto. Il pannello centrale contiene l’elenco dei componenti caricati dal file della netlist. Il pannello di destra contiene l’elenco di impronte disponibili caricate dalle librerie di impronte del progetto. Se nessun file netlist verrà caricato, il pannello componenti resterà vuoto, similmente se nessuna libreria impronte verrà trovata, il pannello delle impronte resterà vuoto.
4.2. La barra strumenti della finestra principale
La barra superiore permette un facile accesso ai seguenti comandi:
|
Invia l’associazione impronte corrente a Eeschema (cioè il contenuto dei campi impronte). |
|
Invoca il menu di configurazione di CvPcb. |
|
Mostra l’impronta del componente selezionato nella finestra impronte. |
|
Seleziona automaticamente nell’elenco il componente precedente senza un’associazione impronta. |
|
Seleziona automaticamente nell’elenco il componente successivo senza un’associazione impronta. |
|
Associa automaticamente impronte con componenti cominciando con l’usare un file di equivalenze. |
|
Cancella tutte le associazioni impronte. |
|
Apre il file di documentazione pdf dell’impronta selezionata usando il visualizzatore pdf predefinito. |
|
Abilita o disabilita il filtro per limitare l’elenco impronte ai filtri impronta del componente selezionato. |
|
Abilita o disabilita il filtro per limitare l’elenco impronte al numero di pin del componente selezionato. |
|
Abilita o disabilita il filtro per limitare l’elenco impronte alla libreria selezionata. |
4.3. Comandi da tastiera della finestra principale
La seguente tabella elenca il comandi da tastiera per la finestra principale:
Freccia destra / Tab |
Attiva il pannello adiacente a destra del pannello attualmente attivo. A capo al primo pannello se è attivo l’ultimo pannello. |
Freccia sinistra |
Attiva l’adiacente pannello a sinistra del pannello attualmente attivo. A capo all’ultimo pannello se è attivo il primo pannello. |
Freccia su |
Seleziona la voce precedente dell’elenco attualmente selezionato. |
Freccia giù |
Seleziona la voce successiva dell’elenco attualmente selezionato. |
Pagina su |
Seleziona l’elemento di una pagina precedente dell’elenco attualmente selezionato. |
Pagina giù |
Seleziona l’elemento di una pagina successiva dell’elenco attualmente selezionato. |
Home |
Seleziona il primo elemento dell’elenco attualmente selezionato. |
Fine |
Seleziona l’ultimo elemento dell’elenco attualmente selezionato. |
4.4. Configurazione CvPcb
CvPcb, dopo il salvataggio del file di associazione impronte, può essere chiuso automaticamente oppure no.
L’invocazione della voce “Librerie” nel menu “Preferenze” mostra la finestra di dialogo della configurazione delle librerie.
A seconda della versione di CvPcb, ci sono due diverse gestioni delle librerie:
-
La gestione tradizionale, con file *.mod e una libreria elenco di file.
-
Il nuovo formato “Pretty”, che usa un file per impronta. Esso usa un elenco di cartelle; ogni cartella (una cartella con nome *.pretty) è una libreria. Quando si utilizza la nuova gestione, si possono usare anche le librerie native che provengono da file xml in formato GEDA/GPCB o Eagle.
5. Gestione librerie impronte
5.1. Osservazione importante:
Questa sezione è rilevante solo per versioni di KiCad a partire dal dicembre 2013
5.2. Tabelle librerie impronte
Since December 2013, Pcbnew and CvPcb uses a new library management tool based on footprint library tables which allows direct use of footprint libraries from
-
KiCad Legacy footprint libraries (.mod files)
-
KiCad New .pretty footprint libraries (on your local disk) (folders with .pretty extension, containing .kicad_mod files)
-
KiCad New .pretty footprint libraries (on our Github server, or other Github server)
-
GEDA libraries (folders containing .fp files)
-
Eagle footprint libraries
Nota
|
|
The image below shows the footprint library table editing dialog which can be opened by invoking the “Library Tables” entry from the “Preferences” menu.
The footprint library table is used to map a footprint library of any supported library type to a library nickname. This nickname is used to look up footprints instead of the previous method which depended on library search path ordering.
This allows CvPcb to access footprints with the same name in different libraries by ensuring that the correct footprint is loaded from the appropriate library. It also allows CvPcb to support loading libraries from different PCB editors such as Eagle and GEDA.
5.2.1. Global Footprint Library Table
The global footprint library table contains the list of libraries that are always available regardless of the currently loaded project file. The table is saved in the file fp-lib-table in the user’s home folder. The location of this folder is dependent upon the operating system being used.
5.2.2. Project Specific Footprint Library Table
The project specific footprint library table contains the list of libraries that are available specifically for the currently loaded project file. The project specific footprint library table can only be edited when it is loaded along with the project netlist file. If no project file is loaded or there is no footprint library table file in the project path, an empty table is created which can be edited and later saved along with the footprint assignment file.
5.2.3. Initial Configuration
The first time Pcbnew or CvPcb is run and the global footprint table file fp-lib-table is not found in the user’s home folder, Pcbnew or CvPcb will attempt to copy the default footprint table file fp-lib-table stored in the system’s KiCad template folder to the file fp-lib-table in the user’s home folder.
If fp-lib-table cannot be found, an empty footprint library table will be created in the user’s home folder. If this happens, the user can either copy fp-lib-table manually or configure the table by hand.
The default footprint library table includes many of the standard footprint libraries that are installed as part of KiCad.
Obviously, the first thing to do is to modify this table (add/remove entries) according to your work and the libraries you need for all your projects.
(Too many libraries to load is time consuming)
5.2.4. Adding Table Entries
In order to use a footprint library, it must first be added to either the global table or the project specific table. The project specific table is only applicable when you have a net list file open.
Each library entry must have a unique nickname.
This does not have to be related in any way to the actual library file name or path. The colon : character cannot be used anywhere in the nickname. Each library entry must have a valid path and/or file name depending on the type of library. Paths can be defined as absolute, relative, or by environment variable substitution (see section below).
The appropriate plug in type must be selected in order for the library to be properly read. KiCad currently supports reading KiCad legacy, KiCad Pretty, Eagle, and GEDA footprint libraries.
There is also a description field to add a description of the library entry. The option field is not used at this time so adding options will have no effect when loading libraries.
Please note that you cannot have duplicate library nicknames in the same table. However, you can have duplicate library nicknames in both the global and project specific footprint library table. The project specific table entry will take precedence over the global table entry when duplicated names occur. When entries are defined in the project specific table, an fp-lib-table file containing the entries will be written into the folder of the currently open net list.
5.2.5. Environment Variable Substitution
One of the most powerful features of the footprint library table is environment variable substitution. This allows you to define custom paths to where your libraries are stored in environment variables. Environment variable substitution is supported by using the syntax ${ENV_VAR_NAME} in the footprint library path.
By default, at run time KiCad defines two environment variables:
-
the KIPRJMOD environment variable. This points always the current project directory and cannot be modified.
-
the KISYSMOD environment variable. This points to where the default footprint libraries that were installed with KiCad are located.
You can override KISYSMOD by defining it yourself in preferences/Configure Path which allows you to substitute your own libraries in place of the default KiCad footprint libraries.
When a project netlist file is loaded, CvPcb defines the KIPRJMOD using the file path (the project path).
Pcbnew also defines this environment variable when loading a board file.
This allows you to store libraries in the project path without having to define the absolute path (which is not always known) to the library in the project specific footprint library table.
5.2.6. Using the GitHub Plugin
The GitHub is a special plugin that provides an interface for read only access to a remote Git Hub repository consisting of pretty (Pretty is name of the KiCad footprint file format) footprints and optionally provides “Copy On Write” (COW) support for editing footprints read from the GitHub repo and saving them locally. Therefore the “Git Hub” plugin is for read only for accessing remote pretty footprint libraries at https://github.com. To add a GitHub entry to the footprint library table the “Library Path” in the footprint library table row for a must be set to a valid GitHub URL.
For example:
or
Typicality GitHub URLs take the form:
The “Plugin Type” must be set to “Github”. To enable the “Copy On Write” feature the option allow_pretty_writing_to_this_dir must be added to the “Options” setting of the footprint library table entry. This option is the “Library Path” for local storage of modified copies of footprints read from the GitHub repo. The footprints saved to this path are combined with the read only part of the Git Hub repository to create the footprint library. If this option is missing, then the Git Hub library is read only. If the option is present for a Git Hub library, then any writes to this hybrid library will go to the local *.pretty directory. Note that the github.com resident portion of this hybrid COW library is always read only, meaning you cannot delete anything or modify any footprint in the specified Git Hub repository directly. The aggregate library type remains “Github” in all further discussions, but it consists of both the local read/write portion and the remote read only portion.
The table below shows a footprint library table entry without the option allow_pretty_writing_to_this_dir:
Nickname | Library Path | Plugin Type | Options | Description |
---|---|---|---|---|
github |
Github |
Liftoff’s GH footprints |
The table below shows a footprint library table entry with the COW option given. Note the use of the environment variable ${HOME} as an example only. The github.pretty directory is located in ${HOME}/pretty/ path. Anytime you use the option allow_pretty_writing_to_this_dir, you will need to create that directory manually in advance and it must end with the extension .pretty.
Nickname | Library Path | Plugin Type | Options | Description |
---|---|---|---|---|
github |
Github |
allow_pretty_writing_to_this_dir= ${HOME}/pretty/github.pretty |
Liftoff’s GH footprints |
Footprint loads will always give precedence to the local footprints found in the path given by the option allow_pretty_writing_to_this_dir. Once you have saved a footprint to the COW library’s local directory by doing a footprint save in the footprint editor, no Git Hub updates will be seen when loading a footprint with the same name as one for which you’ve saved locally.
Always keep a separate local *.pretty directory for each Git Hub library, never combine them by referring to the same directory more than once.
Also, do not use the same COW (*.pretty) directory in a footprint library table entry. This would likely create a mess.
The value of the option allow_pretty_writing_to_this_dir will expand any environment variable using the ${} notation to create the path in the same way as the “Library Path” setting.
What is the point of COW? It is to turbo-charge the sharing of footprints.
If you periodically email your COW pretty footprint modifications to the GitHub repository maintainer, you can help update the Git Hub copy. Simply email the individual *.kicad_mod files you find in your COW directories to the maintainer of the GitHub repository. After you have received confirmation that your changes have been committed, you can safely delete your COW file(s) and the updated footprint from the read only part of Git Hub library will flow down. Your goal should be to keep the COW file set as small as possible by contributing frequently to the shared master copies at https://github.com.
5.2.7. Usage Patterns
Footprint libraries can be defined either globally or specifically to the currently loaded project. Footprint libraries defined in the user’s global table are always available and are stored in the fp-lib-table file in the user’s home folder.
Global footprint libraries can always be accessed even when there is no project net list file opened.
The project specific footprint table is active only for the currently open net list file.
The project specific footprint library table is saved in the file fp-lib-table in the path of the currently open net list . You are free to define libraries in either table.
There are advantages and disadvantages to each method. You can define all of your libraries in the global table which means they will always be available when you need them. The disadvantage of this is that you may have to search through a lot of libraries to find the footprint you are looking for. You can define all your libraries on a project specific basis.
The advantage of this is that you only need to define the libraries you actually need for the project which cuts down on searching.
The disadvantage is that you always have to remember to add each footprint library that you need for every project. You can also define footprint libraries both globally and project specifically.
One usage pattern would be to define your most commonly used libraries globally and the library only require for the project in the project specific library table. There is no restriction on how you define your libraries.
5.3. Using the Footprint Library Table Wizard
A wizard to add footprint libraries to the footprint library tables is available from the footprint library table editing dialog.
Note also libraries can be any type of footprint library supported by KiCad.
It can add “local” libraries or libraries from a Github repository.
When libraries are on a Github repository, they can be added as remote libraries, or downloaded and added as local libraries.
Here, the local libraries option is selected.
Here, the remote libraries option is selected.
Depending on the selected option, one of these pages will be displayed, to select a list of libraries:
Here, the local libraries option was selected.
Here, the remote libraries option was selected.
After a set of libraries is selected, the next page validates the choice:
If some selected libraries are incorrect (not supported, not a footprint library …) they will be flagged as “INVALID”.
The last choice is the footprint library table to populate:
-
the global table
-
the local table (the project specific table)
6. Visualizzazione dell’impronta corrente
6.1. Il comando visualizza impronta
Il comando mostra impronta visualizza l’impronta attualmente selezionata nella finestra impronta. Un modello 3D del componente può venir visualizzato se ne è stato creato uno ed assegnato all’impronta. In basso si può osservare la finestra di visualizzazione impronta.
6.1.1. Informazioni sulla barra di stato
La barra di stato è dislocata in fondo alla finestra principale di CvPcb e fornisce utili informazioni all’utente. La seguente tabella definisce il contenuto di ogni pannello sulla barra di stato.
6.1.2. Comandi da tastiera
F1 |
Zoom In |
F2 |
Zoom Out |
F3 |
Ridisegna lo schermo |
F4 |
Sposta il cursore al centro della finestra |
Home |
Imposta la visualizzazione dell’impronta esattamente nella finestra |
Barra spazio |
Imposta le coordinate relative alla posizione corrente del cursore |
Freccia a destra |
Sposta il cursore a destra di una posizione della griglia |
Freccia a sinistra |
Sposta il cursore a sinistra di una posizione nella griglia |
Freccia su |
Sposta il cursore in alto di una posizione nella griglia |
Freccia giù |
Sposta il cursore in basso di una posizione nella griglia |
6.1.3. Comandi con il mouse
Rotellina |
Zoom in e out alla posizione corrente del cursore |
Ctrl + Rotellina |
Pan a destra e a sinistra |
Maiusc + Rotellina |
Pan su e giù |
Clic tasto destro |
Apre il menu contestuale |
6.1.4. Menu contestuale
Mostrato dal clic destro del mouse:
Selezione zoom |
Selezione diretta dello zoom mostrato. |
Imposta griglia |
Selezione diretta della griglia. |
6.1.5. Barra orizzontale
|
Mostra la finestra di dialogo delle opzioni dello schermo |
|
Zoom in |
|
Zoom out |
|
Ridisegna |
|
Mostra l’area giusta in finestra |
|
Apri il visualizzatore modelli 3D |
6.1.6. Barra strumenti verticale
|
Mostra o nasconde la griglia |
|
Mostra le coordinate in notazione polare o rettangolare |
|
Mostra le coordinate in pollici |
|
Mostra le coordinate in millimetri |
|
Commuta stile puntatore |
|
Scambia tra il disegno delle piazzole in modalità tratteggio e normale |
|
Scambia tra il disegno del testo in modalità tratteggio e normale |
|
Scambia tra il disegno dei bordi in modalità tratteggio e normale |
6.2. Visualizzazione del modello 3D corrente
6.2.1. Comandi con il mouse
Rotellina del mouse |
Zoom in e out alla posizione corrente del puntatore |
Ctrl + Rotellina |
Pan a destra e a sinistra |
Maiusc + Rotellina |
Pan su e giù |
6.2.2. Barra orizzontale
|
Ricarica il modello 3D |
|
Copia l’immagine 3D negli appunti |
|
Imposta le opzioni del visualizzatore 3D |
|
Zoom in |
|
Zoom out |
|
Ridisegna |
|
Mostra l’area giusta in finestra |
|
Ruota indietro lungo l’asse X |
|
Ruota in avanti lungo l’asse X |
|
Ruota indietro lungo l’asse Y |
|
Ruota in avanti lungo l’asse Y |
|
Ruota indietro lungo l’asse Z |
|
Ruota avanti lungo l’asse Z |
|
Pan a sinistra |
|
Pan a destra |
|
Pan in su |
|
Pan in giù |
|
Abilita/disabilita la proiezione ortografica |
7. Uso di CvPcb per associare componenti a impronte
7.1. Associazione manuale delle impronte ai componenti
Per associare manualmente una impronta ad un componente bisogna prima selezionare un componente nel pannello componenti. Poi selezionare un’impronta nel pannello delle impronte facendo doppio clic con il pulsante sinistro del mouse sul nome dell’impronta desiderata. Il prossimo componente non assegnato nell’elenco verrà automaticamente selezionato. Il cambiamento dell’impronta di un componente viene effettuato con la stessa modalità.
7.2. Filtro dell’elenco impronte
Se il componente e/o libreria selezionati sono evidenziati quando una o più delle opzioni di filtro è abilitata, l’elenco di impronte mostrato in CvPcb viene filtrato di conseguenza.
Le icone
abilitano e disabilitano i
filtri. Quando i filtri non sono abilitati, viene mostrato l’elenco completo
delle impronte.
Senza filtro:
Filtrato per elenco di filtri di impronte assegnati al componente selezionato. I filtri componente sono elencati nel pannello centrale della barra di stato in fondo alla finestra principale.
Filtrato per numero di piedini del componente selezionato:
Nell’editor delle librerie di componenti in Eeschema, l’elenco di impronte era stato impostato usando le voci nella scheda filtro impronte della finestra di dialogo delle proprietà del componente, come mostrato in basso.
Filtrato per numero di piedini del componente selezionato:
Filtrata per libreria selezionata.
I filtri possono essere combinati per formare filtri più complessi per aiutare a ridurre il numero di impronte nel pannello delle impronte.
Filtrata per numero di piedini del componente selezionato e per libreria selezionata:
8. Associazioni automatiche
8.1. File delle equivalenze
I file delle equivalenze permettono l’assegnazione automatica di impronte a componenti.
Essi elencano i nomi delle impronte corrispondenti secondo il nome (campo valore) del componente. Questi file hanno tipicamente estensione file .equ.
Questi sono file di testo semplice e possono essere modificati con un qualsiasi editor di testo semplice; devono essere creati dall’utente.
8.2. Formato file delle equivalenze
I file di equivalenze consistono di una riga per ogni componente. Ogni riga ha la seguente struttura:
‘valore componente’ ‘nome impronta’
Ogni nome deve essere virgolettato con un singolo carattere ' e i nomi componente e impronta devono essere separati da uno o più spazi.
Esempio:
Se il componente U3 è il circuito 14011 e la sua impronta è 14DIP300, la riga è:
‘14011’ ‘14DIP300’
Ogni riga che comincia con # è un commento.
Ecco un esempio di file di equivalenze:
#circuiti integrati (smd): '74LV14' 'SO14E' '74HCT541M' 'SO20L' 'EL7242C' 'SO8E' 'DS1302N' 'SO8E' 'XRC3064' 'VQFP44' 'LM324N' 'S014E' 'LT3430' 'SSOP17' 'LM358' 'SO8E' 'LTC1878' 'MSOP8' '24LC512I/SM' 'SO8E' 'LM2903M' 'SO8E' 'LT1129_SO8' 'SO8E' 'LT1129CS8-3.3' 'SO8E' 'LT1129CS8' 'SO8E' 'LM358M' 'SO8E' 'TL7702BID' 'SO8E' 'TL7702BCD' 'SO8E' 'U2270B' 'SO16E' #Xilinx 'XC3S400PQ208' 'PQFP208' 'XCR3128-VQ100' 'VQFP100' 'XCF08P' 'BGA48' #upro 'MCF5213-LQFP100' 'VQFP100' #regolatori 'LP2985LV' 'SOT23-5'
8.3. Associazione automatica di impronte a componenti
Fare clic sul pulsante di associazione automatica impronte in cima alla barra degli strumenti per elaborare un file di equivalenze.
Tutti i componenti trovati per il loro valore nel file di equivalenza (*.equ) selezionato avranno la loro impronta automaticamente assegnata.