Sign in with STEVE

steve/tht-tactile-switch

6 x 6 mm through-hole tactile switches from Omron's B3F data sheet: flat plungers 4.3 to 9.5 mm high, projected 7.3 mm, with or without a ground terminal.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 154 lines · Python · STEVE runtime · checked
Download
1"""6 x 6 mm through-hole tactile switch, Omron's B3F-1000 series (top-operated, flat or projected plunger, with or without a ground
2terminal). The body is centred on the origin, its underside on the board's top face (the XY plane); terminals 1/2 at -X and 3/4 at +X,
36.5 apart along X and 4.5 along Y; the ground terminal, when there is one, at -Y. Dimensions from Omron's data sheet, in the README."""
4from steve import Model
5
6kind = "1000" # Type (the B3F-1xx0 drawing)
7force = "0.98N" # Operating force (sets the plunger colour)
8
9# Each entry: (height to the plunger's top, plunger, terminal pitch along X, overall width over the terminal bends, ground terminal).
10# Omron "Tactile Switch B3F", Cat. No. A070-E1-08 (omronfs.omron.com/en_US/ecb/products/pdf/en-b3f.pdf), Dimensions, pages 4 and 5:
11# every 6 x 6 model: body 6 ±0.2 x 6 ±0.2, 3.4 to the body's top, plunger 3.5 dia., terminals 0.7 wide and 0.3 thick, 3.5 below
12# the board, 4.5 ±0.2 apart along Y. B3F-1000/1002/1005/1006: 4.3 ±0.2; B3F-1020/1022/1025/1026: 5 ±0.2 (note); B3F-1060/1062: 7 ±0.2;
13# B3F-1070/1072/1075: 9.5, the plunger's top 3 dia.; B3F-1050/1052/1055/1056: 7.3 ±0.2, a 2.4 x 2.4 ±0.1 stem 1.8 ±0.1 high above a
14# plunger 4.3 ±0.2 high; terminals 6.5 ±0.5 apart and 7.7 ±0.5 over the bends. With ground terminal (B3F-1100/1102/1105,
15# B3F-1120/1122/1125, B3F-1150/1152/1155): the same, plus terminal 5, its hole 4.1 ±0.1 from the centre line, its tab 1.5 wide.
16# B3F-1110: 5 ±0.2, terminals 7.5 ±0.5 apart and 9 ±0.5 over the bends, with ground terminal.
17TYPES = {
18 "1000": (4.3, "flat", 6.5, 7.7, False),
19 "1020": (5.0, "flat", 6.5, 7.7, False),
20 "1060": (7.0, "flat", 6.5, 7.7, False),
21 "1070": (9.5, "tall", 6.5, 7.7, False),
22 "1050": (7.3, "projected", 6.5, 7.7, False),
23 "1100": (4.3, "flat", 6.5, 7.7, True),
24 "1120": (5.0, "flat", 6.5, 7.7, True),
25 "1150": (7.3, "projected", 6.5, 7.7, True),
26 "1110": (5.0, "flat", 7.5, 9.0, True),
27}
28BODY = 6.0
29BODY_TOP = 3.4
30PLUNGER_D = 3.5
31TALL_TOP_D = 3.0
32STEM = 2.4
33STEM_H = 1.8
34PROJECTED_BASE = 4.3
35ROW = 4.5
36GROUND = 4.1
37GROUND_TAB = 1.5
38LEAD_W = 0.7
39LEAD_T = 0.3
40TAIL = 3.5
41# Plunger colours by operating force (List of Models, pages 1 and 2): (kind, force) -> (part number, colour name).
42COLORS = {
43 ("1000", "0.98N"): ("B3F-1000", "ivory"), ("1000", "1.47N"): ("B3F-1002", "yellow"), ("1000", "2.55N"): ("B3F-1005", "orange"),
44 ("1000", "4.9N"): ("B3F-1006", "red"),
45 ("1020", "0.98N"): ("B3F-1020", "black"), ("1020", "1.47N"): ("B3F-1022", "gray"), ("1020", "2.55N"): ("B3F-1025", "pink"),
46 ("1020", "4.9N"): ("B3F-1026", "blue"),
47 ("1060", "0.98N"): ("B3F-1060", "black"), ("1060", "1.47N"): ("B3F-1062", "yellow"),
48 ("1070", "0.98N"): ("B3F-1070", "black"), ("1070", "1.47N"): ("B3F-1072", "yellow"), ("1070", "2.55N"): ("B3F-1075", "orange"),
49 ("1050", "0.98N"): ("B3F-1050", "ivory"), ("1050", "1.47N"): ("B3F-1052", "yellow"), ("1050", "2.55N"): ("B3F-1055", "orange"),
50 ("1050", "4.9N"): ("B3F-1056", "red"),
51 ("1100", "0.98N"): ("B3F-1100", "ivory"), ("1100", "1.47N"): ("B3F-1102", "yellow"), ("1100", "2.55N"): ("B3F-1105", "orange"),
52 ("1120", "0.98N"): ("B3F-1120", "black"), ("1120", "1.47N"): ("B3F-1122", "gray"), ("1120", "2.55N"): ("B3F-1125", "pink"),
53 ("1150", "0.98N"): ("B3F-1150", "ivory"), ("1150", "1.47N"): ("B3F-1152", "yellow"), ("1150", "2.55N"): ("B3F-1155", "orange"),
54 ("1110", "0.98N"): ("B3F-1110", "black"),
55}
56SHADES = {"ivory": "#ece4cf", "yellow": "#e8c21c", "orange": "#e8761c", "red": "#c8202a", "black": "#222325", "gray": "#8c8f93",
57 "pink": "#e79ab4", "blue": "#2f62b8"}
58# Proportions, for looks only (the drawings don't dimension them): the metal cover's thickness, the four corner rivets, the projected
59# plunger's neck under its stem, where the 9.5 mm plunger narrows to its 3 dia. top, and the terminals' bends.
60COVER_T = 0.3
61RIVET_D = 1.4
62RIVET_AT = 2.1
63RIVET_H = 0.2
64NECK_D = 1.4
65TALL_STEP = 6.5
66TAB_Z = 0.9
67
68if kind not in TYPES:
69 raise ValueError(f"no type {kind!r}: {', '.join(TYPES)}")
70if (kind, force) not in COLORS:
71 raise ValueError(f"B3F-{kind} doesn't come with a {force} operating force")
72height, plunger, pitch, over, ground = TYPES[kind]
73color = SHADES[COLORS[(kind, force)][1]]
74h = BODY / 2
75
76# model.box takes the box's centre; the XZ plane's normal is -Y, so a sketch on it extrudes towards -Y.
77model = Model()
78model.box("housing", BODY, BODY, BODY_TOP - COVER_T, at=(0, 0, (BODY_TOP - COVER_T) / 2), op="new", body="housing_body", name="Housing")
79for i, (sx, sy) in enumerate(((1, 1), (-1, 1), (-1, -1), (1, -1))):
80 model.cylinder(f"rivet_{i + 1}", RIVET_D / 2, COVER_T + RIVET_H, at=(sx * RIVET_AT, sy * RIVET_AT, BODY_TOP - COVER_T), op="join",
81 body="housing_body", name="Corner rivet")
82model.box("cover", BODY, BODY, COVER_T, at=(0, 0, BODY_TOP - COVER_T / 2), op="new", body="cover_body", name="Cover")
83model.cylinder("cover_hole", PLUNGER_D / 2 + 0.1, COVER_T + 0.2, at=(0, 0, BODY_TOP - COVER_T - 0.1), op="cut", body="cover_body",
84 name="Plunger opening")
85# Plunger: from the housing's top up to its own.
86base = BODY_TOP - COVER_T # the plunger stands on the housing, through the cover's opening
87top = PROJECTED_BASE if plunger == "projected" else height
88model.cylinder("plunger", PLUNGER_D / 2, (TALL_STEP if plunger == "tall" else top) - base, at=(0, 0, base), op="new", body="plunger_body",
89 name="Plunger")
90if plunger == "tall":
91 model.cylinder("plunger_top", TALL_TOP_D / 2, height - TALL_STEP + 0.01, at=(0, 0, TALL_STEP - 0.01), op="join", body="plunger_body",
92 name="Plunger top")
93if plunger == "projected":
94 model.cylinder("neck", NECK_D / 2, height - STEM_H - top + 0.02, at=(0, 0, top - 0.01), op="join", body="plunger_body", name="Neck")
95 model.box("stem", STEM, STEM, STEM_H, at=(0, 0, height - STEM_H / 2), op="join", body="plunger_body", name="Stem")
96# Terminals 1-4: a strip 0.7 wide and 0.3 thick, from the housing's side out at TAB_Z, down the outside, in to the pitch and down to the
97# tail; drawn as an outline in the XZ plane (the strip's centre line offset by half the thickness) and extruded along Y.
98x_out = over / 2 - LEAD_T / 2
99x_pin = pitch / 2
100path = [(h, TAB_Z), (x_out, TAB_Z), (x_out, -0.4), (x_pin, -1.2), (x_pin, -TAIL)]
101
102
103def outline(points, t):
104 """A closed outline around a polyline of straight segments, t thick (mitred corners)."""
105 import math
106
107 def offset(sign):
108 out = []
109 for i, (x, y) in enumerate(points):
110 normals = []
111 segments = ([(points[i - 1], points[i])] if i else []) + ([(points[i], points[i + 1])] if i + 1 < len(points) else [])
112 for a, b in segments:
113 dx, dy = b[0] - a[0], b[1] - a[1]
114 n = math.hypot(dx, dy)
115 normals.append((-dy / n, dx / n))
116 if len(normals) == 1:
117 nx, ny = normals[0]
118 k = 1.0
119 else:
120 nx, ny = normals[0][0] + normals[1][0], normals[0][1] + normals[1][1]
121 n = math.hypot(nx, ny)
122 nx, ny = nx / n, ny / n
123 k = 1 / (nx * normals[0][0] + ny * normals[0][1])
124 out.append((x + sign * nx * k * t / 2, y + sign * ny * k * t / 2))
125 return out
126 return offset(1) + offset(-1)[::-1]
127
128
129leads = []
130for i, (sx, sy) in enumerate(((1, -1), (-1, -1), (1, 1), (-1, 1))):
131 pts = [(sx * x, z) for x, z in path]
132 model.plane(f"lead_{i + 1}_plane", on="XZ", offset=-(sy * ROW / 2 + LEAD_W / 2), name=f"Terminal {i + 1}")
133 with model.sketch(f"lead_{i + 1}_sketch", on=f"lead_{i + 1}_plane", name=f"Terminal {i + 1}") as sk:
134 sk.polyline(f"lead_{i + 1}_outline", outline(pts, LEAD_T), closed=True)
135 model.extrude(f"lead_{i + 1}", f"lead_{i + 1}_sketch", distance=LEAD_W, op="new", body=f"lead_{i + 1}_body", name=f"Terminal {i + 1}")
136 leads.append(f"lead_{i + 1}_body")
137if ground:
138 # Terminal 5: a tab 1.5 wide out of the -Y face at TAB_Z, then down at 4.1 from the centre line to the tail.
139 gpts = [(-h, TAB_Z), (-GROUND, TAB_Z), (-GROUND, -TAIL)]
140 model.plane("ground_plane", on="YZ", offset=-LEAD_W / 2, name="Terminal 5")
141 with model.sketch("ground_sketch", on="ground_plane", name="Terminal 5") as sk:
142 sk.polyline("ground_outline", outline(gpts, LEAD_T), closed=True)
143 model.extrude("ground", "ground_sketch", distance=LEAD_W, op="new", body="ground_body", name="Terminal 5")
144 model.box("ground_tab", GROUND_TAB, GROUND - h, LEAD_T, at=(0, -(GROUND + h) / 2, TAB_Z), op="join",
145 body="ground_body", name="Terminal 5 tab")
146 leads.append("ground_body")
147# Materials, for looks and a rough mass (the data sheet names none): the housing a black polyamide (pa6), the cover sheet steel
148# (steel-c10), the plunger polyamide in its colour, the terminals copper alloy, silver plated (copper).
149model.material("pa6", bodies=["housing_body"], color="#26272a")
150model.material("steel-c10", bodies=["cover_body"], color="#c9ccd0")
151model.material("pa6", bodies=["plunger_body"], color=color)
152model.material("copper", bodies=leads, color="#d6d8db")
153result = model.result()
154

