Here is an example of my problem.
I have 4 resistors, R1, R2, R3 and R4, and I need to insert another resistor in designator R3.
So in SCH AND PCB i renamed R3 to R4 and R4 to R5 so they match in the design.
Now when I update the PCB from schematic, it adds R4 and R5 again even though they already are present in the PCB ??
I really don’t understand why, before the update R4 and R5 are linked so when I select R4 in SCH it’s show R4 in PCB.
Normally, KiCad synchronizes symbols (in the schematic) with footprints (on the PCB) with UUID’s. These are not visible in the GUI, but only used internally. The Reference designators are normally not used to synchronize between the schematic and the PCB, but they can be if you enable the: Re-link footprints to schematic symbols based on their reference designators during the PCB Editor / Tools / Update PCB from Schematic [F8] process. This is explained in more detail in chapter 6 (Forward and Back Annotation) of the manual.
This is not the recommended way. If you only change the references in the schematic, and then Update the PCB, the changes in RefDes will be pushed to the PCB too (without changing links between symbols and footprints).
You write “This is not the recommended way”, but it is often necessary.
If I have a group of components there are placed in a specific way on the PCB with tracks, vias. etc…
Here is an example:
U11, R11, R12, C11, C12, D11 and CN11, then in the PCB Editor I the copy the whole group because I need everything to be exactly the same 4 times.
I rename group 2 - U21, R21, R22, C21, C22, D21 and CN21 and so on.
Now I copy/paste the same group in SCH Editor and rename them to match.
I when I update PCB from SCH, adds all 3 groups of components again.
This is a MUST that this is possible, takes to much time to do it manually…
Your workflow is not very clear to me. Are you reverse-engineering a PCB? KiCad has some features for reverse engineering, such as PCB Editor / Place / Add Reference Image, but it also has some holes in this area.
If you first put footprints on the PCB, and then want to match them somehow with the schematic, you have to do several steps twice (both in the PCB and in the Schematic Editors). Consider this:
Create a new project.
Start with the schematic.
Create a hierarchical sheet.
Draw the schematic for one instance in the hierarchical sheet, or at least put the symbols on them. (I.e. not in the root sheet).
Assign footprint links in the schematic.
Use Update PCB from Schematic to get the footprints on the PCB.
Maybe add the reference image, do the footprint placement and routing.
You may have to create or update the schematic several times if you did not have it yet. You can use Update PCB from Schematic as many times as needed, as long as you keep the schematic and PCB synchronized.
In the root sheet of the schematic, create three extra links to the hierarchical sheet with your schematic.
Use Update PCB from Schematic again, to get all the footprints from the other three instances also on the PCB.
Install and then run the Replicate Layout plugin (It’s in the Plugin & Content Manager.
This workflow may seem a bit fiddly because there is quite a lot of switching between the Schematic and PCB Editors, and it takes some time to learn to work with the Replicate Layout plugin, but one you are familiar with these, it works quite well and efficiently. You don’t have to do things twice, and there are no problems with annotation. You can even re-annotate your schematic halfway the design, and push the changes to the PCB. Or do a Geographical Re-annotate in the PCB editor, and push those changes back to the schematic.
You should never have to do re-annotation manual in both the Schematic and PCB editors to match things up. This is both tedious and error prone to do. Learn to use the functions in KiCad to do this for you.
During: Schematic Editor / Tools / Annotate Schematic you have an option for: First free after sheet number X 100 This always results in 3 digit RefDes, but it does create similar RefDes in hierarchical sheets without manual renumbering for each of the instances.
And it was only a small example, i my project I have 10 layers and 50+ peripheral components around my ADC/DAC, and if I have to replicate this setup 8 times it would take 25+ hours… THAT would be tedious ;o)
So if there is a punction to do this, I would love to know, I’m thinking about coding a python script to do this.
It does not matter much whether you are reverse engineering or not, the general workflow is still the same, and the list I made still stands, and the background is simple. Footprint links always originate in the schematic, so that is where you connect schematic symbols and footprints. The UUID’s keep everything synchronized for the rest of the duration of the project.
And if you have repetitive sections in your schematic, then learn to use the Replicate Layout plugin.
I, too, don’t understand your workflow from your description well enough. But may understanding how KiCad works in this respect would help you? See Update PCB from Schematic's match methods. It tells details about how changing reference designators etc. works between the schematic and the PCB.
I don’t want kicad to auto annotate and chouse on it’s own.
If I have in group 1 R11, R12 and in group 2 I have R21, R22, i don’t want kicad to select R1 for group 3.
Can SCH Editor add a chosen value (10) to the designator, so when I copy R11 and R12, I can paste them as R21 and R22 ?
And I will definitely look at the Replicate Layout plugin :o)
I read your post again, and it’s how Paul said: it’s not necessary, using the Replicate Layout is a better option. You repeat the section using hierarchical sheets in the schematic, do the layout once in the PCB and use the plugin on the complete section of the layout. If you need to make changes to that layout, you can just use the plugin again (in your current style you need to copy and paste all over again and deal with the schematic ↔ PCB sync again).
I suggest you do a side step from your real project, and do a few dummy projects. Bot to experiment with the workflow list I posted, the Replicate Layout plugin, and the different match methods eelik mentioned.
The big advantage of the dummy projects is that you can do them very quickly. You don’t have to worry about PCB layout details, GND zones, EMI etc, Your schematic does not even have to make much sense. Us a 555 oscillator as an “ADC frontend” or re-use some sheets of old projects to skip schematic entry altogether. Keep the sheets simple, to reduce clutter, but just enough parts so the replicate layout plugin has something to do. An NE555 oscillator with it’s supporting passives is around the “minimum viable complexity” to be useful.