Sign in with STEVE

steve/dip-switch-smd

Surface-mount slide DIP switches in the Omron A6S (2.54 mm, 1 to 10 poles) and A6H (1.27 mm, 2 to 10 poles) sizes.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 71 lines · Python · STEVE runtime · checked
Download
1"""Surface-mount slide DIP switch, Omron A6S and A6H sizes. Centred on the origin with the seating plane on the XY plane, the poles in a row along X
2(pole 1 at -X) and the gull-wing leads out to -Y and +Y. Dimensions from the Omron datasheet for `series`; see the README."""
3from steve import Model
4
5series = "A6S" # Omron series: A6S (2.54 mm pitch) or A6H (1.27 mm pitch)
6poles = 4 # number of switches
7actuator = "flat" # flat, or raised (A6S only: the actuators stand 0.7 above the body)
8
9# series: (pitch, body width, height, lead tip to tip, foot length, lead width, raised actuator height, raised actuator length), mm.
10# Omron A6S-H datasheet (en-a6s.pdf, 2019), Dimensions, page 3; Omron A6H datasheet (en-a6h.pdf, 2019), Dimensions, page 2. A6H prints no lead width or
11# raised actuator; None there.
12SERIES = {
13 "A6S": (2.54, 6.2, 3.0, 9.8, 0.7, 0.5, 0.7, 1.0),
14 "A6H": (1.27, 4.5, 1.45, 6.7, 0.6, None, None, None),
15}
16# Body length A by number of poles, from the same pages' tables.
17LENGTH = {
18 "A6S": {1: 3.48, 2: 6.02, 3: 8.56, 4: 11.10, 5: 13.64, 6: 16.18, 7: 18.72, 8: 21.26, 9: 23.80, 10: 26.34},
19 "A6H": {2: 3.77, 4: 6.31, 6: 8.85, 8: 11.39, 10: 13.93},
20}
21# Proportions, for looks: lead thickness, the body's height above the seating plane, A6H's lead width, and the actuator windows and knobs.
22LEAD_T = 0.2
23STANDOFF = 0.15
24A6H_LEAD_W = 0.4
25
26pitch, width, top, span, foot, lead_w, raised_h, raised_l = SERIES[series]
27lead_w = lead_w or A6H_LEAD_W
28length = LENGTH[series][poles]
29first = -(poles - 1) * pitch / 2
30model = Model()
31model.plane("body_plane", on="XY", offset=STANDOFF, name="Body")
32with model.sketch("body_sketch", on="body_plane", name="Body") as sk:
33 sk.rect("body_rect", (-length / 2, -width / 2), (length / 2, width / 2))
34model.extrude("body", "body_sketch", distance=top - STANDOFF, name="Body")
35model.plane("top_plane", on="XY", offset=top, name="Top")
36win_w, win_l, depth = 0.45 * pitch, 0.55 * width, 0.25 * (top - STANDOFF)
37with model.sketch("windows", on="top_plane", name="Actuator windows") as sk:
38 for i in range(poles):
39 x = first + i * pitch
40 sk.rect(f"window_{i}", (x - win_w / 2, -win_l / 2), (x + win_w / 2, win_l / 2))
41model.extrude("window_cut", "windows", distance=-depth, op="cut", name="Actuator windows")
42knob_h = depth + (raised_h if actuator == "raised" and raised_h else 0.0)
43knob_l = 0.4 * win_l
44model.plane("knob_plane", on="XY", offset=top - depth, name="Actuators")
45with model.sketch("knobs", on="knob_plane", name="Actuators") as sk:
46 for i in range(poles):
47 x = first + i * pitch # switches drawn in the OFF position, toward -Y
48 sk.rect(f"knob_{i}", (x - win_w / 2 + 0.05, -win_l / 2), (x + win_w / 2 - 0.05, -win_l / 2 + knob_l))
49model.extrude("knobs_body", "knobs", distance=knob_h, name="Actuators")
50arm_z = top / 2
51for tag, side in (("low", -1), ("high", 1)):
52 y_out, y_body, y_bend = side * span / 2, side * width / 2, side * (span / 2 - foot)
53 with model.sketch(f"feet_{tag}", on="XY", name="Leads") as sk:
54 for i in range(poles):
55 x = first + i * pitch
56 sk.rect(f"foot_{tag}_{i}", (x - lead_w / 2, min(y_bend, y_out)), (x + lead_w / 2, max(y_bend, y_out)))
57 model.extrude(f"feet_{tag}_body", f"feet_{tag}", distance=LEAD_T, name="Leads")
58 model.plane(f"arm_plane_{tag}", on="XY", offset=arm_z, name="Leads")
59 with model.sketch(f"arms_{tag}", on=f"arm_plane_{tag}", name="Leads") as sk:
60 for i in range(poles):
61 x = first + i * pitch
62 sk.rect(f"arm_{tag}_{i}", (x - lead_w / 2, min(y_body, y_bend) - LEAD_T / 2), (x + lead_w / 2, max(y_body, y_bend) + LEAD_T / 2))
63 model.extrude(f"arms_{tag}_body", f"arms_{tag}", distance=LEAD_T, name="Leads")
64 with model.sketch(f"legs_{tag}", on="XY", name="Leads") as sk:
65 for i in range(poles):
66 x = first + i * pitch
67 sk.rect(f"leg_{tag}_{i}", (x - lead_w / 2, y_bend - LEAD_T / 2), (x + lead_w / 2, y_bend + LEAD_T / 2))
68 model.extrude(f"legs_{tag}_body", f"legs_{tag}", distance=arm_z + LEAD_T, name="Leads")
69model.material("pla", color="#2b2d31")
70result = model.result()
71

