How to duplicate a PCB layout in Kicad 5?

Unfortunately, in the context of KiCad I don’t know how to do this with hierarchical sheets. That two part numbering sequence for the reference designators can’t automatically be done by KiCad. If it does work (I haven’t tried, so it very well might work) would have to be completely hand annotated.

But, even worse, the only thing that can be entered differently on different instances of hierarchical sheets that use the same schematic file are the reference designators. All the values will be the same. If you set N1R1 to 50Ω on page 2 (assuming page 1 is the top-level hierarchical sheet), then as soon as you open page 3 to change N2R2 to 100Ω, N1R1 will also be changed to 100Ω (as will all the other N#R1 values).

I don’t think MitajN’s script will work for hierarchical sheets that use separate schematic files. How is the script supposed to realize that the schematics of different files are, actually, the same schematic just with different component values?

There is no schematic capture program, including KiCad, that understands the mechanical-boundary line convention of ASME Y14.44, Figure 3 Reference Designation in a Typical Schematic Diagram. I was suggesting an alternative method that can be used and doesn’t use the hierarchical method. The use of the (non-)class letter N, which is listed in IEEE 315, Clause 22.4 Class Designation Letters: Alphabetical List, is covered by ASME Y14.44, Clause 3 LOCATION NUMBERING METHOD (see ASME Y14.44, Figure 15 Location Numbering Applied at Several Subdivision Levels that is an extension of the Unit Numbering Method covered by ASME Y14.44, Clause 2 UNIT NUMBERING METHOD. Yes, you would have to “manually” put the proper N# ref des prefix ahead of the basic ref des for each “sub circuit”.

I just did a top level schematic diagram that had a Front Panel, Rear Panel, and a printed circuit board assembly (PBA). For the Front Panel parts I used ref des prefix A1, for the Rear Panel parts I used ref des prefix A2, and for the PBA (PCB) I used ref des prefix A3. I then copied this schematic, deleted all parts with A1 and A2 ref des prefixes, leaving me with the parts that make up the PBA (PCB). Now I am in a quandary. How do I separate the PCB from the PBA? How would you provision the use of a PCB to be used in two or more different assemblies?

Larry

If I understand what you are trying to do correctly, you can achieve this by:

  • Create .kicad_pcb for all three schematics.
  • Sart pcbnew on it’s own (not using the project manager).
  • Open the first .kicad_pcb, then use File->append board… feature to add the other two board files to your .kicad_pcb…

I hope this helps.

Cheers,
Piotr

1 Like

Hi all,

A somewhat belated coming back to this topic - the days have been busy and I have considered which way of doing this may be most feasible in my context. To this end I noticed PCBWiz’es comment below:

Can I just briefly ask you to say why this is not what I would want?

Cheers,

Jesper

Maybe because you want 12 sub-circuits with identical placement of footprints and identical routing but not a unique sub-circuit 12 times.

I mean, if you have 2 resistors, R101 and R102 linked for the net-1 what we understand is that you want 12 sub-circuits with
R101 R102 net-1
R201 R202 net-2
R301 R302 net-3… and so on.

With the current block duplicate you would get R101 R102 net-1 12 times:
R101 R102 net-1
R101 R102 net-1
R101 R102 net-1 etc.

At least with recent nightly builds when you paste/drop the copied/duplicated track so that it’s on pad it gets the net from that pad. No problems.

EDIT: but footprints can’t be copied that way.

Yes, eelik. This feature was present even in v4.

I haved used it to replicate tracks between “channels”. But the footprints must be positioned first. It may help to use a custom grid where you can snap each item directly into its position, if that’s possible. Another option is to position one channel (from one sheet) and then drag each component from another channel on top of the corresponding component. That way it’s easier to do identical layout. Then select all components of the sheet with RMB->Select->Items in Same Hierarchical Sheet and move them together to their final place.

These are tedious workarounds but possible if you have few components or few channels. Needless to say, native “channels” are desparately needed in KiCad. I’m not sure if this was already mentioned here: https://bugs.launchpad.net/kicad/+bug/1521062. Please vote there, although it has already been assigned to a developer. If Mitja rewrites his plugin to support free positioning and in-place editing I will use it until a native solution.

See replies above. You usually want some nets to duplicate (GND, VCC) but others (local nodes) need new unique net names, to prevent across-module joining. (that’s the bit you don’t want)

I think the replicate scripts use some net-name rule to decide which are global, and which are local.

Note also the scripts work as outlined above, using the feature that a trace polyline, seeds the net-name from the PAD, so it first does a XYRF array part re-place, then a trace overlay.

Hi PCB_Wiz & All … Thanks for your feedbacks. Trying to get a hold of which method may be the most feasible to helpful to get some insight into advantages and shortcomings of each …

Cheers,

Jesper

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