Sign in with STEVE

Compare versions

3 files changed, +52 −11

part.py +28 −2
@@ -5,7 +5,7 @@
55from steve import Model
66import math
77
8package = "TO-220AB" # TO-220AB, TO-220AC, TO-220F, TO-220F-2, TO-247AC, TO-126, TO-92, TO-18, TO-18-2, TO-39 or TO-46
8package = "TO-220AB" # TO-220AB, TO-220AC, TO-220F, TO-220F-2, TO-262, TO-247AC, TO-126, TO-92, TO-18, TO-18-2, TO-39 or TO-46
99detail = "full" # full: body, tab and leads; simple: the body and tab only
1010
1111# Vishay Siliconix, "TO-220AB (High Voltage)", Package Information, document 92506, revision 30-Sep-2024 (DWG 6031), page 2 table; and
@@ -68,8 +68,16 @@
6868# ending 0.1 x the height above the bottom (drawn dashed in the front view, not dimensioned); the TO-220FP-2's cut-off middle lead stub
6969# (O, P, Q on its sheet) isn't modelled.
7070PLATE_T = 0.3
71# Vishay Siliconix, "I2PAK (TO-262) (High Voltage)", Package Information, document 91367, revision 27-Oct-08 (DWG 5977), table (min, max)
72# in mm, the middle (a single value where the table gives only a min or a max: D1, E1 min; L1 max). A body thickness, A1 the leads' back face
73# to the back, b lead width, b2 shoulder width, c lead thickness, c2 tab thickness, D body height, D1 x E1 the thermal pad on the back,
74# E width, e pitch, L lead length below the body, L1 the tab above the body, L2 shoulder length.
75TO262 = dict(A=(4.06, 4.83), A1=(2.03, 3.02), b=(0.51, 0.99), b2=(1.14, 1.78), c=(0.38, 0.74), c2=(1.14, 1.65), D=(8.38, 9.65), D1=(6.86, 6.86),
76 E=(9.65, 10.67), E1=(6.22, 6.22), e=(2.54, 2.54), L=(13.46, 14.10), L1=(1.65, 1.65), L2=(3.56, 3.71))
77# Proportions, for looks: the TO-262 tab above the body is the body's width with its top corners chamfered 0.04 x the width (drawn, not
78# dimensioned), and the thermal pad on the back is flush, from the body's top down.
7179
72PACKAGES = ("TO-220AB", "TO-220AC", "TO-220F", "TO-220F-2", "TO-247AC", "TO-126", "TO-92", "TO-18", "TO-18-2", "TO-39", "TO-46")
80PACKAGES = ("TO-220AB", "TO-220AC", "TO-220F", "TO-220F-2", "TO-262", "TO-247AC", "TO-126", "TO-92", "TO-18", "TO-18-2", "TO-39", "TO-46")
7381if package not in PACKAGES:
7482 raise ValueError("package: " + ", ".join(PACKAGES))
7583
@@ -136,6 +144,24 @@
136144 bodies = {"body_body": ("pa6", "#1c1c1e"), "tab_body": ("copper", "#c8ccd0")}
137145 if detail == "full":
138146 leads(xs, t["b"], t["c"], t["L"], t["L1"], [t["b2"]] * len(xs), z0)
147elif package == "TO-262":
148 # Moulded body with the metal tab: c2 thick, flush with the back, showing as the pad D1 x E1 from the body's top down and rising L1 above it.
149 t = mid(TO262)
150 xs = [0.0, t["e"], 2 * t["e"]]
151 cx = t["e"]
152 back = t["c"] / 2 + t["A1"]
153 front = back - t["A"]
154 z0 = t["L2"] # the shoulders rest on the board
155 top = z0 + t["D"]
156 E, k = t["E"], 0.04 * t["E"]
157 box("body", cx - E / 2, cx + E / 2, front, back, z0, top, "body_body", "new", "Body")
158 box("pad_recess", cx - t["E1"] / 2, cx + t["E1"] / 2, back - t["c2"], back, top - t["D1"], top, "body_body", "cut", "Thermal pad recess")
159 box("pad", cx - t["E1"] / 2, cx + t["E1"] / 2, back - t["c2"], back, top - t["D1"], top, "tab_body", "new", "Thermal pad")
160 through_y("tab_top", [(cx - E / 2, top), (cx + E / 2, top), (cx + E / 2, top + t["L1"] - k), (cx + E / 2 - k, top + t["L1"]),
161 (cx - E / 2 + k, top + t["L1"]), (cx - E / 2, top + t["L1"] - k)], back, back - t["c2"], "tab_body", "join", "Tab")
162 bodies = {"body_body": ("pa6", "#1c1c1e"), "tab_body": ("copper", "#c8ccd0")}
163 if detail == "full":
164 leads(xs, t["b"], t["c"], t["L"], t["L2"], [t["b2"]] * 3, z0)
139165elif package in ("TO-220F", "TO-220F-2"):
140166 # Fully moulded (no exposed metal): the full thickness A up to F below the top, then the thinner top part B thick, its back face flush.
141167 t = mid(TO220F if package == "TO-220F" else TO220F2)
pypart.toml +12 −5
@@ -1,17 +1,17 @@
11name = "steve/to-package"
2version = "1.1.0"
2version = "1.2.0"
33runtime = "steve"
44license = "MIT"
5summary = "Through-hole TO packages standing on the board: TO-220AB, TO-220AC, TO-220F, TO-247AC, TO-126, TO-92 and the TO-18, TO-39 and TO-46 metal cans, from the makers' drawings."
6description = """A through-hole transistor, regulator or diode package standing on the board, from the maker's package drawing: TO-220AB (3 leads) and TO-220AC (2 leads) with the metal tab and its hole, TO-247AC with its exposed copper and side slots, TO-92 with straight leads, TO-126 with its mounting plate, the fully moulded TO-220F with 3 or 2 leads, and the TO-18 (2 or 3 leads), TO-39 and TO-46 metal cans. Lead 1 at the origin, the leads along +X, the moulded front toward -Y. See the README."""
5summary = "Through-hole TO packages standing on the board: TO-220AB, TO-220AC, TO-220F, TO-262, TO-247AC, TO-126, TO-92 and the TO-18, TO-39 and TO-46 metal cans, from the makers' drawings."
6description = """A through-hole transistor, regulator or diode package standing on the board, from the maker's package drawing: TO-220AB (3 leads) and TO-220AC (2 leads) with the metal tab and its hole, TO-247AC with its exposed copper and side slots, TO-92 with straight leads, TO-126 with its mounting plate, the fully moulded TO-220F with 3 or 2 leads, TO-262 (I2PAK) with its tab, and the TO-18 (2 or 3 leads), TO-39 and TO-46 metal cans. Lead 1 at the origin, the leads along +X, the moulded front toward -Y. See the README."""
77tags = ["to-220", "to-247", "to-92", "to-18", "to-39", "to-126", "transistor", "package", "through-hole", "electronics"]
88
99[parameters.package]
1010type = "choice"
1111default = "TO-220AB"
12choices = ["TO-220AB", "TO-220AC", "TO-220F", "TO-220F-2", "TO-247AC", "TO-126", "TO-92", "TO-18", "TO-18-2", "TO-39", "TO-46"]
12choices = ["TO-220AB", "TO-220AC", "TO-220F", "TO-220F-2", "TO-262", "TO-247AC", "TO-126", "TO-92", "TO-18", "TO-18-2", "TO-39", "TO-46"]
1313label = "Package"
14description = "TO-220AB: 3 leads at 2.54. TO-220AC: 2 leads 5.08 apart. TO-247AC: 3 leads at 5.46. TO-92: 3 straight leads at 1.27. TO-18: metal can, 3 leads on a 2.54 circle; TO-18-2: 2 leads 2.54 apart. TO-39: metal can, Ø 9, 3 leads on a 5.08 circle. TO-46: low metal can, 3 leads on a 2.54 circle. TO-126: 3 leads at 2.25, mounting plate on the back. TO-220F: fully moulded, 3 leads at 2.54; TO-220F-2: 2 leads 5.1 apart."
14description = "TO-220AB: 3 leads at 2.54. TO-220AC: 2 leads 5.08 apart. TO-247AC: 3 leads at 5.46. TO-92: 3 straight leads at 1.27. TO-18: metal can, 3 leads on a 2.54 circle; TO-18-2: 2 leads 2.54 apart. TO-39: metal can, Ø 9, 3 leads on a 5.08 circle. TO-46: low metal can, 3 leads on a 2.54 circle. TO-126: 3 leads at 2.25, mounting plate on the back. TO-220F: fully moulded, 3 leads at 2.54; TO-220F-2: 2 leads 5.1 apart. TO-262 (I2PAK): 3 leads at 2.54, metal tab above the body and pad on the back."
1515
1616[parameters.detail]
1717type = "choice"
@@ -47,6 +47,13 @@
4747params = { package = "TO-220F-2" }
4848aliases = ["TO-220F-2", "TO-220FP-2", "TO-220 full pack 2 lead"]
4949standard = "Central TO-220FP-2"
50
51[[presets]]
52id = "TO-262"
53title = "TO-262 (I2PAK), 3 leads, 2.54 pitch, vertical (Vishay outline)"
54params = { package = "TO-262" }
55aliases = ["TO-262-3", "TO-262", "TO-262AA", "I2PAK", "I2-PAK"]
56standard = "Vishay TO-262"
5057
5158[[presets]]
5259id = "TO-247AC"
README.md +12 −4
@@ -8,6 +8,7 @@
88| `TO-220AC` | 2, 5.08 apart | 10.31 x 4.45 x 15.05 (tab included) | Vishay Semiconductors 95221 |
99| `TO-220F` | 3, 2.54 pitch | 10.17 x 4.66 x 15.53, fully moulded | Central Semiconductor TO-220FP |
1010| `TO-220F-2` | 2, 5.10 apart | 10.31 x 4.80 x 15.10, fully moulded | Central Semiconductor TO-220FP-2 |
11| `TO-262` | 3, 2.54 pitch | 10.16 x 4.45 x 10.67 (tab included) | Vishay Siliconix 91367 |
1112| `TO-247AC` | 3, 5.46 pitch | 15.70 x 5.02 x 20.55 | Vishay Siliconix 91360 |
1213| `TO-126` | 3, 2.25 pitch | 7.95 x 2.60 x 11.25 | Central Semiconductor TO-126 |
1314| `TO-92` | 3 straight, 1.27 pitch | 4.83 x 3.68 x 4.83 | TI LP0003A |
@@ -18,7 +19,7 @@
1819
1920Lead 1 is at the origin and the leads run along +X. The moulded front faces -Y (on the TO-92, the flat face), and the metal tab, exposed copper or mounting plate is at the back (+Y).
2021
21- **TO-220, TO-220F, TO-247 and TO-126.** The leads' shoulders rest on the board (the XY plane), and the leads continue their full length down through it.
22- **TO-220, TO-220F, TO-262, TO-247 and TO-126.** The leads' shoulders rest on the board (the XY plane), and the leads continue their full length down through it.
2223- **TO-92.** The body sits 1.5 above the board (TI's reference seating plane).
2324- **TO-18, TO-39 and TO-46.** The flange sits on the board. Leads 1 and 3 are G apart along +X (2.54, or 5.08 on the TO-39), and lead 2 is H off that line along -Y (1.27, or 2.54). The tab is at 45°, beside lead 1.
2425
@@ -32,6 +33,7 @@
3233 - Page 1, drawing: front, side and back views and section F-F.
3334 - Page 2, table (mm): A 4.25–4.65, A1 1.20–1.34, A2 2.563–2.92, b 0.71–0.91, b2 1.14–1.78, c 0.46–0.61, D 14.32–15.86, D1 8.39–8.79, D2 12.20–12.80, E 9.96–10.36, E1 8.14–8.74, E2 0.59–0.69, e 2.54, e1 5.08, H1 6.30–6.70, L 13.40–14.40, L1 3.65–4.05, ØP 3.60–3.80, Q 2.54–2.94.
3435- **Vishay Semiconductors, "TO-220AC"**, Outline Dimensions, document 95221, revision 16-Jan-2026, from vishay.com. The drawing and table use the same letters. Here e1 is 4.88–5.28, the spacing of the two leads, and E2 is 0.76 max. The outline conforms to JEDEC TO-220AC.
36- **Vishay Siliconix, "I2PAK (TO-262) (High Voltage)"**, Package Information, document 91367, revision 27-Oct-08 (DWG 5977), from vishay.com. Table (mm): A 4.06–4.83, A1 2.03–3.02, b 0.51–0.99, b2 1.14–1.78, c 0.38–0.74, c2 1.14–1.65, D 8.38–9.65, D1 6.86 min, E 9.65–10.67, E1 6.22 min, e 2.54, L 13.46–14.10, L1 1.65 max, L2 3.56–3.71. Where the table gives only a minimum or a maximum, the part uses it.
3537- **Vishay Siliconix, "TO-247AC (High Voltage)"**, Package Information, document 91360, revision 07-Sep-2026, from vishay.com. The part uses version 1 (facility code 9) with its nominal values:
3638 - A 5.02, A1 2.41, A2 1.27, b 1.20, b2 2.00, b4 3.00, c 0.50, D 20.55, D1 16.76, D2 0.66, E 15.70, E1 14.02, E2 4.91, e 5.46, L 15.15, L1 4.06, ØP 3.61, ØP1 7.19 (ref), Q 5.50.
3739 - The package reference is JEDEC TO-247, variation AC.
@@ -57,18 +59,20 @@
5759- **TO-220 and TO-247.** A2 (TO-247: A1) runs from the leads' back face to the back of the package. The leads' shoulders (b2, b4) are L1 long. On the TO-220, the metal tab is A1 thick: E wide above the moulding (H1 = D - D1), and E1 wide down the back to D2 below the top. On the TO-247, the exposed copper (D1 x E1, from D2 below the top) is taken as A2 thick, the dimension drawn at the back face. The TO-247's side slots are Ø E2, at Q below the top, the same height as the hole.
5860- **TO-92.** The body is a round of Ø W, cut flat at the depth T, with the leads K in front of the round back.
5961- **TO-18, TO-39 and TO-46.** The tab length J is read as reaching beyond the flange's edge.
62- **TO-262.** A1 is read as on the TO-220: from the leads' back face to the back. The tab is c2 thick and flush with the back. It shows on the back as the thermal pad D1 x E1, from the body's top down (Section A-A), and rises L1 above the body. The shoulders (b2) are L2 long, and L is the lead's length from the body.
6063- **TO-220F.** The side view draws the body A thick up to F below the top, and above that B thick with the back face flush, so the hole is in the thinner part. H is the shoulder's length below the body, J the lead's from the body.
6164- **TO-126.** H is the lead's length from the body, shoulder included, and B runs from the back (the side the sheet marks "BACKSIDE") to the leads' centre plane.
6265
6366**Proportions, for looks only.** The drawings show these but don't dimension them:
6467
6568- The TO-220 tab's side notches, E2 deep, are 1.4 high, from 1.4 to 2.8 below the top, as drawn.
69- The TO-262 tab above the body is the body's full width, with its top corners chamfered 0.04 x the width.
6670- The TO-126's mounting plate on the back, drawn dashed in the front view, is 0.3 thick, set in 0.08 x the width from the sides and the top, and ends 0.1 x the height above the bottom.
6771- Not modelled: the TO-220AC's and TO-220FP-2's cut-off middle lead, the TO-220's ejector dimple, the TO-247's copper ring ØP1, and the bodies' 5° draft and small radii.
6872- Every lead's shoulder narrows to the lead in one step.
6973- Materials are for looks and a rough mass:
7074 - The mouldings are epoxy. Nylon (PA6) is the nearest material in the list.
71 - The TO-220 tab, the TO-247 pad and the TO-126 plate are copper, and the leads are tinned copper.
75 - The TO-220 and TO-262 tabs, the TO-247 pad and the TO-126 plate are copper, and the leads are tinned copper.
7276 - The TO-18, TO-39 and TO-46 headers and leads are Kovar (8.36), so nickel (8.9), the nearest in the list. Their cans are steel.
7377
7478## Catalogue models
@@ -89,16 +93,20 @@
8993- **TO-220F-3_Vertical.** 10.16 wide, 4.70 thick, with the top part 2.54 thick, and 15.6 high. Leads 0.80 x 0.53 with 1.36 shoulders at 2.54. The leads' plane is 3.29 from the back, where Central's drawing gives 2.50–3.10 (0.19 over).
9094- **TO-220F-2_Vertical.** The same body, with leads at 0 and 5.08 (Central 5.10).
9195
96Added in 1.2.0:
97
98- **TO-262-3_Vertical.** 10.01 wide, 4.50 thick, the body 8.85 high, and the tab 1.37 above it, 1.27 thick. Leads 0.80 x 0.50 with 1.27 shoulders at 2.54. The leads' back face is 2.40 from the back. These are all within Vishay's drawing, except that the model's shoulders are about 3.15 long (L2 3.56–3.71) and its leads reach 10.5 below the body (L 13.46–14.10).
99
92100The names name the JEDEC package, so they map to the maker's drawing of it, with the pitch and lead order as named, and the differences are listed here.
93101
94102The reference models stand their bodies at different heights above the board: the TO-92 at 2.5, and the TO-18, TO-39 and TO-46 at about 5. The drawings don't give these, so this part uses the drawings' own seating.
95103
96So these map: TO-220-3_Vertical (TO-220AB), TO-220-2_Vertical (TO-220AC), TO-247-3_Vertical (TO-247AC), TO-92 and TO-92_Inline (TO-92), TO-18-3 (TO-18), TO-18-2 (TO-18-2), TO-39-3 (TO-39), TO-46-3 (TO-46), TO-126-3_Vertical (TO-126), TO-220F-3_Vertical (TO-220F) and TO-220F-2_Vertical (TO-220F-2).
104So these map: TO-220-3_Vertical (TO-220AB), TO-220-2_Vertical (TO-220AC), TO-247-3_Vertical (TO-247AC), TO-92 and TO-92_Inline (TO-92), TO-18-3 (TO-18), TO-18-2 (TO-18-2), TO-39-3 (TO-39), TO-46-3 (TO-46), TO-126-3_Vertical (TO-126), TO-220F-3_Vertical (TO-220F), TO-220F-2_Vertical (TO-220F-2) and TO-262-3_Vertical (TO-262).
97105
98106These stay "no table read yet" (`COVERAGE.md`):
99107
100108- the TO-92 models with leads formed to 2.54 (`_Wide`). TI's formed leads are 2.4 to 2.9 apart, with a land pattern of 2.6.
101109- the horizontal (bent-lead) models. The drawings give straight leads only.
102110- the 2-lead TO-39, TO-46 and TO-126 models. Central's TO-39, TO-46 and TO-126 sheets draw 3 leads only.
103- the other packages in the family: TO-218, TO-220-4/5/11, TO-247-2/4/5, TO-251, TO-262, TO-264, TO-3, TO-3P, TO-5, TO-8, TO-11 and TO-52, the TO-92 variants (L, S, Mini, Flat, 2-lead), and the windowed and lensed cans.
111- the other packages in the family: TO-218, TO-220-4/5/11, TO-247-2/4/5, TO-251, TO-262-3-1EP and TO-262-5, TO-264, TO-3, TO-3P, TO-5, TO-8, TO-11 and TO-52, the TO-92 variants (L, S, Mini, Flat, 2-lead), and the windowed and lensed cans.
104112