6 x 6 mm through-hole tactile switch (SPST-NO), Omron B3F-1000 series, from Omron's data sheet A070-E1-08: B3F-1000 (4.3 mm), 1020 (5.0), 1060 (7.0), 1070 (9.5) and 1050 (7.3, projected plunger), and the ground-terminal B3F-1100, 1120, 1150 and 1110 (7.5 mm pitch). Terminals 6.5 x 4.5 apart (7.5 x 4.5 for 1110), 3.5 below the board. The operating force sets the plunger colour and the part number. See the README.

Through-hole tactile switch, 6 x 6 mm

A 6 x 6 mm through-hole tactile switch (SPST-NO), Omron's B3F-1000 series. It has a black housing, a metal cover with four corner rivets, a round plunger (or a projected plunger with a square stem), and four bent snap-in terminals. Ground-terminal types have a fifth terminal. The body is centred on the origin, with its underside on the board's top face (the XY plane). Terminals 1 and 2 are at -X and 3 and 4 at +X. The ground terminal, terminal 5, is at -Y.

kind is the B3F drawing. force is the operating force, which sets the plunger's colour and the part number.

Type Parts (by force 0.98 / 1.47 / 2.55 / 4.9 N) Height Plunger Terminal pitch x row Over the bends Ground terminal
1000 B3F-1000, 1002, 1005, 1006 4.3 ±0.2 flat, Ø3.5 6.5 x 4.5 7.7 —
1020 B3F-1020, 1022, 1025, 1026 5 ±0.2 flat, Ø3.5 6.5 x 4.5 7.7 —
1060 B3F-1060, 1062 7 ±0.2 flat, Ø3.5 6.5 x 4.5 7.7 —
1070 B3F-1070, 1072, 1075 9.5 flat, Ø3.5, top Ø3 6.5 x 4.5 7.7 —
1050 B3F-1050, 1052, 1055, 1056 7.3 ±0.2 projected: 2.4 x 2.4 stem, 1.8 high, on a plunger 4.3 high 6.5 x 4.5 7.7 —
1100 B3F-1100, 1102, 1105 4.3 flat 6.5 x 4.5 7.7 yes
1120 B3F-1120, 1122, 1125 5 flat 6.5 x 4.5 7.7 yes
1150 B3F-1150, 1152, 1155 7.3 projected 6.5 x 4.5 7.7 yes
1110 B3F-1110 5 ±0.2 flat 7.5 x 4.5 9 yes

