KICAD Finest Practices: Bibliotekadministration

0 Comments

Ett typiskt problem som vi hör av många nya KICAD-individer medarbetare med schematiska såväl som fotavtrycksbibliotek. Tekniken är att använda bara ett schematiskt tecken såväl som fotavtrycksbibliotek med ditt projekt. På så sätt kommer eventuella ändringar av de standardiserade biblioteken inte att påverka ditt projekt och det blir enkelt att dela ditt jobb med andra utan att bryta det. Jag har spenderat lång tid på att förfina den här metoden såväl som jag ska gå med processen i den här artikeln.

Vi har täckt KICAD (såväl som andra) verktyg för elektroniska stil Automation (EDA) ett antal gånger tidigare. [Brian Benchoff] gjorde en hel serie om att bygga ett jobb från att börja med att använda alla de olika EDA-buntarna som han kunde lägga händerna på. Ingen CAD eller EDA-programvara är perfekt, liksom en individ måste upptäcka att ta tag i de idiosyncrasies i vilket program de väljer att använda. Detta leder normalt till en hel del cussing såväl som hår som drar under de preliminära stadierna när man inte kan räkna ut “hur i helvete gör jag det?”, Särskilt från nya konverter som används för att göra saker annorlunda.

Läs vidare för att upptäcka de allra bästa metoderna för att utnyttja när de använder KICAD samt dess bibliotekshantering.

Projektledning

KICAD håller schematiska tecken såväl som elementfotspår i separata bibliotek såväl som du kräver att koppla ett tecken på ett fotavtryck med ett av ett antal olika metoder. Detta sätter av en hel del människor, men det fungerar ganska bra när du blir utnyttjad till det.

I de gamla dagarna före datorer skulle många designers mycket snabbt dra ut en schematisk och sedan producera en “material av material” där de köttar ut de element som ska användas. Detta skulle då hjälpa dem att välja elementfotspår, vilket leder till styrelsesignfasen. KICAD försöker följa detta arbetsflöde. Här är en vanlig mappstruktur som jag använder för att organisera ett KICAD-projekt, som har finjusterat den här metoden över många års arbete med programvaran.

doodad
↳3D_models // .steep samt .WrL designdata för alla fotspår
↳Datheblad // Datablad för användarelement
↳GERBER // Slutliga produktionsfiler
↳images // svg Pictures samt 3D Board Renders
↳Lib_sch // Schematiska symboler
↳lib_fp.pretty // Footprints
↳PDF // Schema, Styrlayouter, Dimension Ritningar
Hantera schematiska bibliotek

När du ritar en schematisk användning av tecken från de inbyggda biblioteken som buntas med KICAD, producerar Eeschema ett regionalt backupbibliotek – Doodad-cache.lib. När du är klar med att rita din schematisk, kopiera den här data till ↳Lib_sch-mappen och byt namn på den till Doodad.lib.

Därefter, gå till ↳Preferences↳Component-bibliotek, välj “Aktuell bläddringslista” för att peka på din regionala jobbmapp ~ / doodad /, klicka på knappen Lägg till längst upp i fönstret (inte Lägg till knappen i mitten av Pop upp), liksom att slutligen välja Doodad.lib. Det läggs till under det valda biblioteket i listan.

KICAD läser dessa bibliotek i sekventiell ordning, så du kräver att du väljer Doodad.lib samt ta det till toppen av listan med hjälp av uppknappen. Om det finns ett tecken med exakt samma namn i olika bibliotek, används den allra första instansen av den. Vid denna tidpunkt kan du antingen eliminera alla andra medföljande bibliotek, eller bara försumma dem så länge du ser till att varje tecken du utnyttjar får läggas till Doodad.lib samt får bara från den filen.

Ditt jobb använder nu bara ett schematiskt teckenbibliotek – ~ / Doodad / lib_sch / doodad.lib – liksom alla typer av ändringar av de standardiserade biblioteken inte kommer att påverka ditt projekt. Dessutom, med hjälp av den ovan angivna mappstrukturen är det enkelt att dela ditt jobb på GitHub. När ditt jobb klonas eller laddas ner, ser det till att det inte finns några bibliotekskonflikter.

Allt ovanstående kan modifiering när KICAD implementerar S-expressionsstilar i Eeschema samt schematiska bibliotek (som redan implementerats i PCBNew), så vi kommer att återvända detta vid den tiden.

Tilldela fotspår till symboler

