Directory Organization

Good day to all. I was wondering if someone could show/tell me what a good KICAD directory should look like. Mine looks like it was thrown in a blender with files everywhere. Thank you in advance for your help.
On another note, if I uninstall an older version of KICAD, will I lose my projects? I have installed KICAD 6 which looks pretty good but just want to be cautious.

You have to think of an organisation that suits your use case best.

Also, what sort of files are you organizing? Projects, or libraries?

I like to have a clean root directory and a clean home directory, so most of my KiCad projects are in

~/projects/kicad

All “just PCB” projects are there. But some projects have other stuff too.
When a project also has software, then I tend to move the project to either ~/projects/avr/ or ~/projects/arm/ depending on what sort of microcontroller is used (I may revisit that decision at some time though).

KiCad should never ever delete anything from your own projects, but you should also not put any personal stuff in the (usually write protected) directories that KiCad uses itself. If you have any decent workflow, then you of course also have some backup mechanism in place, so you won’t loose anything anyway, whatever KiCad does.

All your projects should be stored in the user directory by default (i.e. “My Documents” on windows). I recommend storing your presonal libraries (if you have any) in that folder as well. This way if you uninstall KiCad the user files stay in “My Documents”. You can always translate the projects/libraries to a newer version (but not back to an older version, so be careful).
For KiCad 6 on windows the path to the user folder will look like this:
C:\Users\user name\Documents\KiCad\6.0
Different versions of KiCad will have a separate subfolder created during installation.
If I recall correctly the user folder has these subfolders generated by default:
projects - store your projects here
symbols - store your personal symbol libraries here
3dmodels - store your personal 3d models here
footprints - store your personal footprint libraries here

1 Like

That’s what I do:

Project root directories
explorer_UEVa38mD8m

In E001.YANC e.g.
explorer_Hs0UWMTqau

In hardware e.g.
explorer_3bPaQ8IYzI

In the version E001.01.010.1122
explorer_Y3DtCkbaTN

The version number’s structure is
E for ESP project. There is S fpr STM project and no prefix for MCU-less projects
001 = project number
01 = project component (01=first board, 02=second board, you get the idea)
010 = version (units are minor versions, tens are major versions)
1122 = month/year of creation

[EDIT] There is a repository directory with subdirs for symbols, footprints and 3d models as well. I exclusively use local libraries based on the KiCad standard stuff. Never touch the KiCad libs other than initially copying them over.

I just came up with that years ago without giving that too much thought and then it stayed around.

Of course I am not certain that makes sense for anybody but me :wink:

1 Like

The standard KiCad application and libraries are whereever my Linux packages put them, no need to worry about those.

I put my projects under ~/work/project for non-MCU projects and ~/work/uC/<processor>/project for MCU projects. Each project is a directory tree with gerber for fabrication outputs, .git for git files, sometimes hackaday if I’ve published the project on hackaday. There is hardly any interaction between projects. If I make a new revision I create a new directory.

My pesonal libaries are under ~/lib/kicad.

Hmm, I ought to rename work to play one of these days. Shouldn’t be a big deal, just have to get my fingers used to the new path. I often make significant renames to test the resilience of my directory organisation.

Okay I think I am following so far but now here is my conundrum. I have tried several times to use KICAD but I find the “parts” libraries very confusing. I know that there are symbols, footprints and 3D versions for every part that is made and each of them becomes a “library”. I have tried to use Library Loader but I am not sure how this associates those parts with my libraries. Anyone have enough patience to start at noob level and walk me through this darkness. I have actually created a PCB using KICAD at one time but I still find this very intimidating. I wiped everything off my pallet and am ready to start fresh.

I’m strictly hobby these days, and the only one using this computer and program.
It is a desktop.

Same here.

Same here.

All Kicad 6 data is on D.
Each personal library group has a directory. eg Kicad_6_symbol
Current Kicad projects have a single directory with subs. for each project.
Completed projects are transferred to a Kicad archive directory, each having a decent descriptive name as sub directories with sub directories for each project element within.