For every type:

  • The body is 6 ±0.2 x 6 ±0.2, and its top is 3.4 above the board.
  • The terminals are 0.7 wide and 0.3 thick, and they reach 3.5 below the board.
  • The terminal pitch is ±0.5 on the part (±0.1 for the PCB holes).
  • The ground terminal's hole is 4.1 ±0.1 from the centre line, and its tab is 1.5 wide.

Source

Omron, Tactile Switch B3F, Cat. No. A070-E1-08, from Omron's own site, https://omronfs.omron.com/en_US/ecb/products/pdf/en-b3f.pdf:

  • List of Models (pages 1 and 2): the heights, the plunger colours by operating force, and the part numbers.
  • Ratings/Characteristics (page 3): the weight of the 6 x 6 mm models is approx. 0.25 g.
  • Dimensions (page 4): B3F-1000, B3F-1100, B3F-1110 and B3F-1060 series.
  • Dimensions (page 5): B3F-1070, B3F-1050 and B3F-1150 series.

The general tolerance is ±0.4 mm. The data sheet names no materials.

Proportions, for looks only. The drawings don't dimension the following:

  • The metal cover's thickness, 0.3.
  • The four corner rivets: Ø1.4, standing 0.2 above the cover.
  • The projected plunger's neck under its stem, Ø1.4.
  • Where the 9.5 mm plunger narrows to its Ø3 top: 6.5 above the board.
  • The terminals' bends. Each terminal leaves the housing's side 0.9 above the board, runs out to the 7.7 (or 9) overall width, goes down, steps in to the pitch, and goes on down to the tail.

