Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SMD chip resistors #15

Merged
merged 2 commits into from Jan 6, 2019

Conversation

@dbrgn
Copy link
Contributor

commented Dec 14, 2018

  • IPC naming for chip resistors
  • Height in the name is the max height (I pulled the most common resistor heights from Digikey)
  • The smaller variants don't have silkscreen anymore
  • Silkscreen lines are offset slightly, so that they should still be visible when the part has been mounted

3216 resistor:

img

0603 resistor:

img

5025 resistor:

img

Generated with LibrePCB/librepcb-parts-generator#29.

@dbrgn dbrgn added the addition label Dec 14, 2018

@dbrgn dbrgn requested a review from ubruhin Dec 14, 2018

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Dec 16, 2018

  • Some of these packages already exist in this library -> please reuse UUIDs to overwrite them.
  • Pad 1 is at the right, but should be at the left.
  • Footprints "reflow" and "hand soldering" are exactly the same -> would be good to replace them by IPC density levels A/B/C anyway :)
@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2018

Some of these packages already exist in this library -> please reuse UUIDs to overwrite them.

I'll try to do that, although it requires manually patching the UUID cache file.

Pad 1 is at the right, but should be at the left.

Easy fix, thanks for spotting.

Footprints "reflow" and "hand soldering" are exactly the same -> would be good to replace them by IPC density levels A/B/C anyway :)

Oops, I missed that one.

Regarding density levels, I found heel/toe/side guidelines in IPC and started implementing them. However, I don't think we can implement density level C in generic (manufacturer-independent) packages. The level C has very little tolerances, so it needs to match the part perfectly. (Remember, IPC specifies protrusion, not size.)

The thing is that we don't know the size of the coated leads of the chip resistors. The sizes are standardized, but not the length of the leads. So if we can't know the length of the lead, we can't really do well-matched footprints.

What about implementing footprint variants "Density Level A (Hand Soldering)" and "Density Level B (Reflow Soldering)" and leaving Density Level C to manufacturer specific libraries?

@dbrgn dbrgn force-pushed the chip-resistors branch from 7262cc7 to 4a97330 Dec 18, 2018

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2018

PR is updated.

  • Pin order is fixed
  • Footprints are now generated with two density levels (A and B). Since the length of the pads is not actually standardized, I won't add density level C footprints, they require pad dimensions that match the actual part really well. That is probably best left to manufacturer-specific libraries. (See comment above.)
  • Dimensions used when generating: Gap (-> Heel) based on Samsung datasheet, Toe and Sides based on IPC specification
  • UUIDs are reused where possible. When reusing UUIDs, I mapped them to the highest available package, with density level A footprint.
  • UUID reuse applies to package, footprint, the pads and the texts.
  • I bumped the version to 0.3 (which is higher than 0.2 the previous parts had)

To do:

- Add courtyard

Open questions:

Some parts are not currently generated that were previously available as R-XXXX packages. I believe some of them are actually duplicates of others, but with metric name instead of imperial:

  • R-1005 (metric 0402?)
  • R-2012 (metric 0805?)
  • R-3216 (metric 1206?)
  • R-3225 (metric 2010?)
  • R-5025 (metric 2010?)
  • R-6332 (metric 2512?)

Two of them seem to be rare imperial variants:

  • R-1218 (41 active resistors in cut-tape on Digikey)
  • R-4527 (85 active resistors in cut-tape on Digikey)

(For comparison, there are 9'373 1206-resistors and 12'569 0805-resistors, so those definitely seem to be niche.)

What do we do with those? I'd suggest deprecating (or deleting?) the duplicates and the two rare variants.

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 21, 2018

Courtyard was added (according to IPC):

2012 footprint (level B):

img

2012 footprint (level A):

img

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Dec 22, 2018

The thing is that we don't know the size of the coated leads of the chip resistors. The sizes are standardized, but not the length of the leads. So if we can't know the length of the lead, we can't really do well-matched footprints.

But then it might make sense to specify the lead length in our resistor packages (choosing the most commonly used lead length). Then we can add a density level C footprint, and these packages can be used for real devices if the lead length matches. In future we could also add more packages with different lead lengths.

What about implementing footprint variants "Density Level A (Hand Soldering)" and "Density Level B (Reflow Soldering)" and leaving Density Level C to manufacturer specific libraries?

We can't move only one footprint to a manufacturer specific library, we would have to create a completely new package with density levels A and B specified again.

I noticed that you added packages with heights in 0.05mm interval. I think this is a far too small interval, it would lead to a huge amount of resistor packages. I would rather use an interval of at least 0.2mm. Then probably we only need one height per size to cover 90% of the available real resistors ;)

Now I just found this sentence in the German Wikipedia:

Die Höhe der Bauteile ist nicht standardisiert, bei Widerständen ist sie jedoch meist gleich, während sie bei Kondensatoren je nach Hersteller, Kapazität und Spannungsfestigkeit stark schwanken kann.

So maybe it would make sense to even ignore the different heights completely (adding only one package per size, without specifying a height)? This would simplify things a lot, and for the 3D model a height error of e.g. 0.2mm doesn't matter IMHO...

