adamgreig / agg-kicad

KiCAD libraries, footprints, and scripts
MIT License
161 stars 45 forks source link

Footprint for PTH Amphenol F connectors #137

Closed russss closed 5 years ago

russss commented 5 years ago

There's quite a lot of variance between different connectors, so I'm qualifying this footprint to Amphenol only (although both variants of Amphenol connector also vary slightly).

image

Straight image Right-angle image

adamgreig commented 5 years ago

It looks like your footprint has 1.7mm and 1.5mm drill hits with 2.4mm copper pads, but the datasheet suggests 2.4mm drill hits (and presumably correspondingly larger copper pads)?

russss commented 5 years ago

That teaches me to copy another connector and not think it through from scratch. Updated.

I've been thinking about a simpler DSL-style set of python functions to specify these one-off footprints. The buildmod* scripts have quite a bit of boilerplate which could probably be factored out given that there are consistent style rules.

Something like this sketch would be a lot easier to manually verify:

f = Footprint("F-PTH-AMPHENOL")

# Ground pins
for x, y in array(size=(2, 2), spacing=4.06, centre=(0, 0)):
    f.pth(pos=(x, y), drill=2.4, pad=3.2)

# Signal pin
f.pth(pos=(0, 0), drill=2.4, pad=3.2)
# Perhaps pad diameter should be in addition to the drill diameter to avoid errors?

f.outline(square(size=9.5, centre=(0, 0))) 
# Silk should be automatically clipped where outline crosses pads

# Automatically generate courtyard and ref/val labels
f.save()
adamgreig commented 5 years ago

The updated pads are probably a little skimpy on copper but should work fine, thanks.

Having a script like that would be fantastic for a lot of footprints. Lovely if it could also easily be parameterised to work over a connector family or something, to replace the current per-family specific scripts. Basically a Python DSL for footprints.