Closed SchrodingersGat closed 7 years ago
Sounds good, can't we put that in one short sentence?
Whenever possible, power pins are placed at the top, ground at the bottom, inputs on the left and outputs on the right.
Maybe it is clearer using sub-bullets?
I would lean towards bullets for clarity, especially as many users are English as a second language. Thoughts?
Then we better split most rules into bullets!
I can tackle this.
I agree on bullets.
There are negative and positive power pins. Ground is power pin too. I'd mention control/controlled pins too. Wee can add examples...
Wherever possible, pins should be arranged by function:
Hi!
I only see obne (special case) problem with these rules: What happens if you try to design a 7905 or comparable neg. regulator ... is the GND pin now at the bottom or at the top?
Otherwise: That would be a great addition!
Best, JAN
Great suggestions @diggit
I have mocked up some changes here: https://github.com/SchrodingersGat/kicad-library/wiki/KLC
Let me know what you think - @CarlPoirier if you're happy with this I'll transfer it to the KiCad page
@jkriege2 regarding the exception above - I have added a section in the text specifically relating to exceptions. There are always going to be exceptions to every rule!
I have also added a draft for 3.10
as requested in https://github.com/KiCad/kicad-library/issues/884
As agreed in #869, 3.2 2. bullet should be improved. There were ideas, but not exact formulation. maybe sth like this...
@diggit I have updated 3.2.2 as requested
It's great. In 4.4 I'd put the examples on the same line such as in 3.10.4. Rule 3.10 is nice as well. Once it goes live, don't forget to put your name at the top besides mine!
@CarlPoirier @diggit @jkriege2 let me know if there is anything else that needs changing, otherwise I'll transfer it across :)
Hi!
just some comments:
(1.27mm)
after 50mil for consistency with the first lineFor SMT components (mostly SMD pads) the attributes field is set to
Normal+Insert
, for THT components toNormal
and for any other components (e.g. edge connectors, logos, ...) toVirtual
.
Best, JAN
BTW. In the KLC Wiki page https://github.com/KiCad/kicad-library/wiki/Kicad-Library-Convention you could include some graphical examples of some rules for better understanding.
@keruseykaryu I also had that idea ... but no time so far to prepare some ... I can see if I find some images in the next days/weeks and we discuss them as a new issue? Then we can go forward with the changes above and add the images in a second discussion. OK?
Best, JAN
Please note that I updated my post above (reformulated new rule)! JAN
@keruseykaryu yes this is a fantastic idea - visual examples would be very helpful.
@jkriege2 good suggestions:
(1.27mm
) to 3.2Symbol visual style
) I have also spotted an inconsistency in the rules.
3.5 -> Refdes must be placed on Silkscreen layer, size=1.0mm
10.5 -> Refdes must be placed on the Fabrication layer, size = 2.0mm
This is one that has been the cause of much debate, but we must have the refdes on the silkscreen layer, surely? How should we resolve this?
I would suggest removing rules 10.4 and 10.5 as they are covered in 3.5 and 3.6. Further, these are not really "properties" of the footprint more than graphical elements.
Hi!
%R
on F.Fab).3.11 Symbols must have all pins of the package explicitly available. If they are not connected, they should be marked as such, named NC and set to be invisible. This is required to allow for the use of KiCAD's pin count filter.
3.12 Exposed pads of a device must have their own pin, typically number max. pintcount+1, e.g. pin 9 for a SOIC-8 with exposed pad. The name of this pin is often set to PAD or or a name indicating its function, e.g. GND/PAD
Best, JAN
Hi!
I'm also opening an issue to discuss possible images: https://github.com/KiCad/kicad-library/issues/891 If you like some, just copy them from there into your draft!
Best, JAN
Just to clarify:
Both the value and refdes need to be on the fabrication layer. This has been discussed on the mailing list and in the forum thread I linked in the first email. Rule 10.5 and right, 3.5 should have been removed.
Carl
Then to comply with the current usage in the lib, I would suggest this altered rule:
10.5 Reference designator has a height of 1.0mm is placed on both the fabrication and the silkscreen layer. With current KiCAD versions, this can be achieved by placing the default REFDES label on fabrication layer and a user-defined text label with the contents
%R
on the silkscreen layer.
What do you think? I formated the changes in a bold font and the instructions in an italic font.
best, JAN
Hi!
due to a comment on a bug in my images´, I started pondering a bit with the counter-clockwise-rule for pins ... and I'm not so sure about it. I would see the following example as a logical pin-ordering (and would expect it like that): Here all IO-ports are on the right and are ordered top-to-bottom, the way we read (top-to-bottom), which seems to me to be the direction to expect.
In this example, there is also a clock-wise ordering, which is a bit strange as it is different from how we read (it is top-right -> bottom-right -> bottom-left -> top-left): Here maybe having PA/PB/PC on the left (to->bottom) and the rest on the right (bttom->top) might be better, which would conform to the CCW-rule.
In all I would maybe suggest to alter that rule:
Ports should be ordered as follows:
- when all ports are on the right, they should be ordered top-to-bottom,
- if they are distributed over more edges, they should be ordered in a counter-clockwise-fashion, starting at the tope-left.
What do you think on that topic?
best, JAN
What about simplifying:
Port pins should be ordered from top to bottom
I have now expanded "General Rules for Footprints" and added "Rules for SMD Footprints" and "Rules for THT footprints".
Additionally, there were previously three rule groups governing naming of footprints - these have been consolidated into a single group. There are no auto-checks for these groups currently.
Also, I find rule 7.2 very hard to parse:
Pad 1 is on the left first, then at the top, except at the top for PLCC (IPC-7351).
@CarlPoirier as you are the one who wrote this, is there a better way of expressing this?
I can't remember a case where placing the pad 1 on the left would not result in it being at the top at the same time. So I'd say:
Pad 1 should be placed at the top left. If impossible, it should be placed closest to the top (IPC-7351).
I have made a further update to https://github.com/SchrodingersGat/kicad-library/wiki/KLC addressing these latest issues
@jkriege2 I really like your idea above. It makes sense to me. 2 quick notes:
Hi1
I would also suggest an adition to rules 6.x:
6.8 For some general classes of components, specific prefixes should be used, when generating new footprints as this way the fotprints for that class of component can easily be filtered. Generally the name for a new footprint should be oriented on the existing footprints for that class of component. Currently these are used:
C_
for non-polarized capacitorsCP_
for polarized capacitors (e.g. elcos, tantal caps, ...)Crystal_
for crystalsD_
for diodesFiducial_
for fiducialsFilter_
for filtersL_
for inductorsLabel_
for LabelsLED_
for LEDsMountingHole_
for mounting holesOscillator_
for (crystal) oscillatorsPotentiometer_
for potentiometersR_
for resistorsRelay_
for relaisResonator_
for resonatorsRV_
for varistorsSW_
for switchesTransformer_
for transformersVALVE-
for valves
What do you think? JAN
Hi!
we should really move forward on this! I just went through it again. In addition to my comments above, I spotted these:
SOT-23
, which will then never match):
Filters should match as much dimension information as possible to be as specific as possible, if that is available in the appropriate footprint names. E.g.
Use the IEC-style for electric/electronic symbols for this library.
Capacitor
to C_
?_ThermalPad
in combination with 1EP
for bottom pads with thermal vias."best, JAN
Hi!
one more extension request: Should we reformulate 10.2 from
Doc property contains a full description of footprint.
to
Footprint meta-data is filled in as appropriate.
- Documentation field contains comma-separated device information. You may add a URL to an appropriate datasheet here.
- Keywords field contains space-separated keyword values
Best, JAN
as discussed elsewhere we should also have
1.8 Library- and footprint-files use UNIX-sytle line-endings (i.e.
\n
= LF = 0x0A).
Best, JAN
I just played around with that last rule (and write check-code to check and fix it: https://github.com/KiCad/kicad-library-utils/pull/77). It turns out that KiCAD footprint editor on Windows reverts the line-endings to Widnows! I submitted a bugreport asking for a change of that behaviour: https://bugs.launchpad.net/kicad/+bug/1663990
Best, JAN
Jan - updates here - https://github.com/SchrodingersGat/kicad-library/wiki/KLC
I am hoping to get this completed and include your images very soon.
Thanks for filing the bug report, that would be very handy.
Do you know if the symbol editor (eeschema) has the same behaviour on windows?
Hi!
nice work!
I just saw one thing: Aren't we missing now how to calculate the courtyard clearance in KLC 7.5 (i.e. from pad-outline or/and package outline)?
JAN
Not sure if this issue is the right place to post the following: I've written a piece of python code to identify pins on the same coordinate. Currently I've put it into KLC rule3_1.py, but maybe a new rule would be better? Would you be interested in a PR?
Hi!
yes, that might help in some cases ... please submit a PR, so we can discuss this issue/suggestion there!
Best & thanks, JAN
@jkriege2:
please submit a PR, so we can discuss this issue/suggestion there!
PR submitted: https://github.com/KiCad/kicad-library-utils/pull/85
@SchrodingersGat : I think we should clarify in 3.1 that these rules do not apply to devices such as diodes, resistors, ... any idea how we can make that into a concise statement?
as discussed elsewhere we should also have
1.8 Library- and footprint-files use UNIX-sytle line-endings (i.e. \n = LF = 0x0A).
I think you need to drop that rule, as the code change to KiCad is not likely to happen.
Given that this new KLC is a major change since the previous one (basically a rewrite), and also many of the rules have been renumbered, it should be versioned 2.0.
@bobc thanks, 1.8 has been removed
Can we have the images inlined again? I liked that muhc more ... because the links are really non-obvious and somehow get lost in the text ...
JAN
Hi all,
I think that KLC 2.0 is ready to go. Can you please have a read through to see if I have missed anything?
There is an update to the KLC scripts waiting too - https://github.com/KiCad/kicad-library-utils/pull/81
Thanks to @jkriege2 for the example images, they're great :)
All in all i really like the new klc. It is really detailed and i think there is a lot less ambiguity.
I have a question about the rule for courtyard clearance
Clearance is measured from package, pads, and silkscreen
Should the courtyard distance really be measured from silkscreen not from component body? The Silkscreen is by definition outside of the body outline. (Rule: Silkscreen is completely visible after board assembly)
About the silkscreen: In my pull request https://github.com/KiCad/Connectors_Phoenix.pretty/pull/44 You stated the following:
I agree that detail for connectors like this should be on Silk not Fab. Perhaps this needs to be clearly specified in KLC.
Did you change your mind or did you forget about that? I think details on silk would violate the current rule: "Silkscreen is completely visible after board assembly" Maybe make an "exception" similar to: Silkscreen underneath the footprint is allowed if it makes hand populating the component easier. Or maybe change the first rule to something similar to: Component outline, pin 1 mark and reference on Silkscreen are completely visible after board assembly.
Hmmm good point I did forget about that @poeschlr
Perhaps Silkscreen is allowed for hand-loading of THT components
. The rule is really to prevent issues with SMT design.
The Clearance is measured from...
description is the one I'm having most trouble with....
About courtyard: The question is IMHO what the courtyard is used for: I presume it's for e.g. an autoplace or DRC to prevent components from overlapping. I would say: Measure from pads and outline, because usually teh Silkscreen will be inside, i.e. non-overlapping, only in some cases it may be outside and then it's more a problem of look, not function. Also if we measure from silkscreen we would also have to include the freely movable REFDES, which makes all courtyards ver large.
Abozt the KLC-images: Why are the now there only as links? I think those are easily overlooked ...
JAN
I'm happy to measure from pads and outline - is this what the checker does currently?
Re: Images - I thought it looked messy with inline images, we can make the link text larger to make it more visible?
Nominally we suggest PWR pins are located at the top of a symbol, and GND pins at the bottom. However this is not stated in the KLC rules.
I suggest that rule 3.5 be updated as follows:
Old Rule 3.5
Whenever possible, inputs are on the left and outputs are on the right.
New Rule 3.5