One Schematic: Two Boards (One TH, One SM)

I’m creating an Open Source project and (so far) all components are available in both TH and surface-mount versions. Some of the project’s audience would be able to do surface mount or buy built boards. But others, I suspect, want through-hole for ease of assembly.

What workflow is recommended? I’ve read One schematic for two pcbs (left and right). Although not directly applicable, I got some ideas. My current plan is to manually “share” the schematic (by copying) between two projects. This seems a bit daft because I think I’ll need to change footprints a lot. But it’s what I came up with. Fortunately, the schematic is fairly stable…

I hope this has not been covered - I did look. In a way, I hope I’m overlooking some obvious solution which will be good for the project and bad for the ego. I’ll go with “good for the project”.

Edit 1: I should add this is not an immediate problem. I’ll finish Rev 1 with TH, copy the schematic and layout the SM version after changing footprints. But I’d hate to keep doing that later if there is a simpler way.

Thanks,
MMM

This is an untested idea so I may be taking nonsense but maybe you could assign one set of footprints to get one board file then run a Python script that would substitute each footprint with the corresponding one in the other technology to generate the other board file. Naturally you’d have to create a table of substitutions to feed the script.

Yes, I think that’s a good solution to the footprint issue. But the SM board will have a different layout, traces, and size - so the PCBs will be very different. But maybe the combination of copying the schematic file and running a script on the board file is as good as it gets. And, thinking about it, I think there is an option to retain footprints when you get a new copy of the schematic so maybe I don’t need a script at all.

I just thought this might have come up before and someone else might have a better answer than the one I came up with.

MMM

You could refine the script so that it only changes a footprint if it’s different from the last run or the component didn’t exist before, leaving all the other data the same. There’s a lot of scope for interesting scripting once people get their teeth into it.

See also my comment in https://gitlab.com/kicad/code/kicad/-/issues/2131#note_352447040.

eelik:

After reading your comment (thanks), it seems like a platform ‘solution’ would be very complex and (if I was making the decision) not worth the effort.

I wasn’t asking for a change in KiCAD, merely if anyone had a “Best Practices” that would ease the effort. I’d still listen to any suggestions about workflow, but I think it won’t be all that much work to do pseudo-manually. Even though the design is incomplete, I’m going to do the exercise in a few days and will report back.

MMM

Do be honest my suggestion would be to ditch the THT version as it is just not worth it. SMD is easy enough to solder (possibly even easier than THT) and any measurements you would make on THT can not really be translated to the SMD version as the parasitics are completely different.
So i don’t really see a usecase for having a board made in both technologies but maybe i am missing something.

Rene:

You could be correct. My only counter is that I’ve received pushback from potential ‘users’. I think folks who are not “chip-heads” tend to have a fairly big soldering iron (tip size), no appropriate heat gun, and no oven.

I’ll see how much effort is involved and decide after I do the test. It’s certainly two layouts. And those ‘users’ who are doubtful about SM can always buy a completed board.

MMM

I believe it used to be possible with the old version using hierarchical sheets, because the association between symbols and footprints was done in a separate file.

I just did a quick try, with v5.1.6 and the footprint information is embedded in the schematic sheet making it unique.

The idea was to have:
commonSheet.sch
ProjectTHT
ProjectSMD

and use the “commonSheet.sch” as hierarchical sheet in both projects (using “…/commonSheet.sch” as path), but as I said, as soon as you make the footprint association, the information is saved in the schematic file.

That must have been a very old version. Certainly version 4 already had the association in the symbol fields.

However if that was ever the case then there is at least some truth to the often repeated downside of kicad that it requires association for every project. (So i might have been wrong in always outright rejecting such information)

We have hope that this will be possible in v6 without saving in the common schematic file. Having parameterized hierarchical sheets would allow referencing to one sheet from two top level sheets but changing the footprints in the top level sheets. See https://gitlab.com/kicad/code/kicad/-/issues/2466. That’s not an ideally easy solution for board layout variants, but would be practical and working.

2 Likes

[Edit: Somehow the Quote (w/ emphasis) was lost.]

Emphasis added. I’d upvote this if I had a vote (which I don’t).

MMM

If you mean gitlab issues, you can create an account there and give a thumb up for an issue. That’s our vote system there.

2 Likes

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