A lot of errors on Update Schematic from PCB

Hello.
I am trying to Update Schematic from PCB, but I’m getting a lot of errors:
Error: Footprints ‘REF**’ and ‘REF**’ linked to same symbol.
HERE IS ABOUT 190 LINES OF SAME ERRORS
Error: Footprints ‘REF**’ and ‘REF**’ linked to same symbol.
Error: Cannot find symbol for footprint ‘REF**’.
Can you look at my first KiCad project please to determine, what’s wrong with it?
My project shared with DropBox: Dropbox - KiCad_FirstTestProject.zip - Simplify your life

At the moment you’ve put about 150 LEDs and 50 resistors on the PCB, but without drawing anything on the schematic.

It does not really work that way. The Update Schematic from PCB can only do some limited synchronization updates to an already drawn schematic.

2 Likes

You have misunderstood how this works. The normal workflow is to draw the schematic, attach footprint pointers to the symbols (if they weren’t already defined in the library symbols), then use Update PCB from Schematic, then position the added footprints.

You have added footprints directly to the PCB without a schematic. KiCad can’t create a schematic from that.

1 Like

That sucks, guys ((( .
So, I need to redo everything from the beginning?
KiCad doesn’t have auto-placer and auto-router. So, when I redo schematic, I’ll have to re-place all elements on PCB and re-draw all wires on that PCB, right?..

There exists a plugin which places footprints as the corresponding symbols are in the schematic. But even that needs a schematic first where symbols are placed like the parts are placed in the PCB, and that’s not generally speaking the purpose of schematic.

In this case I think yes. There might be a roundabout way to do by scripting something, but it would probably be more work to create that kind of workflow for only this board than to do this from scratch.

1 Like

OK, got it. Thank you very much!

Is there any CAD tool out there which can create a schematic from a pcb? It sounds like it would be somewhat useful but I would think that the uses for it would be much more limited than for the usual workflow.

PCBs are laid out based on assembly and performance considerations, while schematics are mostly laid out according to our brains and our understanding. My guess is that if software could draw a schematic based upon a pcb layout, the schematic layout would be miserably confusing. :grimacing:

I think programs like Fritzing can do this (or at least create a schematic from a breadboard layout). But as I recall from the few times I played around with it (before realizing that creating new components was ridiculously obtuse) the resulting automatic schematic was only a starting point and needed serious cleanup. In order for a schematic to be able to be autogenerated from a PCB, there would need to be some sort of autorouter in the schematic to take the netlist and draw lines. This functionality isn’t in KiCad and hasn’t been since I started using KiCad back in the v3 “bad old days”.

It’s pretty much the result of your own action.
The biggest problem here is that you started with a project that has far to many parts, without knowing how KiCad works. That means that after you’ve placed 150 LED’s wrong, you have to correct it 150 times, and similar for the 48 resistors.

KiCad has a “Replicate Layout” plugin that can help here, and there also is an array plugin. I think that by combining these, this PCB can be designed quite quickly, but figurering out how to do so efficiently is not so easy.

I have some spare time though, and I’ve been curious about the array tool plugin, so I’m now experimenting a bit with this…

1 Like

No, not really.
KiCad-nightly V6.99 has very recently gotten the ability to load background images in the PCB Editor, and this is a quite useful reverse-engineering tool.

I would already be quite happy if there was a way to attach schematic symbols to footprints, and then draw ratsnest lines in the schematic. So pretty much the reverse process of how it works now.

1 Like

I have never tried it but may be if you draw a schematic being right equivalent of your PCB and when Update PCB from schematic you select ‘Re associate footprints by reference’ (it is the text form V5, may be in V6 is little different) than may be you will have to do nothing at your PCB.

It doesn’t work because the footprints haven’t been annotated. There’s no way to reannotate REF** footprints, even Geographical Reannotation doesn’t do that. It’s logical because the footprints don’t have information about the reference designator letter which would be needed for reannotation.

Can you annotate them manually (one by one)?
But even so it is probably more work the just design PCB once more.

I wanted to get some more experience with array tools in KiCad, so I tikered a bit with your project.
At the moment it is pretty much in a working state, although it’s not exactly in a state I would call “finished”.

2022-07-26_KiCad_FirstTestProject.zip (224.8 KB)

I noticed this also, and found it a bit annoying.
I do not find it logical. I’ve tried various things with the array tools, but it’s either quite buggy, unlogical, or it’s my own mind that turns it into a maze, but in the end I think I drew the whole thing 5 times before I found a method that worked quite well. I’ve used various tools. I could not do anything useful with the “Place Footprints” plugin, but when I discovered that KiCad’s own array tool worked reasonably good I abandoned the plugin. I also used the Replicate Layout plugin, and that one worked quite good.

I placed almost all footprints with combinations of arrays and the Replicate Layout plugin. I also added some measurements. Because the PCB was designed in mils, I also kept that, even for the mounting holes, (I much prefer millimeters myself, but it’s not my PCB. Also most tracks were draw by a combination of simple arrays and the replicate Layout plugin. Because I redrew the whole PCB a few times, some things may have shifted a bit, but I did try to put all the LED’s back in the same locations.

I could not be bothered to draw the return path, so I just thew in a zone for that. I did keep the PCB single sided, that may be nice for home-etching, but if you order PCB’s online then you may as well make it a double sided PCB.

I also added some mounting holes. They’re easy to delete if you don’t want them :slight_smile:

I also noted you removed a lot of the layers in the board setup. That is not a very good idea. You easily loose track of things (especially on more complicated PCB’s) if you do that. For the next time, just turn them off in the Appearance Manager (That is the big thing on the right with 3 tab pages).

1 Like

Yes, it’s possible manually, and

A python script could be handy here. It would need to ask the user a new refdes letter for each footprint ID. Or it could work on selected footprints and ask for the letter.

I’m not sure if you mean the fact that REF** can’t be reannotated at once. But it’s logical. The footprints in libraries don’t have any information about the possible reference designator letter, that information is in the symbols. Because there are no symbols here, they can’t be reannotated with the standard letters. There would be two options I mentioned above, and neither of them can be done without some new UI. Geographical reannotation can’t guess the letter.

I am aware that the the function is called “Geographical Re annotate” and that when footprints are placed directly on the PCB, there is no schematic link whatsoever.

However, that does not mean I find this behavior logical.
What is the use of creating an array of Footprints on a PCB if they can not be annotated?

Weirdly, I am also seeing different behavior between the posted KiCad_FirstTestProject and another project I created (called asdf_Array)

In the project posted by Arthur_Khusnutdinov I can not assign any numbers with PCB Editor / tools / Geographical Reannotate, but I can do it in my asdf_Array test project.

Below is a screenshot of a block of 15 resistors:
image

I created this with:

  1. PCB Editor / Place / Add Footprint
  2. Select it and: [Right Click] / Special Tools / Create Array
  3. Select whole array PCB Editor / Toools / Geographical Reannotate

I just can’t get rid of the asterisks this way.
If I first just place a single resistor and rename the RefDes to R1:
image

Then I can easily create a 3 by 3 array of “R1’s”:
image

And then use the Geographical Reannotate function to give them consecutive numbers:
image

After that I can put a bunch of resistors on the schematic and annotate them:

And then use the normal: Schematic Editor / Tools / Update PCB from Schematic with the Re-Link footprints to schematic symbols based on RefDes option.

Note that in a single update, I updated the 9 resistors already on the PCb from 0805 to 0402 and assigned the values and those resistors keep their orientation. R10, R11 and R12 are new and are thus attached to the cursor after the [F8] update.

This behavior is mostly as I expect it, with two exceptions:

  1. The Geographical Reannoate tool can not get rid of the double asterisks in the RefDes.
  2. In Arthur’s project it does not work at all.

image

1 Like

Hello, @paulvdh!
Whoa!
Your PCB results much better, than mine ))).
I am trying to reproduce a similar result.
Currently I have one row of leds.
KiCad_2ndTestProject_v1.zip (207.3 KB)
I’ve downloaded Replicate Layout from https://github.com/MitjaNemec/Kicad_action_plugins by zip file and placed all files and folders of that zip file to C:\Users\artkh\OneDrive\Documents\KiCad\6.0\scripting\plugins . Now I see that KiCad found that plugin

After I select my row and click on Replicated Layout, I see Exception:
image

I am using KiCad 6.0.6.

I also tried to Duplicate my row on PCB with CTRL+D.
After that row duplicated on PCB, I executed Geo Reannotate and got such output log:
report.txt (10.1 KB)
Update schematic from PCB did not get expected results too:
report2.txt (2.9 KB)

I think you have an old version of the plugin. Remove it and use the Plugin and Content Manager from the KiCad project window. The plugin is there to be installed.

1 Like

Oh, it show window now, thank you.
But! Still doesn’t work :slight_smile:
What I did:
By instructions for that plugin:

After the section for replication (source section) has been laid out (footprints, tracks, text objects and zones placed) you need to:

  1. Place the anchor footprints for the destiantion sections you want to replicate. This defines the position and orientation of replicated sections. You can use PlaceFootprints action plugin for this. - done

  2. Select the same anchor footprint within the source section. - selected one resistor on my PCB

  3. Run the plugin. - it shows window without any hierarchy info. OK button in that windows doesn’t work - when I press that button nothing happens:

  4. Choose which hierarchical level you wish to replicate. - stuck on step 3

  5. Select which sheets you want to replicate (default is all of them)

  6. Select whether you want to replicate also tracks, zones and/or text objects.

  7. Select whether you want to replicate tracks/zones/text which intersect the pivot bounding box or just those contained within the bounding box.

  8. Select whether you want to delete already laid out tracks/zones/text (this is useful when updating an already replicated layout).

  9. Hit OK.