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


#1

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.


#2

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.


#3

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


#4

I have not read this tutorial, though.

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


#5

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.)


#6

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?


#7

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.


#8

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.


#9

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


#10

Thank you all! Have a great weekend.


#11

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!


#12

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


#13

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?


#14

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.


#15

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.


#16

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.


#17

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.


#18

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:


#19

My understanding is with V5 you will be able to ‘back annotate’.


#20

What does that mean?