← Back to team overview

kicad-lib-committers team mailing list archive

Re: Remarks to KiCad Library Convention

 

On Tue, May 13, 2014 at 02:23:28PM +0200, Bernd Wiebus wrote:
> 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.

Better to use the minus-dash, especially if you want to use the
underscore for subscripts. I actually use all caps, but if the library
code is sane, everything should work.

> 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"

Stick with the dot. Since Win95 there is no trouble using it inside the
name. Comma works too, just decide (AFAIK the period is the most used
around).

> > 6. Filename is the same as the part name.
> 
> Can be done only for footprints with S-expressions.

Where is the problem? All the new footprints are sexp based and you can
regenerate them from the collection boead without issues.

> 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.

Need a naming convention for that. FromSolderSide doesn't exist, BTW.
Everything must be drawn from component side looking down. Any other way
to do it would be foolish. Mostly needed for hor/ver mounting *and* for
pin variants (123 vs EBC vs GSD)

> But this shows questions about the structure of a library....what is
> more general depends a little from what you expects.
> 
> "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.

Wave/THT are process variants, should kept in *different* libraries with
the same name. Same for packages designed for 8mil process vs designed
for smaller processed (yes, they change depending on the process limits,
too:D)

> 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.

Right:D 123, EBC, GSD, AnK, A1KA2, and so on...

> > 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?

Part 1, section 1.8. I have the italian edition so I don't know the
original title. It contains the rules for cad systems, I wrote about
that a wole ago.

> 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.

Don't sweat too much over that. "More or less in the middle" for
schematic is a good enough specification. PCB modules OTOH have rules,
if you want to follow them (already wrote about these, too)

> 3. Black-box components group pins logically, for example by function
> set, and ports in counter-clockwise position.

Unless you follow the 60617-12/-13, or the manufacturer drawing or the
'logical' way to use the component. Case study: a 232 transceiver would
have the logic ports on one side, the 232 ports on the other, and the
charge pump pins already spaced for neatly attaching the capacitors.

Other components would benefit from the 'demorgan' option: opamps with
+ and - swapped to keep the power supplies in order (V+ on top, V- on
bottom), for example. Other ones would benefit from *multiple* pin
positioning. How many typical configuration does a 555 have ?:P

Another policy decision: power supplies. Some people use them on the 'A'
component, some other use a locked part just for that, to do a sheet
with supplies and bypass banks. Really no standard here.

Hidden power pins: IMHO worth absolutely *nothing*, just don't use them
:D reason: more often than not (except on doing a pure logic board)
there are many supply rails. On pure logic board too, often you need
a ferrite/inductor to filter the supply so you need to pull out the
supply anyway. And having the pin gives a way to show what bypass cap
goes were.

> 4. Whenever possible, inputs are on the left and outputs are on the 
> right.

As said in -12/-13 and common occidental flow charts.

> 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?

I'd only make the most generic symbol. Combinatorial explosion will hit
you otherwise.

> Next: If i create a array with and without detached representation, like
> a resistor array, how should this be named?

I call them 'packs' :D

> 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 correct term is 'designator letters' by the way. Also decide what
designator table you want to follow, the IEC one or the IEEE/ANSI one.
Many symbols are the same (like R for resistors), other varies: IEEE
uses Q for transistors, IEC has V, french and italian people often use TR. 

> 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

What do you mean 'grid RM10'? Remember that designators and values go
into the BOM, too. I'd use "1K5/0W5" for that (but manually typed, it
makes no sense to type the *whole* E192 series (given that some people
only use E12 or E96...)

> 
> 
> 
> 
> > 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.

Agree with that. I use either the product series (like MODU) or the
manufacturer (TE) with the product number.

> "T....". Why not using the offical way (if it exists), and whom like it
> an another way, could change the reference by its own.

Read above. There are at least two official designator tables, add to it
the IPC one (never seen it in use) and the regional one.

> > 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.

Troublesome thing here: I'd say follow the IPC calculated pattern from
the JEDEC sizes for standard packages. A SO-8 suggested by TI could be
bad for soldering a SO-8 from another manufacturer. So the SO-8 package
should be drawn from the MS-12 (IIRC) sizes and then computed using the
IPC rules on the target technology.

Of course special packages (like the flat IR mosfets) have to follow the
manufacturer pattern.

> 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".

I put as a suffix the pin ordering (in relation to the standard
ordering), so while usually you use a TO92-EBC a swapped part could be
TO92-CBE. In fact TO92 transistor existed in all six permutation, some
time ago :P

> 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.

Yes, IPC7351B has a rule for the origin. See previous posts.

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

I'd keep these technology variants in different libs.

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References