Nested designs, templates, groups


I am currently designing a board with multiple I/O expanders and dc motor drivers of the same model and with the same passive components.
The pcb layout of the individual “blocks” (one IC with its passive components and all connections, vias, copper planes) lets say is rather intricate, or in the least tedious, and therefore I would love to design these blocks once and then be able to copy-paste them.
For my basic MCU layout I do this by having created a project template which allows me to start with a populated basic schematic with all components for the MCU to function in place, as well as having those components properly located and interconnected with each other on the pcb by default.
However I would like to do this with multiple and different components obviously, unfortunately this template feature is specifically tailored to work on a project-level and with singular inheritance.
What I hoped for this far was that I could finish up layouting one IC with its passive components and traces, vias, copper fills, etc., group everything together, then copypaste the group and change the reference designators of the components and the nets manually. Unfortunately, even after doing this (to a point where the properties match exactly with the respective components, and selecting them in the PCB Editor or Schematic Editor selects the correct component in the other editor window) and deleting the original ones that the pcb editor automatically placed, whenever I do an “Update PCB from Schematic…” it will just dump another copy of those components onto the pcb. KiCad does not seem to recognize that I added these components manually already, at least when I use this PCB update routine.

I am sort of at a loss of how to do this sufficiently. I am not particularly interested in duplicating hundreds of intricate details by hand, if that is understandable, and there sure must be a way to do this as I assume way more advanced users must have this problem as well.

I did some searching with the keywords mentioned in the title, and came across some more terminologies in regards to what to call this specific feature, however it seems that natively KiCad does not support what I want to do.

Is there any way I can still do this?
I am using the latest stable release of KiCad 6 on XUbuntu.

Thank you for your time and effort!

I think the Replicate Layout Plugin is quite close to what you want. You can install it with the Plugin and Content Manager, which is accessible via KiCad’s project manager.

1 Like


Thank you for your incredibly quick reply! I just installed it and will be having a go with it.

Thank you

Can you please share your experience when done?

1 Like


So, okay, my experience so far from the last 20 minutes, never having worked on hierarchical sheets.
So I created a hierarchical sheet, cut and pasted the sub-circuit in there, figured out how hierarchical labels work (I have to set them inside the hierarchical sheet, then go out of it to the main sheet, select the hierarchical sheet, right-click and import the labels).
That sheet already had the subcircuitry wired up internally on the pcb (traces, silkscreens, vias, planes) but not connected to anything other than the gnd plane).
I duplicated the hierarchical sheet.
I then updated the pcb to have my duplicated components dropped onto there. I moved the IC of that duplicate in position.
I then went into the original group that is my subcircuit, selected the IC, thereby defining it as the local anchor point. I opened the plugins submenu and was greeted with selections.
The only thing I could manage to do while playing around with the settings, is making the passive components move in place correctly. It never added the silkscreens, traces, planes, vias, etc…
Then after a while trying to figure this out, not even that worked anymore. The passive components just started moving close to the IC without properly arranging themselves, staying in the same position relative to one another like before.

Dropping it onto the pcb:


Then not moving the IC so you can better see what happens, and instead just proceeding to select the IC in the original sub-circuit, and running the plugin.

So now I created two duplicates, thinking the plugin is copying from the wrong sub-circuit, drew some traces and selected that duplicate, then using the plugin.
The result is:

So the plugin somehow doesn’t recognize anything inside my original group as the anchor point anymore. (I tried a passive component instead of the IC with no difference.)

Oh, I figured out the cause of the issue.

PCB Editor doesn’t recognize my original group as components from the schematic. I can select them in the schematic and they will be selected in the pcb editor, and vice versa, but upon updating the pcb from the schematic a new U2 (the IC of the group) and all its passive components will appear.
The reference labels are fitting, how can I tell, appearently just that components dumping routine, that my components are already there?

I managed to fix this by doing this:

The plugin now recognizes the correct footprints, however regardless of the settings, I end up with this:

Note the missing zones and silkscreens I added myself, which are all part of the group.

I am very sorry about the many posts, but the forum only allows me to insert one file per post.

Fixed. :wink:
added characters to hit 20. sigh…

1 Like

One step at a time. :slight_smile:
I’ve been trying to find out why some parts are missing during the duplication process. I tried cleaning up tracks and vias, and regrouping, to no avail so far.

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