From 04cc85d23283435545a08d86d83336649669e986 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Mon, 18 Mar 2013 15:06:53 -0600 Subject: [PATCH] add a bunch of packages --- packages/holes/hole-M2.5.fp | 7 ++ packages/holes/hole-M2.fp | 7 ++ packages/holes/hole-M3.4.fp | 7 ++ packages/holes/hole-M3.5.fp | 7 ++ packages/holes/hole-M3.fp | 7 ++ packages/pinheader/100mil10x2.fp | 29 ++++++ packages/pinheader/100mil2pin.fp | 10 ++ packages/{ => pinheader}/100mil3pin.fp | 0 packages/pinheader/100mil3x2.fp | 13 +++ packages/pinheader/100mil4pin.fp | 12 +++ packages/pinheader/100mil5pin.fp | 13 +++ packages/pinheader/100mil5x2.fp | 17 ++++ packages/pinheader/100mil6pin.fp | 14 +++ packages/pinheader/100mil8pin.fp | 16 ++++ packages/pinheader/50milpitch.py | 49 ++++++++++ packages/pinheader/Makefile | 7 ++ packages/tyco/Makefile | 13 +++ packages/tyco/buchanan-Series.sh | 7 ++ packages/tyco/buchanan.py | 87 +++++++++++++++++ packages/tyco/micromatch | 12 +++ packages/tyco/micromatch-th-v.py | 124 +++++++++++++++++++++++++ packages/tyco/tphybrid.py | 123 ++++++++++++++++++++++++ 22 files changed, 581 insertions(+) create mode 100644 packages/holes/hole-M2.5.fp create mode 100644 packages/holes/hole-M2.fp create mode 100644 packages/holes/hole-M3.4.fp create mode 100644 packages/holes/hole-M3.5.fp create mode 100644 packages/holes/hole-M3.fp create mode 100644 packages/pinheader/100mil10x2.fp create mode 100644 packages/pinheader/100mil2pin.fp rename packages/{ => pinheader}/100mil3pin.fp (100%) create mode 100644 packages/pinheader/100mil3x2.fp create mode 100644 packages/pinheader/100mil4pin.fp create mode 100644 packages/pinheader/100mil5pin.fp create mode 100644 packages/pinheader/100mil5x2.fp create mode 100644 packages/pinheader/100mil6pin.fp create mode 100644 packages/pinheader/100mil8pin.fp create mode 100755 packages/pinheader/50milpitch.py create mode 100644 packages/pinheader/Makefile create mode 100644 packages/tyco/Makefile create mode 100755 packages/tyco/buchanan-Series.sh create mode 100755 packages/tyco/buchanan.py create mode 100755 packages/tyco/micromatch create mode 100755 packages/tyco/micromatch-th-v.py create mode 100755 packages/tyco/tphybrid.py diff --git a/packages/holes/hole-M2.5.fp b/packages/holes/hole-M2.5.fp new file mode 100644 index 0000000..d36c20b --- /dev/null +++ b/packages/holes/hole-M2.5.fp @@ -0,0 +1,7 @@ + +Element["" "hole-M3" "" "" 9800 9800 -16900 -21000 0 100 ""] +( + Pin[0 0 11000 2000 11000 9800 "pin1" "1" 0x0401 ] + ElementArc [0 0 8000 8000 0 360 1000] + + ) diff --git a/packages/holes/hole-M2.fp b/packages/holes/hole-M2.fp new file mode 100644 index 0000000..daf047c --- /dev/null +++ b/packages/holes/hole-M2.fp @@ -0,0 +1,7 @@ + +Element["" "hole-M2" "" "" 9380 9380 -13500 -17500 0 100 ""] +( + Pin[0 0 14000 2000 17500 9380 "pin1" "1" 0x0401 ] + ElementArc [0 0 9000 9000 0 360 1000] + + ) diff --git a/packages/holes/hole-M3.4.fp b/packages/holes/hole-M3.4.fp new file mode 100644 index 0000000..ba1e8ff --- /dev/null +++ b/packages/holes/hole-M3.4.fp @@ -0,0 +1,7 @@ + +Element["" "hole-M3.4" "" "" 13400 13400 -16900 -21000 0 100 ""] +( + Pin[0 0 18400 3000 23400 13400 "pin1" "1" 0x0401 ] + ElementArc [0 0 12500 12500 0 360 1000] + + ) diff --git a/packages/holes/hole-M3.5.fp b/packages/holes/hole-M3.5.fp new file mode 100644 index 0000000..c5c52c5 --- /dev/null +++ b/packages/holes/hole-M3.5.fp @@ -0,0 +1,7 @@ + +Element["" "hole-M3.5" "" "" 13800 13800 -16900 -21000 0 100 ""] +( + Pin[0 0 18400 3000 23400 13800 "pin1" "1" 0x0401 ] + ElementArc [0 0 12500 12500 0 360 1000] + + ) diff --git a/packages/holes/hole-M3.fp b/packages/holes/hole-M3.fp new file mode 100644 index 0000000..a1af2d5 --- /dev/null +++ b/packages/holes/hole-M3.fp @@ -0,0 +1,7 @@ + +Element["" "hole-M3" "" "" 12500 12500 -16900 -21000 0 100 ""] +( + Pin[0 0 17500 2500 22500 12500 "pin1" "1" 0x0401 ] + ElementArc [0 0 12000 12000 0 360 1000] + + ) diff --git a/packages/pinheader/100mil10x2.fp b/packages/pinheader/100mil10x2.fp new file mode 100644 index 0000000..1f0cb9e --- /dev/null +++ b/packages/pinheader/100mil10x2.fp @@ -0,0 +1,29 @@ +Element["" "Header_10x2" "J0" "" 15750 10750 17500 -2500 0 100 ""] +( + Pin[-45000 -5000 7000 3000 8500 3800 "2" "2" ""] + Pin[-35000 -5000 7000 3000 8500 3800 "4" "4" ""] + Pin[-25000 -5000 7000 3000 8500 3800 "6" "6" ""] + Pin[-15000 -5000 7000 3000 8500 3800 "8" "8" ""] + Pin[-5000 -5000 7000 3000 8500 3800 "10" "10" ""] + Pin[5000 -5000 7000 3000 8500 3800 "12" "12" ""] + Pin[15000 -5000 7000 3000 8500 3800 "14" "14" ""] + Pin[25000 -5000 7000 3000 8500 3800 "16" "16" ""] + Pin[35000 -5000 7000 3000 8500 3800 "18" "18" ""] + Pin[45000 -5000 7000 3000 8500 3800 "20" "20" ""] + + Pin[-45000 5000 7000 3000 8500 3800 "1" "1" "square"] + Pin[-35000 5000 7000 3000 8500 3800 "3" "3" ""] + Pin[-25000 5000 7000 3000 8500 3800 "5" "5" ""] + Pin[-15000 5000 7000 3000 8500 3800 "7" "7" ""] + Pin[-5000 5000 7000 3000 8500 3800 "9" "9" ""] + Pin[5000 5000 7000 3000 8500 3800 "11" "11" ""] + Pin[15000 5000 7000 3000 8500 3800 "13" "13" ""] + Pin[25000 5000 7000 3000 8500 3800 "15" "15" ""] + Pin[35000 5000 7000 3000 8500 3800 "17" "17" ""] + Pin[45000 5000 7000 3000 8500 3800 "19" "19" ""] + + ElementLine [50000 -10000 -50000 -10000 1500] + ElementLine [-50000 -10000 -50000 10000 1500] + ElementLine [-50000 10000 50000 10000 1500] + ElementLine [50000 10000 50000 -10000 1500] +) diff --git a/packages/pinheader/100mil2pin.fp b/packages/pinheader/100mil2pin.fp new file mode 100644 index 0000000..6e8c599 --- /dev/null +++ b/packages/pinheader/100mil2pin.fp @@ -0,0 +1,10 @@ + +Element(0x00000000 "Header_2pin" "J0" "" 0 0 125 -30 0 100 0x00000000) +( + Pin(0 0 70 15 85 38 "1" "1" 0x04000101) + Pin(100 0 70 15 85 38 "2" "2" 0x04000001) + ElementLine (150 -50 -50 -50 15) + ElementLine (-50 -50 -50 50 15) + ElementLine (-50 50 150 50 15) + ElementLine (150 50 150 -50 15) + ) diff --git a/packages/100mil3pin.fp b/packages/pinheader/100mil3pin.fp similarity index 100% rename from packages/100mil3pin.fp rename to packages/pinheader/100mil3pin.fp diff --git a/packages/pinheader/100mil3x2.fp b/packages/pinheader/100mil3x2.fp new file mode 100644 index 0000000..eb10720 --- /dev/null +++ b/packages/pinheader/100mil3x2.fp @@ -0,0 +1,13 @@ +Element["" "Header_3x2" "J0" "" 15750 10750 17500 -2500 0 100 ""] +( + Pin[-10000 -5000 7000 1500 8500 3800 "2" "2" "edge2"] + Pin[0 -5000 7000 1500 8500 3800 "4" "4" "edge2"] + Pin[10000 -5000 7000 1500 8500 3800 "6" "6" "edge2"] + Pin[-10000 5000 7000 1500 8500 3800 "1" "1" "square,edge2"] + Pin[0 5000 7000 1500 8500 3800 "3" "3" "edge2"] + Pin[10000 5000 7000 1500 8500 3800 "5" "5" "edge2"] + ElementLine [15000 -10000 -15000 -10000 1500] + ElementLine [-15000 -10000 -15000 10000 1500] + ElementLine [-15000 10000 15000 10000 1500] + ElementLine [15000 10000 15000 -10000 1500] +) diff --git a/packages/pinheader/100mil4pin.fp b/packages/pinheader/100mil4pin.fp new file mode 100644 index 0000000..1a671ad --- /dev/null +++ b/packages/pinheader/100mil4pin.fp @@ -0,0 +1,12 @@ + +Element(0x00000000 "Header_4pin" "J0" "" 0 0 125 -30 0 100 0x00000000) +( + Pin(0 0 70 15 85 38 "1" "1" 0x04000101) + Pin(100 0 70 15 85 38 "2" "2" 0x04000001) + Pin(200 0 70 15 85 38 "3" "3" 0x04000001) + Pin(300 0 70 15 85 38 "4" "4" 0x04000001) + ElementLine (350 -50 -50 -50 15) + ElementLine (-50 -50 -50 50 15) + ElementLine (-50 50 350 50 15) + ElementLine (350 50 350 -50 15) + ) diff --git a/packages/pinheader/100mil5pin.fp b/packages/pinheader/100mil5pin.fp new file mode 100644 index 0000000..7fef2c0 --- /dev/null +++ b/packages/pinheader/100mil5pin.fp @@ -0,0 +1,13 @@ + +Element(0x00000000 "Header_8pin" "J0" "" 0 0 325 -30 0 100 0x00000000) +( + Pin(0 0 70 14 85 38 "1" "1" 0x04000101) + Pin(100 0 70 14 85 38 "2" "2" 0x04000001) + Pin(200 0 70 14 85 38 "3" "3" 0x04000001) + Pin(300 0 70 14 85 38 "4" "4" 0x04000001) + Pin(400 0 70 14 85 38 "5" "5" 0x04000001) + ElementLine (450 -50 -50 -50 15) + ElementLine (-50 -50 -50 50 15) + ElementLine (-50 50 450 50 15) + ElementLine (450 50 450 -50 15) + ) diff --git a/packages/pinheader/100mil5x2.fp b/packages/pinheader/100mil5x2.fp new file mode 100644 index 0000000..ce322df --- /dev/null +++ b/packages/pinheader/100mil5x2.fp @@ -0,0 +1,17 @@ +Element["" "Header_5x2" "J0" "" 15750 10750 17500 -2500 0 100 ""] +( + Pin[-20000 -5000 7000 3000 8500 3800 "2" "2" ""] + Pin[-10000 -5000 7000 3000 8500 3800 "4" "4" ""] + Pin[0 -5000 7000 3000 8500 3800 "6" "6" ""] + Pin[10000 -5000 7000 3000 8500 3800 "8" "8" ""] + Pin[20000 -5000 7000 3000 8500 3800 "10" "10" ""] + Pin[-20000 5000 7000 3000 8500 3800 "1" "1" "square"] + Pin[-10000 5000 7000 3000 8500 3800 "3" "3" ""] + Pin[0 5000 7000 3000 8500 3800 "5" "5" ""] + Pin[10000 5000 7000 3000 8500 3800 "7" "7" ""] + Pin[20000 5000 7000 3000 8500 3800 "9" "9" ""] + ElementLine [25000 -10000 -25000 -10000 1500] + ElementLine [-25000 -10000 -25000 10000 1500] + ElementLine [-25000 10000 25000 10000 1500] + ElementLine [25000 10000 25000 -10000 1500] +) diff --git a/packages/pinheader/100mil6pin.fp b/packages/pinheader/100mil6pin.fp new file mode 100644 index 0000000..b2f3a41 --- /dev/null +++ b/packages/pinheader/100mil6pin.fp @@ -0,0 +1,14 @@ + +Element(0x00000000 "Header_8pin" "J0" "" 0 0 325 -30 0 100 0x00000000) +( + Pin(0 0 70 30 85 38 "1" "1" 0x04000101) + Pin(100 0 70 30 85 38 "2" "2" 0x04000001) + Pin(200 0 70 30 85 38 "3" "3" 0x04000001) + Pin(300 0 70 30 85 38 "4" "4" 0x04000001) + Pin(400 0 70 30 85 38 "5" "5" 0x04000001) + Pin(500 0 70 30 85 38 "6" "6" 0x04000001) + ElementLine (550 -50 -50 -50 15) + ElementLine (-50 -50 -50 50 15) + ElementLine (-50 50 550 50 15) + ElementLine (550 50 550 -50 15) + ) diff --git a/packages/pinheader/100mil8pin.fp b/packages/pinheader/100mil8pin.fp new file mode 100644 index 0000000..b496051 --- /dev/null +++ b/packages/pinheader/100mil8pin.fp @@ -0,0 +1,16 @@ + +Element(0x00000000 "Header_8pin" "J0" "" 0 0 325 -30 0 100 0x00000000) +( + Pin(0 0 70 30 85 38 "1" "1" 0x04000101) + Pin(100 0 70 30 85 38 "2" "2" 0x04000001) + Pin(200 0 70 30 85 38 "3" "3" 0x04000001) + Pin(300 0 70 30 85 38 "4" "4" 0x04000001) + Pin(400 0 70 30 85 38 "5" "5" 0x04000001) + Pin(500 0 70 30 85 38 "6" "6" 0x04000001) + Pin(600 0 70 30 85 38 "7" "7" 0x04000001) + Pin(700 0 70 30 85 38 "8" "8" 0x04000001) + ElementLine (750 -50 -50 -50 15) + ElementLine (-50 -50 -50 50 15) + ElementLine (-50 50 750 50 15) + ElementLine (750 50 750 -50 15) + ) diff --git a/packages/pinheader/50milpitch.py b/packages/pinheader/50milpitch.py new file mode 100755 index 0000000..76b1b78 --- /dev/null +++ b/packages/pinheader/50milpitch.py @@ -0,0 +1,49 @@ +#!/usr/bin/python +# Copyright 2011 by Bdale Garbee . GPLv2 +# +# Program to emit PCB footprint for +# Sullins Connector Solutions single row 0.050" header pins +# +# Needs pin count on command line, in range of 2..50 +# + +# dimensions in mm +PinSpacing = 1.27 + +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 = int(sys.argv[1]) +if pins < 2: + sys.stderr.write('Must be at least 2 pins\n') + sys.exit(1) +if pins > 15: + sys.stderr.write('Must be no more than 15 pins\n') + sys.exit(1) + +print '# author: Bdale Garbee' +print '# email: bdale@gag.com' +print '# dist-license: GPL 2' +print '# use-license: unlimited' + +print 'Element[0x0 "50mil%ipin"' % pins,'"" "" 0 0 0 0 0 100 0x0]' +print "(" +for pin in range (1,pins+1): + pinnum = pins + 1 - pin + if pinnum == 1: + Flags = '0x0101' + else: + Flags = '0x0001' + print ' Pin[', \ + mm2mils100((pins-1)*PinSpacing - (pin-1)*PinSpacing), \ + 0, \ + 4200, \ + 1200, \ + 4800, \ + 2800, \ + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + +print ")" diff --git a/packages/pinheader/Makefile b/packages/pinheader/Makefile new file mode 100644 index 0000000..eef2cc8 --- /dev/null +++ b/packages/pinheader/Makefile @@ -0,0 +1,7 @@ +all: 50mil4pin.fp + +50mil4pin.fp: 50milpitch.py + ./50milpitch.py 4 > 50mil4pin.fp + +clean: + rm -f 50mil*.fp diff --git a/packages/tyco/Makefile b/packages/tyco/Makefile new file mode 100644 index 0000000..3d4efa8 --- /dev/null +++ b/packages/tyco/Makefile @@ -0,0 +1,13 @@ +all: 282834-10.fp 0-215079-4.fp tphybrid.fp + +282834-10.fp: buchanan.py buchanan-Series.sh + ./buchanan-Series.sh + +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/packages/tyco/buchanan-Series.sh b/packages/tyco/buchanan-Series.sh new file mode 100755 index 0000000..6648476 --- /dev/null +++ b/packages/tyco/buchanan-Series.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +for i in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +do + FILE="282834-"$i + ./buchanan.py $i > $FILE.fp +done diff --git a/packages/tyco/buchanan.py b/packages/tyco/buchanan.py new file mode 100755 index 0000000..272c758 --- /dev/null +++ b/packages/tyco/buchanan.py @@ -0,0 +1,87 @@ +#!/usr/bin/python +# Copyright 2007 by Bdale Garbee . GPLv2 +# +# Program to emit PCB footprint for +# Tyco Electronics Buchanan 2.54mm pitch terminal blocks +# +# Needs pin count on command line, in range of 2..12 +# + +# dimensions in mm from ENG_CS_1308389_EUROSTYLE_TERMINAL_BLOCKS_0607.pdf +PinDiam = 1.15 +PinSpacing = 2.54 +RowOffset = 3.25 +BoxHeight = 6.5 +BoxEnd = 1.5 +LineWidth = 600 +Thickness = 1.8 +Clearance = .32 +Mask = Thickness + 0.32 + +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 = int(sys.argv[1]) +if pins < 2: + sys.stderr.write('Must be at least 2 pins\n') + sys.exit(1) +if pins > 15: + sys.stderr.write('Must be no more than 15 pins\n') + sys.exit(1) + +print '# author: Bdale Garbee' +print '# email: bdale@gag.com' +print '# dist-license: GPL 2' +print '# use-license: unlimited' + +print 'Element[0x0 "282834-%i"' % pins,'"" "" 0 0 0 0 0 100 0x0]' +print "(" +for pin in range (1,pins+1): + pinnum = pins + 1 - pin + if pinnum == 1: + Flags = '0x0101' + else: + Flags = '0x0001' + print ' Pin[', \ + mm2mils100(BoxEnd + (pin-1)*PinSpacing), \ + mm2mils100(RowOffset), \ + mm2mils100(Thickness), \ + mm2mils100(Clearance), \ + mm2mils100(Mask), \ + mm2mils100(PinDiam), \ + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + +BoxWidth = (BoxEnd * 2) + ((pins - 1) * PinSpacing); + +print ' ElementLine[', \ + mm2mils100(0), \ + mm2mils100(0), \ + mm2mils100(0), \ + mm2mils100(BoxHeight), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(0), \ + mm2mils100(BoxHeight), \ + mm2mils100(BoxWidth), \ + mm2mils100(BoxHeight), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(BoxWidth), \ + mm2mils100(BoxHeight), \ + mm2mils100(BoxWidth), \ + mm2mils100(0), \ + LineWidth, ']' + +print ' ElementLine[', \ + mm2mils100(BoxWidth), \ + mm2mils100(0), \ + mm2mils100(0), \ + mm2mils100(0), \ + LineWidth, ']' + +print ")" diff --git a/packages/tyco/micromatch b/packages/tyco/micromatch new file mode 100755 index 0000000..d367dbd --- /dev/null +++ b/packages/tyco/micromatch @@ -0,0 +1,12 @@ +#!/bin/sh + +for i in 4 6 8 10 12 14 16 18 20 +do + TENS=$(( i / 10 )) + ONES=$(( i % 10 )) + FILE=$TENS"-215079-"$ONES + ./micromatch-th-v.py $i > $FILE.fp + FILE=$TENS"-338068-"$ONES + ./micromatch-th-v.py $i latch > $FILE.fp +done +./micromatch-th-v.py 24 > 2-215079-24.fp diff --git a/packages/tyco/micromatch-th-v.py b/packages/tyco/micromatch-th-v.py new file mode 100755 index 0000000..5a99300 --- /dev/null +++ b/packages/tyco/micromatch-th-v.py @@ -0,0 +1,124 @@ +#!/usr/bin/python +# Copyright 2009 by Bdale Garbee . GPLv2 +# +# Program to emit PCB footprint for +# Tyco/AMP Micro-MaTch vertical through-hole female connectors +# +# Needs pin count on command line, in range of 4..20 even numbers only +# + +# dimensions in mm from C_215079_v.pdf datasheet +PinDiam = 0.8 +PinSpacing = 1.27 +RowSpacing = 2.54 + +MntX = 1.4 +MntY = 1.8 +MntDiam = 1.5 + +BoxY = 5.1 +BoxXbase = 4.79 + +LineWidth = 600 + +MinAnnular = 700 +MinClearance = 600 +MaskDelta = 300 + +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 = int(sys.argv[1]) + +if pins < 4: + sys.stderr.write('Must be at least 4 pins\n') + sys.exit(1) +if pins == 22: + sys.stderr.write('There is no 22 pin version!\n') + sys.exit(1) +if pins > 24: + sys.stderr.write('Must be no more than 24 pins\n') + sys.exit(1) + +if len(sys.argv) > 2: + if sys.argv[2] == "latch": + BoxXbase = 5.89 + if pins == 24: + sys.stderr.write('There is no 24 pin latching version!\n') + sys.exit(1) + +print '# author: Bdale Garbee' +print '# email: bdale@gag.com' +print '# dist-license: GPL 2' +print '# use-license: unlimited' + +print 'Element[0x0 "MicroMatch%i"' % pins,'"" "" 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 == 1: + Flags = '0x0101' + else: + Flags = '0x0001' + print ' Pin[', \ + mm2mils100((pinnum-1)*PinSpacing), \ + mm2mils100(spacing), \ + mm2mils100(PinDiam)+(MinAnnular*2), \ + (MinClearance*2), \ + mm2mils100(PinDiam)+(MaskDelta*2), \ + mm2mils100(PinDiam), \ + '"pin%i"' % pinnum, '"%i"' % pinnum, 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)+(MinAnnular*2), \ + (MinClearance*2), \ + mm2mils100(MntDiam)+(MaskDelta*2), \ + mm2mils100(MntDiam), \ + '"mnt" "0"', '0x0001', ']' + +BoxX = (pins - 1) * PinSpacing + BoxXbase +BoxX1 = -(BoxXbase/2) +BoxX2 = BoxX1 + BoxX +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 ")" diff --git a/packages/tyco/tphybrid.py b/packages/tyco/tphybrid.py new file mode 100755 index 0000000..babf03f --- /dev/null +++ b/packages/tyco/tphybrid.py @@ -0,0 +1,123 @@ +#!/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 +BUPinDiam = 1.1 # screw terminals +MMPinDiam = 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' + if pinnum % 2 == 0: + PinDiam = MMPinDiam + else: + PinDiam = BUPinDiam + print ' Pin[', \ + mm2mils100((pinnum-1)*PinSpacing), \ + mm2mils100(spacing), \ + mm2mils100(PinDiam + 0.70), \ + 1200, \ + mm2mils100(PinDiam + 0.86), \ + mm2mils100(PinDiam), \ + '"pin%i"' % pinnum, '"%i"' % pinnum, Flags, ']' + +print ' Pin[', \ + mm2mils100((-2)*PinSpacing), \ + mm2mils100(RowSpacing), \ + mm2mils100(PinDiam + 0.32), \ + 1200, \ + mm2mils100(PinDiam + 0.48), \ + 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 ")" -- 2.47.2