A printed gear on a stepper motor runs for an hour, then starts to slip. A pulley creeps along the shaft until it rubs the housing. A wheel runs off-center because the set screw pushed it there. In all three the shaft is steel and comes out unharmed: the failure is in the plastic around it. What you have to work out is how much contact area and how much clamping a printed hub gives, and whether that beats the torque the motor puts on it.
Two ways to carry torque: by shape or by friction
In a form-locked joint (a flat, a key, a hexagon, a spline), torque passes through flanks bearing against each other. In a printed hub the limit is the contact pressure on the plastic flank. Those contacts are a few millimeters wide, and plastic creeps under sustained or repeated load (Creep and fatigue). The steel never gives first. The symptom is crushing: the hub flank rounds off a little at a time and play appears.
In a friction joint (a set screw on a round shaft, a clamp hub, a press fit), the torque it carries is:
T = μ · N · r
Two things limit it: the normal force N the printed part can hold for months, and the friction coefficient μ, which for dry plastic on steel is around 0.2–0.35. The examples take μ = 0.25; measure your own materials. Because creep lowers N over time, a friction joint in plastic does not break: it loses its grip.
Every printed contact here uses one allowable pressure: between ¼ and ⅓ of the XY tensile strength, under repeated or sustained load. That gives about 8–12 MPa in PLA and 12–15 MPa in PETG, the same figure used for the teeth of a printed gear. In the examples, 10 MPa for PLA and 12 MPa for PETG. It is a design value you then check with a coupon.
In plastic, contact area rules. A joint that is excellent in steel, such as a small key, can lose to a long hexagon or a clamp hub, which look like modest solutions in steel.
Every one of these hubs prints with the bore axis vertical. The flat, the keyway flanks and the hexagon's faces come out as true walls, and the ring and ears of a clamp hub bend in the layer plane: anything that bends prints with its length in the layer plane, never standing up (Layer orientation for mechanisms).
D-shafts and double-D shafts
On a D-shaft the flat carries the torque and the round part only locates. The useful width of the flat is the chord:
w = 2 · √(r² − e²)
where e is the distance from the center to the flat. A NEMA 17 has a Ø5 shaft measuring 4.5 mm from the flat to the opposite side: e = 2.0 and w = 3.0 mm. An N20 gear motor, Ø3 with the flat at 2.5, has e = 1.0 and w ≈ 2.2 mm. The 28BYJ-48, Ø5 with two flats at 3, has e = 1.5 and w = 4.0 mm per flat: it is a double-D shaft. The Ø6 shaft with the flat at 4.5 found on potentiometers and encoders gives w = 5.2; that case is covered in Knobs, handles and grips.
When the shaft turns inside the bore, only half the flat presses on the plastic; the other half lifts away, and the round part pushes toward the shaft center, so it adds no torque. Assuming rigid bodies, the peak pressure on each loaded flat is p ≈ 12·T / (L·w²). Solving for torque:
T_max ≈ n · p_adm · L · w² / 12
with n = 1 for a D-shaft and n = 2 for a double-D. A NEMA 17 in a PETG hub with 10 mm of flat inside the hub gives 12 · 10 · 9 / 12 = 90 N·mm, about 0.09 N·m. A typical NEMA 17 has a holding torque of 0.40–0.55 N·m. The NEMA 17 flat, half a millimeter deep, leaves very little flank. On its own, a printed D-bore suits light loads; with the motor at full torque, the flat in the bore rounds off.
To raise the capacity, in order of effectiveness:
- A set screw on the flat or a clamp hub, in the next sections.
- Length. T is proportional to L, but only the stretch of flat inside the hub counts. The flat is not the same length on every motor: measure yours, and do not run the hub past the end of the flat.
- A second flat (double-D) doubles the capacity.
- Material, little: from PLA to PETG, 20 % more (10 to 12 MPa).
Clearance also turns into angular play. With a clearance s per side, the hub rotates ± s / (w/2) radians before it bears. On a NEMA 17 flat (w/2 = 1.5), 0.10 mm per side gives ± 3.8°, much more than on a knob, because the flat is narrower. On a gear or a pulley that play adds to the play of the drive. So start at zero clearance and tune it with a coupon (Test coupons); why the bore prints tighter than drawn is in Why holes print small. Negative clearance is a press fit, and you handle its hoop strain as in Press fits that do not crack.
If the shaft is a round rod (an 8 mm ground rod, the shank of a bolt), you can file a flat on it. Half a millimeter deep is enough to seat a set screw and keeps the screw from marking the stretch where a bearing runs. For the flat to carry torque by shape, file further: Ø8 taken down to 7.0, one millimeter deep, gives e = 3.0 and w = 2 · √(16 − 9) ≈ 5.3 mm, almost twice the capacity of a half-millimeter flat (T grows with w²).
A tight bore puts the ring in hoop tension, along the beads, and opens it at the seam: place the seam away from the flat and the set screw.
The set screw
The set screw pushes the shaft against the far side of the bore. That takes out the play, whatever the clearance, and holds the hub axially. On a round shaft it is the only thing carrying torque, and it does so by friction:
T ≈ μ · F · d
There is friction at the screw tip and at the opposite contact, about μ·F at each, at a radius of d/2.
Always seat it on the flat, never on the round part of a D-shaft. On the round part it slips and raises a burr that later jams bearings and pulleys when you try to pull them off. On a round rod, file a flat for it. According to Machine Design magazine, holding power is roughly proportional to tightening torque, and a flat seat adds 6 %. Two set screws in line along the shaft hold about twice what one does; 60° apart, about 1.75 times; opposed at 180°, only 1.3 times. For sizing, the same source gives a rule of thumb: screw diameter ≈ half the shaft diameter (Ø5 → M3, Ø8 → M4). The aluminum GT2 pulleys sold for printers usually carry two set screws at 90° on a Ø5 bore.
In a printed hub, the limit is not the screw but what it threads into and the plastic behind it. The set screw must thread into metal: a nut in a slot (Captive nuts and clearance holes) or a heat-set insert (Designing for heat-set inserts). Never into a printed thread smaller than M6 (Modeling threads). With a slotted nut, the reaction ends up in the plastic wall behind the nut. The bearing face of an M3 nut is about 19 mm²; at 12 MPa it holds about 230 N. Design for F ≈ 200 N per M3 set screw in PETG, not for the hundreds of newtons the same screw delivers in a steel collar.
With those figures, a round Ø5 shaft with one M3 gives about 0.25 · 200 · 5 = 250 N·mm, 0.25 N·m. Above that it slips at the first jolt and polishes a ring into the shaft. On a D-shaft the set screw also closes the play, so the flat works from the first degree of rotation rather than waiting for the clearance to close. As a rough estimate, you can add the two capacities.
The price of the set screw is runout, the wobble of the part's rim on every turn. The screw shifts the hub sideways by the clearance s: the eccentricity is e = s and the rim swings 2s in total. On a gear, the center distance changes by ± s every turn and the backlash varies by about ± 2 · s · tan 20°. With 0.10 per side that is ± 0.07 mm: from the tightest position to the loosest, backlash goes from about 0.13 to 0.27 mm, a swing that eats three quarters of the 0.2 mm set aside for a pair of printed gears. With a set screw, keep the clearance small (0–0.10 per side) or move to a clamp hub, which centers the shaft.
The 200 N preload relaxes over the first few days. Retighten after 48 h, and if the motor runs warm, use a material with thermal margin (Motor mounts covers motor heat). A medium-strength anaerobic threadlocker works for a set screw in a metal nut or insert, because that is metal on metal. Keep it off the plastic: it cracks ABS and PC.
Clamp hub
The clamp hub comes in two forms: the slotted hub, with a slot running from the bore to the outside and a screw across it; and the split hub, two halves joined by two screws. It grips by friction around the whole bore, centers the shaft (no set-screw runout) and holds a plain round shaft. That is why it is the standard choice for couplings and aluminum pulleys on CNC machines.
With a screw force F, the total normal force N falls between π·F, if the printed collar is rigid, and 2π·F, if it behaves like a flexible band. The torque is T ≈ μ · N · d/2 and the axial hold, μ·N. For printed parts, design with π·F and measure.
The plastic under the head and the nut sets the maximum screw force. An M3 washer, Ø7, gives about 30 mm² of bearing; at 12 MPa that is about 360 N. Design for F ≈ 300–400 N per M3 screw in PETG, provided the other side is a heat-set insert or a nut with a washer under its bearing face. A bare nut in its pocket bears on only about 19 mm² and limits you to about 230 N.
A Ø5 shaft with one M3 at 350 N: N ≈ π · 350 ≈ 1100 N, and T ≈ 0.25 · 1100 · 2.5 ≈ 690 N·mm, about 0.7 N·m. With a bare nut and no washer it stays at about 0.45 N·m. On Ø8, the same screw at 350 N gives about 1.1 N·m. Torque grows with shaft diameter and with the number of screws. With the same M3, a clamp hub holds about three times what a set screw does.
The slot must stay open with the screw tight. If its faces touch, the screw force ends up in the ears and the bore stops gripping. To close a clearance s per side, the bore circumference shortens by π · 2s, and that is how much the slot closes: 0.6 mm at 0.10 per side. A 1 mm slot closes completely at about 0.16 per side; stay at 0.10 or less to keep a margin, and with more clearance, widen the slot. On top of that, in a stiff PETG ring part of the screw force goes into bending the ring before it grips: start at 0–0.05 per side, keep the ring wall no thicker than it needs to be, or add a relief slot so that only one sector of the hub closes. Bicycle mounts shows the closed-slot failure at another scale.
A clamp hub printed with the bore horizontal cracks along a layer at the root of an ear.
Creep matters more here than in any other joint, because everything rests on the preload, which you retighten as for the set screw. For sustained load use PC, ASA or a fiber-filled grade; PLA and PETG are fine for a light load with no heat (Creep and fatigue). If it has to last years, the sensible answer is a steel collar or a bought aluminum clamp hub; on a NEMA 23, from the start.
Key
A parallel key sits half in the shaft and half in the hub, in a keyway cut into each part. The dimensions are those of DIN 6885-1, the standard the catalogs follow:
| Shaft | Key b × h | Shaft keyway depth t1 | Hub keyway depth t2 |
|---|---|---|---|
| Ø6–8 | 2 × 2 | 1.2 mm | 1.0 mm |
| Ø8–10 | 3 × 3 | 1.8 mm | 1.4 mm |
| Ø10–12 | 4 × 4 | 2.5 mm | 1.8 mm |
| Ø12–17 | 5 × 5 | 3.0 mm | 2.3 mm |
Other standards, such as the British BS 4235-1, give a different hub keyway depth for the same key. If your shaft comes from a British catalog, measure the keyway before you draw it.
The tangential force at the shaft surface is F = 2·T/d, and it bears on the flank of the hub keyway. What carries it is the part of the key that stands proud of the shaft, h − t1, not the depth t2, which includes the clearance over the top of the key. Here the pressure is close to uniform along the flank:
p = 2·T / (d · (h − t1) · L)
However strong the steel key, its flank in the hub is one or two millimeters tall. A Ø8 shaft with a 2 × 2 key (h − t1 = 0.8) and a 12 mm hub, in PETG at 12 MPa, holds T = p · (h − t1) · L · d/2 = 12 · 0.8 · 12 · 4 ≈ 460 N·mm, about 0.46 N·m. That is far more than the NEMA 17 D-bore, but at 1 N·m the pressure rises to about 26 MPa and the flank crushes. A Ø15 shaft with a 5 × 5 key (h − t1 = 2.0) and a 20 mm hub, at 2 N·m: F ≈ 267 N and p ≈ 6.7 MPa, with margin to spare. On small shafts the key loses to a hexagon or a clamp hub; it pays off from Ø12–15 up and with long hubs.
When the flank crushes, the fix is more flank: a longer hub, a bigger shaft and key, or a metal part carrying the keyway, fitted into a larger printed pocket. Adding material around the hub does nothing: the contact is still h − t1 high.
The printed keyway corner comes out rounded by the nozzle, with a radius of about half a line width: chamfer the key edges or open the keyway corners with a small relief. The key needs axial retention; Machine Design magazine recommends a set screw over the key, with a diameter equal to the key width. The set screw holds axially; the key carries the torque.
In workshop projects, keys turn up on gearbox output shafts and on Ø8–12 shafts of larger machines. Stepper motors and gear motors below NEMA 23 rarely come with a keyed shaft.
Hexagon, square and spline
A polygonal shaft spreads the load over n flats, and the D-shaft model generalizes:
T_max ≈ n · p_adm · L · a² / 12
with a the side of the polygon (for a hexagon, a = across-flats / √3; for a square, a = side). A 6.35 mm across-flats hexagon, the 1/4″ bit size, has a = 3.67. With n = 6, L = 10 and PETG at 12 MPa it gives 6 · 12 · 10 · 13.5 / 12 ≈ 0.8 N·m, about nine times a NEMA 17 D-bore of the same length. An 8 mm across-flats hexagon (a = 4.62) in a 12 mm hub gives about 1.5 N·m. If you get to choose the shaft, choose a hexagon.
With printed clearances not every flat touches at once: at first, alternate corners take the load. The estimate assumes they all bear; the coupon tells you how many do.

