steve/jst-xh-header
JST XH shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A.
JST PH shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K.
| 1 | """JST PH shrouded header, 2.0 mm pitch, top entry, through-hole: B2B-PH-K to B16B-PH-K. Pin 1 is at the origin, the row along +X, the housing's underside on the |
| 2 | XY plane, its opening up, the posts' tails down through the board. Dimensions from JST's catalogue page in the README.""" |
| 3 | from steve import Model |
| 4 | |
| 5 | circuits = 4 # Circuits |
| 6 | detail = "full" # full: the shroud's opening and the posts; simple: a plain block |
| 7 | |
| 8 | # JST PH connector catalogue, Through-hole type Header, Top entry type, p. 2: pitch 2.0, A = 2.0 x (circuits - 1), B = A + 3.9 (1.95 past the end pins |
| 9 | # each side), height 6, depth 4.5 with the pins 1.7 from one face, tails 3.4, posts 0.5 square. |
| 10 | PITCH, END, HEIGHT, DEPTH, FROM_FACE, TAIL, POST = 2.0, 1.95, 6.0, 4.5, 1.7, 3.4, 0.5 |
| 11 | WALL = 0.6 # the shroud's wall, the floor and how far the posts stand in it are proportions, for looks |
| 12 | FLOOR = 1.2 |
| 13 | if not 2 <= circuits <= 16: |
| 14 | raise ValueError("The B..B-PH-K top entry header has 2 to 16 circuits.") |
| 15 | |
| 16 | A = PITCH * (circuits - 1) |
| 17 | x0, y0 = -END, -FROM_FACE |
| 18 | model = Model() |
| 19 | with model.sketch("housing_sketch", on="XY", name="Housing") as sk: |
| 20 | sk.rect("housing_rect", (x0, y0), (A + END, y0 + DEPTH)) |
| 21 | model.extrude("housing", "housing_sketch", distance=HEIGHT, name="Housing") |
| 22 | if detail == "full": |
| 23 | model.plane("top_plane", on="XY", offset=HEIGHT, name="Top") |
| 24 | with model.sketch("opening_sketch", on="top_plane", name="Opening") as sk: |
| 25 | sk.rect("opening_rect", (x0 + WALL, y0 + WALL), (A + END - WALL, y0 + DEPTH - WALL)) |
| 26 | model.extrude("opening", "opening_sketch", distance=-(HEIGHT - FLOOR), op="cut", name="Opening") |
| 27 | model.plane("tail_plane", on="XY", offset=-TAIL, name="Tails") |
| 28 | with model.sketch("posts_sketch", on="tail_plane", name="Posts") as sk: |
| 29 | for i in range(circuits): |
| 30 | sk.rect(f"post_{i}", (i * PITCH - POST / 2, -POST / 2), (i * PITCH + POST / 2, POST / 2)) |
| 31 | model.extrude("posts", "posts_sketch", distance=TAIL + HEIGHT - 1.0, name="Posts") |
| 32 | model.material("pa6", color="#f1ede4") |
| 33 | result = model.result() |
| 34 |
| 1 | name = "steve/jst-ph-header" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "JST PH shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K." |
| 6 | description = """JST PH through-hole shrouded header, top entry, 2 to 16 circuits, with its opening and posts. Dimensions from JST's catalogue page. See the README.""" |
| 7 | tags = ["connector", "jst", "jst-ph", "wire-to-board", "header", "electronics"] |
| 8 | |
| 9 | [parameters.circuits] |
| 10 | type = "integer" |
| 11 | default = 4 |
| 12 | min = 2 |
| 13 | max = 16 |
| 14 | label = "Circuits" |
| 15 | |
| 16 | [parameters.detail] |
| 17 | type = "choice" |
| 18 | default = "full" |
| 19 | choices = ["full", "simple"] |
| 20 | label = "Detail" |
| 21 | description = "full: the shroud's opening and the posts. simple: a plain block." |
| 22 | |
| 23 | [[presets]] |
| 24 | id = "B2B-PH-K" |
| 25 | title = "JST PH 2 pin header, top entry" |
| 26 | params = { circuits = 2 } |
| 27 | aliases = ["JST PH 2 pin", "JST PH 2P", "PH 2 pin header", "2 pin JST PH", "JST PH 2", "PH2.0 2P", "JST PH 1x02"] |
| 28 | standard = "JST" |
| 29 | |
| 30 | [[presets]] |
| 31 | id = "B3B-PH-K" |
| 32 | title = "JST PH 3 pin header, top entry" |
| 33 | params = { circuits = 3 } |
| 34 | aliases = ["JST PH 3 pin", "JST PH 3P", "PH 3 pin header", "3 pin JST PH", "JST PH 3", "PH2.0 3P", "JST PH 1x03"] |
| 35 | standard = "JST" |
| 36 | |
| 37 | [[presets]] |
| 38 | id = "B4B-PH-K" |
| 39 | title = "JST PH 4 pin header, top entry" |
| 40 | params = { circuits = 4 } |
| 41 | aliases = ["JST PH 4 pin", "JST PH 4P", "PH 4 pin header", "4 pin JST PH", "JST PH 4", "PH2.0 4P", "JST PH 1x04"] |
| 42 | standard = "JST" |
| 43 | |
| 44 | [[presets]] |
| 45 | id = "B5B-PH-K" |
| 46 | title = "JST PH 5 pin header, top entry" |
| 47 | params = { circuits = 5 } |
| 48 | aliases = ["JST PH 5 pin", "JST PH 5P", "PH 5 pin header", "5 pin JST PH", "JST PH 5", "PH2.0 5P", "JST PH 1x05"] |
| 49 | standard = "JST" |
| 50 | |
| 51 | [[presets]] |
| 52 | id = "B6B-PH-K" |
| 53 | title = "JST PH 6 pin header, top entry" |
| 54 | params = { circuits = 6 } |
| 55 | aliases = ["JST PH 6 pin", "JST PH 6P", "PH 6 pin header", "6 pin JST PH", "JST PH 6", "PH2.0 6P", "JST PH 1x06"] |
| 56 | standard = "JST" |
| 57 | |
| 58 | [[presets]] |
| 59 | id = "B7B-PH-K" |
| 60 | title = "JST PH 7 pin header, top entry" |
| 61 | params = { circuits = 7 } |
| 62 | aliases = ["JST PH 7 pin", "JST PH 7P", "PH 7 pin header", "7 pin JST PH", "JST PH 7", "PH2.0 7P", "JST PH 1x07"] |
| 63 | standard = "JST" |
| 64 | |
| 65 | [[presets]] |
| 66 | id = "B8B-PH-K" |
| 67 | title = "JST PH 8 pin header, top entry" |
| 68 | params = { circuits = 8 } |
| 69 | aliases = ["JST PH 8 pin", "JST PH 8P", "PH 8 pin header", "8 pin JST PH", "JST PH 8", "PH2.0 8P", "JST PH 1x08"] |
| 70 | standard = "JST" |
| 71 | |
| 72 | [[presets]] |
| 73 | id = "B9B-PH-K" |
| 74 | title = "JST PH 9 pin header, top entry" |
| 75 | params = { circuits = 9 } |
| 76 | aliases = ["JST PH 9 pin", "JST PH 9P", "PH 9 pin header", "9 pin JST PH", "JST PH 9", "PH2.0 9P", "JST PH 1x09"] |
| 77 | standard = "JST" |
| 78 | |
| 79 | [[presets]] |
| 80 | id = "B10B-PH-K" |
| 81 | title = "JST PH 10 pin header, top entry" |
| 82 | params = { circuits = 10 } |
| 83 | aliases = ["JST PH 10 pin", "JST PH 10P", "PH 10 pin header", "10 pin JST PH", "JST PH 10", "PH2.0 10P", "JST PH 1x10"] |
| 84 | standard = "JST" |
| 85 | |
| 86 | [[presets]] |
| 87 | id = "B11B-PH-K" |
| 88 | title = "JST PH 11 pin header, top entry" |
| 89 | params = { circuits = 11 } |
| 90 | aliases = ["JST PH 11 pin", "JST PH 11P", "PH 11 pin header", "11 pin JST PH", "JST PH 11", "PH2.0 11P", "JST PH 1x11"] |
| 91 | standard = "JST" |
| 92 | |
| 93 | [[presets]] |
| 94 | id = "B12B-PH-K" |
| 95 | title = "JST PH 12 pin header, top entry" |
| 96 | params = { circuits = 12 } |
| 97 | aliases = ["JST PH 12 pin", "JST PH 12P", "PH 12 pin header", "12 pin JST PH", "JST PH 12", "PH2.0 12P", "JST PH 1x12"] |
| 98 | standard = "JST" |
| 99 | |
| 100 | [[presets]] |
| 101 | id = "B13B-PH-K" |
| 102 | title = "JST PH 13 pin header, top entry" |
| 103 | params = { circuits = 13 } |
| 104 | aliases = ["JST PH 13 pin", "JST PH 13P", "PH 13 pin header", "13 pin JST PH", "JST PH 13", "PH2.0 13P", "JST PH 1x13"] |
| 105 | standard = "JST" |
| 106 | |
| 107 | [[presets]] |
| 108 | id = "B14B-PH-K" |
| 109 | title = "JST PH 14 pin header, top entry" |
| 110 | params = { circuits = 14 } |
| 111 | aliases = ["JST PH 14 pin", "JST PH 14P", "PH 14 pin header", "14 pin JST PH", "JST PH 14", "PH2.0 14P", "JST PH 1x14"] |
| 112 | standard = "JST" |
| 113 | |
| 114 | [[presets]] |
| 115 | id = "B15B-PH-K" |
| 116 | title = "JST PH 15 pin header, top entry" |
| 117 | params = { circuits = 15 } |
| 118 | aliases = ["JST PH 15 pin", "JST PH 15P", "PH 15 pin header", "15 pin JST PH", "JST PH 15", "PH2.0 15P", "JST PH 1x15"] |
| 119 | standard = "JST" |
| 120 | |
| 121 | [[presets]] |
| 122 | id = "B16B-PH-K" |
| 123 | title = "JST PH 16 pin header, top entry" |
| 124 | params = { circuits = 16 } |
| 125 | aliases = ["JST PH 16 pin", "JST PH 16P", "PH 16 pin header", "16 pin JST PH", "JST PH 16", "PH2.0 16P", "JST PH 1x16"] |
| 126 | standard = "JST" |
| 127 | |
| 128 | [[presets]] |
| 129 | id = "B4B-PH-K-simple" |
| 130 | title = "JST PH 4 pin header, simple" |
| 131 | params = { circuits = 4, detail = "simple" } |
| 132 | aliases = ["B4B-PH-K simple"] |
| 133 | standard = "JST" |
| 134 |
A JST PH through-hole shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K. Pin 1 is at the origin, the row runs along +X, the housing sits on the XY plane with its opening up, and the tails go down through the board.
JST PH connector catalogue, Through-hole type Header, Top entry type, page 2, a copy at https://static.chipdip.ru/lib/832/DOC031832410.pdf (JST's own site refuses automated downloads):
Proportions, for looks only: the shroud's wall and floor, and how high the posts stand in it. The polarising ribs aren't modelled. The page gives the wafer as nylon 66, natural white. The material list has no nylon 66, so the part uses pa6 (nylon 6), for looks and rough mass.
Side entry (S..B-PH-K) and SMT headers aren't here yet; see COVERAGE.md.
| 1 | # JST PH header |
| 2 | |
| 3 | A JST PH through-hole shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K. Pin 1 is at the origin, the row runs along +X, the housing sits on the XY plane with its opening up, and the tails go down through the board. |
| 4 | |
| 5 | ## Source |
| 6 | |
| 7 | JST PH connector catalogue, *Through-hole type Header, Top entry type*, page 2, a copy at <https://static.chipdip.ru/lib/832/DOC031832410.pdf> (JST's own site refuses automated downloads): |
| 8 | |
| 9 | - pitch 2.0, A = 2.0 x (circuits - 1), and B = A + 3.9, 1.95 past the end pins each side |
| 10 | - height 6, depth 4.5, with the pins 1.7 from one face |
| 11 | - tails 3.4, posts 0.5 square |
| 12 | |
| 13 | **Proportions, for looks only:** the shroud's wall and floor, and how high the posts stand in it. The polarising ribs aren't modelled. The page gives the wafer as nylon 66, natural white. The material list has no nylon 66, so the part uses `pa6` (nylon 6), for looks and rough mass. |
| 14 | |
| 15 | Side entry (S..B-PH-K) and SMT headers aren't here yet; see `COVERAGE.md`. |
| 16 |
JST PH through-hole shrouded header, top entry, 2 to 16 circuits, with its opening and posts. Dimensions from JST's catalogue page. See the README.
A JST PH through-hole shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K. Pin 1 is at the origin, the row runs along +X, the housing sits on the XY plane with its opening up, and the tails go down through the board.
JST PH connector catalogue, Through-hole type Header, Top entry type, page 2, a copy at https://static.chipdip.ru/lib/832/DOC031832410.pdf (JST's own site refuses automated downloads):
Proportions, for looks only: the shroud's wall and floor, and how high the posts stand in it. The polarising ribs aren't modelled. The page gives the wafer as nylon 66, natural white. The material list has no nylon 66, so the part uses pa6 (nylon 6), for looks and rough mass.
Side entry (S..B-PH-K) and SMT headers aren't here yet; see COVERAGE.md.
JST XH shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A.
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.
Through-hole pin header, 2.54 mm and 2.00 mm pitch, one or two rows, 1 to 40 pins per row, straight or right-angle.
Straight through-hole pin socket, 2.54 mm pitch, one or two rows, 1 to 40 pins per row.