Skip to main content
Back to module
Machine Design & Manufacturing · Machine Elements

Shafts and keys

Reading39mLesson 1 of 3 in this module

Turn power and speed into torque, combine bending and torsion with von Mises, size a solid shaft and check its key.

Why it matters

Almost every machine moves power along a shaft: a motor drives a pump, a gearbox drives a conveyor, a pulley drives a fan. If a shaft is too small it twists, bends, wobbles or cracks; if it is far too large the machine is heavy, expensive and needs bigger bearings. Sizing a shaft is one of the first real design calculations a mechanical engineer does, and it pulls together the statics and strength of materials from Engineering Mechanics.

Loads on a shaft

A rotating shaft usually carries two things at once:

  • Torque (T) from the power it transmits. Torque causes torsional shear stress.
  • Bending moment (M) from belt pulls, gear forces and its own weight between bearings. Bending causes normal stress.

Torque comes from power and speed. Power in watts equals torque in N·m times angular speed in rad/s:

omega = 2 * pi * n / 60        (n in rpm, omega in rad/s)
T     = P / omega

For a 5 kW motor at 1450 rpm: omega = 2·pi·1450/60 = 151.8 rad/s, so T = 5000 / 151.8 = 32.9 N·m. Notice that the same power at a lower speed means more torque: a gearbox output shaft turning slowly is thicker than the motor shaft feeding it.

Stresses in a solid round shaft

The largest stresses are at the outer surface. For a solid shaft of diameter d:

bending stress    sigma = 32 * M / (pi * d^3)
torsional shear   tau   = 16 * T / (pi * d^3)

Both scale with 1/d³, so a small increase in diameter buys a lot of strength: going from 20 mm to 25 mm cuts both stresses roughly in half (factor (25/20)³ = 1.95).

To compare the combined state of stress with a material's yield strength, ductile steels use the von Mises equivalent stress:

sigma_vm = sqrt(sigma^2 + 3 * tau^2) = 32 * sqrt(M^2 + 0.75 * T^2) / (pi * d^3)

Worked example: a pulley shaft

Our 5 kW shaft also carries a bending moment of M = 50 N·m at the pulley. It is made of a plain carbon steel with a yield strength of about 250 MPa, and we want a static factor of safety of 2.5, so the allowable stress is 250 / 2.5 = 100 MPa.

Check a 25 mm shaft (d = 0.025 m):

sigma    = 32 * 50 / (pi * 0.025^3)     = 32.6 MPa
tau      = 16 * 32.9 / (pi * 0.025^3)   = 10.7 MPa
sigma_vm = sqrt(32.6^2 + 3 * 10.7^2)    = 37.5 MPa   (well under 100 MPa)

Or solve for the smallest diameter that just reaches the allowable stress:

d = ( 32 * sqrt(M^2 + 0.75 * T^2) / (pi * sigma_allow) ) ^ (1/3)
  = ( 32 * sqrt(50^2 + 0.75 * 32.9^2) / (pi * 100e6) ) ^ (1/3)
  = 0.0180 m  =  18.0 mm

So why choose 25 mm? Because the static check is only the start.

What the static check leaves out

  • Fatigue. A rotating shaft under a steady bending load sees fully reversed stress: every point on the surface goes from tension to compression once per revolution. A motor at 1450 rpm reaches a million cycles in under 12 hours. Fatigue strength is well below yield, so real shaft design uses fatigue criteria (such as the Goodman or ASME-elliptic methods taught in machine design textbooks) with endurance-limit correction factors.
  • Stress concentrations. Shoulders, grooves for retaining rings and keyseats raise the local stress by a factor Kt, often 1.5 to 3. Generous fillet radii at shoulders help a lot.
  • Deflection and slope. Gears and bearings need the shaft to stay stiff. Bearing makers and gear standards set limits on slope at bearings and deflection at gear meshes, and these limits often govern the diameter rather than strength.
  • Critical speed. A long, slender shaft can resonate. Keep the operating speed well away from its first natural frequency.

Keys

A key locks a pulley or gear to the shaft so torque passes through it. A common parallel key for a 25 mm shaft is 8 mm wide and 7 mm tall (from the standard key tables for that shaft size). The torque becomes a force at the shaft surface, F = 2T/d = 2·32.9/0.025 = 2.63 kN. With a 28 mm key length:

key shear   tau = F / (w * L)       = 2630 / (8 * 28)   = 11.8 MPa
key bearing     = F / ((h/2) * L)   = 2630 / (3.5 * 28) = 26.9 MPa

Keys are often made slightly weaker than the shaft on purpose, so an overload shears a cheap key instead of breaking the shaft.

Common mistakes

  • Forgetting rpm to rad/s. Using rpm directly in T = P/omega gives a torque about 10 times too small.
  • Mixing N·mm and N·m. Keep metres and pascals together, or millimetres and MPa (N/mm²).
  • Stopping at the static check. For anything that rotates under load, fatigue and deflection decide the final size.
  • Ignoring the keyseat. The stress concentration at the end of a keyseat is a classic fatigue crack starter.

A note on real design

This lesson teaches the mechanics so you can understand and sanity-check a shaft. Real shafts are designed to recognised methods and standards, use verified material data, and are reviewed by qualified engineers. Where public safety depends on the design, a licensed professional engineer takes responsibility for it.

Recap

  • T = P / omega, with omega = 2·pi·n/60.
  • sigma = 32M/(pi·d³), tau = 16T/(pi·d³), and von Mises combines them.
  • Diameter matters as d³, so small changes help a lot.
  • Fatigue, stress concentrations, deflection and critical speed usually set the final size.

Try it

On the Do tab, finish a Python function that solves for the minimum shaft diameter, and check it against the worked example.

Also in this lesson: