Modules with Kicad


Is there a way to creat a module that I could use exactly like a single component. The module would have its own schematic with hotspots and the corresponding layout would have the same hotspots… Example: I often redesign the exact same power supply for new PCBs. It would be good to design it once for all, footprint included. The schematic would have 4 hotspots, ~, ~, +, - or in+ in- out+ out-, and the footprint would have the exact same hotspots on the PCB layout.
I have searched into the history, and I’m not the only one coming with this idea, but there is apparently no existing method, except maybe in the schematic by concealing the power supply into its own sheet. But there is no equivalent in the PCBnew software. Is there any other method? Is it scheduled for a later version?
In the meantime, is there a way to copy a part of an existing schematic into another one? I tried without success.



You can add a schematic as a hierarchical sheet, if the references do not conflict happy days, otherwise you may need to manually correct them, for each new project copy the sheet with the powersupply and add as a hyrachial

Without plugins this only works for schematics, not pcb

As @Rerouter said the desing you reuse should be put in its own hierarchical sheet. You can then copy/paste layout with Save/restore action plugin

1 Like

Another way is to save a (part of) an existing project as a template.
For examples look at:
KiCad Project manager / File / New / Project from Template …
(That is, if you have installed the templates, they may be optional).

“Real” “sub circuits” do not exist (yet) in KiCad. This topic has been mentioned a few times before, there may even be an issue or feature request on gitlab for this.
The main problems is probably the limited resources for KiCad developers, so plenty of good ideas are waiting for someone to implement them.

In the meantime:
You could create some simple projects which for example only have power supply section. Then you can use the “append board” option in the standalone mode of Pcbnew to import Footprints and tracks from such a partial layout, and as said before, use a “Hierarchical sheet” in Eeschema to add the schematic part. This will break the connection between Schematic and PCB, so you will have to repair that manually.

Thanks for your replies! Indeed, there might be something to do with hierarchical sheets. By the way, suppose I create for example a power supply project on its own, as mentioned above (paulvdh), how can I “repair manually” the connection between PCB and schematic?

Also thanks to MitjaN: the link about save / restore will be extremely useful, because it shows how to duplicate layouts. I’m designing a 8 channel signal generator, so it might save me a lot of work.



Ensure that the reference designators match between schematic and pcb and then use “by reference” setting in the update pcb from schematic dialog. See Update PCB from Schematic's match methods

Hello Rene!
Thanks for your reply. I had a look at the link you provided. Thanks! So if I decide for example to number all my references (in the “module”) with ids that are unlikely to be present in the PCB I am adding to, it should work right away, right?
I’m thinking: start all the resistors from R1000, for example, all the caps by C1000, etc…
If I add that to the board, no reference will ever overlap with an existing one. Except if I design a PCB
with more than 1000 resistors in this case.

You will still need to ensure you select “by reference” but yes otherwise this will work.

thank you for this. My fear is that with my limited KiCAD knowledge (which will continue as an occasional user) i’ll get into trouble here. You’ve indicated several logical steps – but every one of them unfamiliar to me :frowning: