Sign in with STEVE

steve/right-angle-tactile-switch

Right-angle 6 x 6 mm through-hole tactile switches, C&K PTS645V: round actuators 3.15 to 8.35 mm from the front leads, or the 6.15 mm square actuator.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 161 lines · Python · STEVE runtime · checked
Download
1"""Right-angle (vertical) 6 x 6 mm through-hole tactile switch, C&K PTS645V series: a 6 x 6 mm tactile switch lying on its back in a
2sheet-metal frame, the actuator parallel to the board. The origin is midway between terminals 1 and 2, on the board's top face (the XY
3plane); the actuator points along +Y, the frame's legs are 2.55 behind the terminals (-Y). Dimensions from C&K's data sheet, in the
4README."""
5from steve import Model
6
7kind = "31" # Actuator: length from the front leads (31, 39, 58, 83) or the square actuator (J61)
8force = "L" # Actuation force (sets the actuator colour and the part number)
9
10# Each entry: (actuator length from the front leads, actuator shape).
11# C&K "PTS645 Series, 6 mm Tact Switches", 6 february 18, page B-102 (pdf.icgoo.net copy), "Switch length from front leads for V
12# only": 31 3,15; 39 3,85; 58 5,85; 83 8,35 (H ±0.1). Page B-98, How To Order: 61 6,15, vertical, square actuator 2.4 mm side only.
13LENGTHS = {
14 "31": (3.15, "round"),
15 "39": (3.85, "round"),
16 "58": (5.85, "round"),
17 "83": (8.35, "round"),
18 "J61": (6.15, "square"),
19}
20# Page B-99, V VERTICAL: frame 7.5 wide, 6.2 from its top to the face's lower edge; terminals 1 and 2 0.7 wide, 4.5 ±0.15 apart and
21# 4.3 below that edge; the frame's legs 4.95 below it, 7 apart at the tips and 8.5 over their bends, 1 wide, 2.55 ±0.1 behind the
22# terminals; the frame's back 4.2 behind them; the leg tips 3.95 below the board, so the face's lower edge is 4.95 - 3.95 = 1.0 above it;
23# the actuator Ø3.5, its axis 4.05 above the board; terminal 1/2 thickness 0.3. PCB layout: terminals 1/2 in Ø1 holes 4.5 ±0.05
24# apart, the legs in Ø1.3 holes 7 ±0.05 apart, 2.55 ±0.05 behind.
25FRAME_W = 7.5
26FACE_H = 6.2
27FACE_LOW = 1.0
28AXIS = 4.05
29ACTUATOR_D = 3.5
30PIN_PITCH = 4.5
31PIN_W = 0.7
32PIN_T = 0.3
33PIN_DOWN = 4.3
34LEG_PITCH = 7.0
35LEG_OVER = 8.5
36LEG_W = 1.0
37LEG_BACK = 2.55
38LEG_TIP = 3.95
39REAR = 4.2
40# Page B-100, J SQUARE ACTUATOR, VERTICAL THT (the same frame and switch): the actuator 6.2 (order table: 6.15) from the front leads
41# and 3.85 beyond the switch's face, so the face is 6.15 - 3.85 = 2.3 in front of the terminals; a 2.4 square stem 1.8 long on a neck
42# 1.4 long; four Ø0.9 holes in the face, 4.3 apart.
43FACE_Y = 2.3
44STEM = 2.4
45STEM_L = 1.8
46NECK_L = 1.4
47FACE_HOLE_D = 0.9
48FACE_HOLE_AT = 4.3
49# Page B-99, S STRAIGHT (the switch itself standing upright): body 6 square, 3.45 from the terminal side to the face.
50BODY = 6.0
51BODY_DEPTH = 3.45
52# Page B-102, ACTUATION FORCE: L 130 grams black, M 160 grams blue, H 200 grams gray, K 260 grams red.
53COLORS = {"L": ("130 grams", "#222325"), "M": ("160 grams", "#2f62b8"), "H": ("200 grams", "#8c8f93"), "K": ("260 grams", "#c8202a")}
54# Proportions, for looks only (the drawings don't dimension them): the frame's sheet thickness, the gap between the switch and the frame's
55# side walls, the switch's metal face thickness, the side walls' outline (sloped back edge, slanted lower front edge) and window, where the
56# legs bend, and the square actuator's neck (Ø1.6, as page B-101's square actuator).
57SHEET_T = 0.2
58COVER_T = 0.3
59NECK_D = 1.6
60WALL_TOP_BACK = 3.2
61WALL_BACK_LOW = 3.0
62WALL_FOOT = 0.7
63WINDOW = (-1.0, 2.0, 2.0, 3.9)
64LEG_BENDS = (-0.6, -1.6, -2.0, -3.0)
65
66if kind not in LENGTHS:
67 raise ValueError(f"no actuator {kind!r}: {', '.join(LENGTHS)}")
68if force not in COLORS:
69 raise ValueError(f"no actuation force {force!r}: {', '.join(COLORS)}")
70length, shape = LENGTHS[kind]
71color = COLORS[force][1]
72top = FACE_LOW + FACE_H
73body_top = FACE_LOW + BODY
74back = FACE_Y - BODY_DEPTH
75w = FRAME_W / 2
76
77model = Model()
78# The switch: housing, metal face with the actuator opening and four holes, actuator along +Y.
79model.box("housing", BODY, BODY_DEPTH - COVER_T, BODY, at=(0, (back + FACE_Y - COVER_T) / 2, FACE_LOW + BODY / 2), op="new",
80 body="housing_body", name="Housing")
81model.box("face", BODY, COVER_T, BODY, at=(0, FACE_Y - COVER_T / 2, FACE_LOW + BODY / 2), op="new", body="face_body", name="Face")
82model.cylinder("face_opening", ACTUATOR_D / 2 + 0.1, COVER_T + 0.2, at=(0, FACE_Y - COVER_T - 0.1, AXIS), direction=(0, 1, 0), op="cut",
83 body="face_body", name="Actuator opening")
84for i, (sx, sz) in enumerate(((1, 1), (-1, 1), (-1, -1), (1, -1))):
85 model.cylinder(f"face_hole_{i + 1}", FACE_HOLE_D / 2, COVER_T + 0.2, at=(sx * FACE_HOLE_AT / 2, FACE_Y - COVER_T - 0.1,
86 AXIS + sz * FACE_HOLE_AT / 2), direction=(0, 1, 0), op="cut", body="face_body", name="Face hole")
87base = FACE_Y - COVER_T
88if shape == "round":
89 model.cylinder("actuator", ACTUATOR_D / 2, length - base, at=(0, base, AXIS), direction=(0, 1, 0), op="new", body="actuator_body",
90 name="Actuator")
91else:
92 neck_at = length - STEM_L - NECK_L
93 model.cylinder("actuator", ACTUATOR_D / 2, neck_at - base, at=(0, base, AXIS), direction=(0, 1, 0), op="new", body="actuator_body",
94 name="Actuator")
95 model.cylinder("neck", NECK_D / 2, NECK_L + 0.02, at=(0, neck_at - 0.01, AXIS), direction=(0, 1, 0), op="join", body="actuator_body",
96 name="Neck")
97 model.box("stem", STEM, STEM_L, STEM, at=(0, length - STEM_L / 2, AXIS), op="join", body="actuator_body", name="Stem")
98# The frame: a top plate over the switch, two side walls (sloped back, a window onto the housing) and a bent leg from each wall.
99model.box("frame_top", FRAME_W, FACE_Y + WALL_TOP_BACK, SHEET_T, at=(0, (FACE_Y - WALL_TOP_BACK) / 2, top - SHEET_T / 2), op="new",
100 body="frame_body", name="Frame top")
101wall = [(-REAR, 0), (WALL_FOOT, 0), (FACE_Y, FACE_LOW), (FACE_Y, top), (-WALL_TOP_BACK, top), (-REAR, WALL_BACK_LOW)]
102for side, x0 in (("right", w - SHEET_T), ("left", -w)):
103 model.plane(f"wall_{side}_plane", on="YZ", offset=x0, name=f"Frame wall, {side}")
104 with model.sketch(f"wall_{side}_sketch", on=f"wall_{side}_plane", name=f"Frame wall, {side}") as sk:
105 sk.polyline(f"wall_{side}_outline", wall, closed=True)
106 model.extrude(f"wall_{side}", f"wall_{side}_sketch", distance=SHEET_T, op="join", body="frame_body", name=f"Frame wall, {side}")
107y0, y1, z0, z1 = WINDOW
108model.box("window", FRAME_W + 1, y1 - y0, z1 - z0, at=(0, (y0 + y1) / 2, (z0 + z1) / 2), op="cut", body="frame_body",
109 name="Side windows")
110
111
112def outline(points, t):
113 """A closed outline around a polyline of straight segments, t thick (mitred corners)."""
114 import math
115
116 def offset(sign):
117 out = []
118 for i, (x, y) in enumerate(points):
119 normals = []
120 segments = ([(points[i - 1], points[i])] if i else []) + ([(points[i], points[i + 1])] if i + 1 < len(points) else [])
121 for a, b in segments:
122 dx, dy = b[0] - a[0], b[1] - a[1]
123 n = math.hypot(dx, dy)
124 normals.append((-dy / n, dx / n))
125 if len(normals) == 1:
126 nx, ny = normals[0]
127 k = 1.0
128 else:
129 nx, ny = normals[0][0] + normals[1][0], normals[0][1] + normals[1][1]
130 n = math.hypot(nx, ny)
131 nx, ny = nx / n, ny / n
132 k = 1 / (nx * normals[0][0] + ny * normals[0][1])
133 out.append((x + sign * nx * k * t / 2, y + sign * ny * k * t / 2))
134 return out
135 return offset(1) + offset(-1)[::-1]
136
137
138# Legs: from inside the wall's foot straight down, out to the 8.5 overall width, in to the 7 pitch and down to the tip; drawn in the XZ
139# plane (the XZ plane's normal is -Y, so a sketch on it extrudes towards -Y) and LEG_W wide along Y, centred LEG_BACK behind the terminals.
140x_wall = w - SHEET_T / 2
141x_out = LEG_OVER / 2 - SHEET_T / 2
142x_tip = LEG_PITCH / 2
143b1, b2, b3, b4 = LEG_BENDS
144leg = [(x_wall, 0.3), (x_wall, b1), (x_out, b2), (x_out, b3), (x_tip, b4), (x_tip, -LEG_TIP)]
145for side, sx in (("right", 1), ("left", -1)):
146 model.plane(f"leg_{side}_plane", on="XZ", offset=LEG_BACK - LEG_W / 2, name=f"Frame leg, {side}")
147 with model.sketch(f"leg_{side}_sketch", on=f"leg_{side}_plane", name=f"Frame leg, {side}") as sk:
148 sk.polyline(f"leg_{side}_outline", outline([(sx * x, z) for x, z in leg], SHEET_T), closed=True)
149 model.extrude(f"leg_{side}", f"leg_{side}_sketch", distance=LEG_W, op="join", body="frame_body", name=f"Frame leg, {side}")
150# Terminals 1 and 2: straight down from the housing's underside, 0.7 x 0.3, 4.3 below the face's lower edge.
151for i, sx in enumerate((-1, 1)):
152 model.box(f"terminal_{i + 1}", PIN_W, PIN_T, PIN_DOWN, at=(sx * PIN_PITCH / 2, 0, FACE_LOW - PIN_DOWN / 2), op="new",
153 body=f"terminal_{i + 1}_body", name=f"Terminal {i + 1}")
154# Materials, for looks and a rough mass (the data sheet names only the silver plating): the housing black polyamide (pa6), the face and the
155# frame sheet steel (steel-c10), the actuator polyamide in its colour, the terminals copper alloy, silver coloured (copper).
156model.material("pa6", bodies=["housing_body"], color="#26272a")
157model.material("steel-c10", bodies=["face_body", "frame_body"], color="#c9ccd0")
158model.material("pa6", bodies=["actuator_body"], color=color)
159model.material("copper", bodies=["terminal_1_body", "terminal_2_body"], color="#d6d8db")
160result = model.result()
161

