Sign in with STEVE

steve/pin-header

Straight through-hole pin header, 2.54 mm and 2.00 mm pitch, one or two rows, 1 to 40 pins per row.

v1.0.0 STEVE MIT 0
Isometric
part.py 47 lines · Python · STEVE runtime · checked
Download
1"""Straight through-hole pin header, 2.54 mm and 2.00 mm pitch, one or two rows. Pin 1 is at the origin, the row along +X, the second row along
2+Y; the insulator's underside is on the XY plane, the posts' mating end up, the tails down through the board. Dimensions in the README."""
3from steve import Model
4
5pitch = 2.54 # mm Pitch
6rows = 1 # Rows
7pins = 8 # Pins per row
8detail = "full" # full: square posts and notched insulator; simple: one block per row, with no posts
9
10# pitch: (above the insulator C, insulator height, tail B, one-row width, two-row width, post square).
11# 2.54: Samtec TSW lead style -07, catalogue page TSW/HTSW (F-226), A 10.92, B 2.54, C 5.84, widths 2.48 and 5.02, post .025 in.
12# 2.00: Samtec TMM lead style -02, catalogue page TMM (F-226), A 8.20, B 3.70, C 3.00, body 1.50, widths 1.97 and 3.94. The page doesn't
13# print the post size, so 0.50 here is a proportion of the pitch, for looks.
14SIZES = {2.54: (5.84, 2.54, 2.54, 2.48, 5.02, 0.64), 2.0: (3.00, 1.50, 3.70, 1.97, 3.94, 0.50)}
15
16above, body_h, tail, one, two, post = SIZES[pitch]
17width = one if rows == 1 else two
18length = pitch * pins
19y0 = (rows - 1) * pitch / 2 - width / 2
20x0 = -pitch / 2
21notch = 0.12 * pitch # the V between pins, for looks
22outline = [(x0, y0)]
23for i in range(1, pins):
24 outline += [(x0 + i * pitch - notch, y0), (x0 + i * pitch, y0 + notch), (x0 + i * pitch + notch, y0)]
25outline += [(x0 + length, y0), (x0 + length, y0 + width)]
26for i in range(pins - 1, 0, -1):
27 outline += [(x0 + i * pitch + notch, y0 + width), (x0 + i * pitch, y0 + width - notch), (x0 + i * pitch - notch, y0 + width)]
28outline += [(x0, y0 + width)]
29
30model = Model()
31with model.sketch("body_sketch", on="XY", name="Insulator") as sk:
32 if detail == "full":
33 sk.polyline("body_outline", outline, closed=True)
34 else:
35 sk.rect("body_outline", (x0, y0), (x0 + length, y0 + width))
36model.extrude("body", "body_sketch", distance=body_h if detail == "full" else body_h + above, name="Insulator")
37if detail == "full":
38 model.plane("tail_plane", on="XY", offset=-tail, name="Tail end")
39 with model.sketch("posts_sketch", on="tail_plane", name="Posts") as sk:
40 for row in range(rows):
41 for i in range(pins):
42 x, y = i * pitch, row * pitch
43 sk.rect(f"post_{row}_{i}", (x - post / 2, y - post / 2), (x + post / 2, y + post / 2))
44 model.extrude("posts", "posts_sketch", distance=tail + body_h + above, name="Posts")
45model.material("steel-generic", color="#2b2b2d")
46result = model.result()
47

Straight through-hole pin header with square posts and a notched insulator. Pin 1 at the origin, row along +X. Heights and widths from Samtec's TSW and TMM pages. See the README.

Pin header

A straight through-hole pin header. Pin 1 is at the origin, the row runs along +X and the second row along +Y. The insulator's underside is on the XY plane, the mating posts point up and the tails go down through the board.

Source

Other headers of the same pitch differ in post and tail length, so check the one you buy.

Proportions, for looks only: the V notches between pins, and the 2.00 mm post size of 0.50 mm, which that page doesn't print.

Right-angle, surface-mount, 1.27 mm and 1.00 mm headers aren't here yet; see COVERAGE.md.

  1. 1.1.0 Latest Compare with 1.0.0

    Right-angle 2.54 mm headers.

  2. 1.0.0
More #pin-header
STEVEMIT

steve/jst-ph-header

JST PH shrouded header, 2.0 mm pitch, top entry: B2B-PH-K to B16B-PH-K.

0 16 sizes 0 23 minutes ago v1.0.0
STEVEMIT

steve/pin-socket

Straight through-hole pin socket, 2.54 mm pitch, one or two rows, 1 to 40 pins per row.

0 81 sizes 0 1 hour ago v1.0.0
STEVEMIT

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.

0 17 sizes 0 25 minutes ago v1.0.0
STEVEMIT

steve/pluggable-terminal-header

PCB header for pluggable terminal blocks, Phoenix Contact MSTBA 2,5 type: right-angle, 5.0 and 5.08 mm pitch, 2 to 16 positions.

0 31 sizes 0 1 minute ago v1.0.0