steve/jst-ph-header
JST PH shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K.
JST XH shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A.
| 1 | """JST XH shrouded header, 2.5 mm pitch, top entry, through-hole: B2B-XH-A to B20B-XH-A. 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 XH connector catalogue, Through-hole type shrouded header, Top entry type, p. 63: pitch 2.5, A = 2.5 x (circuits - 1), B = A + 4.9 (2.45 past the |
| 9 | # end pins each side), height 7.0, depth 5.75 with the pins 2.35 from one face, tails 3.4, posts 0.64 square. |
| 10 | PITCH, END, HEIGHT, DEPTH, FROM_FACE, TAIL, POST = 2.5, 2.45, 7.0, 5.75, 2.35, 3.4, 0.64 |
| 11 | WALL = 0.8 # the shroud's wall, the floor and how far the posts stand in it are proportions, for looks |
| 12 | FLOOR = 1.5 |
| 13 | if not 2 <= circuits <= 20 or circuits in (17, 18, 19): |
| 14 | raise ValueError("The B..B-XH-A top entry header has 2 to 16 or 20 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-xh-header" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "JST XH shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A." |
| 6 | description = """JST XH through-hole shrouded header, top entry, 2 to 16 or 20 circuits, with its opening and posts. Dimensions from JST's catalogue page. See the README.""" |
| 7 | tags = ["connector", "jst", "jst-xh", "wire-to-board", "header", "electronics"] |
| 8 | |
| 9 | [parameters.circuits] |
| 10 | type = "integer" |
| 11 | default = 4 |
| 12 | min = 2 |
| 13 | max = 20 |
| 14 | label = "Circuits" |
| 15 | description = "2 to 16, or 20." |
| 16 | |
| 17 | [parameters.detail] |
| 18 | type = "choice" |
| 19 | default = "full" |
| 20 | choices = ["full", "simple"] |
| 21 | label = "Detail" |
| 22 | description = "full: the shroud's opening and the posts. simple: a plain block." |
| 23 | |
| 24 | [[presets]] |
| 25 | id = "B2B-XH-A" |
| 26 | title = "JST XH 2 pin header, top entry" |
| 27 | params = { circuits = 2 } |
| 28 | aliases = ["JST XH 2 pin", "JST XH 2P", "XH 2 pin header", "2 pin JST XH", "JST XH 2", "XH2.54 2P", "JST XH 1x02"] |
| 29 | standard = "JST" |
| 30 | |
| 31 | [[presets]] |
| 32 | id = "B3B-XH-A" |
| 33 | title = "JST XH 3 pin header, top entry" |
| 34 | params = { circuits = 3 } |
| 35 | aliases = ["JST XH 3 pin", "JST XH 3P", "XH 3 pin header", "3 pin JST XH", "JST XH 3", "XH2.54 3P", "JST XH 1x03"] |
| 36 | standard = "JST" |
| 37 | |
| 38 | [[presets]] |
| 39 | id = "B4B-XH-A" |
| 40 | title = "JST XH 4 pin header, top entry" |
| 41 | params = { circuits = 4 } |
| 42 | aliases = ["JST XH 4 pin", "JST XH 4P", "XH 4 pin header", "4 pin JST XH", "JST XH 4", "XH2.54 4P", "JST XH 1x04"] |
| 43 | standard = "JST" |
| 44 | |
| 45 | [[presets]] |
| 46 | id = "B5B-XH-A" |
| 47 | title = "JST XH 5 pin header, top entry" |
| 48 | params = { circuits = 5 } |
| 49 | aliases = ["JST XH 5 pin", "JST XH 5P", "XH 5 pin header", "5 pin JST XH", "JST XH 5", "XH2.54 5P", "JST XH 1x05"] |
| 50 | standard = "JST" |
| 51 | |
| 52 | [[presets]] |
| 53 | id = "B6B-XH-A" |
| 54 | title = "JST XH 6 pin header, top entry" |
| 55 | params = { circuits = 6 } |
| 56 | aliases = ["JST XH 6 pin", "JST XH 6P", "XH 6 pin header", "6 pin JST XH", "JST XH 6", "XH2.54 6P", "JST XH 1x06"] |
| 57 | standard = "JST" |
| 58 | |
| 59 | [[presets]] |
| 60 | id = "B7B-XH-A" |
| 61 | title = "JST XH 7 pin header, top entry" |
| 62 | params = { circuits = 7 } |
| 63 | aliases = ["JST XH 7 pin", "JST XH 7P", "XH 7 pin header", "7 pin JST XH", "JST XH 7", "XH2.54 7P", "JST XH 1x07"] |
| 64 | standard = "JST" |
| 65 | |
| 66 | [[presets]] |
| 67 | id = "B8B-XH-A" |
| 68 | title = "JST XH 8 pin header, top entry" |
| 69 | params = { circuits = 8 } |
| 70 | aliases = ["JST XH 8 pin", "JST XH 8P", "XH 8 pin header", "8 pin JST XH", "JST XH 8", "XH2.54 8P", "JST XH 1x08"] |
| 71 | standard = "JST" |
| 72 | |
| 73 | [[presets]] |
| 74 | id = "B9B-XH-A" |
| 75 | title = "JST XH 9 pin header, top entry" |
| 76 | params = { circuits = 9 } |
| 77 | aliases = ["JST XH 9 pin", "JST XH 9P", "XH 9 pin header", "9 pin JST XH", "JST XH 9", "XH2.54 9P", "JST XH 1x09"] |
| 78 | standard = "JST" |
| 79 | |
| 80 | [[presets]] |
| 81 | id = "B10B-XH-A" |
| 82 | title = "JST XH 10 pin header, top entry" |
| 83 | params = { circuits = 10 } |
| 84 | aliases = ["JST XH 10 pin", "JST XH 10P", "XH 10 pin header", "10 pin JST XH", "JST XH 10", "XH2.54 10P", "JST XH 1x10"] |
| 85 | standard = "JST" |
| 86 | |
| 87 | [[presets]] |
| 88 | id = "B11B-XH-A" |
| 89 | title = "JST XH 11 pin header, top entry" |
| 90 | params = { circuits = 11 } |
| 91 | aliases = ["JST XH 11 pin", "JST XH 11P", "XH 11 pin header", "11 pin JST XH", "JST XH 11", "XH2.54 11P", "JST XH 1x11"] |
| 92 | standard = "JST" |
| 93 | |
| 94 | [[presets]] |
| 95 | id = "B12B-XH-A" |
| 96 | title = "JST XH 12 pin header, top entry" |
| 97 | params = { circuits = 12 } |
| 98 | aliases = ["JST XH 12 pin", "JST XH 12P", "XH 12 pin header", "12 pin JST XH", "JST XH 12", "XH2.54 12P", "JST XH 1x12"] |
| 99 | standard = "JST" |
| 100 | |
| 101 | [[presets]] |
| 102 | id = "B13B-XH-A" |
| 103 | title = "JST XH 13 pin header, top entry" |
| 104 | params = { circuits = 13 } |
| 105 | aliases = ["JST XH 13 pin", "JST XH 13P", "XH 13 pin header", "13 pin JST XH", "JST XH 13", "XH2.54 13P", "JST XH 1x13"] |
| 106 | standard = "JST" |
| 107 | |
| 108 | [[presets]] |
| 109 | id = "B14B-XH-A" |
| 110 | title = "JST XH 14 pin header, top entry" |
| 111 | params = { circuits = 14 } |
| 112 | aliases = ["JST XH 14 pin", "JST XH 14P", "XH 14 pin header", "14 pin JST XH", "JST XH 14", "XH2.54 14P", "JST XH 1x14"] |
| 113 | standard = "JST" |
| 114 | |
| 115 | [[presets]] |
| 116 | id = "B15B-XH-A" |
| 117 | title = "JST XH 15 pin header, top entry" |
| 118 | params = { circuits = 15 } |
| 119 | aliases = ["JST XH 15 pin", "JST XH 15P", "XH 15 pin header", "15 pin JST XH", "JST XH 15", "XH2.54 15P", "JST XH 1x15"] |
| 120 | standard = "JST" |
| 121 | |
| 122 | [[presets]] |
| 123 | id = "B16B-XH-A" |
| 124 | title = "JST XH 16 pin header, top entry" |
| 125 | params = { circuits = 16 } |
| 126 | aliases = ["JST XH 16 pin", "JST XH 16P", "XH 16 pin header", "16 pin JST XH", "JST XH 16", "XH2.54 16P", "JST XH 1x16"] |
| 127 | standard = "JST" |
| 128 | |
| 129 | [[presets]] |
| 130 | id = "B20B-XH-A" |
| 131 | title = "JST XH 20 pin header, top entry" |
| 132 | params = { circuits = 20 } |
| 133 | aliases = ["JST XH 20 pin", "JST XH 20P", "XH 20 pin header", "20 pin JST XH", "JST XH 20", "XH2.54 20P", "JST XH 1x20"] |
| 134 | standard = "JST" |
| 135 | |
| 136 | [[presets]] |
| 137 | id = "B4B-XH-A-simple" |
| 138 | title = "JST XH 4 pin header, simple" |
| 139 | params = { circuits = 4, detail = "simple" } |
| 140 | aliases = ["B4B-XH-A simple"] |
| 141 | standard = "JST" |
| 142 |
A JST XH through-hole shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A. 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 XH connector catalogue, Through-hole type shrouded header, Top entry type, page 63, a copy at https://mantech.co.za/datasheets/products/XH-JST.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 and latch slots 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-XH-A) and SMT headers aren't here yet; see COVERAGE.md.
| 1 | # JST XH header |
| 2 | |
| 3 | A JST XH through-hole shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A. 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 XH connector catalogue, *Through-hole type shrouded header, Top entry type*, page 63, a copy at <https://mantech.co.za/datasheets/products/XH-JST.pdf> (JST's own site refuses automated downloads): |
| 8 | |
| 9 | - pitch 2.5, A = 2.5 x (circuits - 1), and B = A + 4.9, 2.45 past the end pins each side |
| 10 | - height 7.0, depth 5.75, with the pins 2.35 from one face |
| 11 | - tails 3.4, posts 0.64 square |
| 12 | |
| 13 | **Proportions, for looks only:** the shroud's wall and floor, and how high the posts stand in it. The polarising ribs and latch slots 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-XH-A) and SMT headers aren't here yet; see `COVERAGE.md`. |
| 16 |
JST XH through-hole shrouded header, top entry, 2 to 16 or 20 circuits, with its opening and posts. Dimensions from JST's catalogue page. See the README.
A JST XH through-hole shrouded header, 2.5 mm pitch, top entry: B2B-XH-A to B16B-XH-A and B20B-XH-A. 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 XH connector catalogue, Through-hole type shrouded header, Top entry type, page 63, a copy at https://mantech.co.za/datasheets/products/XH-JST.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 and latch slots 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-XH-A) and SMT headers aren't here yet; see COVERAGE.md.
JST PH shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K.
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.