[SOLVED] Duplicated Footprints after splitting a schematic into hierarchical sheets

Hi all,

I stared a schematic, then layout. After the schematic growing I split it into hierarchical sheets.
Then updated PCB from a schematic and now lots of components (those from sub sheets) are duplicated. The components from the main (top) sheet are OK - showing up only once.

Is there a way to fix it automatically?

See below how it looks now:

Kicad version info:

Application: KiCad x86_64 on x86_64

Version: 7.0.7-7.0.7~ubuntu23.04.1, release build

Libraries:
wxWidgets 3.2.2
FreeType 2.12.1
HarfBuzz 6.0.0
FontConfig 2.14.1
libcurl/7.88.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh/0.10.4/openssl/zlib nghttp2/1.52.0 librtmp/2.3

Platform: Ubuntu 23.04, 64 bit, Little endian, wxGTK, xubuntu, x11

Build Info:
Date: Aug 13 2023 23:14:43
wxWidgets: 3.2.2 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.6.3
Curl: 7.88.1
ngspice: 38
Compiler: GCC 12.3.0 with C++ ABI 1017

Build settings:
KICAD_SPICE=ON

Ouch! Did you reannotate the schematic after creating the sub sheets? I see two J10 on your PCB.

1 Like

How is that going to help Greg_m in any way?


I started to give a mostly standard answer, as this is often the result of a standard mistake, but this is different, because I see ratsnest lines between the “old” and the “new” set of footprints. This means that both sets are part of the netlist. Connections seem to be one - to - one. The most logical explanation is that you may have accidentally pasted your symbols twice in the hierarchical sheet.

To try to fix this, first make a backup, so it can’t get any worse, and after that:

  1. Open both the schematic and the PCB editors next to each other. (Dual monitor or big screen is nice)
  2. Click on the footprint you do not want in the PCB editor to select it.
  3. The same symbol should now be selected and highlighted in the schematic (this is called cross probing).
  4. Click on the title bar in the schematic editor, this should give focus to the schematic editor, but without undoing the highlight.
  5. Now press the [Del] key to delete the highlighted symbol in the schematic.
  6. Go back to the PCB editor, and select the other corresponding symbol again.
  7. Cross probing should make that other one visible on the schematic.

So there is no “automatic” method I know of, because the problem itself is unusual. I am also mostly guessing what happened. It could be something else too, but I can’t see that from a screenshot. It’s much easier to diagnose a problem if you upload the actual project. (The backup directory and the fp-info-cache files are not needed (In KiCad V7)).

1 Like

It’s probably not, but I’m trying to understand what happened. Why so bellicose?

1 Like

It’s problematic that KiCad doesn’t have a way to explicitly move parts of existing schematic between sheets.

What you should do is

  • move some symbols to subsheets so that the refdes are kept
  • use the non-default matching method with the next pcb update
  • use also the option which deletes footprints which don’t have symbols

What you have done changed the symbol IDs which also create new footprints, but left the old footprints there with no valid IDs, i.e. without symbols.

Edit: if you have some footprints without symbols, you have to mark them explicitly or lock them to prevent unwanted deleting.

1 Like

Hi all,

Thanks for suggestions.

Luckily the schematic is not that complex yet as it’s a very early Work-In-Progress stage, so I’m glad in happened now, not later.

I think v7 has a automatic annotation enabled, which (when I realized it’s on) I found quite useful.
The issue with the duplicated footprints happened first (with automatic annotation being active), then when noticed that the same footprints have a different annotation, then I manually changed it to whatever was annotated first. That didn’t help.

Double probing wasn’t very clear in this case.
Selecting a footprint (the original one or duplicated) highlights the same symbol in the Schematic Editor.
And the other way - selecting a symbol in the schematic editor highlights both footprints in the PCB editor. A bit crazy :crazy_face:

The solution was to just delete the duplicated footprints (they were still out of the board edge so easy to select them all) and update PCB from a schematic again. Seems like that solved the issue as only new footprints appeared in the PCB editor. No duplicates anymore! :slightly_smiling_face:

Not sure if it was an issue with my project / settings or a temporary KiCAD hiccup or perhaps a bug.

Will probably move other symbols to subsheets and see how it behaves.

I panicked a bit last night, but seems like all is under control again!

Many thanks to you all for your suggestions and help!

2 Likes

The “Update pcb from schematic” shows a checkbox “delete footprints with no symbols”. Setting this checkbox should prevent you from duplicated footprints.

Sure, but the weird thing in this particular case is that there were ratsnest lines between the two sets of footprints. Usually only one of the sets has links to the netlist.

Usually only one of the sets has links to the netlist.

If the “new” footprint set has the same RefDes as the “old” than both are connected with the ratsnest. This happens if the “paste special with retaining the original RefDes” is used in the schematic. Then both footprints have the same RefDes, the netnames and pad-names are calculated by the Refdes and so both footprint-sets end up with padnames/netnames like “Net-(R10-Pad1)” and then these are connected.

It’s a little bit different if the nets are labeled - than the two footprint groups are not connected together. (because the nets have a unique name which incorporates the subsheet-name)

1 Like

When new footprints are created with the array tool it also happens that the duplicated footprints are connected to the original ones.

Didn’t use “paste special with retaining the original RefDes”.
Usual Copy in the mian sheet and Paste in the sub-sheet.
I can’t exactly remember, but I think I pasted a selected part of the schematic in the sub-sheet first, then deleted that part from the main sheet. I guess that could caused the issue.

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