Generating new connector / header lib for EEschem in Python

One of the small irritations I had ( <- Past tence : ) was that the default connector symbols had inverting pins. I have never seen a connector ( = mechanical device) which inverts signals.

My workaround was to make some schematic symbols with square pins by hand, but only for the connectors with the pin counts I needed, but that gets boring easily.
So a month ago I decided to play a bit with Python and give it a shot to write a script to generate symbols for single and double row connectors.
The schematic symbols look like this:

I will also include the the script which generated the lib here. It is my firsy python program, so it’s a bit sloppy and I’m also not much good with github.
I’m hoping somebody likes it and includes the script and / or library in KiCad.
Or even better: Replace the strange inverting pin connectors with this lib.

Connectors_Square.py (6.0 KB)

Could you share your python script? I would like to generate dual row symbols with different pin ordering (See this github issue)


I’m a bit confused about your statement about inverted pins used in the official lib for connectors. (I assume a circle on the pin?)
This is the conn symbol shiped with kicad 4.0.0 (and newer stable releases. I checked the tags 4.0.0, 4.0.2 and the most recent 4.0.6/4.07 version as well as the current HEAD of the github repo)

The connectors which offended my eye are the “sil” range in:
/usr/share/kicad/library/conn.lib
As you can see in the part library editor they have “graphical style” “inverted”.

The CON_xxXxx range looks a bit like the old ISA slots in PC’s but I have to admit that the difference is not very important.
Playing with Python was fun though : )

Edit: Addition:
The inverted pins are also used on the “DIL” and “HE10” range of symbols.

Read your post while editing, also found the “supp20”.
I already attached my python script to the first post.

2 Likes

Ok the sil/dil connectors. (Why do they even exist?) They have the same pin numbers as the conn_RRxPP connectors so you could have used them.

could you share your script it would help me to supply more pin orderings for the official lib.

Bump?
(You probably don’t get notified after an edit)
The “supp20” does not have the inverted pins, but it does have the very long leads which “waste” space on

I think those and SIL are all legacy symbols mostly obsoleted by the new CONN_rrXcc… symbols, but…

The DIL etc symbols have “DIP” pin ordering instead of typical “alternate” connector ordering, but the actual order is defined by the footprint so maybe a bit irrelevant. I guess it is useful to have the symbol pin ordering match the physical connector. Someone might use DIP for a generic DIP socket (e.g. ZIF).

The DILxx symbols mix two types of pin ordering (what I call DIP and a third type I call “zip-v” ordering used by some Molex connectors). The SIL and HE I think are entirely superfluous.

I think for consistency we could have 3 groups of generic connectors: CONN, DIP, and whatever we call the third type.

Oh, there is also the 4th type exemplified by C64AB.

2 Likes

Well as soon as i find time, i will play around with the python script provided by @paulvdh and clean up the connectors lib. It is an even worse mess than i noticed when i originally created my issue over at github.

The topic moves to the top of the list. (I disabled email notifications anyway. I visit quite regularly.)

1 Like