← Back to team overview

kicad-lib-committers team mailing list archive

Remarks to KiCad Library Convention

 

Hello Carl.

     A. I just read the KiCad Library Convention at
https://github.com/KiCad/kicad-library/blob/master/KiCad_Library_Convention.txt

Thank you for your efforts.

Thinking about your paper, i have some suggestions.

> 1)
> General Rules
> -------------

> 2. Every acronym has all of its letters capitalized.

Maybe CamelCase would save some space. But Underscores would be nice to
separate different types of information in the name. More, a dash could
be used to seperate two following capital letters, where you cannot see
the separation by CamelCase. Also a dash could be used instead of a
decimal point.


> 5. When dimensions are used in part name, they are in millimeters and
> unit is not capitalized. Ex: "Cap_10x13mm_RM5"

What about fractions of a unit? See suggestion about a separating dash
above. I am very careful and would avoide more then one decimal point at
a filename. Yes, i am aware, that it is allowed at windows and Linux,
but i am just suspiciously.
Example: "Capacitor_NonPolarised_5x10-5mm_RM5.kicad_mod"

> 6. Filename is the same as the part name.

Can be done only for footprints with S-expressions.

7. Naming should be done from the general to the special. Like
"Transistor_TO-220_HorizontalInLine_FromSolderSide.kicad_mod" or
"Transistor_TO-220_HorizontalInLine_Standard.kicad_mod" or
"Transistor_TO-220_Vertical_Standard.kicad_mod" as an example.

But this shows questions about the structure of a library....what is
more general depends a little from what you expects.