Right-angle (vertical) 6 x 6 mm through-hole tactile switch (SPST-NO), C&K PTS645V series, from C&K's PTS645 data sheet (6 february 18): a 6 x 6 mm switch lying on its back in a sheet-metal frame, the actuator parallel to the board. Round actuator 3.15, 3.85, 5.85 or 8.35 mm from the front leads (PTS645Vx31/39/58/83), or the square 2.4 mm actuator 6.15 mm out (PTS645VJx61). Leads 4.5 apart, frame legs 7 apart 2.55 behind. The actuation force sets the actuator colour and the part number. See the README.

Right-angle tactile switch, 6 x 6 mm

A right-angle (vertical) 6 x 6 mm through-hole tactile switch (SPST-NO), C&K's PTS645V series. It is a 6 x 6 mm tactile switch lying on its back in a sheet-metal frame, so the actuator is parallel to the board. The switch has a black housing and a metal face with four holes. The frame has a top plate, two side walls with a window onto the housing, and a bent leg from each wall. Terminals 1 and 2 go straight down from the housing.

The origin is midway between terminals 1 and 2, on the board's top face (the XY plane). The actuator points along +Y, and the frame's legs are 2.55 behind the terminals.

kind is the actuator's length code from the order code. force is the actuation force, which sets the actuator's colour and the part number.

