I am thinking of raising this as an issue. Before I do that I would like some feedback.
The following is a small section of the XML file for a schematic:
<comp ref="TP4">
<value>TestPoint_SMD_2.0mm</value>
<footprint>TestPoint:TestPoint_Pad_D2.0mm</footprint>
<libsource lib="Connector" part="TestPoint_SMD_2.0mm" description="test point"/>
...
</comp>
<comp ref="U1">
<value>MAX17632AATE+</value>
<footprint>Package_DFN_QFN:TQFN-16-1EP_3x3mm_P0.5mm_EP1.23x1.23mm_ThermalVias</footprint>
<datasheet>https://datasheets.maximintegrated.com/en/ds/MAX17632.pdf</datasheet>
<libsource lib="Regulator_Switching" part="MAX17632AATE+" description="4.5V to 36V, 2A, High-Efficiency, Synchronous Step-Down DC-DC Converter"/>
...
</comp>
<comp ref="C8">
<value>0.1 uF</value>
<footprint>Capacitor_SMD:C_0402_1005Metric</footprint>
<libsource lib="Device" part="C" description="Unpolarized capacitor"/>
...
</comp>
I have removed a few lines that are not relevant to this discussion. This is indicated by "..."
.
The listing shows three types of components:
- A PCB test point fabricated purely by etching the board (not a real part you purchase)
- An integrated circuit (MAX17632AATE+)
- A capacitor (C8)
The question is: What part number do I order?
Well, the test point should not be ordered. This is easy to manage in the schematic by turning off inclusion in the BOM. No need to discuss ordering this part.
In the real world the integrated circuit does not have a “value”. The capacitor does. However, they are both identified by the <value>
field. There is no place for a real part number in either part. The capacitor consumes the <value>
appropriately. If I wanted to have an orderable part number I would have to do one of two things:
- Add a custom
part_number
field to every component - Create a new library where every single part is named using the orderable part number
This is where I think there’s a semantic problem in KiCad. The <value>
field is being used for <part_number>
. Value does not mean part number and it confuses and complicates things when dealing with the BOM.
This would be no different if we also decided to encode no-place into the value field by appending something like “NP” to the value rather than having a dedicated --and semantically correct-- field, as seen in the schematic file source code:
(symbol (lib_id "Connector:TestPoint_SMD_2.0mm") (at 93.98 104.14 0) (unit 1)
(in_bom yes) (on_board yes)
Here in_bom
clearly conveys the semantics and does not misuse the value field.
In short, I think KiCad needs a semantically correct part number field. This is, and perhaps a GUID could be used to link to a future database-driven approach to libraries.