Sign in with STEVE

steve/nema-stepper-motor

NEMA stepper motor envelope: frames 8, 11, 14, 17, 23 and 34, with common models such as 17HS4401 as presets.

v1.0.0 Latest STEVE MIT 0
Isometric
part.py 74 lines · Python · STEVE runtime · checked
Download
1"""Hybrid stepper motor, NEMA frame sizes 8, 11, 14, 17, 23 and 34: envelope for assemblies.
2
3The mounting face is on the XY plane at the origin: the square body runs down along -Z for `body_length`, the round
4pilot and the shaft stand up along +Z. Four mounting holes on a square pattern (threads drawn at their nominal diameter;
5NEMA 23 and 34 have plain holes through the front flange). The D-flat on the smaller frames' shaft faces +Y.
6Windings, end bell, wires and connector are not modelled, and a NEMA 34 shaft's key is not drawn.
7"""
8import math
9
10from steve import Model
11
12frame = "NEMA17" # NEMA frame size
13body_length = 40 # mm Body length, mounting face to the back of the motor
14shaft_diameter = 5 # mm Shaft diameter
15
16# frame: (square side, hole spacing, hole diameter, hole depth, pilot diameter, pilot height, shaft length,
17# flat length from the shaft end)
18# Leadshine, CM Series Stepper Motors data sheet (c) 2018, section 2.3, printed pp. 07-14 (NEMA 8 to 34 drawings); NEMA 17
19# side, hole depth and pilot height: SOYO SY42STH47-1206A sheet (42.3 max, depth 4.5 min, pilot 2), Leadshine shows 42,
20# depth 4, pilot 1.8. NEMA 34 pilot height: Novanta NEMA 34 data sheet 2022 (2.5 +-0.5 mm).
21FRAMES = {
22 "NEMA8": (20.3, 15.4, 2.0, 2.0, 16.0, 1.5, 10.0, 0.0),
23 "NEMA11": (28.2, 23.0, 2.5, 2.5, 22.0, 2.0, 20.0, 15.0),
24 "NEMA14": (35.2, 26.0, 3.0, 4.5, 22.0, 2.0, 24.0, 15.0),
25 "NEMA17": (42.3, 31.0, 3.0, 4.5, 22.0, 2.0, 24.0, 15.0),
26 "NEMA23": (56.4, 47.14, 5.0, 5.0, 38.1, 1.6, 21.0, 15.0),
27 "NEMA34": (86.0, 69.6, 5.5, 10.0, 73.0, 2.5, 32.0, 0.0),
28}
29# frame: {shaft diameter: width across the flat} (0: round shaft, no flat). Leadshine, as above: 4.5 on the 5 mm shafts;
30# NEMA 23 table: D 6.35 E 5.8, D 8 E 7.5.
31SHAFTS = {
32 "NEMA8": {4: 0},
33 "NEMA11": {5: 4.5},
34 "NEMA14": {5: 4.5},
35 "NEMA17": {5: 4.5},
36 "NEMA23": {6.35: 5.8, 8: 7.5},
37 "NEMA34": {12.7: 0, 14: 0},
38}
39# frame: (shortest, longest) body length of the sourced models: Leadshine's tables (NEMA 8 33-45, 11 32-51, 14 31-47,
40# 17 33-60, 23 41-85, 34 65-129), the body length is the maker's choice within a frame.
41BODY_RANGE = {"NEMA8": (33, 45), "NEMA11": (32, 51), "NEMA14": (31, 47), "NEMA17": (33, 60), "NEMA23": (41, 85), "NEMA34": (65, 129)}
42
43side, spacing, hole_d, hole_depth, pilot_d, pilot_h, shaft_l, flat_l = FRAMES[frame]
44if shaft_diameter not in SHAFTS[frame]:
45 raise ValueError(f"{frame} shafts: {', '.join(str(d) for d in SHAFTS[frame])} mm.")
46low, high = BODY_RANGE[frame]
47if not low <= body_length <= high:
48 raise ValueError(f"{frame} body lengths in the sourced data: {low} to {high} mm.")
49across_flat = SHAFTS[frame][shaft_diameter]
50half = spacing / 2
51
52model = Model()
53with model.sketch("body_sketch", on="XY", name="Body") as sk:
54 sk.rect("square", (-side / 2, -side / 2), (side / 2, side / 2))
55model.extrude("body", "body_sketch", distance=-body_length, name="Body")
56with model.sketch("pilot_sketch", on="XY", name="Pilot") as sk:
57 sk.circle("pilot_circle", (0, 0), pilot_d / 2)
58model.extrude("pilot", "pilot_sketch", distance=pilot_h, name="Pilot")
59with model.sketch("shaft_sketch", on="XY", name="Shaft") as sk:
60 sk.circle("shaft_circle", (0, 0), shaft_diameter / 2)
61model.extrude("shaft", "shaft_sketch", distance=shaft_l, name="Shaft")
62with model.sketch("holes_sketch", on="XY", name="Mounting holes") as sk:
63 for i, (x, y) in enumerate([(-half, -half), (half, -half), (half, half), (-half, half)]):
64 sk.circle(f"hole_{i + 1}", (x, y), hole_d / 2)
65model.extrude("holes", "holes_sketch", distance=-hole_depth, op="cut", name="Mounting holes")
66if across_flat:
67 model.plane("flat_plane", on="XY", offset=shaft_l - flat_l, name="Flat start")
68 y0 = across_flat - shaft_diameter / 2
69 with model.sketch("flat_sketch", on="flat_plane", name="Shaft flat") as sk:
70 sk.rect("flat", (-shaft_diameter, y0), (shaft_diameter, shaft_diameter))
71 model.extrude("flat_cut", "flat_sketch", distance=flat_l, op="cut", name="Shaft flat")
72model.material("steel-generic", color="#3a3c40")
73result = model.result()
74