Materials are for looks and a rough mass. The housing is black polyamide (pa6), the cover sheet steel (steel-c10), the plunger polyamide in its colour, and the terminals copper alloy (copper), silver coloured. Mass check: B3F-1000 as modelled is 0.131 g housing + 0.060 g cover + 0.016 g plunger + 0.042 g terminals = 0.25 g, against the sheet's approx. 0.25 g.

Catalogue models

The Omron models map to their drawings:

Old models Type
B3F-100x, B3F-102x, B3F-106x, B3F-107x 1000, 1020, 1060, 1070
B3F-110x, B3F-112x, B3F-1110 1100, 1120, 1110

They were measured on the reference models (2026-11-06) for B3F-100x, 107x and 1110:

Over the bends Body Height Terminals
old B3F-100x 7.68 6.0 x 6.0 4.3 6.5 x 4.5, 3.5 below
Omron B3F-1000 7.7 ±0.5 6 x 6 4.3 6.5 x 4.5, 3.5 below
old B3F-107x 7.68 6.0 x 6.0 9.5, the plunger narrowing to Ø3.04 6.5 x 4.5
old B3F-1110 8.96, 7.25 deep with the ground tab 6.0 x 6.0 5.0 7.5 x 4.5, 3.56 below
Omron B3F-1110 9 ±0.5, 7.25 deep 6 x 6 5 7.5 x 4.5, 3.5 below

