How to create multiple PCBs from hierarchical sheets?

Hello.

I am new to KiCad and I have never created a PCB.
I created a schematic that consists of four files: three hierarchical sheets and a main sheet that connects all the hierarchical sheets using their hierarchical labels to other hierarchical sheets or components.

The hierarchical sheets are physical boards. The boards mainly consist of a microcontroller with its own power supply and inputs.
The main sheet is not actually a board, it’s more like a principal schematic used to illustrate how the three boards will be connected, so the main sheet doesn’t have a PCB.

I want to create PCBs for the three boards corresponding to their schematics, but I don’t see a way to create different PCBs for different hierarchical sheets.
I found two workarounds:

  1. Manually create a .kicad_pcb file. I can open the PCB file, but I didn’t find a way to import the hierarchical sheet to the PCB. In the opened PCB editor it allows me to load a netlist file, but I don’t know how to export a netlist file in KiCad 6 from a single hierarchical sheet.
  2. Use different projects. I can put the three hierarchical sheets into their own projects that will be located in the folder of the main project. It should work, but I noticed that it breaks ERC giving a lot of errors like “Error: Label not connected to anything” because KiCad doesn’t know about the parent, main project and can’t track the labels.

How would you recommend me to create multiple PCBs from hierarchical sheets?

Please take the time to search the forum first. This has been discussed so many times.
Hierachical sheets are not intended for making multiple PCBs.

1 Like

Hello and welcome @user894561

Kicad is strictly one PCB for one project. You will need to alter your schematic structure to suit.

As already mentioned, hierarchical sheets are not intended for making multiple PCBs. They are intended to partition large schematics for easier editing, or to represent repeated design blocks in the schematic.

You’ll need to make a separate project of each of your current sheets. So you’ll be going from zero to three PCBs on your first attempt. Make and test each project independently and then connect them together. Hopefully the integration will be smooth.

Somebody will for sure mention some hacks similar to your method 2 to put all the boards under one project. IMO just do it the normal way.

1 Like

Hello, your intend is one of my reasons why I started learning KiCAD although I am still using another ECAD software which I used for years.
KiCAD community here is used to consider the “hierarchical” project is only for splitting a large schematic into the multiple sheets. Yet , the current development of KiCAD came close to the level where it will allow making a large schematic for the project consisting of multiple PCBs. This brings a huge advantage to have a complete single schematic for a multi-board large project.
For ex. in my project I have a complete schematic “all-in-one” place consisting of multiple PCB modules mounted on the motherboard.
The pointers for us to work toward this goal are these:

  1. Hierarchical PCB generation - Layout - KiCad.info Forums describes quite a manual workaround but still doable.
  2. Another way to use plugins “Replicate Layout” or “Save/Restore Layout” , both are tested and available for V.7.0
    My procedure I am to try is this:
  3. Making a complete hierarchical schematic
  4. Making PCBs with isolated blocks representing single sheets (see how to in the 1st forum link above)
  5. Use a plugin to Replicate your individual sheets layout and paste it into the new project PCB to generate manufacturing files…
    Something along these lines
    I hope we’ll get there :stuck_out_tongue_winking_eye:
1 Like

Forgot to mention, the link to the forum post about this topic has one useful “how to” description I wanted to share. It is a reply by Petra on Aug. 1 2020 .

Hi @Kaunas you seem to have thought about this a bit. Perhaps you might like to post a write-up to the Feature chat category for wider discussion.

One possibility is to build capability above the current project structure so that KiCad can deal with super-projects comprising standard projects.

I can have different projects for the three boards. The three hierarchical sheets/boards have nothing in common with each other (like common symbols or footprints), so it wouldn’t be a problem to separate them.

But would I be able to still maintain the main sheet that illustrates the connection between the three boards and executive components? (like lamps, motors, etc)

I can think of creating a symbol for each of the three boards in the main sheet’s project instead of using a hierarchical sheet.
Honestly, it would be a pain to update those symbols manually when any of the input/output pins of a board is changed.
Also, there would be no connection between the main sheet and the three boards, meaning that ERC wouldn’t work like it works with hierarchical sheets.

Do you have any recommendations on how to organize the main sheet and link it to the three boards saving ERC capabilities and easy updating of the input/output pins like I would do with hierarchical sheets?

I wouldn’t do that way at all. With modular boards you decide on each board’s electrical interface and then you treat it as a component and do ERC across these components. I don’t see the need for the ERC to extend into the innards of those modules. So don’t go changing the interface contract willy nilly.

Particularly as many projects use prefabricated modules, a RP2040 for example. What need is there of knowing the exact parts that are in the modole? That’s what modularity and hierarchy are for after all.

1 Like

I see that users are considering the feature discussed here only from the prospective of their known case scenarios, without seeing the “overall grandeur” of all the possibilities and all use cases potentially provided if some (minor) changes were made to the code which handles the hierarchical sheets.
I will try to find time soon to put out a clear description of the huge potential of this hierarchical feature (mostly already implemented), describe all the possible scenarios for the large projects and my suggestions of the changes to make that leap possible. May be in another channel ?

1 Like

What would be the best place to put out the document on this site for the design/suggestion for this feature? It should be editable to reflect other people input.

Indeed.

In the thread linked to by Kaunas, I also posted such an experiment. It seemed to work quite well back then, but that may have changed in a newer KiCad version.

I am thinking of this for a test fixture involving a single channel before I make the large board with many channels.

My work around is copy the sub-circuit to another directory and make a new project for it.

Maybe a nicer way to do it would be to allow the sub-circuit to be shared with another project.

The issue of course is the chaos that ensues absent some sort of revision control.

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