add footprint for Infineon CoolMOS SOT-223'ish FET package
[hw/altusmetrum] / packages / 11071.py
1 #! /usr/bin/python3
2 #
3 # generate lihata footprint for 4ucon 11071 tabbed micro USB connector
4 # Copyright 2020 by Bdale Garbee <bdale@gag.com>
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 from fplht import *
17
18 # dimensions taken from 4ucon part drawing
19 # note that we define Y origin to be the board edge, not center mass
20
21 pad_width = 0.4
22 pad_height = 1.35
23 pad_spacing = 0.65
24 pad_y = 1.45 + 3.35 - pad_height/2
25
26 tab_width = 1.9
27 tab_height = 1.9
28 tab_x = 0.2 + tab_width / 2
29 tab_y = 1.45
30
31 slot_x = 6.40 / 2
32 slot_y = 1.45
33 slot_width = 0.45
34 slot_height = 1.55
35 slot_copper = (2.15 - 1.55) / 2
36
37 wing_width = 1.6
38 wing_height = 1.4
39 wing_x = 3.2
40 wing_y = 1.45 + 2.25
41
42 fp = footprint()
43
44 fp.name = "11071"
45 fp.description = "4ucon 11071 tabbed micro USB connector"
46 fp.copyright = "Copyright 2020 by Bdale Garbee <bdale@gag.com>"
47
48 fp.pad({'x': pad_spacing * 2,
49         'y': pad_y,
50         'width': pad_width,
51         'height': pad_height,
52         'name': 'VBUS',
53         'number': '1'})
54 fp.pad({'x': pad_spacing * 1,
55         'y': pad_y,
56         'width': pad_width,
57         'height': pad_height,
58         'name': 'D-',
59         'number': '2'})
60 fp.pad({'x': pad_spacing * 0,
61         'y': pad_y,
62         'width': pad_width,
63         'height': pad_height,
64         'name': 'D+',
65         'number': '3'})
66 fp.pad({'x': pad_spacing * -1,
67         'y': pad_y,
68         'width': pad_width,
69         'height': pad_height,
70         'name': 'HS',
71         'number': '4'})
72 fp.pad({'x': pad_spacing * -2,
73         'y': pad_y,
74         'width': pad_width,
75         'height': pad_height,
76         'name': 'GND',
77         'number': '5'})
78
79 # mounting "wings", or tabs next to the signal pads
80
81 fp.pad({'x': -wing_x,
82         'y': wing_y,
83         'width': wing_width,
84         'height': wing_height,
85         'spacing': 0,
86         'name': "",
87         'number': "G"})
88 fp.pad({'x':  wing_x,
89         'y':  wing_y,
90         'width': wing_width,
91         'height': wing_height,
92         'spacing': 0,
93         'name': "",
94         'number': "G"})
95
96 # mounting tabs under package
97
98 fp.pad({'x': -tab_x,
99         'y': tab_y,
100         'width': tab_width,
101         'height': tab_height,
102         'spacing': 0,
103         'name': "",
104         'number': "G"})
105 fp.pad({'x':  tab_x,
106         'y': tab_y,
107         'width': tab_width,
108         'height': tab_height,
109         'spacing': 0,
110         'name': "",
111         'number': "G"})
112
113 # slots for through-hole mounting tabs
114 fp.slot({'x': -slot_x,
115          'y': slot_y,
116          'width': slot_width,
117          'height': slot_height,
118          'thickness': slot_width + slot_copper * 2,
119          'name': 'GND',
120          'number': 5})
121 fp.slot({'x':  slot_x,
122          'y': slot_y,
123          'width': slot_width,
124          'height': slot_height,
125          'thickness': slot_width + slot_copper * 2,
126          'name': 'GND',
127          'number': 5})
128
129 fp.emit()