5 # PCB, interactive printed circuit board design
6 # Copyright (C) 1994,1995,1996 Thomas Nau
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 # Contact addresses for paper mail and Email:
23 # Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
24 # Thomas.Nau@rz.uni-ulm.de
29 # -------------------------------------------------------------------
36 # by Olaf Kaluza <criseis!olaf@ruhrgebiet.individual.net>
38 `Element(0x00 "$1" "`$2'" "$3" 400 800 0 100 0x00)
41 # The JEDEC drawing specifies that pins #1
42 # and #2 have a diameter from 38 to 43 mils.
43 # The mounting holes (pins 3 and 4 here) are
44 # 151 to 161 mils. Increasing by 15 mils would
45 # give a drill diameter of 58 and 176 mils.
46 # 55 and 177 are close in standard drill sizes.
47 # a #4 machine screw is 110 mils, a #6 is 140 mils and a
48 # #8 is 160 mils in diameter. Looks like you can not count
49 # on using a #8 for a TO3, but a #6 is fair.
50 # This would give something like a 90 pad size for a
51 # 35 mil annular ring for pins 1 and 2.
52 PIN(650, 1000, 90, 55, 1)
53 PIN(650, 550, 90, 55, 2)
54 PIN(1320, 775, 250, 177, 3)
55 PIN(125, 775, 250, 177, 4)
57 ElementArc(700 775 500 500 70 40 20)
58 ElementArc(700 775 500 500 250 40 20)
59 ElementArc(1320 775 180 180 125 110 20)
60 ElementArc(125 775 180 180 305 110 20)
61 ElementLine(25 925 530 1245 20)
62 ElementLine(25 625 530 305 20)
63 ElementLine(870 305 1430 630 20)
64 ElementLine(870 1245 1430 920 20)
69 # by Volker Bosch, 45 degree, TO3
71 `Element(0x00 "$1" "`$2'" "$3" 480 510 0 100 0x00)
73 PIN(750, 750, 90, 55, 1)
74 PIN(960, 380, 90, 55, 2)
75 PIN(1300, 830, 250, 177, 3)
76 PIN(280, 210, 250, 177, 4)
78 ElementLine(660 1010 1300 1010 20)
79 ElementLine(1210 230 1470 770 20)
80 ElementLine(110 270 375 810 20)
81 ElementLine(280 30 920 30 20)
83 ElementArc(790 520 420 420 0 360 20)
84 ElementArc(790 520 510 510 215 40 20)
85 ElementArc(790 520 510 510 35 40 20)
87 ElementArc(1300 830 180 180 90 110 20)
88 ElementArc(280 210 180 180 270 110 20)
93 # -------------------------------------------------------------------
100 # by Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
102 `Element(0x00 "$1" "`$2'" "$3" 110 110 0 100 0x00)
106 # The JEDEC drawing specifies a pin diameter of 16 to 21 mils
107 # This suggests a minimum drill size of 36 mils. 42 is a common
108 # standard drill (#58). A 72 mil pad gives a 15 mil annular ring.
109 PIN(100, 200, 72, 42, 1)
110 PIN(200, 300, 72, 42, 2)
111 PIN(300, 200, 72, 42, 3)
113 ElementArc(200 200 150 150 0 360 10)
114 ElementArc(200 200 170 170 0 360 20)
115 ElementLine(65 95 35 65 20)
116 ElementLine(35 65 65 35 20)
117 ElementLine(65 35 95 65 20)
122 # -------------------------------------------------------------------
129 define(`PKG_TO18BASE',
130 `Element["" "$1" "`$2'" "$3" 10300 11100 6000 7000 0 100 ""]
133 # The JEDEC drawing shows a pin diameter of 16-21 mils
138 # TO18: |3 1| <-- bottom view (supposed to be a circle)
142 # NOTE: some vendors, ST for example, number the pins
143 # differently. Here we follow the JEDEC drawing.
145 # the pins are arranged along a 100 mil diameter
146 # circle. The can outline is 178 to 195 mils
147 # for the top of the can and 209 to 230 mils
148 # for the bottom edge of the can
150 Pin[0 -5000 5500 3000 6100 3500 "1" "1" ""]
151 Pin[-5000 0 5500 3000 6100 3500 "2" "2" ""]
152 Pin[0 5000 5500 3000 6100 3500 "3" "3" ""]
153 # x, y, width, height, start angle, delta angle, thickness
154 ElementArc [0 0 9800 9800 0 360 1000]
155 # tab is 28 to 48 mils long, 36 to 46 wide
156 # and comes off at an angle of 45 deg clockwise from
157 # pin 1 when looking at the top of the board
158 ElementLine [6700 -7900 9400 -10600 1000]
159 ElementLine [7300 -7300 10000 -10000 1000]
160 ElementLine [7900 -6700 10600 -9400 1000]
161 ElementLine [9400 -10600 10600 -9400 1000]
164 # -------------------------------------------------------------------
172 define(`PKG_TO39BASE',
173 `Element["" "$1" "`$2'" "$3" 18800 18800 6000 7000 0 100 ""]
175 # The JEDEC drawing shows a pin diameter of 16-21 mils
180 # TO39: |3 1| <-- bottom view (supposed to be a circle)
184 # NOTE: some vendors, ST for example, number the pins
185 # differently. Here we follow the JEDEC drawing.
187 # the pins are arranged along a 200 mil diameter
188 # circle. The can outline is 315 to 335 mils (320 nom)
189 # for the top of the can and 350 to 370 mils (360 nom)
190 # for the bottom edge of thecan
192 Pin[0 -10000 5500 3000 6100 3500 "1" "1" "square"]
193 Pin[-10000 0 5500 3000 6100 3500 "2" "2" ""]
194 Pin[0 10000 5500 3000 6100 3500 "3" "3" ""]
195 # tab is 29 to 40 mils long, 28 to 34 wide
196 # and comes off at an angle of 45 deg clockwise from
197 # pin 1 when looking at the top of the board
198 ElementLine [12700 -13900 14800 -16000 1000]
199 ElementLine [13300 -13300 15400 -15400 1000]
200 ElementLine [13900 -12700 16000 -14800 1000]
201 ElementLine [16000 -14800 14800 -16000 1000]
202 # x, y, width, height, start angle, delta angle, thickness
203 ElementArc [0 0 18300 18300 0 360 1000]
209 # -------------------------------------------------------------------
216 # by Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
217 # lineare Anordnung der Pins
218 define(`PKG_TO92BASE',
219 `Element(0x00 "$1" "`$2'" "$3" 60 70 0 100 0x00)
222 # The JEDEC drawing shows a pin diameter of 16-21 mils
226 # TO92: | 1 2 3 | <-- bottom view
229 # The pin to pin spacing is 100 mils.
230 PIN(250, 200, 72, 42, 1)
231 PIN(150, 200, 72, 42, 2)
232 PIN(50, 200, 72, 42, 3)
234 ElementArc(150 200 100 100 315 270 10)
235 ElementLine( 80 130 220 130 10)
240 # -------------------------------------------------------------------
247 # by Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
248 define(`PKG_TO126LAY',
249 `Element(0x00 "$1" "`$2'" "$3" 80 480 1 100 0x00)
252 # From the JEDEC drawing, the pins are rectangular with dimensions
253 # 25-35 mil X 15-25 mil
255 # This gives a diagonal dimension of 29.2 to 43.0 mils.
256 # Pin pitch is 80 to 100 mils.
258 # For a minimum clearance of 10 mils (probably not unreasonable if
259 # you are doing a design with leaded parts, this gives a max pad size
260 # of 80 mils. A 52 mil drill will give 14 mil annular ring which should
263 # The mounting hole is 100 to 130 mils diameter
264 PIN(110, 600, 80, 52, 1)
265 PIN(200, 600, 80, 52, 2)
266 PIN(290, 600, 80, 52, 3)
268 # Befestigungsbohrung
269 PIN(200, 170, 130, 110, 4)
272 ElementLine(100 600 100 500 30)
273 ElementLine(200 600 200 500 30)
274 ElementLine(300 600 300 500 30)
277 ElementLine( 50 500 350 500 20)
278 ElementLine(350 500 350 70 20)
279 ElementLine(350 70 50 70 20)
280 ElementLine( 50 70 50 500 20)
285 define(`PKG_TO126LAY_WIDE',
286 `Element(0x00 "$1" "`$2'" "$3" 80 480 1 100 0x00)
288 PIN(110, 600, 80, 52, 1)
289 PIN(200, 700, 80, 52, 2)
290 PIN(290, 600, 80, 52, 3)
292 # Befestigungsbohrung
293 PIN(200, 170, 130, 110, 4)
296 ElementLine(100 600 100 500 30)
297 ElementLine(200 700 200 500 30)
298 ElementLine(300 600 300 500 30)
301 ElementLine( 50 500 350 500 20)
302 ElementLine(350 500 350 70 20)
303 ElementLine(350 70 50 70 20)
304 ElementLine( 50 70 50 500 20)
309 define(`PKG_TO126STAND',
310 `Element(0x00 "$1" "`$2'" "$3" 60 170 0 100 0x00)
312 PIN(110, 100, 80, 52, 1)
313 PIN(200, 100, 80, 52, 2)
314 PIN(290, 100, 80, 52, 3)
316 ElementLine(50 50 350 50 20)
317 ElementLine(350 50 350 150 20)
318 ElementLine(350 150 50 150 20)
319 ElementLine(50 150 50 50 20)
324 define(`PKG_TO126STAND_WIDE',
325 `Element(0x00 "$1" "`$2'" "$3" 270 170 0 100 0x00)
327 PIN(110, 100, 80, 52, 1)
328 PIN(200, 200, 80, 52, 2)
329 PIN(290, 100, 80, 52, 3)
332 ElementLine(200 200 200 150 30)
333 ElementLine( 50 50 350 50 20)
334 ElementLine(350 50 350 150 20)
335 ElementLine(350 150 50 150 20)
336 ElementLine( 50 150 50 50 20)
339 ElementLine(150 50 150 150 10)
340 ElementLine(250 50 250 150 10)
345 # -------------------------------------------------------------------
352 # by Volker Bosch (bosch@iema.e-technik.uni-stuttgart.de)
353 define(`PKG_TO220LAY',
354 `Element(0x00 "$1" "`$2'" "$3" 50 570 1 100 0x00)
357 # I have been unable to locate the JEDEC drawing. However, refering
358 # to http://www.zetex.com/3.0/pdf/TO220.pdf which claims to be JEDEC
359 # compliant, I see that the pins are rectangular with dimensions:
361 # 15-40 mils X 16-20 mils which gives a diagonal of
364 # The pin pitch is 90 to 110 mils.
366 # The mounting hole is 139 to 160 mils diameter
367 PIN(100, 800, 90, 60, 1)
368 PIN(200, 800, 90, 60, 2)
369 PIN(300, 800, 90, 60, 3)
371 # Befestigungsbohrung
372 PIN(200, 130, 150, 130, 4)
375 ElementLine(100 800 100 620 30)
376 ElementLine(200 800 200 620 30)
377 ElementLine(300 800 300 620 30)
380 ElementLine( 0 620 400 620 20)
381 ElementLine(400 620 400 245 20)
382 ElementLine(400 245 0 245 20)
383 ElementLine( 0 245 0 620 20)
385 # Kuehlfahne mit Kerben
386 ElementLine( 0 245 400 245 20)
387 ElementLine(400 245 400 120 20)
388 ElementLine(400 120 385 120 20)
389 ElementLine(385 120 385 50 20)
390 ElementLine(385 50 400 50 20)
391 ElementLine(400 50 400 10 20)
392 ElementLine(400 10 0 10 20)
393 ElementLine( 0 10 0 50 20)
394 ElementLine( 0 50 15 50 20)
395 ElementLine( 15 50 15 120 20)
396 ElementLine( 15 120 0 120 20)
397 ElementLine( 0 120 0 245 20)
402 define(`PKG_TO220LAY_WIDE',
403 `Element(0x00 "$1" "`$2'" "$3" 50 570 1 100 0x00)
405 PIN(100, 800, 90, 60, 1)
406 PIN(200, 900, 90, 60, 2)
407 PIN(300, 800, 90, 60, 3)
409 # Befestigungsbohrung
410 PIN(200, 130, 150, 130, 4)
413 ElementLine(100 800 100 620 30)
414 ElementLine(200 900 200 620 30)
415 ElementLine(300 800 300 620 30)
418 ElementLine( 0 620 400 620 20)
419 ElementLine(400 620 400 245 20)
420 ElementLine(400 245 0 245 20)
421 ElementLine( 0 245 0 620 20)
423 # Kuehlfahne mit Kerben
424 ElementLine( 0 245 400 245 20)
425 ElementLine(400 245 400 120 20)
426 ElementLine(400 120 385 120 20)
427 ElementLine(385 120 385 50 20)
428 ElementLine(385 50 400 50 20)
429 ElementLine(400 50 400 10 20)
430 ElementLine(400 10 0 10 20)
431 ElementLine( 0 10 0 50 20)
432 ElementLine( 0 50 15 50 20)
433 ElementLine( 15 50 15 120 20)
434 ElementLine( 15 120 0 120 20)
435 ElementLine( 0 120 0 245 20)
440 define(`PKG_TO220STAND',
441 `Element(0x00 "$1" "`$2'" "$3" 0 10 0 100 0x00)
443 PIN(100, 200, 90, 60, 1)
444 PIN(200, 200, 90, 60, 2)
445 PIN(300, 200, 90, 60, 3)
448 ElementLine( 0 80 400 80 20)
449 ElementLine(400 80 400 260 20)
450 ElementLine(400 260 0 260 20)
451 ElementLine( 0 260 0 80 20)
453 # Kuehlfahne icl. Bohrung
454 ElementLine( 0 80 400 80 20)
455 ElementLine(400 80 400 140 20)
456 ElementLine(400 140 0 140 20)
457 ElementLine( 0 140 0 80 20)
459 ElementLine(130 80 130 140 10)
460 ElementLine(270 80 270 140 10)
465 define(`PKG_TO220STAND_WIDE',
466 `Element(0x00 "$1" "`$2'" "$3" 0 10 0 100 0x00)
468 PIN(100, 200, 90, 60, 1)
469 PIN(200, 300, 90, 60, 2)
470 PIN(300, 200, 90, 60, 3)
473 ElementLine( 0 80 400 80 20)
474 ElementLine(400 80 400 260 20)
475 ElementLine(400 260 0 260 20)
476 ElementLine( 0 260 0 80 20)
478 # Kuehlfahne icl. Bohrung
479 ElementLine( 0 80 400 80 20)
480 ElementLine(400 80 400 140 20)
481 ElementLine(400 140 0 140 20)
482 ElementLine( 0 140 0 80 20)
484 ElementLine(130 80 130 140 10)
485 ElementLine(270 80 270 140 10)
488 ElementLine(200 300 200 260 30)
493 # Small outline transistors, taken from some nice data sheets
494 # by NEC/CEL for the NE688 series.
495 # WX, WY are width of the pad footprint
496 # DX, DY are center-to-center pad spacing
497 # OX, OY are outline size for drawing
498 # There is good reason to make OY match the size of plastic package,
499 # but I suggest making OX small enough to not get ink on the pad,
500 # even if that understates the size of the real package.
501 # Jan 6, 2000 Larry Doolittle <LRDoolittle@lbl.gov>
502 # Status: Untested, but looks pretty :-)
504 define(`PKG_BASE_SOT',
505 `Element(0x00 "$1" "`$2'" "$3" 0 eval(DY+WY/2+10) 0 100 0x00)
508 define(`RX', `eval((WX-WID)/2)')
514 define(`Y3', `eval(DY/2)')
515 # Use Pad instead of PAD so all pads come out square
516 Pad(eval(X1-RX) Y1 eval(X1+RX) Y1 WID "1" 0x100)
517 Pad(eval(X2-RX) Y2 eval(X2+RX) Y2 WID "2" 0x100)
518 Pad(eval(X3-RX) Y3 eval(X3+RX) Y3 WID "3" 0x100)
520 define(`LX', `eval((DX-OX)/2)')
521 define(`LY', `eval((DY-OY)/2)')
522 define(`MX', `eval((DX+OX)/2)')
523 define(`MY', `eval((DY+OY)/2)')
524 ElementLine(LX LY LX MY 6)
525 ElementLine(LX MY MX MY 6)
526 ElementLine(MX MY MX LY 6)
527 ElementLine(MX LY LX LY 6)
531 define(`PKG_SOT23_CEL',`
538 PKG_BASE_SOT(`$1',`$2',`$3')
541 define(`PKG_SOT323_CEL',`
548 PKG_BASE_SOT(`$1',`$2',`$3')
558 PKG_BASE_SOT(`$1',`$2',`$3')