Default manufacturer's part number field in KiCad libraries


#21

I just did some digging and found the documents outlining the new format.

In those you can find for instance:


# A 74LS00 is as simple as this.
(part "74LS00" inherits "7400/rev1" (value "74LS00"))

# This is a so called heavy weight part definition of a Texas Instruments
# part number SN74HCT00NSR.
(part "SN74HCT00NSR" inherits "7400/rev1"
  (value "SN74HCT00NSR")
  (footprint "14-SOP")
  (datasheet "http://focus.ti.com/general/docs/lit/getliterature.tsp?genericPartNumber=sn74hct00&fileType=pdf")
  (keywords "LOGIC" "NAND")
  (property "Description" "IC GATE POS-NAND QD 2IN 14-SOP")
  (property "Manufacturer" "Texas Instruments")
  (property "Vendor" "Digikey")
  (property "Vendor Part Number" "SN74HCT00NSR-ND")
)

I don’t see why there shouldn’t be a standard for MPN in there although part actually seems to be it? Would be good to get some clarity on that.

To me it would make sense if a property field was added that allowed MPN Manufacturer combinations:

(property "MPNs" "Atmel:ATmega32U4-AU" "Atmel:ATmega32U4RC-AU") 

or even better really

(property "MPNs" (mpn "Atmel" "ATmega32U4-AU") (mpn "Atmel" "ATmega32U4RC-AU"))

#22

What you propose is already doable. Add the field to you components then go forth and populate. But I think you would soon abandon the idea as it’s simply not practical. It’s only even feasible for a handful of ICs, those with only one manufacturer.

For instance, my current board has 29 ICs in total but only 7 different types of IC and most of these have only one manufacturer. 7 is a pretty manageable number. However, my board also has 121 capacitors, 194 resistors, 26 inductors, … Some of the capacitors can be X7R but many need to be C0G/NP0, some resistors can be 1% but many need to be 0.1%, and most of the inductors have various power handling requirements. As you can see most of my time is spent managing the discrete passives and not the ICs. Your proposal would be of little benefit in this case.

If you were designing a board with mostly ICs such as CPU, RAM, Flash, and very few passives then it might make more sense. But honestly how much time do you think it would actually save you?


#23

I am already doing in a way I like for my own projects. I would simply like a convention that will make various tools like KiCost, my extension, whatever BOM tool de-jour to work together better.

7 components is 7 things you don’t have to do. Makes sense to me. In the future everything will just be ICs anyway :laughing:.

We already have datasheets linked in and a manufacturer field. Not sure why people are so resistant to this on here. Does nobody think this is a little step towards making things easier? I would like to stop arguing over the “why” and get more into the “how”.


#24

But I would anyway because it would be silly to blindly trust the data that someone else put in that field when I’m ordering parts for 100 boards.

Perhaps because they’ve been there, done that, have the T-shirt, to know it’s just not practical.


#25

Nobody is actually addressing the issue though: having even one or two parts defined and setting a convention is way better than having nothing. What it enables for the tooling like KiCost and 1clickBOM is valuable to us, who are writing these tools (if I can presume @devbisme thought it would be a good thing to make use of in KiCost).

I think the first step would be to enable lists and key: value type data in the property expression allowing multiple and precise MPNs per part. This could then be used by everyone no matter if these fields are added in the standard library.


#26

It would be nice to have some conventions for certain part attributes, like manufacturer’s part numbers, so tool builders would know where to look for things. If I build a library with a field called manf#, and somebody else builds a library with a field called ‘MPN’, then the tools have to be able to find part numbers in both fields. And the problem gets worse as more people make more libraries using different field names for the same things.

I’m not asking for atomic parts (whatever those are) or re-writes of libraries or anything else. But is there, or can there be, a list of field names and definitions of what they contain which library creators and tool builders can follow to minimize incompatibilities?


Kibom BOM generation plug-in with TSV, PDF and RTF support
#27

Currently we have a schematic symbol for a 7400 part and we can choose from a number of footprints that satisfy most (all?) variations of this part. To add the manufacturer’s part number to the schematic symbol in the library we now need a new symbol for each variation, 74F00, 74HC00, 74HCT00, 74AHCT00, 74LS00, 74ALS00, 74LVT00, 74LVC00, … you get the idea. Is that going to happen? Of course not. Nor is it feasible for any passives.

I think the fields and their names are the least of the problems associated with adding such information to libraries. The tools could always be made configurable and even accept more than one name for the same field. Then if people want to add this information to each schematic they create then the tool could make use of it. That approach is certainly more feasible and doable without expending any developers efforts.

Edit: We, as a community, could decide on some names for these fields if you feel that is at least a step forward. Then the tools could be adapted and people could at least put this info in their schematics.


#28

If KiCad can encourage a convention it will have much more impact than just deciding as a community. I will make a request for comment on the dev mailing list. If any other tool writers would like to see encouragement towards convention for an MPN field in KiCad please speak up (@opticalworm, @reinis, @SchrodingersGat, @John-Nagle, @crashbang_proto).


#29

The solution to this is to make the tools not proprietary from the get go and allow customization of the fields they need to look for - but I wouldn’t demand that of the people who write those tools to first and foremost solve their own problem and then allow others to use them as well.
But yeah, just modify the tool to be able to associate ‘manf#’ with ‘MPN’ or ‘partnumber’ or what-have-you-got and this problem goes completely away.
If there were more predefined fields I also wouldn’t have a problem with those, I just change my libs and the tools could do the same, but it wouldn’t help kasbah’s case, as the libs that come with KiCAD will not have those fields populated.

If one wants them populated he either has to do it the moment he places such a component in the schematic (simple boards, no problem, larger boards … meh) or run his own libs which then automatically become atomic if he pre-fills those fields to not have that work every time he places a component in the schematic.
And to go through all that trouble really only makes sense if you catch 99% of the devices, especially the stuff that comes in hundreds.

