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.
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.
| 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.""" |
| 3 | from steve import Model |
| 4 | |
| 5 | series = "A6S" # Omron series: A6S (2.54 mm pitch) or A6H (1.27 mm pitch) |
| 6 | poles = 4 # number of switches |
| 7 | actuator = "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. |
| 12 | SERIES = { |
| 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. |
| 17 | LENGTH = { |
| 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. |
| 22 | LEAD_T = 0.2 |
| 23 | STANDOFF = 0.15 |
| 24 | A6H_LEAD_W = 0.4 |
| 25 | |
| 26 | pitch, width, top, span, foot, lead_w, raised_h, raised_l = SERIES[series] |
| 27 | lead_w = lead_w or A6H_LEAD_W |
| 28 | length = LENGTH[series][poles] |
| 29 | first = -(poles - 1) * pitch / 2 |
| 30 | model = Model() |
| 31 | model.plane("body_plane", on="XY", offset=STANDOFF, name="Body") |
| 32 | with model.sketch("body_sketch", on="body_plane", name="Body") as sk: |
| 33 | sk.rect("body_rect", (-length / 2, -width / 2), (length / 2, width / 2)) |
| 34 | model.extrude("body", "body_sketch", distance=top - STANDOFF, name="Body") |
| 35 | model.plane("top_plane", on="XY", offset=top, name="Top") |
| 36 | win_w, win_l, depth = 0.45 * pitch, 0.55 * width, 0.25 * (top - STANDOFF) |
| 37 | with 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)) |
| 41 | model.extrude("window_cut", "windows", distance=-depth, op="cut", name="Actuator windows") |
| 42 | knob_h = depth + (raised_h if actuator == "raised" and raised_h else 0.0) |
| 43 | knob_l = 0.4 * win_l |
| 44 | model.plane("knob_plane", on="XY", offset=top - depth, name="Actuators") |
| 45 | with 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)) |
| 49 | model.extrude("knobs_body", "knobs", distance=knob_h, name="Actuators") |
| 50 | arm_z = top / 2 |
| 51 | for 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") |
| 69 | model.material("pla", color="#2b2d31") |
| 70 | result = model.result() |
| 71 |
| 1 | name = "steve/dip-switch-smd" |
| 2 | version = "1.0.0" |
| 3 | runtime = "steve" |
| 4 | license = "MIT" |
| 5 | summary = "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." |
| 6 | description = """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.""" |
| 7 | tags = ["switch", "dip-switch", "slide", "smd", "electronics"] |
| 8 | |
| 9 | [parameters.series] |
| 10 | type = "choice" |
| 11 | default = "A6S" |
| 12 | choices = ["A6S", "A6H"] |
| 13 | label = "Omron series" |
| 14 | |
| 15 | [parameters.poles] |
| 16 | type = "integer" |
| 17 | default = 4 |
| 18 | min = 1 |
| 19 | max = 10 |
| 20 | label = "Poles" |
| 21 | description = "A6S: 1 to 10. A6H: 2, 4, 6, 8 or 10." |
| 22 | |
| 23 | [parameters.actuator] |
| 24 | type = "choice" |
| 25 | default = "flat" |
| 26 | choices = ["flat", "raised"] |
| 27 | label = "Actuator" |
| 28 | description = "raised: A6S only, actuators 0.7 mm above the body." |
| 29 | |
| 30 | [[presets]] |
| 31 | id = "A6H-2pole" |
| 32 | title = "Omron A6H DIP switch, 2 poles" |
| 33 | params = { series = "A6H", poles = 2 } |
| 34 | aliases = ["A6H-2101", "A6H-2102", "2 position DIP switch A6H"] |
| 35 | |
| 36 | [[presets]] |
| 37 | id = "A6H-4pole" |
| 38 | title = "Omron A6H DIP switch, 4 poles" |
| 39 | params = { series = "A6H", poles = 4 } |
| 40 | aliases = ["A6H-4101", "A6H-4102", "4 position DIP switch A6H"] |
| 41 | |
| 42 | [[presets]] |
| 43 | id = "A6H-6pole" |
| 44 | title = "Omron A6H DIP switch, 6 poles" |
| 45 | params = { series = "A6H", poles = 6 } |
| 46 | aliases = ["A6H-6101", "A6H-6102", "6 position DIP switch A6H"] |
| 47 | |
| 48 | [[presets]] |
| 49 | id = "A6H-8pole" |
| 50 | title = "Omron A6H DIP switch, 8 poles" |
| 51 | params = { series = "A6H", poles = 8 } |
| 52 | aliases = ["A6H-8101", "A6H-8102", "8 position DIP switch A6H"] |
| 53 | |
| 54 | [[presets]] |
| 55 | id = "A6H-10pole" |
| 56 | title = "Omron A6H DIP switch, 10 poles" |
| 57 | params = { series = "A6H", poles = 10 } |
| 58 | aliases = ["A6H-0101", "A6H-0102", "10 position DIP switch A6H"] |
| 59 | |
| 60 | [[presets]] |
| 61 | id = "A6S-1pole" |
| 62 | title = "Omron A6S DIP switch, 1 poles" |
| 63 | params = { series = "A6S", poles = 1 } |
| 64 | aliases = ["A6S-1101-H", "A6S-1102-H", "1 position DIP switch A6S"] |
| 65 | |
| 66 | [[presets]] |
| 67 | id = "A6S-2pole" |
| 68 | title = "Omron A6S DIP switch, 2 poles" |
| 69 | params = { series = "A6S", poles = 2 } |
| 70 | aliases = ["A6S-2101-H", "A6S-2102-H", "2 position DIP switch A6S"] |
| 71 | |
| 72 | [[presets]] |
| 73 | id = "A6S-3pole" |
| 74 | title = "Omron A6S DIP switch, 3 poles" |
| 75 | params = { series = "A6S", poles = 3 } |
| 76 | aliases = ["A6S-3101-H", "A6S-3102-H", "3 position DIP switch A6S"] |
| 77 | |
| 78 | [[presets]] |
| 79 | id = "A6S-4pole" |
| 80 | title = "Omron A6S DIP switch, 4 poles" |
| 81 | params = { series = "A6S", poles = 4 } |
| 82 | aliases = ["A6S-4101-H", "A6S-4102-H", "4 position DIP switch A6S"] |
| 83 | |
| 84 | [[presets]] |
| 85 | id = "A6S-5pole" |
| 86 | title = "Omron A6S DIP switch, 5 poles" |
| 87 | params = { series = "A6S", poles = 5 } |
| 88 | aliases = ["A6S-5101-H", "A6S-5102-H", "5 position DIP switch A6S"] |
| 89 | |
| 90 | [[presets]] |
| 91 | id = "A6S-6pole" |
| 92 | title = "Omron A6S DIP switch, 6 poles" |
| 93 | params = { series = "A6S", poles = 6 } |
| 94 | aliases = ["A6S-6101-H", "A6S-6102-H", "6 position DIP switch A6S"] |
| 95 | |
| 96 | [[presets]] |
| 97 | id = "A6S-7pole" |
| 98 | title = "Omron A6S DIP switch, 7 poles" |
| 99 | params = { series = "A6S", poles = 7 } |
| 100 | aliases = ["A6S-7101-H", "A6S-7102-H", "7 position DIP switch A6S"] |
| 101 | |
| 102 | [[presets]] |
| 103 | id = "A6S-8pole" |
| 104 | title = "Omron A6S DIP switch, 8 poles" |
| 105 | params = { series = "A6S", poles = 8 } |
| 106 | aliases = ["A6S-8101-H", "A6S-8102-H", "8 position DIP switch A6S"] |
| 107 | |
| 108 | [[presets]] |
| 109 | id = "A6S-9pole" |
| 110 | title = "Omron A6S DIP switch, 9 poles" |
| 111 | params = { series = "A6S", poles = 9 } |
| 112 | aliases = ["A6S-9101-H", "A6S-9102-H", "9 position DIP switch A6S"] |
| 113 | |
| 114 | [[presets]] |
| 115 | id = "A6S-10pole" |
| 116 | title = "Omron A6S DIP switch, 10 poles" |
| 117 | params = { series = "A6S", poles = 10 } |
| 118 | aliases = ["A6S-0101-H", "A6S-0102-H", "10 position DIP switch A6S"] |
| 119 | |
| 120 | [[presets]] |
| 121 | id = "A6S-4pole-raised" |
| 122 | title = "Omron A6S DIP switch, 4 poles, raised actuators" |
| 123 | params = { series = "A6S", poles = 4, actuator = "raised" } |
| 124 | aliases = ["A6S-4104-H", "4 position DIP switch A6S"] |
| 125 | |
| 126 | [[presets]] |
| 127 | id = "A6S-8pole-raised" |
| 128 | title = "Omron A6S DIP switch, 8 poles, raised actuators" |
| 129 | params = { series = "A6S", poles = 8, actuator = "raised" } |
| 130 | aliases = ["A6S-8104-H", "8 position DIP switch A6S"] |
| 131 |
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.
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.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 | # SMD DIP switch |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## Source |
| 6 | |
| 7 | - 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. |
| 8 | - 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. |
| 9 | |
| 10 | Both pages give a ±0.4 mm general tolerance; the model uses the printed values. |
| 11 | |
| 12 | Seal-tape models (A6S-□102-H, A6H-□102) have the same outline and are aliases of the standard presets. |
| 13 | |
| 14 | **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. |
| 15 | |
| 16 | Other DIP switches aren't here yet; see `COVERAGE.md`. |
| 17 |
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.
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.
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.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.
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.
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.
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.
Hirose FH12 0.5 mm pitch FPC/FFC connectors, right angle, bottom contact, flip lock, 6 to 53 contacts, by the maker's drawing.