How to import different projects .sch files into one hierarchy sheet

Hey mates! I am new to PCB design softwares and starting with KICAD. I want to combine schematics from 3 different projetcs into one using hierachial sheet. Is it possible? is yes please help me. Thanks in advance. tutorial links are welcome.

First, yes it is possible.

Second, you must understand how hierarchical sheets work in Kicad. I suggest you to read the manual to understand the binding of a hierarchical sheet and its file.

Then, make a copy of all your files before trying to merge them in one project. It is possible a file gets overwritten with a blank if a critical step is missed.

For example, a sheet can be imported assigning an empty sheet to an existing schematic file. Or can be imported with copy and paste the content of the schematic you have to the new file (outside kicad, files a text based).

Finally, be careful with the power symbols: they are global to the whole project.

1 Like

Thanks man. Can you help me with a tutorial link or something related to that.

I have not read this tutorial, though.

And the manual pages:
http://docs.kicad.org/stable/en/eeschema.html#hierarchical-schematics

1 Like

If you do that, the new file refers to a wrong symbol cache file. You have to change it manually. Otherwise itā€™s possible you will see only question marks instead of symbols. (At least in version pre-5.)

1 Like

I will try the above steps. For now what I have done is, I just copied all the .sch file into my main project and when while adding the hierarchy sheet, I just given the same .sch file name and it copied with a pop up ā€œthe file already exists, do you want to copy itā€. It worked fine but when I go into that schematic file, the circuit is broken down with ? marks. What went wrong?

Exactly what I described above happened. Edit the files manually. Or edit the symbol one by one, changing them to the ones which can be found.

Ensure that the same symbol libs are added to the source and target project. Make sure the source project does not need symbols rescued before copying the files over to the target project. (Run the rescue dialog from the tools menu on the source project)
If there is a rescue lib in the source project you need to copy the content of it as well.

3 Likes

Not necessarily. If the libs containing the components are loaded into the project, the cache lib is not mandatory.

1 Like

Thank you all! Have a great weekend.

1 Like

I searched this forum looking for a way of combining 2 schematics from 2 different projects before taking the time to manually copy one schematic to another.

Iā€™m happy to see somebody successfully merging one schematic with another :slight_smile:

I wanted to reach out for some help doing this since Iā€™m not 100% sure I follow the process exactly to avoid the missing symbol issue that can come up if the symbols are not included in the merged project.

Below are screenshots of the files included in each project. One of them does have a Rescue.lib which @Rene_Poschl had mentioned.

Can you help me with the proper steps to get the 10Ah LFP Solar Generator PCB Design.sch merged with the USBC_Power_IO_Ports.sch into the same project?

I figure Iā€™m better off asking vs assuming I know what Iā€™m doing here.

Any help is appreciated!

Thanks!

You need to load the libs of both projects in the new project. Preferences->component libraries

Ok, so once I make sure all libs from both projects are included in the newly merged project whatā€™s next.

Just add the 2nd .sch file to the project I want to merge it with?

I would follow the steps in the previous comments in this topic.

Maybe you want to add the second schematic as a hierarchical sheet / hierarchical file to the first project, or add 2 hierarchical sheets to a blank project.

Once you have both schematics together, you can choose to keep each design in a hierarchical sheet (my choice) or merge with copy/paste both schematics into a single one.

Donā€™t forget to review power symbols and re-annotate the whole schematic, very likely youā€™ll have duplicated references.

Ideally, I want to merge the added schematic to the same page as the original project schematic.

Got it, good tip.

I think I understand now.

The most important part is making sure the library has all the part symbols that are needed for the imported project to load without missing anything.

Is it possible to import a PCB layout from the imported project also? That would save a good amount of work but from previous searching, I donā€™t think this is possible.

Iā€™m using a V5rc2 install. I opened up two instances of pcbnew from the command line and was able to copy and paste from one to the other. I would imagine you would have to edit reference numbers to match the schematic to make this all work though.

1 Like

I think this is true; IIRC I did such a copy and for some reason the references matched and it was OK. I donā€™t remember why this happened, maybe I copied both schematic and pcb from an old project.

I was able to open PCBnew individually and then append a new PCB layout file which brought in the PCB layout I wanted.

Now I need to see if I can just merge this with the schematic and I think this will work out just fine with minimal new work :slight_smile:

My understanding is with V5 you will be able to ā€˜back annotateā€™.

What does that mean?