Det finns ett antal metoder för att göra detta, men i huvudsak väljer du en schematisk symbol, såväl som utse det ett fotavtryck från en av standardbiblioteken. Någonsin med tanke på att KICAD flyttade fotavtrycksbibliotek till GitHub, har det varit en orsak till halsbränna för många. För en hålls alla bibliotek på nätet, liksom KICAD måste se dem när du avslutar det. För dem som inte ändrar detta beteende saktar det ner programmet under uppstart, om du inte är kopplad till webben. På internetbibliotek är ett bra koncept eftersom fotspår är uppdaterade, men det är en säker avslutningsmetod för att bryta dina stilar måste en av fotspåren som används i din stiländring. Detta kommer inte att dyka upp för dig omedelbart, eftersom du måste uttryckligen läsa nätlistan och få kicad to replace altered footprints. however for somebody else who clones your design, as well as their KiCAD version tons up the updated footprint, it will break things.

The option is to clone all the KiCAD libraries to a regional place on your computer, as well as then point KiCAD to this location. however when you do this, it negates the advantage of having gain access to to updated libraries. I don’t believe there’s an suitable method to make it work, however here’s what works for me.

I clone the GitHub libraries to my regional computer, as well as keep them updated by routine pulls. This assists me utilize existing footprints or customize them to fit my requirements. however my job does not utilize any type of of those cloned libraries directly. Instead, I produce a job certain footprint library that contains all of the footprints (~/doodad/lib_fp.pretty) utilized in the project. when again, this makes sure that when the job gets cloned, all of the ideal footprints are already offered without depending upon outside source libraries.

How to Make KiCAD Footprints regional as well as Project-Unique

Start by cloning (from GitHub) the KiCAD footprint repository to your computer. This is finest done utilizing the ‘Footprint Libraries Wizard‘ from within PCBnew. In my case, I have cloned it to ~/kicad_sources/library-repos. In KiCAD’s PCBnew, choose ↳PREFERENCES ↳CONFIGURE paths as well as edit KISYSMOD to point to the regional footprint library path (~/kicad_sources/library-repos).

path to fp-lib-table
In some cases, extra steps may be needed to make things work. Select  ↳PREFERENCES ↳FOOTPRINT LIBRARIES MANAGER and figure out the place of the “fp-lib-table” data utilized by PCBnew. This is a text data that tells PCBnew where to look for footprint libraries – on Github, regional path etc. open this data in a text editor, as well as inspect if it utilizes KISYSMOD as the path. If not, do a browse as well as replace for all instances of present path as well as replace it with KISYSMOD.

Now, you can edit each schematic symbol, as well as add a footprint to it — either from within EESCHEMA, or utilizing the stand alone Cvpcb module. when all footprints have been assigned, make sure you re-generate the netlist before moving on to PCBnew.

MODE : footprint
You can now begin PCBnew as well as checked out the netlist, which dumps all the footprints in a stack on the canvas. choose the mode : footprint icon, then context-click on any type of ONE footprint, choose ↳Global spread as well as location ↳Spread out all footprints.

This spreads out all the footprints making it much easier to choose as well as step them around. when you’re made with your board layout, as well as all of your footprints are locked in, choose data ↳Archive Footprints↳Create library as well as Archive Footprints as well as supply the path/name to the .pretty folder in your job (~/doodad/lib_fp.pretty). This copies all the footprints utilized in your design to the target folder.

Then, Preferences↳Footprint Libraries Wizard↳Files on my computer↳(navigate to ~/doodad/lib_fp.pretty) as well as make sure you choose “To the present job Only” before hitting Finish. At this point, you have utilized footprints from KiCAD’s worldwide libraries as well as used them to schematic symbols, made a netlist, imported netlist in PCBnew, put the footprints as well as directed the board, made an archive of all the footprints used, as well as configured PCBnew to utilize that archive library.

Replace library paths
Next, return back to EESCHEMA, as well as edit the footprint association of each sign to point to the new lib_fp.pretty folder instead of the regional GitHub repository on your computer. The simplest method to do this is to open the .SCH data in a text editor as well as do a search/replace. In our present example, we will replace instances such as “Capacitors_ThroughHole” or “Resistors_ThroughHole” or “LEDs” with our regional job library folder “lib_fp”

Open the schematic one last time, save a fresh netlist, open PCBnew, checked out this netlist, however this time around choose the modification choice under exchange Footprint. Your board design will now be utilizing footprints saved in your lib_fp.pretty folder, as well as modifications to the KiCAD worldwide libraries will not impact the layout.

Sammanfatta

This may noise a bit convoluted in the beginning, however over time it becomes rather easy, as well as you can get rid of some steps as you get better. For example, I already have my own library for a lot of of the typical parts that I use, as well as copy these footprints before starting off on a new project. Over time, as you get much better at it, you will begin building your own schematic signs as well as footprints from element data sheets instead of utilizing outside versions. like I stated at the beginning, it’s not perfect, as well as for me this process works extremely well. If you have comments or tips on making this better, chime in as wellsom låt oss veta.

Leave a Reply

Your email address will not be published. Required fields are marked *