Surface-mount slide DIP switches for board layouts: body, actuators and gull-wing leads, sized from the Omron A6S and A6H datasheets. See the README.

SMD DIP switch

Surface-mount slide DIP switches in the Omron A6S and A6H sizes: the body, one actuator per pole in its window, and the gull-wing leads. The switch is centred on the origin with the seating plane on the XY plane, the poles in a row along X (pole 1 at -X) and the leads out to -Y and +Y. The actuators are drawn in the OFF position.

Source

  • A6S: Omron A6S-H datasheet, https://omronfs.omron.com/en_US/ecb/products/pdf/en-a6s.pdf, Dimensions (page 3): length A by number of poles (3.48 for 1 pole to 26.34 for 10), width 6.2, height 3, lead tip to tip 9.8, foot 0.7, lead width 0.5, pitch 2.54. Raised actuators stand 0.7 above the body and are 1 long.
  • A6H: Omron A6H datasheet, https://omronfs.omron.com/en_US/ecb/products/pdf/en-a6h.pdf, Dimensions (page 2): length A for 2, 4, 6, 8 and 10 poles (3.77 to 13.93), width 4.5, height 1.45, lead tip to tip 6.7, foot 0.6, pitch 1.27.

Both pages give a ±0.4 mm general tolerance; the model uses the printed values.

Seal-tape models (A6S-□102-H, A6H-□102) have the same outline and are aliases of the standard presets.

Proportions, for looks only: lead thickness 0.2, the body's 0.15 mm height above the seating plane, A6H's lead width (0.4; the page prints only the 0.76 pad), and the actuator windows and knobs.

Other DIP switches aren't here yet; see COVERAGE.md.

  1. 1.0.0 Latest
More #switch
STEVEMIT

steve/son-package

No-lead small-outline IC packages by TI outline: WSON-8/10/12/16, VSON-8 and X1SON-8, 0.4 to 0.8 mm pitch, with exposed thermal pad.

1 7 sizes 0 2 hours ago v1.1.0
STEVEMIT

steve/molded-chip-inductor

Power molded chip inductors in the Würth WE-PMCI sizes, 1.6 x 0.8 mm to 3.2 x 2.5 mm, by the maker's datasheets.

0 7 sizes 0 1 hour ago v1.0.0
STEVEMIT

steve/flat-wire-inductor

Shielded SMD flat-wire high-current inductors in the Würth WE-HCM sizes, 7 x 7 mm to 13.3 x 13.5 mm, by the maker's datasheets.

0 9 sizes 0 1 hour ago v1.0.0
STEVEMIT

steve/fh12-fpc-connector

Hirose FH12 0.5 mm pitch FPC/FFC connectors, right angle, bottom contact, flip lock, 6 to 53 contacts, by the maker's drawing.

0 28 sizes 0 1 hour ago v1.0.0