Move packages for micropeak over
authorKeith Packard <keithp@keithp.com>
Mon, 18 Mar 2013 23:07:44 +0000 (16:07 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 18 Mar 2013 23:07:44 +0000 (16:07 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
packages/MO-220.py [new file with mode: 0644]
packages/Makefile
packages/bhx1-1025-sm.fp [new file with mode: 0644]
packages/diodes/Makefile
packages/diodes/topled.5c [new file with mode: 0644]
packages/switches/Makefile [new file with mode: 0644]
packages/switches/cus-12.5c [new file with mode: 0644]

diff --git a/packages/MO-220.py b/packages/MO-220.py
new file mode 100644 (file)
index 0000000..ee6ecfd
--- /dev/null
@@ -0,0 +1,145 @@
+#!/usr/bin/python
+# Copyright 2011 by Bdale Garbee <bdale@gag.com>.  GPLv2
+#
+# Program to emit PCB footprint for MO-220 package used by the ATTiny85
+#
+
+# dimensions in mm from the ATTiny datasheed
+
+PinWidth = 0.23          # b   
+PinHeight = 0.55  # L
+PinSpacing = 0.50 # e
+Overall = 4.25    # E
+GndSquare = 2.60  # D2 & E2
+CoreSquare = 2.60
+PinClearance = 2 * (PinSpacing - PinWidth)
+
+# ATMEL specifies 120-150 microns between pad and solder mask
+# AT88RF1354 Appplication note
+#
+PinResist = PinWidth + (2 * 0.07)
+
+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 )
+
+print '# author: Keith Packard'
+print '# email: keithp@keithp.com'
+print '# dist-license: GPL 2'
+print '# use-license: unlimited'
+
+print 'Element[0x0 "MO-220" "" "" 0 0 0 0 0 100 0x0]'
+print "("
+
+# pad under the chip, must be grounded
+print '   Pad[',\
+       mm2mils100(0), \
+       mm2mils100(0), \
+       mm2mils100(0), \
+       mm2mils100(0), \
+       mm2mils100(GndSquare), \
+       mm2mils100(PinClearance), \
+       mm2mils100(PinResist), \
+       '"pin21" "21" "square,nopaste"]'
+
+# vias in the ground pad under the chip
+#for viarow in range (-1,2):
+#  for viacol in range (-1,2):
+#    print '   Pin[',\
+#      mm2mils100(2 * viacol * CoreSquare / 5), \
+#      mm2mils100(2 * viarow * CoreSquare / 5), \
+#      2900, \
+#      2500, \
+#      0, \
+#      1500, \
+#      '"pin21" "21" 0x0002]'
+
+# break pad under chip into a grid to control the resist and paste masks
+
+blocks=3;
+
+for viarow in range (-1, 2):
+  for viacol in range (-1, 2):
+    if (viarow in (-1, 1)) and (viacol in (-1, 1)):
+      # copper sub-square with resist over vias
+      print '   Pad[',\
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       mm2mils100((CoreSquare)/blocks), \
+       0, \
+       0, \
+       '"pin21" "21" "square,nopaste"]'
+    else:
+      # copper sub-square without resist
+      print '   Pad[',\
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       mm2mils100((CoreSquare)/blocks), \
+       0, \
+       mm2mils100((CoreSquare)/blocks), \
+       '"pin21" "21" "square,nopaste"]'
+      # copper spot to control paste mask generation
+      print '   Pad[',\
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       mm2mils100(viacol * CoreSquare / blocks), \
+       mm2mils100(viarow * CoreSquare / blocks), \
+       1500, \
+       0, \
+       mm2mils100((CoreSquare)/blocks), \
+       '"pin21" "21" "square"]'
+
+# pins
+for pin in range (1,6):
+    print '   Pad[',\
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(-Overall/2 + PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
+       mm2mils100(PinWidth), \
+       mm2mils100(PinClearance), \
+       mm2mils100(PinResist), \
+       '"pin%i"' % (16-pin), '"%i"' % (16-pin), '0x0000]'
+
+    print '   Pad[',\
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(+Overall/2 - PinHeight + PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(+Overall/2 - PinWidth/2), \
+       mm2mils100(PinWidth), \
+       mm2mils100(PinClearance), \
+       mm2mils100(PinResist), \
+       '"pin%i"' % pin, '"%i"' % pin, '0x0000]'
+      
+    print '   Pad[',\
+       mm2mils100(Overall/2 - PinHeight + PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(Overall/2 - PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(PinWidth), \
+       mm2mils100(PinClearance), \
+       mm2mils100(PinResist), \
+       '"pin%i"' % (11-pin), '"%i"' % (11-pin), '0x0000]'
+
+    print '   Pad[',\
+       mm2mils100(-Overall/2 + PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(-Overall/2 + PinHeight - PinWidth/2), \
+       mm2mils100((-3 + pin) * PinSpacing), \
+       mm2mils100(PinWidth), \
+       mm2mils100(PinClearance), \
+       mm2mils100(PinResist), \
+       '"pin%i"' % (15+pin), '"%i"' % (15+pin), '0x0000]'
+
+print '   ElementArc[',\
+       mm2mils100(-2.0), \
+       mm2mils100(2.0), \
+       '500 500 0 360 1000 ]'
+print ")"
index 992c4ead1fe98e36fa5d8b2ec42eac84863b18f2..60ee226fa1f7f4075ee645bee5ef3af5511fa40b 100644 (file)
@@ -5,6 +5,7 @@ DIRS= \
        jst \
        molex \
        pinheader \
+       switches \
        tyco
 
 FOOTPRINTS= \
@@ -25,7 +26,8 @@ FOOTPRINTS= \
        UBLOX-MAX.fp \
        TI-QFN32.fp \
        NDK32.fp \
-       sma-edge.fp
+       sma-edge.fp \
+       MO-220.fp
 
 .5c.fp:
        nickle $*.5c > $@
diff --git a/packages/bhx1-1025-sm.fp b/packages/bhx1-1025-sm.fp
new file mode 100644 (file)
index 0000000..2a620d6
--- /dev/null
@@ -0,0 +1,15 @@
+Element["" "BHX1-1025-SM" "" "" 0 0 -240000 -24000 0 100 ""]
+(
+       Pad[-29500 -5000 -29500 5000 10000 1000 10500 "VCC" "1" "square,edge2"]
+       Pad[0 0 0 0 20000 1000 20500 "GND" "2" "square"]
+       Pad[29500 -5000 29500 5000 10000 1000 10500 "VCC" "1" "square,edge2"]
+       ElementLine [-25000 -24000 25000 -24000 1000]
+       ElementLine[25000 -24000 25000 23900 1000]
+       ElementLine[25000 15000 30200 20200 1000]
+       ElementLine[30200 20200 20100 30300 1000]
+       ElementLine[20100 30300 -20100 30300 1000]
+       ElementLine[-20100 30300 -30200 20200 1000]
+       ElementLine[-30200 20200 -25000 15000 1000]
+       ElementLine[-25000 23900 -25000 -24000 1000]
+       ElementLine[-25000 23900 25000 23900 1000]
+)
index 2123d8fb12a4f1e107742777b39b803e21af31a5..a25dd51bd87f7dfd1c41ff944d0003c48e623989 100644 (file)
@@ -2,7 +2,8 @@
 
 FOOTPRINTS = \
        0605.fp \
-       powerdi123.fp
+       powerdi123.fp \
+       topled.fp
 
 .5c.fp:
        nickle $*.5c > $@
diff --git a/packages/diodes/topled.5c b/packages/diodes/topled.5c
new file mode 100644 (file)
index 0000000..e6504dc
--- /dev/null
@@ -0,0 +1,22 @@
+load "../footprint.5c"
+import Footprint;
+
+real   total_width=4.5;
+real   total_height=2.6;
+real   pad_width=1.5;
+real   pad_height = total_height;
+real   pad_center_x = total_width / 2 - pad_width / 2;
+
+element_start("topled");
+pad_mm(-pad_center_x, 0, pad_width, pad_height, "1", "1");
+pad_mm(pad_center_x, 0, pad_width, pad_height, "2", "2");
+
+real   line_left = pad_center_x + 0.5;
+real   line_right = pad_center_x + pad_width / 2 + .3;
+real   line_top = 0 - pad_height / 2 - .3;
+
+line(line_left, line_top, line_right, line_top);
+line(line_right, line_top, line_right, -line_top);
+line(line_right, -line_top, line_left, -line_top);
+     
+element_end();
diff --git a/packages/switches/Makefile b/packages/switches/Makefile
new file mode 100644 (file)
index 0000000..41e782e
--- /dev/null
@@ -0,0 +1,18 @@
+.SUFFIXES: .5c .py .fp
+
+FOOTPRINTS = \
+       cus-12.fp
+
+.5c.fp:
+       nickle $*.5c > $@
+
+.py.fp:
+       python $*.py > $@
+
+all: $(FOOTPRINTS) .gitignore
+
+clean:
+       rm -f $(FOOTPRINTS)
+
+.gitignore: Makefile
+       for i in $@ $(FOOTPRINTS); do echo $$i; done > $@
diff --git a/packages/switches/cus-12.5c b/packages/switches/cus-12.5c
new file mode 100644 (file)
index 0000000..45e4c55
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ * Copyright © 2012 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+ */
+
+load "../footprint.5c"
+import Footprint;
+
+real hole_spacing = 3;
+real hole_diameter = 0.9;
+real hole_x = hole_spacing / 2;
+real hole_y = 0;
+real pad_height = 1.5;
+real pad_width = 0.7;
+real hold_width = 1;
+real hold_height = 0.8;
+real hold_y = -1;
+real hold_x = 6.3 / 2 + 1/2;
+real package_width = 6.7;
+real package_height = 2.6;
+real outline_x = package_width / 2;
+real outline_y = package_height / 2;
+
+real switch_travel = 1.5;
+real switch_width = 1.3;
+real switch_height = 1.5;
+real switch_x = switch_travel / 2 - switch_width / 2;
+real switch_y = package_height / 2;
+
+/* to center */
+real pad_1_x = -2.25;
+real pad_2_x = 0.75;
+real pad_3_x = 2.25;
+
+/* to top */
+real pad_y = 2.5;
+
+element_start("cus-12");
+
+/* pad 1 */
+pad_mm (pad_1_x, -(pad_y - pad_height / 2),
+       pad_width, pad_height,
+       "1", "1");
+
+/* pad 2 */
+pad_mm (pad_2_x, -(pad_y - pad_height / 2),
+       pad_width, pad_height,
+       "2", "2");
+
+pad_mm (pad_3_x, -(pad_y - pad_height / 2),
+       pad_width, pad_height,
+       "3", "3");
+
+pad_mm (-hold_x, -hold_y,
+       hold_width, hold_height,
+       "GND", "GND");
+
+pad_mm (hold_x, -hold_y,
+       hold_width, hold_height,
+       "GND", "GND");
+
+pad_mm (-hold_x, hold_y,
+       hold_width, hold_height,
+       "GND", "GND");
+
+pad_mm (hold_x, hold_y,
+       hold_width, hold_height,
+       "GND", "GND");
+
+pin_mm (-hole_x, hole_y, hole_diameter,
+       0.17, "GND", "GND");
+
+pin_mm (hole_x, hole_y, hole_diameter,
+       0.17, "GND", "GND");
+
+rect (-outline_x, -outline_y, outline_x * 2, outline_y * 2);
+rect (switch_x, switch_y, switch_width, switch_height);
+element_end();
+