-
Notifications
You must be signed in to change notification settings - Fork 177
Generate separate C, L, and R chip footprints #438
base: master
Are you sure you want to change the base?
Conversation
- File renames to remove 'chip' if file contained more than chip info - Aligned size definition file names - Print part type and definition during execution - Corrected descriptions and keywords in SMD_chip_devices.yaml - Fixed a few typos in comments
Code Climate has analyzed commit f83b987 and detected 0 issues on this pull request. View more on Code Climate. |
@poeschlr |
@poeschlr And one question: because there's now a YAML file just for resistors, should the wide-body YAML file be merged into the regular resistor file? I kept them separate for continuity reasons but I really don't see why they can't be together in one file. |
- Branched on top of pointhi#438
Should I merge in master the same way I did at #439? Or is that not the right way? |
@poeschlr Also, merge in master as I did above to fix the conflict? |
I do not see a problem with using unique body sizes for different devices. However, be aware that we did not use the outdated IPC document everywhere. And we did avoid it for 0805 completely as we did our own research. The reality is that such devices are much less standardized than we would like. Which means the footprints of the official lib can only ever be a compromise. Unless we really want to add one footprint per component series (not really feasible). I hope that 5.1.6 finally fixes a deal breaker bug for the footprint wizard allowing me to continue working on a IPC footprint wizard for these sort of devices that will give users the option to generate fully compliant footprints for the device they really use. |
Regarding fixing the merge conflicts: You can either merge master into this one or rebase this onto the current master. The latter might be better in the sense of a cleaner git history but it also requires more git skills. Edit: also remember that rebasing becomes impossible once one has used the merge workflow for a given branch. |
Yes. As this was a while ago I may have forgotten some details, but from memory and looking at the Google Sheets I linked the IPC-SM-782 0805 cap size and the body size you came up with from reviewing datasheets is quite similar. So I think the initial issues were related from us not realizing that C and L body sizes were given in the IPC doc, and instead using the R body size for all part types. I will try a rebase, then. First time for everything... |
@poeschlr I merged in master again with a little manual work. Branch conflicts resolved but the size definitions added at #440 have a Also, I noticed a typo of 'tantalum' (there is a trailing 'n') so can that be done here too? |
One option to fix up the branch is to locally rename it, make a new branch with the current online name and then cherry-pick the commits from your original (now renamed branch) to your new branch correcting merge conflicts as necessary. At the end (after checking the state locally) force push the new branch to the online branch connected to this pull request. This might help a bit: https://learngitbranching.js.org/ Edit: If necessary then i could look into fixing your branch but it might take a while till i find the time for it (don't tell that to normal contributors, this would be a service reserved to fellow maintainers). |
@poeschlr New footprints are submitted at KiCad/kicad-footprints#2280. |
@poeschlr |
@poeschlr |
Nope, the R & C footprints seem fine.
Yes, lets do that!
From https://content.kemet.com/datasheets/KEM_T2005_T491.pdf page 15 The (current) KiCad footprint is quite different:
We are missing about 0.5mm on the L parameter, which corresponds to the 0.5mm heel in the IPC spec file. |
Here is the equivalent info from AVX. I will add it to the table in the above post. |
I just pushed the footprints into that PR. Seems to me everything looks good, but take a look through the diff and see what you see. Reviewing those footprints also made two things pop out at me which wouldn't take long to incorporate here but I suspect it's best to do as a later step:
I'll look at the tantalum stuff a bit later today. We can always decide to punt on it if the current footprints are OK. Waiting also gives more time to get into #491 and (possibly... hopefully??) #439. Edit: I should have clearly started that I didn't touch any tantalum footprints. I only pushed other footprints. |
ad1: I vote for a different PR
|
Looks like I mixed up heel and toe in my head. Then the current behavior of the generator makes sense (pads grow inward). Swapping heel and toe might be what happened in that table. But that is a whole different story to investigate. ad 2) I also don't see any reason to duplicate the footprints. In my personal use I selected resistor-footprints for ferrites so far (because I did not know better). They worked fine (a few thousand boards without problems). Regarding that last block from
|
I think this one is ready to merge. Do you want anything else done/checked @evanshultz |
Right. Because the end of the lead is wrapped under the part on tantalum caps (and other molded body parts), the toe is under the part body instead of sticking out on the ends of the part. Confusing. But it finally clicked for me, too. I checked the footprints at the end of https://www.vishay.com/docs/40182/tmch.pdf, and it's not too different. Pad centers just a bit off and the pads are a bit bigger. If I use the LMC (smallest pads) they are smaller than the datasheet. So with the tantalum fillet goals with heel and toe flipped I think we might be OK. The only caveat are the 1608-08 and 1608-10 footprints where the pads are just too close with nominal fillet goals. I checked body dimensions and they appear correct. With LMC pads the pad inner gap is 0.2mm apart which should be fine. My thought with this would be to update the script to set a minimum pad spacing that automatically makes adjustments if the pads are too close. That distance would be in the series config YAML file. However, that would take too much time. So I see a few options now:
Any of those are OK with me. Just let me know. But regardless, I will push another commit to this PR. Fix the extra 'n' on tantalum and a few other things that I figured out so far (even if he tantalum caps aren't re-generated). So please don't merge this first. FYI, there already is an issue about having chip footprints with varying IPC densities: KiCad/kicad-footprints#1836. And a PR to add that functionality to the script: #439. We can pick this up later. :) |
- Fix typo - Swap the heel and tow fillet goal valules and add a explanation - Use the tantalum IPC table values for tantalum caps - Not sure why ipc_chip_molded.py shows as a new file...
I pushed the tantalum updates, but I expect we will merge them as they are. And later take a closer look at the footprints and add some feature to adjust things if pad-pad spacing is too tight. But we'll see. As noted, I didn't copy over tantalum footprints to the footprint PR. So if you want to hold off on other tantalum changes there are only two minor questions:
|
|
- Generate handsolder footprints for <0603 R and C - Generate handsolder and castellated footprints <0603 for other part types - Do not generate fuses <0402 - Do not generate LEDs <0201 - 2816 is only for resistors
I figured out what happened with the missing footprints. Since the YAML files for body size info has been split, new entries were needed in the YAML file that contains the info for each part type. I would like to simplify the part_definitions.yaml file which I think is possible right now. My fix for this issue added a lot of entries. If this PR can wait to be merged for a few hours I'll do that tonight when I have a chance to work on it.
We should also update the datasheets and dimensions for generic parts since some (all?) use R or C datasheets which don't apply to the diodes, fuses, LEDs, etc. I think we end up with a single YAML file for each part type and get rid of the generic YAML files entirely. But I don't think it's a showstopper to get this merged and it will affect footprints so let's not do it now. |
Several of the size definition YAML files had an ipc reference file for just that body size which wasn't being used. Now it will overwrite the generic one, which allows condensing the entries in part_definitions.yaml
Good catch on the L_1806 footprint at KiCad/kicad-footprints#2280 (comment) and fixed at KiCad/kicad-footprints#2487. Pads end up 1.275x1.9mm at +/-2.1125mm. A little more narrow but a bit taller than the pads now. And wider than the actual part's body width now! I was able to remove about half the entries in part_definitions.yaml by allowing an ipc_reference for one size definition in the YAML file to overwrite the general one for the entire part group. That was easy. Supporting a paste pad overwrite requires changing parameters in IPC calculator functions that I plan to pull out and share across all generators so I'm leaving it for now. I checked each footprint compared to the current master, and excluding L_1806 only the timestamp changed (except for some castellated footprints; see below). So I think this change is good. I also noticed there are 2816 diode, fuse, and LED footprints which should have been removed from the footprint repo. Oh well. All the castellated footprints are wrong. The castellated table applies only the LCC footprints, not chips. So these footprints should be removed IMO. We are saying they are something when they clearly are not. What do you want to do about that? Here is the table and generic package drawing, from which you can compare the fillet goals with the YAML file to see for yourself: If you have no further comments, I believe this can be merged. Or I can whack out the castellated stuff first. Let me know. Edit: Actually, I'd rather remove the castellated footprints, the 2816 ones, and update L_1806. And remove the castellated stuff from this PR before merging. Are you OK with that? |
@cpresser |
Yep, that sounds good. One option would be so squash all the commits and rework the commit message so it properly reflects all the changes. What do you think? |
I submitted KiCad/kicad-footprints#2495 and made the corresponding cleanup changes to the script. I'm fine with a squash merge. That's what I usually do in this repo. Maybe that's a mistake? |
Looks like my comment was not clear at all. Sorry about that. What I meant to say was:
Reasons:
|
Oh. I see. I did misunderstand. I usually squash merge in the web interface and can change the commit message then if I want. As a reviewer and merger (is that a word?), desktop/desktop#3580 captures what I usually do. I've not actually done all the stuff above. Doesn't look too tough, just new to me. I can figure it out. But let me work on the gullwing footprint name format thing first. Hang on... |
The difference is squashing everything into one commit vs. explicitly choosing which commits to squash. I have no clue how to clean up the history in a gui. In this case, something like A quick google-search did return this video: https://mattstauffer.com/blog/squashing-git-commits-with-interactive-rebase/ that explains this workflow. |
Fixes #420
Because IPC tells us there are differences in the body sizes, not all chip parts should result in the same footprints. This generates unique footprints for each part type.
See a comparison of resulting footprints at https://docs.google.com/spreadsheets/d/1OAOwxWGSfmM8BzPS2x2mySmMnPzjYmWQ7ZMfdHtCbws/edit?usp=sharing.
Footprint PR: KiCad/kicad-footprints#2280
Related: KiCad/kicad-footprints#711