Hybrid stepper motor envelope for assemblies: square body, round pilot, shaft with its flat and the four mounting holes, in NEMA frame sizes 8, 11, 14, 17, 23 and 34. The mounting face is on the XY plane, the shaft points along +Z. Dimensions from makers' public data sheets (see the README); not affiliated with any maker named.

NEMA stepper motor

Hybrid stepper motor envelope for assemblies, NEMA frame sizes 8, 11, 14, 17, 23 and 34.

Geometry

The mounting face is on the XY plane at the origin. The square body runs along -Z for body_length; the pilot and the shaft stand along +Z. Four mounting holes on a square pattern (threaded holes are drawn at their nominal diameter). The shaft's D-flat faces +Y where the frame has one. Windings, end bell, wires and connector aren't modelled, and neither is the key on a NEMA 34 shaft (5 mm wide, 25 mm long on the data sheet).

Parameters

Parameter Meaning
frame NEMA8, NEMA11, NEMA14, NEMA17, NEMA23, NEMA34
body_length Mounting face to the back of the motor, mm. Not fixed by the frame size: it is the maker's choice
shaft_diameter 4, 5, 6.35, 8, 12.7 or 14 mm, as the frame allows

Source

Frame Side Hole spacing Holes Pilot Ø × height Shaft Ø Shaft length Flat
NEMA 8 20.3 15.4 M2 × 2 16 × 1.5 4 10 none drawn
NEMA 11 28.2 23 M2.5 × 2.5 22 × 2 5 20 4.5 across, 15 long
NEMA 14 35.2 26 M3 × 4.5 22 × 2 5 24 4.5 across, 15 long
NEMA 17 42.3 31 M3 × 4.5 22 × 2 5 24 4.5 across, 15 long
NEMA 23 56.4 47.14 Ø5 through a 5 flange 38.1 × 1.6 6.35 or 8 21 5.8 or 7.5 across, 15 long
NEMA 34 86 69.6 Ø5.5 through a 10 flange 73 × 2.5 12.7 or 14 32 key, not drawn

Every row is in part.py (FRAMES, SHAFTS, BODY_RANGE).

Body lengths are limited per frame to the range of the sourced models (BODY_RANGE): a length outside it has no maker's data, so the recipe refuses it. Motor names in the presets identify the sizes those makers publish; this part is not made by or affiliated with any of them. Drawing tolerances vary by maker and are not stated here.

Preset list: frame sizes of the step.parts catalogue (MIT) and the makers' models above, see library/NOTICE.md.

  1. 1.0.0 Latest
More #motor
STEVEMIT

steve/precision-shaft

Precision round shaft for linear bearings: any diameter and length, with the common sizes as presets.

1 117 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/linear-guide

Profile linear guide envelope: HGR15, 20, 25 and MGN rails of any length, HGH and HGW blocks.

0 90 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/lead-screw

Trapezoidal lead screw envelope: Tr8, Tr10, Tr12 and Tr16, leads 2 to 8 mm, any length.

0 84 sizes 0 3 hours ago v1.0.0
STEVEMIT

steve/miniature-linear-guide

HIWIN MGN miniature linear guideway, sizes 7, 9, 12 and 15: rail (MGNR) or block (MGN-C / MGN-H).

0 9 sizes 0 3 days ago v1.0.0