If you go straight on from general to special, you could start with
"Transistor", than go to the type of housing (SMD or THT) or direct to a
housing "TO-220-3" or "SOT-23" (here i would suggest to avoid the first
dash, and only use the dash to separate more details of the housing like
"SOT23-3" or "SOT23-5". Then you go to further special details like
"reverse", "FromSolderSide" and "WaveSoldering", "ReflowSoldering" and
"HandSoldering". At this Point, you should also think about special
footprints for "Dead Bug stile", where a footprint is only a spaceholder
and mark sign for the device glued top over to the board and then
contacted by wires, for which you have now to place pads.

But there is also an other abroach to name footprints. Starting with the
housing name. Like "TO220-2" for diodes or "TO220-3" for douple diodes
or transistors, triacs ec. More special differences are the same like
above.

> Symbols
> -------

> 1. Using a 100mil grid, pin ends and origin must lie on grid nodes 
> (IEC-60617).

Sadly, i do not own all parts of the IEC-60617. So please could you be
so nice and tell me, where this is written in the specification?

And origins should be at the symmetrical center of the symbol. This is,
because in this case, the symbols will not jump around wild, if you turn
them (around the origin). It is more easily to place them.
Placing the origin to the symmetrical center of a point symmetric symbol
(like an ordinary resistor) is quite easy, but if you have a symbol,
which is only symmetrical, the origin should lie upon this symmetrical
axis, but its exact position is not so easy to determine. So i suggest
for practical purposes, place the origin upon the symmetrical axis
somewhere near where you would expect the barycentre, if this symbol
where a real objekt.

> 3. Black-box components group pins logically, for example by function
> set, and ports in counter-clockwise position.
> 4. Whenever possible, inputs are on the left and outputs are on the 
> right.

There is a need for different types of blackboxes. sometimes, you need a
black box in detached representation with hidden Voltage inputs,
sumetimes you need a detached representation with extra Voltage input
detachment, and sometimes you need a all in one representation with no
hidded pins.
What name extension do you suggest for this?

Next: If i create a array with and without detached representation, like
a resistor array, how should this be named?
My example would be the resistor arrays from "SymbolsSimilarEN60617
+oldDIN617-RevE8.lib", which are named like
"RESISTOR_9xArray_Bussed_SIL_DetachedPresentation_RevA_Date23Aug2012"
"RESISTOR_9xArray_Bussed_SIL_RevE_Date15jun2010"
"RESISTOR_9xArray_Isolated_SIL_DetachedPresentation_RevA_Date23Aug2012"
"RESISTOR_9xArray_Isolated_SIL_RevE_Date15jun2010"


At some librarys, the intended meaning of Value and reference seems to
be mixed up. (Maybe, this is the case if the libraries are exported from
eagle with an ulp? Here are often guys with this problem)

Perhaps it would be usefull to write it explicite down:
The "Reference Text field" is for the numbering reference. It should be
prefilled with the abbrevitation for the symbol. As an Example "R" for a
Resistor, which get numbered like "R1, R2...R154" and so on.

The "Value Text field" is for the Value of the component. Like "1k5" for
1500 Ohm or "1k5/0,5W/RM10" for a 1500 Ohm, 0,5 Watt resistor for Grid
RM10. It should be prefilled with the name of the symbol, like
"RESISTOR_RevE_Date15jun2010" for symbols and with the fottprint name
for the footprints.





> Footprint Library Names (.pretty repositories)
> ----------------------------------------------

> 1. Part type (resistor, cap, etc), must be in plural form.
> 2. Package type (SOIC, SMD, etc).

Se my remarks at general about going from general to special....

> 3. Manufacturer.

If it is a generic footprint, the manufacturer should be omitted. But if
it is a very special footprint, only for one manufacturer, it should be
NOT omitted. If there is a manufacturer known for his specific housings,
there should be a library for especially this manufacturer, an for this
special case, the name should start with the manufacturer.

> 4. Part number.

You think about the reference? Because official a transistor is
referenced wit "Q..." but for some historical reasons, you will always
find people. who prefere to reference transistors with "V..." or
"T....". Why not using the offical way (if it exists), and whom like it
an another way, could change the reference by its own.

> Footprints
> ----------

> 1. Follows datasheet recommendation unless intentional variation, for
> example longer pads for hand soldering.

Sometimes it might be useful, to take the datasheets of different
manufacturers, look for the Values and then make a footprints usinf the
mean values of them.

> 2. Pad 1 must be on the left first, then at the top, except at the top
> for PLCC (IPC-7351).

Pad numbering should follow the numbering of the Datasheed, hopefully
this fits to the symbol. If there exists a problem with inverted
Transistors, as an example, just create a fitting fotprints
"foo_bar_inverted.kicad_mod".

> 3. For through-hole components, origin is set on pad 1.
> 4. For surface-mount devices, origin is placed in the middle with 
> respect to device lead ends (IPC-7351).

For footprints, it is even more crucial to set the origin to the
symmetrical center, like it is for symbols. They will not only jump
paround at turning, they also would produce pick and place files for smd
with a nasty offset. I think, this will fit IPC-7351, despite i do not
own an exemplar for looking.

> Names for footprints of Surface-Mount Devices (SMD)
> ---------------------------------------------------

> 1. Specific package feature first, not separated by anything.
> 2. Package name, numbers separated from letters using hyphen. Ex:
>"SOT-89"

A made remarks about this above.

> 3. Pin number is expanded with '+' sign for extra pads to package, 
> with acronym for type of pad. Ex: Exposed pad under QFP: "QFP-48+1EP".

This is dangerous, because it seems always dangerous to use special
characters (with the exeption of -. and _ at file or folder names, even
if they are allowed in the filesystem itsself and the actual program.
An example of such an odd behavier can you see for an ampersand:
https://bugs.launchpad.net/kicad/+bug/1171160
https://groups.yahoo.com/neo/groups/kicad-users/conversations/topics/14952
So i would suggest to add an CamelCase "And". If there is a problem to
separate from leading capital letters, so use a dash "-" .

Example: "QFP-48And1EP" or "FOOBAR-24A-And1EP"

> 4. Variation of package, separated by another hyphen. Ex: "SOT-23-5"
> 5. If it's a manufacturer-specific package, name can be appended, >
separated by an underscore.

Keep in mind, that it will be costly in any case to search for an
offical name, if you have only a manufacturer spezific name.

> 6. Any modification to the original footprint, indicated by appending
> the reason. Ex: longer pads are used to facilitate hand soldering of a
> QFN component: "QFN-52_HandSoldering"

Of course, but where will you append the reason exact. Not in the name,
i think, i think more in a commit?

With best regards: Bernd Wiebus alias dl1eic




Follow ups