]> git.gag.com Git - hw/altusmetrum/blob - packages/11071.py
item per line in footprint script, better copyright handling
[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 import math
17 from fplht import *
18
19 # dimensions taken from 4ucon part drawing
20 # note that we define Y origin to be the board edge, not center mass
21
22 pad_width = 0.4
23 pad_height = 1.35
24 pad_spacing = 0.65
25 pad_y = 1.45 + 3.35 - pad_height/2
26
27 tab_width = 1.9
28 tab_height = 1.9
29 tab_x = 0.2 + tab_width / 2
30 tab_y = 1.45
31
32 slot_x = 6.40 / 2
33 slot_y = 1.45
34 slot_width = 0.45
35 slot_height = 1.55
36 slot_copper = (2.15 - 1.55) / 2
37
38 wing_width = 1.6
39 wing_height = 1.4
40 wing_x = 3.2
41 wing_y = 1.45 + 2.25
42
43 fp = footprint()
44
45 fp.name = "11071"
46 fp.description = "4ucon 11071 tabbed micro USB connector"
47 fp.copyright = "Copyright 2020 by Bdale Garbee <bdale@gag.com>"
48
49 fp.pad({'x' : pad_spacing* 2, 
50         'y' : pad_y, 
51         'width' : pad_width, 
52         'height' : pad_height, 
53         'name' : 'VBUS', 
54         'number' : '1'})
55 fp.pad({'x' : pad_spacing* 1, 
56         'y' : pad_y, 
57         'width' : pad_width, 
58         'height' : pad_height, 
59         'name' : 'D-', 
60         'number' : '2'})
61 fp.pad({'x' : pad_spacing* 0, 
62         'y' : pad_y, 
63         'width' : pad_width, 
64         'height' : pad_height, 
65         'name' : 'D+', 
66         'number' : '3'})
67 fp.pad({'x' : pad_spacing* -1, 
68         'y' : pad_y, 
69         'width' : pad_width, 
70         'height' : pad_height, 
71         'name' : 'HS', 
72         'number' : '4'})
73 fp.pad({'x' : pad_spacing* -2, 
74         'y' : pad_y, 
75         'width' : pad_width, 
76         'height' : pad_height, 
77         'name' : 'GND', 
78         'number' : '5'})
79
80 # mounting "wings", or tabs next to the signal pads 
81
82 fp.pad({'x' : -wing_x, 
83         'y' : wing_y, 
84         'width' : wing_width, 
85         'height' : wing_height, 
86         'spacing' : 0, 
87         'name' : "", 
88         'number' : "G"})
89 fp.pad({'x' :  wing_x, 
90         'y' : wing_y, 
91         'width' : wing_width, 
92         'height' : wing_height, 
93         'spacing' : 0, 
94         'name' : "", 
95         'number' : "G"})
96
97 # mounting tabs under package
98
99 fp.pad({'x' : -tab_x, 
100         'y' : tab_y, 
101         'width' : tab_width, 
102         'height' : tab_height, 
103         'spacing' : 0, 
104         'name' : "", 
105         'number' : "G"})
106 fp.pad({'x' :  tab_x, 
107         'y' : tab_y, 
108         'width' : tab_width, 
109         'height' : tab_height, 
110         'spacing' : 0, 
111         'name' : "", 
112         'number' : "G"})
113
114 # slots for through-hole mounting tabs
115 fp.slot({'x' : -slot_x, 
116          'y' : slot_y, 
117          'width' : slot_width, 
118          'height' : slot_height, 
119          'thickness' : slot_width + slot_copper * 2, 
120          'name' : 'GND', 
121          'number' : 5})
122 fp.slot({'x' :  slot_x, 
123          'y' : slot_y, 
124          'width' : slot_width, 
125          'height' : slot_height, 
126          'thickness' : slot_width + slot_copper * 2, 
127          'name' : 'GND', 
128          'number' : 5})
129
130 fp.emit()