SMD and THT PCB Layouts from Single Schematic

Hi, let me know if this belongs in another category.

I want to have 2 separate PCB layouts for a single schematic. 1 SMD and 1 THT.

I’m using GIT for versioning and I can make separate branches and use the .gitattributes file to maintain a single schematic.

However, the footprints are stored with the symbol in the schematic. I read that a .eqo file can might be able to do what I want.

Is there a good tutorial or has anyone found a better solution?

Thanks!

I assume making a single PCB which can be used for both, SMD or THT, at the same time, is not possible do to space restrictions? [meaning you have a PCB that can be used to either place SMD or a THT component for the same component, but not necessary both]

If you can make a single PCB and use foorprints that can be assembled with either, SMD or THT, it would make everything much simpler, not only in software: You only need to design one type of PCB, check only one design, only have to order one type of PCB (cheaper), only have one documentation, test only one design, easier to manage excess PCBs…
Maybe with footprints that have SMD and THT pins and you can solder either one of them.

If this is not possible, i don’t know any smart solution (there is probably a better one then the following). I came up with this ideas:

  1. Create 2 KiCad projects with 2 different schematics, maybe in a single git project or in 2. I would do that, despite that is means more work. Because i store additional information like part number in the schematic.
  2. Create 2 KiCad projects with 2 different PCB files but use the same schematic, either by linking one to the other on the file system or by including hierarchical sheets, use the same repository. One version has just one commit more than the other and contains the changes of the schematic. It would need a bit of switching with untagged changes between branches so the master branch still contains both PCBs but should be possible.
  3. Create a single git project and use 2 different branches and cherry-pick changes from one to the other.

What is a .eqo file?


Edit:

After seeing @greg_m answers, it was clear that this don’t work out of the box for your problem, because the linked project uses the same footprint for both PCBs, but it can be made work with 2 different libraries.
Here is how you can do it:

  • Create a new project, including a folder and 2 subfolders in it, one for each PCB. You could also use the main folder and a subfolder but that is probably less clean. Anyway, you need 2 different folder because you need the fp-table-cache 2 times and they are named the same.
  • Create a new KiCad project in on of the Folders, lets call that version A.
  • Create a new Footprint library A in folder A and add as project specific library with a alias that is meaningful for both versions.
  • Create the footprints used only in version A in the Footprint library A.
  • Draw the schematic and assign the footprints to the symbols. Make sure to use the correct alias for the footprint library.
  • Go to the other version, lets call that version B. Make a new KiCad project there.
  • Create a new footprint library B in folder B and add it the the project with the same alias as the Footprint library used by version A.
  • Create the footprints used only in version B in the Footprint library B.
  • Add a hierarchical sheet to the schematic of Version B.

Now you can open the PCBs of either projects and it should import the schematic with the correct footprint for the open PCB.
If you want to add a component with footprint is used by both version, use a footprint library that is linked by both with the same alias.

This way you can update the schematic and both versions get updated. You can add common components that use the same footprint for both and you can add components that use different footprints, just use the correct footprint library. A change can be made to one of the footprint libraries without affecting the other. It does not require and git or VCS hacks nor any links that may don’t work under Windows. It is a bit complicated to setup but should work well once setup.

But combining both PCBs in a single one would still be better if there is a way to do that.

There is nothing like a .equ file any more AFAIK. IIRC that was KiCad 4.x stuff.

Kicad really only works - 1 PCB for 1 Schema. Copy the schema to a new project for the 2nd PCB. Layouts are probably radically different anyway.

Have a look here:

And the repo with examples:

I don’t think this is a good idea if you want two different versions of PCB.

If you thinking about modifying the schematic in a future I’d keep one schematic for both PCBs, choose footprints in the PCB editor and make it the way as described in the link I pasted above.

If the schematic is “fixed” and won’t change then I’d copy it to another folder and effectively have two separate KiCAD projects.

Branching in git is another option. I use git, but not for branching KiCAD projects to multiple versions, so can’s advise how effective this is.

Yes, this is my solution and I’ve been doing it since Kicad v4 (though exact process changes a bit…)

Multiple PCB’s from a single (or multiple) Schematic - I’ve posted several times on doing this.

It’s too simple and I find it, well, interesting to see folks tell others it’s Not doable…

Caution - don’t Update the Second PCB from schematic afterwards… or it’s (Footprints/Pads will not be happy… You can always update PCB2 from the Netlist or new/updated Netlist).

  1. Create the Schematic (it doesn’t matter if the parts/symbols have footprints associated with them at this point. But, it’s best to do it with those for either the THT or SMD, not both at same time).
    This Example used THT for the First PCB.

  2. With schematic open, File>Export>Netlist (this will be used for second PCB)

  3. Build the PCB (with THT, for this Example). In the PCB editor, you can do: Tools>Update_PCB_from_Schematic.
    Shape the PCB, add stuff, add Traces…etc
    Save Copy_As (whatever you want to call it, PCB 2, for example)

  4. [PCB 2) Open the File and Draw the Shape.
    Now, load the Netlist: File>Import>Netlist
    Now, you’ve got the circuit with the THT parts for this example.
    Double-Click the THT parts and change them to desired SMD parts.
    (for some, you can Double-Click the THT pads and change to SMD, especially if you haven’t any SMD parts for that THT part).

  5. Add the Traces…etc… Draw the shape if not already done…

You can do the Save-As …etc for more PCB’s if wanted…

See the Two PCB’s in the project

PCB 1 - With the THT parts/Pads

PCB 2 - With the SMD parts/Pads I changed only two items for this example (Cap and Resistor)

Thanks for the replies everyone! Lots to digest here.

@BlackCoffee I’ll give it a shot. Seems pretty reasonable.

Cheers. Matt

I should have mentioned: Best to plan ahead for future regarding potential need for updating…

I don’t assign Footprints to items that I don’t want changed upon an update from Netlist. Without assigned Footprints in the Symbol’s, updating either of the PCB’s will retain the Footprints that I Manually assigned on the Specific PCB’s.

And, I usually Export Netlists for each PCB (to ensure I have a backup resource)…

The only downside is I use my own Symbols and most have assigned Footprints. But, it’s easy to delete them for a placed Symbol (just double-click symbol and delete the footprint). Now, a newly generated Netlist (from schematic) won’t affect those in a PCB…

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