echo "EESchema-LIBRARY Version 2.3" > Capacitors_SMD.lib; echo "EESchema-DOCLIB Version 2.0" > Capacitors_SMD.dcm; for i in $(cat Capacitors_SMD.csv); do IFS='; ' read -r -a array <<< "$i"; cat ${array[2]}_template.lib | tail -n +3 | head -n -2 | sed -e "s/###PARTNAME###/${array[0]}/g" -e "s/###FOOTPRINT###/${array[3]}/g" -e "s/###VALUE###/${array[4]}/g" -e "s/###RATING###/${array[5]}/g" -e "s/###TOLERANCE###/${array[7]}/g" -e "s/###MATERIAL###/${array[6]}/g" -e "s,###DATASHEET###,${array[8]},g" >> Capacitors_SMD.lib; echo "\$CMP ${array[0]}" >> Capacitors_SMD.dcm; echo "K ${array[3]} ${array[4]} ${array[5]} ${array[6]}" >> Capacitors_SMD.dcm; echo "\$ENDCMP" >> Capacitors_SMD.dcm; done
This transforms the csv into KiCad library format using the template. The result looks like this:Well, so basically you have turned the Kicad library system into a copy of Eagle's, where every value/footprint variant/voltage rating has its own symbol/footprint in the library, duplicating the stuff all over the place.
Now imagine that there is a mistake in that symbol or footprint. With the original Kicad way of doing things you fix a single symbol/footprint and all parts using it will be correct. With yours? Good luck fixing few thousands parts each time - even if you automate the job.
The entire point of the Kicad's design is that you are not supposed to do this. Add the fields to the components, but do that per project, as you need them, not creating entire libraries of 0603 and 0805 capacitors that differ only in a value of a field or two.
That is interesting to hear from a super contributor. When I started using CAD-Systems, I probably had the same mindset but people from here and some professionals I know have changed my point of view over the time: The schematic is the place (and the only one) where everything is specified - except layout of course. Till now, the only consistent way of doing that I know is to have a separate symbol for every part ("part" == orderable, specific component). For some designs the parameters of a component are important. Even with simple DC/DC converters it can matter if it is a low ESR type of capacitor or not. Where would you specify that?
For other components special symbols are required as the pinout changes with the packages (i.e. BGA != SOIC etc ...). Then also I can auto-generate the BOM directly from the schematic without further effort ...
What I did was not to copy the eagle system ... Eagle really has separate footprints for every component. I'm not doing that. Deliberately! For the capacitor example I just specify that is is an 0603 footprint. I still have them in a single place. That footprint can be altered according to the particular needs of the project (i.e. hand-soldering vs, reflow ...)
And come on ... a general and severe mistake in a capacitor component?
And come on ... a general and severe mistake in a capacitor component?
Well, so basically you have turned the Kicad library system into a copy of Eagle's, where every value/footprint variant/voltage rating has its own symbol/footprint in the library, duplicating the stuff all over the place.
For some designs the parameters of a component are important. Even with simple DC/DC converters it can matter if it is a low ESR type of capacitor or not.
Otherwise as far as I'm concerned resistor is fully specified by...
You mean like symbols changing between different releases of Kicad? Have you never had the messages about parts being replaced or "rescued" when loading an old project because the parts have been replaced in the libraries in the meantime? Sometimes only the shape of the parts changes slightly, sometimes there is a larger change that could break your diagram. Of course, if you generate all your libraries yourself, you may not care, on the other hand you are missing out on any improvements in the stock library files as well (which may not be always visible outright - like the footprint fields that were added relatively recently).
Keeping every last design detail in the schematic is a nice idea, but in practice you can easily end up with an enormous and/or unreadable schematic if each symbol includes a list of specifications next to it. Furthermore, there are too many components and too many manufacturers and too many part numbers (all subject to change) to make the job of compiling a comprehense library worth the hassle.
It does make BOM generation easier, but it makes everything else worse. Many contract assemblers stock certain common components and you can have them for cheap. If you specify some other components instead of the ones they could use, your assembly cost goes up.
OK, so specify those parts in your library and BOM.
If you leave it up to your assembly house to substitue whatever they think is a good match for your spec you could be in for trouble.
When you start having batch problems due to components they fitted you are in a world of hurt. You may not even know how many boards were produced with a particular substituted part.
So it looks like you are in a market where you are happy not knowing exactly what you have produced. Lucky you.
I'm not, we need documentation for every board produced along with test certs.
But we are going off topic now, these are manufacturing issues.
Lol, I do know, various hospital equipment. Let's just say I don't care about what brand 100K pull up resistor they use, it will still work whether it is 10K or 200K Of course you can specify the most expensive ones.
Specifying the footprint and part number later seems to make sense because it is modular. But every time you use that symbol you have to risk making a mistake in choosing the wrong part number or footprint. That is just asking for errors. I prefer to create a schematic symbol once and never have to worry about it again. All of the arguments against this approach seem to focus on making it easier for the designer - instead of minimizing errors.
Thanks, Homebrew. I had rejected Kicad because I thought it could not do this - i.e. tie the footprint and the manufacturer's part number to the schematic library symbol. The typical workflow (as I understand it) used for Kicad seems so error prone - personally I find it unacceptable. I will now reconsider using Kicad.
Specifying the footprint and part number later seems to make sense because it is modular. But every time you use that symbol you have to risk making a mistake in choosing the wrong part number or footprint. That is just asking for errors. I prefer to create a schematic symbol once and never have to worry about it again.
All of the arguments against this approach seem to focus on making it easier for the designer - instead of minimizing errors.
A library *is* a database and should be treated a such. It makes non-trivial designs manageable.
Industry has solved this problem by using a complete manufacturer part number as a root key for a part. This ensures a 1:1 relationship between the part and footprint. Cases where you can substitute multiple manufacturers is handled by abstracting the part with an internal part number. In this case you become the manufacturer as there has been a value added step inserted into the supply chain. This approach is the only way that has been proven to solve long term PLM/PDM issues.
This approach of course requires some engineering discipline.
Part library certainly isn't a database, especially not in Kicad. It is just that - library of symbols and library of footprints. The database part that permits you to join and store information about part numbers, datasheets, substitutes and similar is completely absent from Kicad so far. Trying to repurpose the existing library system for this is an attempt to drive a square peg into a round hole, I am afraid. It isn't designed for this and will be very fragile.
Yes, but that also assumes that you have a proper database-backed inventory system, where each entry has also associated part symbol, footprint, datasheets and what not. This doesn't exist in Kicad so far. I am not really aware of any low-end PCB tool that actually has something like that.
OTOH, it shouldn't be too difficult to build something similar, for example by tying Kicad with something like PartKeepr (https://partkeepr.org/). It would certainly beat having to maintain crazy amounts of duplicated data in the libraries or trying to stuff the extra information into schematic symbol fields.
Instead, the REAL argument against my proposal that came out of the discussion would be the very very inconvenient process of changing parts during the design. Changing the value of a capacitor would require the discipline to delete the part from the schematic and add a completely new one. If not done very carefully, this could easily have implications on the netlist and thus corrupt the layout (if this has been created already). The only way around that would be to address the changes by altering the schematic directly using a script. Again - potentially an error prone process.
Instead, the REAL argument against my proposal that came out of the discussion would be the very very inconvenient process of changing parts during the design. Changing the value of a capacitor would require the discipline to delete the part from the schematic and add a completely new one. If not done very carefully, this could easily have implications on the netlist and thus corrupt the layout (if this has been created already). The only way around that would be to address the changes by altering the schematic directly using a script. Again - potentially an error prone process.Nobody will want that. And I'm sure no one will want a database of passives in their CAD. There are 100s of manufacturers and millions of parts. Who would want to maintain that, and why?
Well than, what do you want? A PCB full of errors?
What is the pin-spacing on your 100uF jelly bean capacitor? 2.5mm? 3.5mm? Is the 22uF capacitor really available in 0603 package? And so on and so on ...
Yes sure, the best option would be if CvPcb would provide a database with orderable components. So instead matching designators to footprints one would match designators to orderable components. Each component would then have A SINGLE footprint associated. Problem solved ...
However, we don't have that ...
Jst curious...
What system do people use to make their libraries? If you do not make something based on the the part number, how do you differentiate?
Jst curious...
What system do people use to make their libraries? If you do not make something based on the the part number, how do you differentiate?
Personally, I begin with the schematic symbol, generally i am forced to create this for each IC i use short of the generic pinout ones like op amps,
Next up i pull up my footprints and see if i have a good match, if not i create that footprint following kicads smd footprint naming convention (style, e.g. qfn, number of pins, size key value, e.g. width, pitch, and thermal pad or not), this way unless something is weird, there is nothing about the footprint that has to be unique. i can look at the name and tell what it is, and if it matches up.
add that to the footprint feild in the schematic symbol and be done with it,
For multiple footprint options i use alias's, but rarely do i forsee using multiple footprints in 1 go so i just add them as i use them, e.g. one project i may use a soic, then later a tssop, same pinout, just different footprint. so open the old symbol and add in a new alias for an already created part
What would make kicads libraries 80x better in my book would be a duplicate scanner and a drag drop interface to move stuff between library files and delete / rename them.
Well than, what do you want? A PCB full of errors?
What is the pin-spacing on your 100uF jelly bean capacitor? 2.5mm? 3.5mm? Is the 22uF capacitor really available in 0603 package? And so on and so on ...
Yes sure, the best option would be if CvPcb would provide a database with orderable components. So instead matching designators to footprints one would match designators to orderable components. Each component would then have A SINGLE footprint associated. Problem solved ...
However, we don't have that ...Well you need some common sense when designing the circuit board, CAD is not a substitution for it. Personally I don't want to assign mfg part numbers to common (0603 0805 etc) passives ever. Not even when I provide BOM to my client. Unless I need something special in a particular place. I don't want to restrict purchasing more than absolutely necessary.
In my experience only two times I had to spec specific passives. One time product was failing due to caps cracking because of the board was deformed due to over tighten screws (I spec'd some flex-termination caps) and second time I had to spec pulse-withstanding resistors in some AC circuit. All other times 1% spec for resistors is sufficient. My customers are only buying good parts from digikey or mouser anyway.
How do you do it? Say you attach an mfg p/n to your component in CAD. What happens next time you want to change the value of that component? I had problems with this scenario in the past, where pieces of sch was copied to another board, values of components changed but attached p/n were not updated. Now I have discrepancy between my board and BOM. That was kind of embarrassing. This whole approach just creates way more opportunities for errors.
In my experience only two times I had to spec specific passives. One time product was failing due to caps cracking because of the board was deformed due to over tighten screws (I spec'd some flex-termination caps) and second time I had to spec pulse-withstanding resistors in some AC circuit. All other times 1% spec for resistors is sufficient. My customers are only buying good parts from digikey or mouser anyway.
How do you do it? Say you attach an mfg p/n to your component in CAD. What happens next time you want to change the value of that component? I had problems with this scenario in the past, where pieces of sch was copied to another board, values of components changed but attached p/n were not updated. Now I have discrepancy between my board and BOM. That was kind of embarrassing. This whole approach just creates way more opportunities for errors.
In my experience only two times I had to spec specific passives. One time product was failing due to caps cracking because of the board was deformed due to over tighten screws (I spec'd some flex-termination caps) and second time I had to spec pulse-withstanding resistors in some AC circuit. All other times 1% spec for resistors is sufficient. My customers are only buying good parts from digikey or mouser anyway.
How do you do it? Say you attach an mfg p/n to your component in CAD. What happens next time you want to change the value of that component? I had problems with this scenario in the past, where pieces of sch was copied to another board, values of components changed but attached p/n were not updated. Now I have discrepancy between my board and BOM. That was kind of embarrassing. This whole approach just creates way more opportunities for errors.
Simple, I never change values on the schematic, only in the library. If I need to change the value of the part, I'll just delete the part from the schematic and add the replace part with the same reference designator set. My philosophy is that if it's on the schematic, it's got a manufacturer's part number attached. I don't edit parameters on the schematic - only in the library. That way, at the end, I have a BoM as an output with exact, orderable part numbers.
I actually automated that process in the current set of KiCad libraries I'm building up - I dumped all the 1% 0603 Panasonic ERJ series resistors from DigiKey to a CSV file, then wrote a python script to populate my library with them:
This way I already have all the standard 1% series values ready to go, complete with supplier links.
Hi Im new here and off to a REALY bad start by raising a dead thread. (Pr0toc01 plays his Thread Necromancer card, everyone sighs and shakes their head in disgust )
Im of two minds on this.
I like the fact that I can just drop a capacitor on a schematic and enter the value for it without having to go looking through the library for the one with exactly the specs I need.
On the other hand there have been times where i have ended up using values for components that just dont exist / nobody makes (hey im self taught, leave me alone)
I like flexibility, but I also like knowing im not going to design something that cant actually be made unless I rework everything due to bad part values.
Would it be possible for someone far mopr familiar with KiCad then myself to basically add a "KNOWN VALUES" option.
So you have your schematic symbol, you have your foot print, you have your model, you have your Documentation file and then you have a file containing information about known manufactured components.
Lets take resistors.
So you have your --|/\/\/\|-- symbol that you put down
you hit V click it and in the EDIT VALUE window you get a list (like in the add part window) with known REAL WORLD value combinations for that resistor (10k 1% 1/4w) that also contains manufacturer name, part number etc?
OR just manually enter the information (and have it ask if you want to save it to the list)
This would give you the flexibility to use known real world values, or type them in on the fly as you go without the need for creating a new part in the library for every value combination...
Its just a thought, and im not familiar enough with the code of KiCAD to try to make this work myself.
Again, sorry about raising a dead thread
If I need a special tolerance for a component, I will add it in the value field. Like "10k 0.1%". I also have fields for manufacturer part number, manufacturer name and distributor id.
If I need a special tolerance for a component, I will add it in the value field. Like "10k 0.1%". I also have fields for manufacturer part number, manufacturer name and distributor id.This is exactly what I do, too. I wish KiCad would standardize these fields so BOM tools would know what to look for.
I may have a dozen 0.1µF caps, all 0402, but the one in the buck converter is different from all the others and needs to be a specific part. So I make those custom values visible on the schematic and the PCB fab layer, but many BOM tools can't be configured to look for them.
I also wish it could use a simple REST API to do part lookups; then I could implement a simple server in golang that fronts a part inventory database and bridges queries to those distributors who will let me do API based parts lookups.
Well, so basically you have turned the Kicad library system into a copy of Eagle's, where every value/footprint variant/voltage rating has its own symbol/footprint in the library, duplicating the stuff all over the place.
Now imagine that there is a mistake in that symbol or footprint. With the original Kicad way of doing things you fix a single symbol/footprint and all parts using it will be correct. With yours? Good luck fixing few thousands parts each time - even if you automate the job.
The entire point of the Kicad's design is that you are not supposed to do this. Add the fields to the components, but do that per project, as you need them, not creating entire libraries of 0603 and 0805 capacitors that differ only in a value of a field or two.
Well, so basically you have turned the Kicad library system into a copy of Eagle's, where every value/footprint variant/voltage rating has its own symbol/footprint in the library, duplicating the stuff all over the place.
Now imagine that there is a mistake in that symbol or footprint. With the original Kicad way of doing things you fix a single symbol/footprint and all parts using it will be correct. With yours? Good luck fixing few thousands parts each time - even if you automate the job.
The entire point of the Kicad's design is that you are not supposed to do this. Add the fields to the components, but do that per project, as you need them, not creating entire libraries of 0603 and 0805 capacitors that differ only in a value of a field or two.I disagree. It is extremely clean approach to create a bunch of 402 capacitors of different values. I even go as far as adding static text to them specifying value, voltage etc. Then I can just place these parts on the schematic and no more hassle. Great approach.
Sent from my SM-G960F using Tapatalk