Is there a way to reuse pre-routed PCB layout and connect them together?

I have a designed a little PCB layout that I want to have multiple of. Then I want to connect those little PCB to each other with tracks in a larger PCB.

Is there a way to draw one layout and reuse that for each copy of schematics sheet?

Hi,

I have a little program written in C that does something similar to what you want. I can send you the sources. It has been tested on linux only, from the test console. It works fine for version 4.0.5 .kicad_pcb files.

In your example, you would place all components of sheet pwr_mod_1. After running the program each block (sheets in power_mod.sch) will be placed in the same way as pwr_mod_1 at the chosen distance.

Example with 2 modules and 3 hierarchical sheets:

First sheet eeschema RC_1: R101 and C101 placed at (10,10) and (10,15) in pcbnew
Second sheet eeschema RC_2: R201 and C201 anywhere in pcbnew
Third sheet eeschema RC_3: R301 and C301 anywhere in pcbnew
Common File: RC.sch

Horizontal spacing 20
Vertical spacing 0

What I get:

R101 and C101 placed at (10,10) and (10,15) (no change)
R201 and C201 placed at (30,10) and (30,15) second block
R301 and C301 placed at (50,10) and (50,15) third block

For routing, route the first sheet and copy-paste-block tracks with legacy canvas.

If this is what you need, I’m glad to send you the sources.

Regards,
Pedro.

I would very like that you send the C code. As for copy the tracks, won’t that also make the net name of the copy same as the first sheet?

To be honest there is no really nice feature in kicad (yet) for such a usecase.
But you could look into append board.

The guys over at this forum have laid out a nice workflow:
http://www.eevblog.com/forum/kicad/copying-layout-portions-in-pcbnewkicad/
Maybe it is something you might want to look into.
By the way if you have problems opening pcbnew/eeschem as standalone look at this thread:

Hi flatcable,

I have uploaded the program to github.
It is the first time I create an own project, so maybe issues.

It has 3 sections:
-tablareferencias, mandatory in first place
-bloquesgemelos: places all modules
-refergemelas: places references only

https://github.com/lucobos/gemelos

The copy tracks take their names from the new pins they are attached to. Pcbnew is fantastic in this behaviour.

I’m developing this tool in a different way (C++) so I will be able to merge it to kicad sources. By now, I know it is a botched job, but it helps.

Please, send me your feedback. Good or bad, comments are welcome.

Regards,
Pedro.

Pedro.

What about creating a component and a layout for the fragment?
I guess that means the parts wouldn’t appear in your BOM, etc, but still…

Old thread, but there has been a plugin written for this. See this thread:

Thanks. The reason I even found this thread (and forum!) was that my interest is in building re-usable fragments of schematics optionally with associated routing. The idea being that I can add sub-circuits from a library to a top sheet, which becomes a block diagram for the complete design. Then go into the PCB editor and either use or redo bits of PCB into a single PCB, so that for example, a sub-circuit with critical grounding or trace impedance can carry that IP with it.

Ideally there’d be a connection so the sub-circuit library could be updated too. Apparently KiCAD is not there, yet. :slight_smile:

I think this feature is planned (I seem to remember seeing it in the roadmap) but i am not sure how much of the necessary preparation work is done to even start on it. (This feature would need a more powerful data model for the internal communication.)

See https://bugs.launchpad.net/kicad/+bug/1521062.

EDIT: may be a bit different than what @cliffordheath meant, but right on target for what the original poster from three years ago wanted (repeated subcircuit).

Correct, this is not doable as it stands now. Though with python scripting support, you could save the existing layout of one schematics sheet into separate file, which you could load in another project. This should be doable, but somebody has to do it (don’t look at me even though this sounds like a fun project)