Sign in with STEVE

Compare versions

4 files changed, +136 −6 1.2.0: Vertical MSTBVA 2,5 headers at 5.08 mm. Right-angle parts are unchanged.

part.py +18 −2
@@ -3,6 +3,7 @@
33from steve import Model
44
55series = "MSTBA 2,5" # Series
6style = "right-angle" # right-angle or vertical (vertical: MSTBVA 2,5)
67pitch = 5.08 # mm Pitch
78positions = 2 # Positions
89detail = "full" # full: the opening, the mating pins and the solder pins; simple: the housing's outline
@@ -16,10 +17,15 @@
1617 "MSTBA 2,5": ((5.0, 5.08), 12, 8.6, 3.5, 2, {5.0: 3.5, 5.08: 3.54}, 1.2),
1718 "MC 1,5": ((3.81,), 9.2, 7.25, 3.4, 1.2, {3.81: 2.6}, 0.8),
1819}
19pitches, LENGTH, HEIGHT, PIN_LENGTH, PIN_FROM_BACK, ENDS, PIN = SERIES[series]
20# Vertical, MSTBVA 2,5: data sheet MSTBVA 2,5/ 2-G-5,08 (1755736, 24 Feb 2024), Dimensions p. 3: width 12.16 for 2 positions (a + 7.08), length 8.6, installed
21# height 12, solder pins 3.9 long, 1 x 1; the July 2003 edition's dimensioned drawing and drilling diagram (p. 4): pins 3.8 from one face, 3.54 past each end pin.
22VERTICAL = ((5.08,), 8.6, 12, 3.9, 3.8, {5.08: 3.54}, 1.0)
23pitches, LENGTH, HEIGHT, PIN_LENGTH, PIN_FROM_BACK, ENDS, PIN = VERTICAL if style == "vertical" else SERIES[series]
2024# the wall and the mating pins' reach are proportions, for looks: the data sheets don't dimension them
2125SHORT = 1.5 # the mating pins stop this far short of the opening, where the plug's contacts meet them
2226WALL = 1.0 if series == "MSTBA 2,5" else 0.8
27if style == "vertical" and series != "MSTBA 2,5":
28 raise ValueError("The vertical header here is MSTBVA 2,5 (5.08 mm).")
2329if pitch not in pitches or not 2 <= positions <= 16:
2430 raise ValueError(f"{series} comes in pitch {pitches}, 2 to 16 positions.")
2531
@@ -32,7 +38,17 @@
3238with model.sketch("housing_sketch", on="XY", name="Housing") as sk:
3339 sk.rect("housing_rect", (x0, front), (x0 + width, back))
3440model.extrude("housing", "housing_sketch", distance=HEIGHT, name="Housing")
35if detail == "full":
41if detail == "full" and style == "vertical":
42 model.plane("top_plane", on="XY", offset=HEIGHT, name="Opening")
43 with model.sketch("opening_sketch", on="top_plane", name="Opening") as sk:
44 sk.rect("opening_rect", (x0 + WALL, front + WALL), (x0 + width - WALL, back - WALL))
45 model.extrude("opening", "opening_sketch", distance=-(HEIGHT - WALL), op="cut", name="Opening")
46 model.plane("pin_plane", on="XY", offset=-PIN_LENGTH, name="Pins")
47 with model.sketch("pins_sketch", on="pin_plane", name="Pins") as sk:
48 for i in range(positions):
49 sk.rect(f"pin_{i}", (i * pitch - PIN / 2, -PIN / 2), (i * pitch + PIN / 2, PIN / 2))
50 model.extrude("pins", "pins_sketch", distance=PIN_LENGTH + HEIGHT - SHORT, name="Pins")
51elif detail == "full":
3652 model.plane("opening_plane", on="XZ", offset=-front, name="Opening")
3753 with model.sketch("opening_sketch", on="opening_plane", name="Opening") as sk:
3854 sk.rect("opening_rect", (x0 + WALL, WALL), (x0 + width - WALL, HEIGHT - WALL))
pypart.toml +10 −3
@@ -1,9 +1,9 @@
11name = "steve/pluggable-terminal-header"
2version = "1.1.0"
2version = "1.2.0"
33runtime = "steve"
44license = "MIT"
5summary = "PCB header for pluggable terminal blocks, right-angle: Phoenix Contact MSTBA 2,5 (5.0, 5.08 mm) and MC 1,5 (3.81 mm) types, 2 to 16 positions."
6changes = "MC 1,5 headers at 3.81 mm. MSTBA 2,5 parts are unchanged."
5summary = "PCB header for pluggable terminal blocks: right-angle Phoenix Contact MSTBA 2,5 (5.0, 5.08 mm) and MC 1,5 (3.81 mm) types, and vertical MSTBVA 2,5 (5.08 mm), 2 to 16 positions."
6changes = "Vertical MSTBVA 2,5 headers at 5.08 mm. Right-angle parts are unchanged."
77description = """Right-angle PCB header of the MSTBA 2,5 or MC 1,5 type, with its opening, mating pins and solder pins. Width, length, height and pins from Phoenix Contact's data sheets. See the README."""
88tags = ["terminal-block", "pluggable", "header", "phoenix", "mstb", "connector", "electronics"]
99
@@ -12,6 +12,13 @@
1212default = "MSTBA 2,5"
1313choices = ["MSTBA 2,5", "MC 1,5"]
1414label = "Series"
15
16[parameters.style]
17type = "choice"
18default = "right-angle"
19choices = ["right-angle", "vertical"]
20label = "Style"
21description = "vertical: MSTBVA 2,5 at 5.08 mm."
1522
1623[parameters.pitch]
1724type = "choice"
presets.toml +105 −0
@@ -316,6 +316,111 @@
316316standard = "Phoenix Contact"
317317
318318[[presets]]
319id = "MSTBVA2.5-2-G-5.08"
320title = "Pluggable terminal header, 2 positions, 5.08 mm, vertical (MSTBVA 2,5)"
321params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 2 }
322aliases = ["MSTBVA 2,5/2-G-5,08", "2 pin vertical pluggable terminal header 5.08", "2 way vertical pluggable terminal block 5.08mm"]
323standard = "Phoenix Contact"
324
325[[presets]]
326id = "MSTBVA2.5-3-G-5.08"
327title = "Pluggable terminal header, 3 positions, 5.08 mm, vertical (MSTBVA 2,5)"
328params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 3 }
329aliases = ["MSTBVA 2,5/3-G-5,08", "3 pin vertical pluggable terminal header 5.08", "3 way vertical pluggable terminal block 5.08mm"]
330standard = "Phoenix Contact"
331
332[[presets]]
333id = "MSTBVA2.5-4-G-5.08"
334title = "Pluggable terminal header, 4 positions, 5.08 mm, vertical (MSTBVA 2,5)"
335params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 4 }
336aliases = ["MSTBVA 2,5/4-G-5,08", "4 pin vertical pluggable terminal header 5.08", "4 way vertical pluggable terminal block 5.08mm"]
337standard = "Phoenix Contact"
338
339[[presets]]
340id = "MSTBVA2.5-5-G-5.08"
341title = "Pluggable terminal header, 5 positions, 5.08 mm, vertical (MSTBVA 2,5)"
342params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 5 }
343aliases = ["MSTBVA 2,5/5-G-5,08", "5 pin vertical pluggable terminal header 5.08", "5 way vertical pluggable terminal block 5.08mm"]
344standard = "Phoenix Contact"
345
346[[presets]]
347id = "MSTBVA2.5-6-G-5.08"
348title = "Pluggable terminal header, 6 positions, 5.08 mm, vertical (MSTBVA 2,5)"
349params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 6 }
350aliases = ["MSTBVA 2,5/6-G-5,08", "6 pin vertical pluggable terminal header 5.08", "6 way vertical pluggable terminal block 5.08mm"]
351standard = "Phoenix Contact"
352
353[[presets]]
354id = "MSTBVA2.5-7-G-5.08"
355title = "Pluggable terminal header, 7 positions, 5.08 mm, vertical (MSTBVA 2,5)"
356params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 7 }
357aliases = ["MSTBVA 2,5/7-G-5,08", "7 pin vertical pluggable terminal header 5.08", "7 way vertical pluggable terminal block 5.08mm"]
358standard = "Phoenix Contact"
359
360[[presets]]
361id = "MSTBVA2.5-8-G-5.08"
362title = "Pluggable terminal header, 8 positions, 5.08 mm, vertical (MSTBVA 2,5)"
363params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 8 }
364aliases = ["MSTBVA 2,5/8-G-5,08", "8 pin vertical pluggable terminal header 5.08", "8 way vertical pluggable terminal block 5.08mm"]
365standard = "Phoenix Contact"
366
367[[presets]]
368id = "MSTBVA2.5-9-G-5.08"
369title = "Pluggable terminal header, 9 positions, 5.08 mm, vertical (MSTBVA 2,5)"
370params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 9 }
371aliases = ["MSTBVA 2,5/9-G-5,08", "9 pin vertical pluggable terminal header 5.08", "9 way vertical pluggable terminal block 5.08mm"]
372standard = "Phoenix Contact"
373
374[[presets]]
375id = "MSTBVA2.5-10-G-5.08"
376title = "Pluggable terminal header, 10 positions, 5.08 mm, vertical (MSTBVA 2,5)"
377params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 10 }
378aliases = ["MSTBVA 2,5/10-G-5,08", "10 pin vertical pluggable terminal header 5.08", "10 way vertical pluggable terminal block 5.08mm"]
379standard = "Phoenix Contact"
380
381[[presets]]
382id = "MSTBVA2.5-11-G-5.08"
383title = "Pluggable terminal header, 11 positions, 5.08 mm, vertical (MSTBVA 2,5)"
384params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 11 }
385aliases = ["MSTBVA 2,5/11-G-5,08", "11 pin vertical pluggable terminal header 5.08", "11 way vertical pluggable terminal block 5.08mm"]
386standard = "Phoenix Contact"
387
388[[presets]]
389id = "MSTBVA2.5-12-G-5.08"
390title = "Pluggable terminal header, 12 positions, 5.08 mm, vertical (MSTBVA 2,5)"
391params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 12 }
392aliases = ["MSTBVA 2,5/12-G-5,08", "12 pin vertical pluggable terminal header 5.08", "12 way vertical pluggable terminal block 5.08mm"]
393standard = "Phoenix Contact"
394
395[[presets]]
396id = "MSTBVA2.5-13-G-5.08"
397title = "Pluggable terminal header, 13 positions, 5.08 mm, vertical (MSTBVA 2,5)"
398params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 13 }
399aliases = ["MSTBVA 2,5/13-G-5,08", "13 pin vertical pluggable terminal header 5.08", "13 way vertical pluggable terminal block 5.08mm"]
400standard = "Phoenix Contact"
401
402[[presets]]
403id = "MSTBVA2.5-14-G-5.08"
404title = "Pluggable terminal header, 14 positions, 5.08 mm, vertical (MSTBVA 2,5)"
405params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 14 }
406aliases = ["MSTBVA 2,5/14-G-5,08", "14 pin vertical pluggable terminal header 5.08", "14 way vertical pluggable terminal block 5.08mm"]
407standard = "Phoenix Contact"
408
409[[presets]]
410id = "MSTBVA2.5-15-G-5.08"
411title = "Pluggable terminal header, 15 positions, 5.08 mm, vertical (MSTBVA 2,5)"
412params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 15 }
413aliases = ["MSTBVA 2,5/15-G-5,08", "15 pin vertical pluggable terminal header 5.08", "15 way vertical pluggable terminal block 5.08mm"]
414standard = "Phoenix Contact"
415
416[[presets]]
417id = "MSTBVA2.5-16-G-5.08"
418title = "Pluggable terminal header, 16 positions, 5.08 mm, vertical (MSTBVA 2,5)"
419params = { series = "MSTBA 2,5", style = "vertical", pitch = 5.08, positions = 16 }
420aliases = ["MSTBVA 2,5/16-G-5,08", "16 pin vertical pluggable terminal header 5.08", "16 way vertical pluggable terminal block 5.08mm"]
421standard = "Phoenix Contact"
422
423[[presets]]
319424id = "MSTBA2.5-2-G-5.08-simple"
320425title = "Pluggable terminal header, 2 positions, 5.08 mm, simple"
321426params = { series = "MSTBA 2,5", pitch = 5.08, positions = 2, detail = "simple" }
README.md +3 −1
@@ -15,5 +15,7 @@
1515
1616**Proportions, for looks only:** the MSTBA pin section (1.2), the wall, and the mating pins' reach. The data sheet's side view doesn't dimension the reach, so the pins run to 1.5 mm short of the opening, where the plug's contacts meet them. The plug isn't part of this header. The housing is PA, modelled as `pa6`, green.
1717
18Vertical (MSTBVA, MCV), flanged (GF) and 3.5 mm MC headers aren't here yet; see `COVERAGE.md`.
18Vertical MSTBVA 2,5 at 5.08 mm: data sheet *MSTBVA 2,5/ 2-G-5,08* (1755736), Dimensions page 3 of the 24 Feb 2024 edition, a copy at <https://static.chipdip.ru/lib/759/DOC041759173.pdf>: width 12.16 for 2 positions (a + 7.08), length 8.6, installed height 12, solder pins 3.9 long and 1 x 1. The pins' place, 3.8 from one face and 3.54 past each end pin, is from the July 2003 edition's dimensioned drawing and drilling diagram, page 4, a copy at <https://tvsat.com.pl/PDF/1/1755736-phoenix.pdf>. Vertical: the opening faces up and the pins stand 1.5 mm below the top.
1919
20MSTBVA at 5.0 mm, MCV, flanged (GF) and 3.5 mm MC headers aren't here yet; see `COVERAGE.md`.
21