I “play” with the nightlies.
6.99 libraries are duplicated and used from E drive so there is minimal chance of “polluting” my “6” libraries.
6.99 has a test directory on E, usually just copies of old 6 projects,that are deleted after testing.
6.99 also has current and archive directories on E. 6 projects will migrate here when 7 arrives, 7.99 directories will be set up and these new 7s (ex 6s) will be pushed back to D.

This works for me. This is how I moved from 5 & 5.99
I suppose the most important feature is using descriptive folder names for ease of referencing in the future.

How far have you managed to get?
Have you created personal libraries?

A few comments:
Kicad only gives you one layer for symbols and footprint libraries… the final library.

Use your Operating System to set up your directories and sub-directories and sub-sub-directories, then, when happy with these, create your personal footprint and symbol libraries with Kicad. Place each in the appropriate sub-directory, then populate these libraries with suitable symbols and footprints.

If you intend using all the resources available, you will end up needing four basic sub-directories:
Symbol, Footprint, 3D & Simulation.

For 3D you may also need to create libraries, unless you copy complete libraries from the Kicad system.
If you wish to create your own 3D libraries and populate them yourself (from kicad or outside) opening the Kicad system libraries will give you a good idea into naming your personal 3D libraries

I have never used the simulation so others may comment on that requirement.

When naming symbol and footprint libraries, try to include the ability for future expansion of those libraries to suit future needs. eg, don’t just place all ICs in the one library. see the Kicad system as a guide.
Restructuring personal libraries because of past thoughtlessness is a PITA! :slightly_smiling_face:

Negative example is the “device” symbol library. OMG…

Not so much for footprints. That’s tedious file shuffling. But for symbols it’s hell.

I think for a noob, the hardest part is wrapping your head around the word library and the enormity of it. When I think of a part, it is a part, not a library. So now that it is a library, there are many factors which can come into play as to how you break down your library. Do I go - SYMBOLS-RESISTORS-TH-SMD-SIZE-Part # or am I overthinking it? Copy and Paste for FOOTPRINTS, 3D, SIM??
I do a lot of automotive reverse engineering on paper and none of mine will ever become builds. Mostly I like the schematic portion of it.
I downloaded the Library Loader and still trying to figure out what I am doing there, I believe I downloaded a part and received three libraries…which I should now divide up into respective sub-folders?? Maybe I am just a hobbyist and perhaps I am not ready for this?? Seems like it should be in my wheelhouse but this part is frustrating. I will figure it out.

My train of thought actually follows something similar to this which I found in another post.
image

I don’t have project specific libraries. My personal libraries are usable across all my projects.

I am thinking Global is the way to go for all libraries. Not sure what the CONS are but just seems to make sense to have them all there for whatever you are doing. Maybe I see this wrong? Makes sense in my head.

I use:
D > Kicad6SymbolLibrary > Resistors > Rs603

I think most have a “Kicad_Libraries” between D & Symbols. I chose not to.

I have many Resistors in my library. All have the same symbol, each a different footprint.
Rs603 is a SMD size 603. Rt.4 is a THT with .4 inches between holes. I also have a basic R for odd, occasional resistors.
It is easy to build the library, just “save as” the Kicad R in device into my personal library then keep "save as"ing the R in my personal library but change the name then place the relevant footprint in the properties.

Absolutely! Otherwise, 2 years later, “now which project library had that IC ???”… opens each project, then library, in turn, after finding which thumb drive is Kicad archives, then, in the very last…

Pardon my ignorance, but what is this?

Agree. I use only global libraries and I use only symbols and footprints and 3D models from my libraries. All symbols I define myself. Footprints I copy from KiCad libraries and modify a little.
Before even trying to design my first KiCad PCB I have checked what are the possibilities to prepare files for documentation I need. And I found being it a problem with KiCad footprints. So I decided to have them defined a little differently (I have Reference and Value at CrtYd layer).
I also don’t like if I can’t place one footprint touching the other. If I see a gap there I think they can be placed closer to each other and then trying to do that I find that one have CrtYd at 0.1mm raster and the other ar 0.05mm and working with 0.1mm I can’t do what I am trying to do. So all my footprints have CrtYd rectangles at 0.1mm raster. It is why I edit each footprint I plan to use.
MM is my directory I backup each day. My KiCad directory:


I start names with ‘_’ to have them at the beginning.
_FreeCad, _LibreCad are not used by KiCad, but I have there work connected with KiCad. If I define 3D model than sources I have in _FreeCad. Untypical PCB shape - source in _LibreCad. In _MM there are Page layout description files for sch and pcb and little modified python script used to generate BOMs. _Out I use whenever I generate any output files. They are then moved to different directory so _Out is typically empty.
Directoris named without ‘_’ at the beginning are the project groups. One level lower are the project directories. There are no exceptions. It is in case some paths are defined relatively.
My Symbol Libraries:
C
C1
Connect
D
Extra
Hole
IcDigi
IcInOut
IcPower
IcProc
IcRest
L
LED
Mech
Module
Power
PTC
R
R1
R2
R3
T
V
X
I have C, C1 and R,R1,R2,R3 libraries because you can’t have two symbols with the same name in one library and I want it. Previously (in Protel) I had 1k as 1k 0603 resistor and 1k_4 as 1k 0402 resistor, but moving to KiCad I decided to have them both at schematic as 1k. One of the reason was that I couldn’t use (as previously) ‘Univers Condensed’ font in KiCad.
I don’t change anything in symbol after placing it at schematic. So if I want to use 1k1 resistor and I don’t have it in library I add it to library and then place at schematic.
Each symbol in my libraries are connected to its footprint and I never change it. If I want to use element with different footprint I define new symbol in library (and the same symbol in spreadsheet I use to generate BOM). That way if I have specified exact element we use and we have it on stock there is no way that by mistake I will use it in other case that we don’t have.
My PcbLib:
PcbLib
_3DMod contains sub-directories named as PcbLib directory.

1 Like

@jmk
Library Loader is a tool that you can find here:

It is supposed to help find parts, download the symbol, footprint, 3D model etc to your libraries and is supposed to be good for finding really odd parts. I stumbled upon it accidentally while in Mouser where you will also find the connection and Library loader tool. If you figure it out, let me know. I downloaded a part IRLL2705 and found a ZIP file and inside, four more files. Not sure what I do with them at this point. I think I am supposed to put them in their relative files? Symbol/Footprint/3D etc but not sure.

@Piotr I see what you are doing and it makes perfect sense but it is a lot of work. It would be nice if everything was just default. You look up a part number, it comes with your necessary files, it downloads it to your KICAD directory and splits them off into the sub-categories. What a perfect world that would be. Maybe I don’t put enough thought into it? Just makes sense to me but I am but a noob at this part of it.

It is a lot of work but it is to be done once. Then when you have all typical parts you are using you typically need to add one or two parts whenever you design the next PCB. That is provided all your PCBs are similar (mine are).
For me it was obvious that before starting to work with KiCad I have to prepare my workplace to meet my needs.
Thanks to that I have never went through the step of selecting footprints for all symbols at schematic. Skipping this I save some time with each PCB. But that’s not the main point. I am trying to protect myself against my own mistake like - choosing too small footprint for a high-capacity ceramic capacitor. Then it wouldn’t be a matter of buying the new capacitor. The PCB would simply have to be thrown away.
My assumption is - if you select symbol from library than you get all with it and you are sure that such element exists.
Last times even you know such element exists you sometimes have to wait till end of 2024 to get it :slight_smile:

1 Like

@bwilliams60, I too ‘find “parts” libraries very confusing’. I think the idea of a “library” is not like a library from which you borrow a book, but rather a place where you make a photocopy of the book–in this case, a set of footprints or a 3D model.

I think these 2D models and the 3D models are copied into your project files, specifically the project_name.kicad_prl
project_name.kicad_pro, and the
project_name.kicad_pcb files.

By “copied” I mean copying the text associated with each of the parts, since kicad6 uses text files.
I’d guess the 2D graphics would be stored in the .kicad_pcb, and the 3D graphics in the .kcad_prl file.
But that’s just a guess.

The main issue that could thwart the proper drawing of the PCB would be if the origin (0,0,0) for the 3D model doesn’t coincide with the origin (0,0) for the set of footprints in the real world. If these two points do not coincide where exactly do you make the change and which kicad6 tool do you use to do it?

1 Like