The square drives of socket sets, 1/4″ and 3/8″, follow the same model with n = 4. They fit socket tools and work well for printed toys.
A spline is the version with many small flanks. Printed splines, involute or straight-sided, work if every tooth is printable: module 1 or above with a 0.4 nozzle, the same limit as for printed gears. Below that, the teeth are thinner than a line and come out as a wavy round hole. That is the case with servo splines, covered in Motor mounts. Because of print scatter, only some of the teeth carry load at once; the torque test tells you how many.
The cross axle of construction toys is a four-lobed spline; dimensions and fit in LEGO Technic-compatible parts. Compatible with LEGO Technic; KapyCAD is not affiliated with the LEGO Group.
Axial retention: keeping the hub in place
A flat, a key, a hexagon or a spline stops rotation, not sliding. Axial retention comes from something else:
- a set screw, which also stops the key walking out;
- a clamp hub, with μ·N in the axial direction;
- a shoulder on the shaft;
- a shaft collar;
- an E-clip or an external retaining ring (circlip) in a groove on the shaft;
- the stack of parts itself: a gear between a bearing and a spacer, or a nut on a threaded end.
E-clips and external retaining rings are the clean answer when the shaft already has the groove, as many bought shafts do, or when you can cut one on a lathe. The groove dimensions depend on the clip and come from its maker; do not improvise them. The clip holds the hub against a shoulder or a spacer, not against bare plastic: a clip bearing on a printed face marks it and, under axial load, digs in. If the hub has to come off often, a collar with a set screw is handier than an E-clip.
Helical gears and worms push axially (Helical and herringbone gears). Under that thrust, a hub held only by a set screw walks along the shaft: put a shoulder or a collar on the side it pushes toward.
If the joint is permanent, glue it. Epoxy on a degreased, sanded shaft with a flat, for parts that carry torque; cyanoacrylate for small parts. Anaerobic retaining compounds only between metals: on plastic they cure poorly and crack ABS and PC.
Worked example: a printed gear on a NEMA 17
The brief: a PETG spur gear, module 1.5, 17 teeth, 12 mm face width (Ø25.5 pitch), on a NEMA 17 with a Ø5 shaft and the flat at 4.5, driving a small reduction. The example takes a holding torque of 0.45 N·m; a typical NEMA 17 sits between 0.40 and 0.55, and the short pancake types on extruders hold a good deal less (read the datasheet for yours). The gear holds about 0.70 N·m in PLA at 10 MPa (Sizing a gear that holds), a little more in PETG. The teeth are not the limit: the bore is.
Option 1, D-bore alone, L = 12 (the gear width, no boss): T ≈ 12 · 12 · 9 / 12 = 108 N·mm, about 0.11 N·m. Well below 0.45: the flat rounds off. A boss that stretches the hub to L = 20 gets to about 0.18 N·m, provided the motor's flat is at least that long. Still short.
Option 2, D with L = 12 plus an M3 set screw on the flat, with a slotted nut. The set screw closes the play and adds about 0.25 · 200 · 5 = 250 N·mm by friction. Together, about 0.36 N·m: short of full torque. Only good for a light drive that never stalls.
Option 3, clamp hub on a boss: 1 mm slot, an M3 across it with a washer under the head, a heat-set insert in the opposite ear, and the D flat kept. That gives about 0.7 N·m from friction plus the 0.11 of the flat, about 0.8 N·m: a margin of 1.8 over the holding torque and no runout. This is the one chosen.
Option 4, buy: an aluminum gear or pulley with two set screws, or a brass or aluminum hub pressed or bolted into the printed gear. The plastic then takes the torque on a large bolt circle, with a force per bolt of F = T / (n·r). This is the right call when the gear takes shocks.
Check the material against heat. At rated current a NEMA 17 case gets warm, and under load PETG holds up to about 50 °C. If the motor case runs hotter than that, print the hub in ASA or PC (Heat, cold, sunlight and chemicals).
For the fit, print three short hubs with the D-bore at 0, 0.05 and 0.10 per side, the same coupon as in Motor mounts. Keep the one that goes on by hand without wobbling. With a clamp hub, 0.05 per side is enough, because the clamp takes it up and the 1 mm slot stays open.
Which one for your motor
| Motor and shaft | Torque | First choice | When to step up |
|---|---|---|---|
| N20 gear motor (Ø3, D at 2.5) | depends on the ratio; read the stall torque on its datasheet | D-bore, zero clearance or press fit | high ratios: long D with a set screw |
| TT gear motor (Ø5.4, double-D at 3.7) | low | press-fit double-D, the classic robot-wheel hub | rarely needed |
| 28BYJ-48 (Ø5, double-D at 3) | small | double-D | rarely needed |
| NEMA 17 (Ø5, D at 4.5) | 0.40–0.55 N·m holding | D with set screw for light loads only | clamp hub at full torque; metal pulley or hub for tensioned belts |
| NEMA 23 (Ø6.35 or Ø8) | several N·m | clamp hub with two screws | metal hub; key only if the shaft has one |
| RC servo (splined) | per servo | the servo horn, not a printed spline (Motor mounts) | — |
| Potentiometer or encoder, by hand (Ø6 D or knurled) | hand torque | Knobs, handles and grips | — |
Always compare the joint's capacity with the motor's stall or holding torque, not its running torque. A jam, a crash or a stalled stepper loads the hub with full torque, multiplied by any reduction in between: a hub after a 5:1 stage sees five times the motor torque. Choosing the motor itself is covered in Choosing a motor.
When it fails
| Symptom | Cause | Fix |
|---|---|---|
| The gear turns on the shaft after a few hours; the flat in the bore is rounded and there is fine plastic dust | the D-bore crushed: pressure above the allowable | set screw on the flat, clamp hub, longer hub or hex shaft |
| The set screw keeps working loose and the hub slips | thread in plastic, or the wall behind the nut is creeping | nut or insert, retighten after 48 h, medium-strength threadlocker (metal on metal only), or a clamp hub |
| The pulley or gear runs off-center; belt or mesh tightens and slackens every turn | the set screw pushed the hub off-center (runout 2s) | clearance 0–0.10 per side, clamp hub, or two set screws at 60–90° |
| Burr on the shaft; the bearing or pulley will not come off | the set screw bore on the round part | seat it on the flat, or file one |
| The clamp hub slips with the screw tight | the slot has closed, or the bore is too loose for the slot | wider slot, less clearance; check the gap after tightening |
| One ear of the clamp hub has cracked along a layer | printed with the bore horizontal | print the bore vertical |
| Keyway flank crushed, key loose | flank too short for the torque ((h − t1)·L) | longer hub, bigger shaft and key, or a hexagon |
| A helical gear walks along the shaft | axial thrust with no shoulder or collar | collar or shoulder on the thrust side |
| Fine on the bench, slips in the machine | stall torque, multiplied by any reduction, exceeds the joint's capacity | size for stall torque; add a limiter (Torque limiters) |
How to test it
Draw a line across shaft and hub with a fine marker. Run the joint and look for a step in the line: it shows up both slip and creep.
For the static torque test, clamp the shaft in a vice with soft jaws, or grip it by the flat with locking pliers. Do not count on the motor to hold it: a powered stepper slips at its holding torque and will never load the hub beyond it. Apply torque to the gear by hanging a known weight, or pulling with a luggage scale, from an arm of known length: T = F · r. One kilo at 50 mm is about 0.49 N·m, a little over the holding torque in the example. Go up to 1.5 times the stall or holding torque (about 0.68 N·m: 1.4 kg on that arm; option 3 is estimated at about 0.8 N·m, so slip beyond that is expected) and watch whether the mark moves, the flat rounds off or the slot gap closes.
Then the endurance test: leave it loaded, or run it for a day (hot, if the motor runs warm), and check the mark and the clamp again. Retighten once after 48 h and test again. The longer protocols are in Testing a mechanism before you trust it.
Runout shows on a dial indicator or a feeler gauge at the rim, or in how the belt or mesh tension changes over one turn.
See also
- Motor mounts: motor dimensions, motor heat and servo splines.
- Knobs, handles and grips: the knob on a potentiometer or encoder shaft.
- Rigid shaft couplings: joining two shafts end to end.
- Seating bearings and bushings: the bearings that carry the shaft.