Some parts are not currently generated that were previously available as R-XXXX packages. I believe some of them are actually duplicates of others, but with metric name instead of imperial:

Oh f*ck, I didn't realize that (I imported them from a Eagle library) 😭

I would suggest to add the R-1218 and R-4527 as metrical variants 3246 resp. 11470 (or 11570?). But I'm not sure about the duplicate packages. I tend to remove them, although normally we shouldn't remove packages... We can just hope that nobody uses them already ;)

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 23, 2018

We can't move only one footprint to a manufacturer specific library, we would have to create a completely new package with density levels A and B specified again.

Yes, but the different variants could then exactly match the manufacturer recommendations.

I'm not sure about the lead length, we'd have to add 2-3 different variants for every resistor, and then that would still be only an approximation, where the density level C wouldn't fit perfectly.

But I also agree that ending up with the same resistor package in 10 different manufacturer-specific libraries isn't great either...

Maybe @rnestler or @HBadertscher have further comments?

I noticed that you added packages with heights in 0.05mm interval. I think this is a far too small interval, it would lead to a huge amount of resistor packages. I would rather use an interval of at least 0.2mm.

I used Digikey to find common heights. I only added them for variants which actually exist for thousands of different resistors, I didn't generate all possible combinations. (For example, the 1005 resistor only has 1 height variant. Only 3 variants (2012, 3216 and 3225 have 3 different heights.) Do you think the current amount of resistor packages is too much?

img

Generating 3D models later for different heights is trivial, I would prefer it if the max height would actually match the part (for when you do very thin, space-constrained designs). And when considering mechanical constraints, then the height is important (much more so than the color).

I would suggest to add the R-1218 and R-4527 as metrical variants

I can do that, won't hurt much.

We can just hope that nobody uses them already ;)

Since the parts are copied to the project, it won't break anything, right? And they can be trivially replaced.

@dbrgn dbrgn force-pushed the chip-resistors branch from 4a97330 to 30dfe2b Dec 23, 2018

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 23, 2018

Ok, branch updated.

I added 3246 (1218) footprints:

img

I did not add the 11470 (4527) footprint. These are packages that look different from other chip resistors, they have J-style leads and are quite rare. Here's an example:

https://www.newark.com/vishay/wsc45271k000fea/res-wirewound-1k-1-2w-4527/dp/65K4016

I don't think these should be generated with the same generator (I'd have to add quite a few conditionals because the leads are less wide than the package). I'd actually vote for removal of the package, I think the current one has pads that are too wide anyways.

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Dec 31, 2018

@ubruhin ping 🙂

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Jan 1, 2019

OK, another idea: Probably most users (especially hobby users) will use "generic" resistor devices anyway (called e.g. "R-0805") because they don't care about which exact resistor will be assembled, and because it would take a lot of time to add all of the (thousands?) available (manufacturer-specific) resistors to our libraries. Thus maybe the best option is to make the corresponding packages for these devices also that generic that there is only one package per size, i.e. using only one specific lead length and one specific height (or even not specifying the height at all), without density level C footprint. So basically what you did now, but removing the packages with different heights.

In addition to these generic resistor packages and devices, specific packages and devices can be added step by step, with lead lengths and heights according the datasheets and so on. These are completely independent of the generic packages/devices, and thus out of scope of this PR.

So, a hobby user typically just uses the generic "R-0805" device with its generic "RESC2012 (0805)" package and assembles the random 0805 resistor he found in his resistor set. He doesn't care at all about lead length and package height, as long as he can hand-solder it and the 3D view looks nice.

On the other hand, a professional which might want to do a design with density level C and needs an accurate 3D export chooses the specific device of the exact resistor he evaluated, which has the corresponding package assigned, with exact lead length and package height, so it comes with density level C footprint and exact 3D model.

I think this would be a good compromise and suits both workflows very well. What do you think @dbrgn?

Btw:

Since the parts are copied to the project, it won't break anything, right? And they can be trivially replaced.

Removing packages wouldn't break existing projects, but it would break existing devices. Meaning that you get an error when placing such a device on a board because the package can't be found.

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 1, 2019

Yes, I think that sounds sensible!

It would be good to have another opinion from @rnestler or @HBadertscher, if one of you has time 🙂

@dbrgn dbrgn force-pushed the chip-resistors branch from 30dfe2b to bf40dcb Jan 4, 2019

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 4, 2019

Ok, branch updated. To summarize:

  • Packages are meant to be generic, they should fit most use cases and will be used by generic resistor devices
  • Density levels A and B are generated according to the rules from IPC
  • Only max height is being used (except for the RESJ11569 package, where heights of 2.54mm and 5.84mm are available, which is quite a big difference)
  • R-4527 has been updated to RESJ11569X584
  • The duplicate resistors have been removed

Resulting packages:

img

This is how the footprints look like:

chipresistors

Generator script: LibrePCB/librepcb-parts-generator#29

dbrgn added a commit to LibrePCB/librepcb-parts-generator that referenced this pull request Jan 4, 2019

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2019

