Different pin assignments for different footprints

I have been googling and browsing the forums, and have a feeling the answer to my question is that it is not (at least currently) possible. I certainly haven’t found anything in the UI that makes me feel hopeful - but I’ll ask anyway just to be sure. Sorry if this matches practically verbatim a post I’ve failed to find.

I have a component (OPA172) that is available in SC70-5 and SOT-23-5 packages, however the pinout is not the same in each case. I would like to associate the two generic footprints with the symbol and select the appropriate one upon placement in the schematic, but I don’t think it’s possible to have a schematic pin be, say footprint pin 1 in the SC70-5 but footprint pin 3 in the SOT-23-5.

To try and clarify, the footprint pinouts are as follows:

Pin Name No. SC70-5 No. SOT-23-5
IN+ 1 3
V- 2 2
IN- 3 4
OUT 4 1
V+ 5 5

I think this forces me to create two OPA172 symbols in KiCAD? Or to create a unique mutant mis-numbered footprint for use only with this component?

Two possibilities:
1: create two different parts in the symbol library. That’s the standard solution.
2: read this:KiCad 7 Alternate Schematic Symbols: How to Create Them but be aware that it only supports two variants of a symbol and should be used with care.

It will not fix your footprint problem, though. You’ll need to attach the right one as needed, it’s still one symbol.

I think you’ll have to create two symbols and make sure the right footprint is associated to each. It’s the same problem as for parts that are the same spec but in different packages, e.g. DIP-40 and PLCC-44, or DIP-28 and PLCC-32.

PS: Fixed typo in title so that the word will not be missed by searches.

Indeed. In KiCad, mapping of pin numbers in symbols is directly to the footprint pads with no intermediate translation table. The most common way is to create different symbols for the different pinouts. For an example of this, you can have a look at the ATMEGA328, which has several schematic symbols because of the different footprints. Even the number of pins varies a bit between the footprints.

Another option is to play a bit dirty in the footprints. It is possible to swap the footprint pad numbers in one of the footprints, to make it match the schematic symbol. Alternatively, you can also use IN+, V-, etc as pin “numbers” in the symbol, and then modify both footprints to use these numbers.

The use of the De Morgan technique is interesting. I had seen that in one of the menues and not investigated it. Being originally a digital electronics person, I knew the meaning, but had no idea it meant the same in this context : )

Yep - I should have checked some obvious components for examples - I had a look at some op-amps as that’s what was on my mind at the time, but by then it was getting late and I’d done a lot of looking through menus and the likes and I got lazy : o

Good to know pin numbers aren’t necessarily numeric. Unfortunately still not an ideal solution.

I think the best option in my case is probably to create unique mutant footprints for the parts that don’t have a 1:1 correlation, as it’s common for me to design something with “big” parts I can solder easily for a prototype before swapping out all the footprints for the tiniest variations of the components and re-routing when I need to squeeze everything into a production model.

If you want to go that way then:

  1. Start by a copy of a standard footprint.
  2. Put it in a personal library, (You have to do that anyway, because KiCad’s own libraries are read-only.
  3. Make sure the schematic also uses that same library.

This is pretty much the standard way KiCad works. When you start editing footprints in unexpected ways, I also suggest you give your footprints special names. For example add the IC type number it is modified for. This will firstly any designer after you there is something unusual, and it also excludes any possibility of the footprint accidentally getting swapped by a default footprint.

Now I realize, it’s not terribly important. If the footprint accidentally gets swapped during some futur PCB revision, then DRC will loudly complain.

Thanks for the advice - it is much appreciated. I have also tracked down a 5 y.o. feature request (#2282) looking to deal with these sorts of cases, which has me considering a dive into the source code! But who knows if I’ll find time…