kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #42105
Re: [RFC] Symbols and Pin mapping in v6 - Proposal
-
To:
"kicad-developers@xxxxxxxxxxxxxxxxxxx" <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Michael Platzer <michael.platzer@xxxxxxxxxxx>
-
Date:
Mon, 16 Sep 2019 12:52:37 +0000
-
Accept-language:
de-AT, en-US
-
Arc-authentication-results:
i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
-
Arc-message-signature:
i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Q06KQ8s4TjJ/auJj/YDffI7JgXSScEvQ20l7CfNJFPM=; b=CPHtY9tvT06rDPQnaafWbc1WzDbNh8UEnFg+bqhoeoSvNYEihcnDJBtz+ccBx6RkzJRh2RLmywe6dx20XM/CbXT5Q1IxTjzo5QiqGlKi14fQ/IEiQB9kdZp5FNJX2gm0K4Rq9HV8SzalJexHfeGK+132VTk3d++2yoLza8r4B/D3lCQ+N7fu85T/5mAwKQ6yYJkUM/SRi3tnAopIyjI0R2COjirFeRhN6DNYfkPEQcgWRNNl0hAlW8aOzrRneyrq6iCmnmWuV0dFpsuKAxDyMtpehAPSjoA2eMO/ChM+VydOlQ+PJsSBZ7npMcFfhyd4ChpzL3gmgnfSWiiMXxV2dw==
-
Arc-seal:
i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PX8IHibwj/5eg0q0YAZ68adz7I9r8nX7qLQ82uArLLzaTqwNMDe/cR8Qhh7C4M3k7bXuKM4yh9yRbxxuwCspqLbXKIm4T7UG3Ca8G8B2a5p5UPjmCtPeQG+QNjTNdphnucstCe8XuOIOMsZejSqhD9wvdIWy/Vx66/R3S36EHVYQY7pgw+w6uY/blKzGAv3/3iN8CJksiVMYbR3616/IdmMRMv93+msIAtk4Fw3b3q6Dx1B5Nh9YGdYzE5DoOk+O+4pdokY9Y7bEzsMqFwzxZtWlYAfw7GNjEZG5xgzZ2Mwqb3kVQqdKiLSKi2Jvr8iIEqvwlFudxc8rxaCwxEzMaQ==
-
In-reply-to:
<16d23c1e39b.1110dc0dc923396.3461254708801812924@zoidlabs.com>
-
Thread-index:
AQHVbI2dPNDIWsB3dEOI7T7VQRO30w==
-
Thread-topic:
[RFC] Symbols and Pin mapping in v6 - Proposal
Hello all,
I saw this discussion and joined this mailing list to share how I
currently deal with generic (group of parts, e.g. n-channel MOSFET) vs
atomic components (a specific part with specific pin mapping).
I created a schematic symbols library with symbols for components which
come in various different packages, such as transistors or op-amps. All
of these are saved in the library as generic symbols, i.e. their pins
have names, but no numbers assigned. Often when designing a circuit I do
not yet have a specific part in mind, so I just drop in one of these
generic symbols for the moment. For example, I know that I need a MOSFET
in some place, but I have not decided which one to use yet and would
like to move on with the schematic before that.
Later, when I have decided which part I would like to use, I create a
new field in the symbol properties, where I enter the pin mapping for
this part (e.g. for a MOSFET the assignment would be something like "G>1
S>2 D>3"). I wrote a Python script which then creates a new symbol
library in the project's directory and in this library it places a copy
of the generic symbol with the pin numbers corresponding to the mapping
specified in the symbol properties. A description of the pin mapping is
appended to the name of the symbol, so the pin-assigned version of our
MOSFET would be called something like "MOSFET#G_1_S_2_D_3". So in the
end, the library created by the script contains multiple copies of the
generic symbol, one for each pin configuration found in the schematic,
which are atomic versions of the generic symbol in the first library.
The script also changes the library references of the symbols in the
schematic to the corresponding atomic version in the new library.
An additional advantage of this setup is that, if later on I decide that
I want to replace one part with another with a different pin mapping, I
do not need to replace the symbol in the schematic. Instead, I simply
change the pin assignment in the symbol properties and rerun the script,
which generates an atomic version for the new pin assignment and changes
the library reference of the part in the schematic accordingly.
The script uses the KiCad library utils (
https://github.com/KiCad/kicad-library-utils/ ) to read the schematic
and symbol libraries. In case someone is interested I am happy to share
the script.
Having the pin mappings in the symbol properties avoids to maintain a
separate file with pin assignments and using a script which creates
atomic versions of generic parts avoids the need to maintain a library
with hundreds of different parts which are very similar and mainly
differ in their pin mappings. Maybe such a functionality could be
directly integrated into KiCad in the future, though I have to admit
that I do not know what the current plans for version 6 are.
Best,
Michael
References