‘Atomic parts’ relates to having unique symbols defined with all information set up for each and every distinct device you can use on your board (datasheet, footprint, man#, house#).
This means, cvpcb is not needed anymore.

The big problem with that currently is the way Eeschema works and references symbols (parts)… a C with 100n in a schematic is usually the same value for either X7R 50V or X5R 16V and to find a symbol for it you have to put all that information in the library name, as otherwise the part is not retrievable from the libs.
But then that library descriptor is being used as value field, which is information overload in the schematic and it has to be trimmed down, and you loose all that additional information in the process.


#30

You would be amazed how often MPNs details change for the same part.

Different bulk packaging
Different final assembly and test location
Changes of ownership of the brand
Expressing regulations - recycling, ROHS etc
Manufacturers warehouse software change
Trying to look like someone elses part number for commercial reasons
Somebodies wild idea


#31

How exactly do you expect KiCad to “encourage” this? The only way it could is to have the fields added to the library. There is no point in expending the effort to do so unless you also populate those fields which, if you’ve been following along, you would know is not going to happen. In my opinion KiCad and the libraries should be completely ignorant of these fields. As has been pointed out time and again here the number of parts in the library quickly grows unwieldy when we start adding such information to the library. Never mind the names of all those parts. It also forces the user to decide on things like which manufacturer while drawing the schematic. And if for some reason, ie availability, the part changes then the schematic has to be edited to reflect this. KiCad users would quickly become extinct if this were the case.

KiCad already discourages things like this by not associating footprints with schematic symbols in the library.

A compromise has been suggested and I recommend you embrace it.


#32

Yes, they would have to be filled. For instance, if you take one resistor, set the value and mfpn field, and then copy paste it around. The resulting BOM will be better when you order components.

Just having it the field there empty will serve as a reminder to anyone using KiCAD. And will remove any doubts about which component is needed when sharing the project. It is basically the same argument as why we prefer to have an empty value field in our resistors and capacitors, it indicates that this needs to be filled.


#33

Exactly! Copy the resistor around change it’s value but forget to update the mpn and you end up with a messed up BOM.

But if you are really that bent on doing it go ahead, everything you need is there now.


#34

Well with proper support for this an error could be generated when a component is having different values, but the same MFPN.


#35

What if the values are the same but the power dissipation is different, or the tolerance, or the temperature coefficient, … and the MPN is the same? Things like MPN are simply not part of a schematic. The schematic describes the electrical properties of the circuit. It does not matter which footprint I use until I layout the PCB. It does not matter who I buy my resistors from until I place the order. I certainly don’t want to be bothered with those decisions while I’m designing the circuit. Nor do I want to edit my schematic every time an MPN changes, especially if it is a controlled document.


#36

That would generate an error as well in this case.

I do however agree that the MFPN does not have anything to do in the schematic normally. The concept of parts is in my opinion prefered. As it stands now the schematic symbol is the part.

It would still be the same as today wouldn’t it? We have the footprints defined in the schematic already since the symbol is the part. My prefered solution would to have the concept of “parts”. Where after the schematic is done. The part with the corresponding footprint is chosen, this would ofcourse change the MFPN and if applicable also the Spice simulation files, tolerances, prices and whatever else you feel like embedding into the part.


#37

That’s asking a lot.

I see it as a “symbol” that represents potentially thousands of parts.

I don’t define footprints in my schematic, they do end up there after using CvPcb to associate the footprint with the symbol. I prefer to do the association in CvPcb as it is far more convenient.

I’m not sure you understand the magnitude of the effort required to implement what you propose nevermind the ongoing maintenance that would be required.


#38

In the worst case, the library system would have to encompass the billions of available parts. Even if you back off and say the library must only reflect the several thousand parts you typically use, the task of creating and maintaining the library is daunting.

Dale


#39

Well that is just wrong as it stands now, since they also define everything in them. The spice model, The footprint, The datasheet. The symbols should be viewed as the part.

I am well aware of the magnitude. Therefore I would like to have the empty field of MFPN there by default in the libraries. Same way we have the empty field of value on everything. Im not even trying to say there should be a standard library of parts. I am just saying that for any meaningful BOM there must be a partnumber or unique identifer. Therefore the MFPN should be there by default.

Still the same as with footprints today. Schematic symbols are the parts. But except for a messed up BOM you would in that case get a messed up PCB.

I also prefer to do the association in CvPcb, for the most parts at least, mostly for resistors and such though, for microcontrollers and the like i prefer the symbol to contain the footprint already. And thats what i do in my own libraries.


#40

If you use CvPCB for footprint association, then the whole notion of a manufacturer or house part number in the symbol necessarily goes away. The manufacturer part number refers to a specific combination of symbol, footprint, tolerance and all sorts of other criteria. Change the footprint, you change the manufacturer part number, and that’s why CvPCB is unusable.

I completely understand the effort to create a library of fully-qualified (“atomic”) parts. Every employer I’ve worked for (been a few) has had a company-standard library. All parts have symbols, footprints, house part number, 3D model.

The first thing to understand is that you don’t need a million parts in the library. You only need the parts you use. This means you can start small, adding only the parts you need for the first design. For the next design, if you need new parts, you create them, you add them to the library, done. And before you add them to the library, you vet the symbols, you make sure you can buy the parts, you put them through your documentation and release system. Thus, maintenance of the library isn’t onerous.

Now, I am the first to admit that the hobbyist using Kicad for one design a year doesn’t need the overhead of an ERP system. And that’s why Kicad has the option to do CvPCB and why it doesn’t have an embedded part number field in the symbols and all of that.