Hierarchical PCB generation

Hello there, i have a hopefully not silly question: I generate hierarchical sheets and want to generate from this sheets hierarchical pcbs, say for every schematic page i want to generate a separate pcb. Is this possible? How can i do this? I am using some schematics like amplifiers more than one time and do not want to rule the exact same schematic two times…
I am using a nightly version, because the official 5.16 refuses to start the footprint-editor: it crashes on starting it. I am working with osx.
Thank you very much for every kind of help!

This is the way I do it… (using 5.1.5-0)

Create a Project
• Create One PCB and One Schematic
You can add Symbols and Footprints for things you want all of the PCB & Schem to contain, if any (it eliminates adding individually. Can leave them empty if desired.

Now, using the Mac’s finder, located the project and Duplicate the PCB and Schematic.
Do this as many times as you want/need.
Rename them uniquely.

Thus, ending with a Project containing multiple PCBs and Schematics.

Add the symbols and footprints to each schematic, Annotate and Netlist each of them (unless you want common nets and layouts…).

Now, for each PCB, load the NETlist.

Result: Each Schematic will have a corresponding PCB. Of course, you can add/delete/edit each as usual.

Example below showing 4 Schem’s and 4 PCB’s and the Project Panel.



1 Like

I am not really shure if i understand you right: I comletely forget the hierarchical schematic, create as many single schematics as i need, and so get the desired amount of pcbs?
So i loose the complete schematic and later have to get all together however, but not as a single project, even when all files are in one folder? Thats not what i wanted…
But said, not shure if i understood right… My english is not the best.

Perhaps I’m not understanding you…

After doing it, you have One project with multiple schematics and multiple PCBs, all in the One project.

Now, you can use each ‘Pair’ of schematics and correspondingly named PCBs (inside the project) as if they were separate projects.
But, because they’re in the same (single project) you can, Annotate and Netlist them with commonality, if desired and/or Add/Delete footprints/symbols as needed.

But, perhaps I misunderstand. If you want separate projects with common circuit/netlist, then do multiple projects and copy the Netlist into each project

Yes, Correct. Don’t forget to also duplicate the PCB

No. No need to make them separate. Use them in the single project folder (that’s what I do). Your choice.

Try a simple example and see if it’s what you wanted…

ok. Sounds … not interesting. To clear up the whole thing: At work i make lots of big projects with schematics and layouts for industrial machines. Here we have multiple boxes around and all work with hierarchical schematics. So the person who has to repair something or change whatever needs one schematic which is divided hierarchically and the whole process is easy and understandable. Every box is marked and the corresponding layouts are “connected” with the schematic. Everything fine. One BOM, every connection is clearly searcheable through the whole plan. You can see directly where come and go cables, see where anything is installed and connected. Great!
Now with your idea - which is fine for small projects with only one person who works with it. But i have everytime in mind that i get ill or am at holidays and another person needs to look up. I can hear the grumpling about the “idiot” (which is me) who is not capable to make that things right… :wink: And finally needs hours to understand the whole plan. Second thing is that i have (in this case) 5 BOMs, 5 plans, 5 pcbs where 2 times 2 pcbs have the same annotation, which is a no-go in a complex project - here where i work for. So even with privat projects i dont want to change that kind of work, i find it very sophisticated and easy to handle, even when it looks like much more work when beginnig a new project. So i have to find another way to get that solved. But maybe its an idea for a future version to have the possibility to generate hierarchical pcbs…
But many many thanks for your explanation. My wishes are sometimes a bit big…

In 2019 I did an experiment that seemed to work, but I never explored it beyond the experimental stage.

I made several independent KiCad projects in the same directory, (One for each PCB), And then I made a “master project” and added the schematics of the “sub projects” as hierarchical sheets in the “master project”.

I think the result is about the same as what blackcoffee did, but without the file copying and renaming. It all did seem to work, butit was a short experiment for me, and there may be some hidden monsters under the carper for library management or such.

I’ll post the experiment, in case you want to look what’s inside:

2020-08-1_experiment_multi_pcb.zip (217.3 KB)

Yes and no :slight_smile:

In the same project you can make 1 pcb for each hierarchical sheet, yes.

schematic
Just make a closed pcb outline for each hierachical sheet.

layout

3d
You will have only one BOM. You can make a panel with all the pcbs together too.

So far, so good.

Now, if you want different Gerber files for each pcb you will need to split the layout into the different pcbs. Then, make a number of copies of the .kicad_pcb file and delete what is not needed to generate the Gebers for an individual pcb.

From my experience:
1- I create a flat or hierarchical project.

2- I draw a schema accordingly. I check it against errors then I attach the footprints and create a netlist.

3- From this project, I open pcbnew and I import the common netlist previously generated. I route all the boards on the same layout with the edge cuts temporarily placed on an unused layer. They will individually be transferred later on to the edge-cut layer (Menu edit, edit text &graphic properties, … see below for the other parameters):


please note that the “scope” content is important.

The known drawback are:

  • when the 3D view opens, it displays a single PCB bounded to the external object envelope. This is temporarily not a problem.

image

  • the nets between the boards must temporarily be routed, even in a silly way, to calm down the rule checker. If the edges aren’t transferred before, they will stop this routing operation.

4- When I’m satisfied with the PCB layout, I save it normally then I “save as” it under several file names representing the individual boards. I close the original layout.

5- I open an individual PCB file by double-clicking on it or launching pcbnew from the program\bin directory.
Of course, a message error complaining about the missing project template is popping-up. I just temporarily ignore it.

6- I delete everything of the layout that’s not related to the current board. I transfer the edge cuts from the temporary place to edge-cut layer (see above). I place the grid origin and the axis origin where they are supposed to be.
Exporting, plotting,… everything can be normally done from here.

7- Should the pcbnew error message be bothering, a specific project file can be created inside or outside the initial project’s one, it is obtained from a copy of the original project.pro file and renamed, matching the current board’s name.
If the file is inside the project, first select its own project and open it to make it active or launch the board PCB from the tree. Otherwise if the active project isn’t the board’s one, launching pcbnew with the icon will open the .pro project PCB file. A picture being better than 1000 words, here it is !

Note: .pro files are important because, at launch, kicad looks at its generic configuration as well as the project specific one.

8 - In case of modification, I do it from the original project, proceeding in the same way as before (steps #4 to 6).

You can also combine or replace the file management according what BlackCoffee said yesterday.

1 Like

I did something similar once but only designed 1 board out of 2 before the project died. The difference is I didn’t separate the individual boards into their own sub-folders. I probably should have because copying the master sheet project file and hand-modifying it to match the schematic name of the child sheet was prone to error, but I hadn’t thought through managing the project level symbol&footprint libraries. I didn’t stress test anything so I don’t know what caveats were waiting in the wings to bite me in the sits-upon.

In this project, the top-level master sheet provided the wiring documentation to connect the sub-boards to an Arduino. If anyone is interested in seeing how to (not?) do this, here is the project. (Hopefully it transfers OK onto someone else’s library organization. I did open both project files here and it all looks good with v5.1.6.)
ProtonPackCircuit.zip (428.6 KB)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.