The nightly build shows clearance warnings between pads and placement layer 😉

Only max height is being used (except for the RESJ11569 package, where heights of 2.54mm and 5.84mm are available, which is quite a big difference)

I'm not sure if that's a good idea. This is something between a generic and a specific package, what devices would we need to create to use these two packages? And which device/package would a user choose which don't know what height his resistors have?

IMHO we should clearly distinguish between generic and specific packages, and generic packages should not specify the height at all, not even a maximum height (what is the "max. height" useful for if the corresponding device is generic, i.e. doesn't specify the height at all?). So I would remove the package's name and description...

Maybe it would make sense to add some kind of "warning" to the package's description, to make clear these are meant to be used as "generic" or "general purpose" resistors, and thus the height and lead length is not specified, but just "best guess"?

The duplicate resistors have been removed

You also need to remove the corresponding devices as they are no longer valid ;)

@dbrgn dbrgn force-pushed the chip-resistors branch from bf40dcb to 433dd9e Jan 5, 2019

Remove duplicate chip resistor packages and devices
These chip resistor packages are duplicate of others, but with metric
names instead of imperial:

- R-1005 (metric 0402)
- R-2012 (metric 0805)
- R-3216 (metric 1206)
- R-3225 (metric 2010)
- R-5025 (metric 2010)
- R-6332 (metric 2512)

They have been added through an Eagle import.

@dbrgn dbrgn force-pushed the chip-resistors branch from 433dd9e to 0c95cb6 Jan 5, 2019

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

The nightly build shows clearance warnings between pads and placement layer

That's a float rounding issue. The silkscreen ends at X 2.15 and the pad starts at X 2.3. The difference (2.3 - 2.15) is 0.14999999999, so your tool complains.

I'll file a bug report (maybe I can also fix it).

IMHO we should clearly distinguish between generic and specific packages

You're right, I changed it. The max height was primarily meant for the 3D model, where we need to choose some height. I left in the parameters in the source file, but won't render it.

I also added a note to the description that the packages are generic.

You also need to remove the corresponding devices as they are no longer valid ;)

Done.

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2019

Looks very good now 👍

The only thing which would be nice, is to see the actual lead size in the documentation layer, so the pad protrusion gets visually visible (at least the outer dimension, as the lead length of the generic packages aren't specified). Actually on the master branch this is already the case, but your change removes that "feature" 😁

grafik

Would it be possible that add this again? (the glue rect in the center might also be nice, but let's ignore that for the moment)

I noticed that even the density level A pads are much smaller that the pads imported from Eagle, I wonder if they are not too small now for hand soldering 🤔

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

The only thing which would be nice, is to see the actual lead size in the documentation layer, so the pad protrusion gets visually visible (at least the outer dimension

That's being done on the documentation layer, right?

img

It shows the outline of the package, which is the only thing we can know for sure in a generic package.

The glue rect in the center might also be nice, but let's ignore that for the moment

Ah that's glue... I could add that if you want, shouldn't be much work.

I noticed that even the density level A pads are much smaller that the pads imported from Eagle, I wonder if they are not too small now for hand soldering 🤔

Yes, that's because it is just a manufacturing density level, and not a hand soldering package 😉

We could take the density level A footprint and simply extend the toe and sides by 0.5mm and call it "Hand Soldering".

@dbrgn dbrgn force-pushed the chip-resistors branch 2 times, most recently from e5ff83e to fe30f88 Jan 5, 2019

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

Updated doc layer.

img

@dbrgn dbrgn force-pushed the chip-resistors branch from fe30f88 to 5b3bf4b Jan 6, 2019

@ubruhin

This comment has been minimized.

Copy link
Contributor

commented Jan 6, 2019

Only two things now (sorry 😉):

The smallest resistors should have thinner lines on the documentation layer:
grafik

And the RESC2012 has very small leads, are you sure this is really intended? The leads are even narrower than those of RESC1608, which doesn't make sense to me. I checked a few datasheets, and they all have wider leads.

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

I mostly used this datasheet:

img

2012 has a gap (B) of 1.4mm, 1608 has a gap of 0.8mm. That results in the mentioned difference.

So yes, it's intended. We could reduce the gap a bit (to be able to deal with a wider range of sizes) even though it feels a bit arbitrary.

I'll adjust the doc layer line thickness.

dbrgn added a commit to LibrePCB/librepcb-parts-generator that referenced this pull request Jan 6, 2019

@dbrgn dbrgn force-pushed the chip-resistors branch from 5b3bf4b to 6dde3a2 Jan 6, 2019

@dbrgn

This comment has been minimized.

Copy link
Contributor Author

commented Jan 6, 2019

Branch updated with latest changes from LibrePCB/librepcb-parts-generator#29.

@ubruhin

ubruhin approved these changes Jan 6, 2019

Copy link
Contributor

left a comment

Thank you, looks good now! 😃

@dbrgn dbrgn merged commit d63cdcc into master Jan 6, 2019

@dbrgn dbrgn deleted the chip-resistors branch Jan 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.