From: Bdale Garbee Date: Mon, 31 Jan 2011 08:50:01 +0000 (+1000) Subject: create a "hybrid" footprint that can handle either a 10 position screw strip X-Git-Url: https://git.gag.com/?p=hw%2Fbdale;a=commitdiff_plain;h=4e5acf14b0a67bea437d61d87841c44722116986 create a "hybrid" footprint that can handle either a 10 position screw strip or a 16-pin MicroMatch, that will be used to allow choice in TelePyro wiring --- diff --git a/pkg/newlib/tyco/Makefile b/pkg/newlib/tyco/Makefile index 59326e5..3d4efa8 100644 --- a/pkg/newlib/tyco/Makefile +++ b/pkg/newlib/tyco/Makefile @@ -1,4 +1,4 @@ -all: 282834-10.fp 0-215079-4.fp +all: 282834-10.fp 0-215079-4.fp tphybrid.fp 282834-10.fp: buchanan.py buchanan-Series.sh ./buchanan-Series.sh @@ -6,5 +6,8 @@ all: 282834-10.fp 0-215079-4.fp 0-215079-4.fp: micromatch micromatch-th-v.py ./micromatch +tphybrid.fp: tphybrid.py + ./tphybrid.py > tphybrid.fp + clean: rm -f *.fp diff --git a/pkg/newlib/tyco/tphybrid.py b/pkg/newlib/tyco/tphybrid.py new file mode 100755 index 0000000..8c803d1 --- /dev/null +++ b/pkg/newlib/tyco/tphybrid.py @@ -0,0 +1,119 @@ +#!/usr/bin/python +# Copyright 2011 by Bdale Garbee . GPLv2 +# +# Program to emit PCB footprint for a 16 pin +# Tyco/AMP Micro-MaTch vertical through-hole female connectors +# overlaid with a 10-pin +# Tyco Electronics Buchanan 2.54mm pitch terminal blocks +# + +# dimensions in mm from C_215079_v.pdf datasheet +#PinDiam = 1.15 # screw terminals +PinDiam = 0.8 # micromatch +PinSpacing = 1.27 +RowSpacing = 2.54 + +MntX = 1.4 +MntY = 1.8 +MntDiam = 1.5 + +BoxY = 5.1 + +LineWidth = 600 + +import sys + +# we're going to use the 1/100 of a mil fundamental unit form +def mm2mils100( mm ): + return int( mm / 25.4 * 1000.0 * 100.0 + 0.5 ) + +pins = 17 + +BoxXbase = 5.89 +BoxEnd = 1.5 + +print '# author: Bdale Garbee' +print '# email: bdale@gag.com' +print '# dist-license: GPL 2' +print '# use-license: unlimited' + +print 'Element[0x0 "tphybrid" "" "" 0 0 0 0 0 100 0x0]' +print "(" +for col in range ((pins+1)/2): + for row in range (2): + if row == 1: + spacing=0 + else: + spacing=RowSpacing + pinnum = (col * 2) + row + 1 + if pinnum != 18: + if pinnum == 1: + Flags = '0x0101' + else: + Flags = '0x0001' + print ' Pin[', \ + mm2mils100((pinnum-1)*PinSpacing), \ + mm2mils100(spacing), \ + mm2mils100(PinDiam*2), \ + 1200, \ + mm2mils100(PinDiam*2)+1000, \ + mm2mils100(PinDiam), \ + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + +print ' Pin[', \ + mm2mils100((-2)*PinSpacing), \ + mm2mils100(RowSpacing), \ + mm2mils100(PinDiam*2), \ + 1200, \ + mm2mils100(PinDiam*2)+1000, \ + mm2mils100(PinDiam), \ + '"pin18"' , '"18"', Flags, ']' + +# add a hole for the index pin. plated to save non-plated-hole extra fab cost. +print ' Pin[', \ + mm2mils100(-MntX), \ + mm2mils100(RowSpacing-MntY), \ + mm2mils100(MntDiam)+1400, \ + 1400, \ + mm2mils100(MntDiam)+1400+600, \ + mm2mils100(MntDiam), \ + '"mnt" "0"', '0x0001', ']' + +# pins-2 accounts for the extra pin used by screw terminal overlay +BoxX = (pins - 2) * PinSpacing + BoxXbase +BoxX1 = -(BoxXbase/2) +BoxX2 = BoxX1 + BoxX +# re-compute X1 after computing X2 to account for screw terminal overlay +BoxX1 = -2*PinSpacing - BoxEnd +BoxY1 = -(BoxY - RowSpacing)/2 +BoxY2 = BoxY1 + BoxY + +print ' ElementLine[', \ + mm2mils100(BoxX1), \ + mm2mils100(BoxY1), \ + mm2mils100(BoxX1), \ + mm2mils100(BoxY2), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(BoxX1), \ + mm2mils100(BoxY2), \ + mm2mils100(BoxX2), \ + mm2mils100(BoxY2), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(BoxX2), \ + mm2mils100(BoxY2), \ + mm2mils100(BoxX2), \ + mm2mils100(BoxY1), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(BoxX2), \ + mm2mils100(BoxY1), \ + mm2mils100(BoxX1), \ + mm2mils100(BoxY1), \ + LineWidth, ']' + +print ")"