The generic SW PUSH 6mm, H4.3mm, H5mm and H9.5mm models name no maker. They map to the B3F of the same height, because their body is the same 6.0 x 6.0 housing (measured through 3.3 above the board), the terminals are on the same 6.5 x 4.5 grid, and they reach 3.5 below the board. Their differences are below. The terminal spread varies between makers of the same part, as post lengths do for headers.

Over the bends Above the body Plunger
generic 6 mm models 7.18 four corner posts to 4.0 Ø3.5, straight to the top (H9.5 too)
Omron B3F 7.7 ±0.5 rivets Ø3.5 (B3F-1070: Ø3 top)

These models are not mapped:

  • SW PUSH 6mm H7.3mm, "no table read yet": it is a round Ø3.5 plunger 7.3 high. B3F has a 7.0 flat plunger and a 7.3 projected plunger with a square stem, and neither is this part.
  • H8mm and H13mm, "no table read yet": B3F has no switch of those heights.
  • The family's other switches (DIP switches, slide and toggle switches, other makers' tactile switches) are other parts. See COVERAGE.md.
  1. 1.0.0 Latest
STEVEMIT

steve/pcb-relay

Through-hole PCB relays from Omron's data sheets: G2RL-2 power relay, G5V-1 and G5V-2 signal relays, G6A and G6AK signal relays.

0 5 sizes 0 12 minutes ago v1.0.0
STEVEMIT

steve/axial-resistor

Axial leaded metal film resistor, Vishay Beyschlag MBA/SMA 0204, MBB/SMA 0207 and MBE/SMA 0414, with colour rings, horizontal or vertical.

1 9 sizes 0 5 hours ago v1.0.0
STEVEMIT

steve/bridge-rectifier

Single-phase bridge rectifiers in Vishay's through-hole cases: GBL, GBU, KBL and KBU in-line, KBPC1 and KBPC6 square, from Vishay's data sheets.

0 7 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/axial-diode

Axial leaded diodes in Vishay's DO-35, DO-41, DO-15, DO-201AD and P600 packages, with the cathode band, horizontal or vertical.

0 30 sizes 0 3 hours ago v1.0.0