Kind Parts (by force L / M / H / K) Actuator From the front leads
31 PTS645VL31-2 LFS, VM31, VH31, VK31 round, Ø3.5 3.15 ±0.1
39 PTS645VL39-2 LFS, VM39, VH39, VK39 round, Ø3.5 3.85 ±0.1
58 PTS645VL58-2 LFS, VM58, VH58, VK58 round, Ø3.5 5.85 ±0.1
83 PTS645VL83-2 LFS, VM83, VH83, VK83 round, Ø3.5 8.35 ±0.1
J61 PTS645VJL61-2 LFS, VJM61, VJH61, VJK61 square, 2.4 side, 1.8 long, on a neck 1.4 long 6.15
Force Actuation force Actuator colour
L 130 grams black
M 160 grams blue
H 200 grams gray
K 260 grams red

For every kind:

  • The frame is 7.5 wide. Its top is 6.2 above the face's lower edge, and that edge is 1.0 above the board (4.95 - 3.95).
  • The actuator's axis is 4.05 above the board, and the switch's face is 2.3 in front of the terminals (the square actuator's 6.15 less its 3.85 beyond the face).
  • Terminals 1 and 2 are 0.7 wide and 0.3 thick, 4.5 ±0.15 apart, and reach 4.3 below the face's lower edge (3.3 below the board).
  • The frame's legs are 1 wide, 2.55 ±0.1 behind the terminals. They are 7 apart at the tips and 8.5 over their bends, and reach 3.95 below the board.
  • The frame's back is 4.2 behind the terminals.
  • The PCB holes are Ø1 for the terminals (4.5 ±0.05 apart) and Ø1.3 for the legs (7 ±0.05 apart, 2.55 ±0.05 behind).
  • The face has four Ø0.9 holes, 4.3 apart.

Source

C&K, PTS645 Series, 6 mm Tact Switches, dated 6 february 18, catalogue pages B-98 to B-103, from the copy at pdf.icgoo.net (https://pdf.icgoo.net/productinfo/allpdf/5305a3c5-e437-3b12-913a-2860127444d6.pdf; C&K's own site refused the download):

  • How To Order (page B-98): the order code (termination V, actuator shape J, actuation force L/M/H/K, length 31, 39, 58, 61 or 83, insertion type 2), and the lengths 3,15, 3,85, 5,85, 6,15 (square actuator only) and 8,35. Terminals are silver plated.
  • V VERTICAL (page B-99): the frame, terminals, legs, actuator Ø3.5 and its 4.05 axis height, and the PCB layout.
  • S STRAIGHT (page B-99): the 6 x 6 switch itself, 6 square and 3.45 from its terminal side to its face, used here for the housing.
  • J SQUARE ACTUATOR, VERTICAL THT (page B-100): the square actuator (6.2 from the front leads, 3.85 beyond the face, a 2.4 square stem 1.8 long on a neck 1.4 long), and the four Ø0.9 face holes 4.3 apart. This is the same frame and switch.
  • ACTUATION FORCE and ACTUATOR HEIGHT (page B-102): the actuator colours, and "Switch length from front leads for V only": 31 3,15, 39 3,85, 58 5,85, 83 8,35, each H ±0.1.

The sheet gives no weight and names no materials.

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

  • The frame's sheet thickness, 0.2, and the switch's metal face thickness, 0.3.
  • The gap between the housing and the frame's side walls: the walls are at the frame's 7.5 width, the housing 6 wide.
  • The side walls' outline: the back edge sloping from 3.0 above the board up to the top plate 3.2 behind the terminals, the lower front edge slanting from 0.7 in front of the terminals on the board up to the face's lower edge. Each wall has a window from 1.0 behind to 2.0 in front of the terminals, 2.0 to 3.9 above the board.
  • Where the legs bend: straight down to 0.6 below the board, out to the 8.5 width by 1.6, in to the 7 pitch from 2.0 to 3.0, then straight to the tip.
  • The square actuator's neck, Ø1.6, as the square actuator drawn on page B-101.

Materials are for looks and a rough mass. The housing is black polyamide (pa6), the face and the frame sheet steel (steel-c10), the actuator polyamide in its colour, and the terminals copper alloy (copper), silver coloured. Mass check: the sheet states no weight. PTS645VL31 as modelled is 0.13 g housing + 0.05 g face + 0.01 g actuator + 0.19 g frame + 0.02 g terminals = 0.40 g, and PTS645VL83 is 0.46 g.

Catalogue models

The old SW Tactile SPST Angled PTS645Vx31 2LFS, x39, x58 and x83 models name these exact parts, so they map to kinds 31, 39, 58 and 83. They were measured on the reference models (2026-11-06). They are simplified models: they have the right footprint, but the frame, legs and actuator differ from the drawing, as below.

Old models C&K drawing
Terminals 1 and 2 0.7 x 0.3, 4.5 apart, 3.99 below the board, running up through the housing to its top 0.7 x 0.3, 4.5 ±0.15 apart, 3.3 below the board
Legs 0.7 wide, centred 2.5 behind, tips 7.1 apart, bent inwards to 6.6 1 wide, 2.55 ±0.1 behind, tips 7 apart, bent outwards to 8.5
Leg tips below the board 3.99 3.95
Frame 7.4 wide, 7.01 high, back 4.15 behind the terminals 7.5 wide, 7.2 high, back 4.2 behind
Actuator Ø3.14, axis 3.5 above the board Ø3.5, axis 4.05 above the board
Actuator from the front leads (31 / 39 / 58 / 83) 3.05 / 3.75 / 5.71 / 8.26 3.15 / 3.85 / 5.85 / 8.35, each ±0.1

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/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.

0 9 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/small-tactile-switch-tht

6 x 3.5 mm through-hole tactile switches from APEM's MJTP sheet: MJTP1243 (4.3 mm actuator) and MJTP1250 (5.0 mm), two terminals 6.5 apart.

0 2 sizes 0 1 hour ago v1.0.0
STEVEMIT

steve/right-angle-pushbutton-tht

Right-angle subminiature pushbutton from NKK's Series BB sheet: BB15AH, SPDT momentary, with a support bracket, without a cap or with a 5.1 or 7.5 mm slip-on cap.

0 7 sizes 0 1 hour ago v1.0.0
STEVEMIT

steve/slide-switch-tht

Through-hole slide switches from the makers' drawings: C&K OS102011 SPDT, vertical (MS2Q) and right-angle (MA1Q); E-Switch EG1224 (SPDT) and EG2219 (DPDT), right-angle.

0 4 sizes 0 1 hour ago v1.1.0