1. Home
  2. Slider-crank

Slider-crank mechanism: how a turning crank drives a piston

A slider-crank joins a rotating crank to a slider that moves back and forth along a straight guide, through a connecting rod. It is the mechanism of piston engines and reciprocating pumps.

With the slide line through the crank pivot, the slider travels twice the crank length (the stroke is 2r), but it does not move at a steady speed: even with the crank turning steadily, it is not fastest at a crank angle of 90°, and it stops momentarily at both ends.

Try it

Try itin-line slider-crankOAB

Shown at the initial values. Turn on JavaScript to change the values and play the motion.

Lengths
Assembly

All lengths in mm. Angles in degrees.

StatusValid linkage.
Typein-line slider-crank
Stroke40.00 mm
Slider position60.00 – 100.00 mm
Input range full turn
Crank angle per stroke (→ / ←) 180.0° / 180.0°
Time ratio of the two strokes1.000
Largest rod angle to the slide line14.5°
Largest slider speed per rad20.62 mm/rad

Slider position against crank angle

Slider position against crank angle60708090100060120180240300360Crank angle (deg)Slider position s (mm)

Slider speed per radian of crank turn

Slider speed per radian of crank turn-30-20-100102030060120180240300360Crank angle (deg)ds/dθ (mm/rad)

Values every 30 degrees

Crank (deg) Position s (mm) ds/dθ (mm/rad) d²s/dθ² (mm/rad²) Rod angle (deg)
0.0 100.000 0.000 -25.000 0.00
30.0 96.693 -12.182 -19.900 -7.18
60.0 88.102 -19.538 -7.502 -12.50
90.0 77.460 -20.000 5.164 -14.48
120.0 68.102 -15.103 12.498 -12.50
150.0 62.052 -7.818 14.741 -7.18
180.0 60.000 -0.000 15.000 -0.00
210.0 62.052 7.818 14.741 7.18
240.0 68.102 15.103 12.498 12.50
270.0 77.460 20.000 5.164 14.48
300.0 88.102 19.538 -7.502 12.50
330.0 96.693 12.182 -19.900 7.18
360.0 100.000 0.000 -25.000 0.00

Three things to try

  1. Change the crank. Set r to 30. The stroke becomes 60.0 mm, twice the crank length. The rod length does not change the stroke of an in-line slider-crank; it changes the shape of the motion in between.
  2. Move the slide line off the pivot. Set the offset e to 20. The stroke becomes 41.41 mm, and the two strokes no longer take the same crank angle: 172.0° one way and 188.0° the other. At a steady crank speed one stroke is 1.093 times as long as the other: this is the quick-return effect used in shaping machines.
  3. Make the rod shorter than the crank. Set l to 15. The rod can no longer reach the slide line at every crank angle, so the crank cannot turn all the way round: it only rocks within ±48.6° of the slide line (and around the opposite side).

How it works

Where the slider is

Measure the slider position s along the slide line from the crank pivot O, and the crank angle θ from the slide line. With the slide line through O (no offset), the joint A is at (r cos θ, r sin θ) and the rod of length l must reach the line, so

s(θ) = r cos θ + √(l² − r² sin² θ)

With the preset lengths (r = 20 mm, l = 80 mm) this gives s = 100 mm at θ = 0° (crank and rod in line, slider farthest away) and s = 60 mm at θ = 180° (crank folded back under the rod), so the stroke is 40 mm. These three numbers are part of the automated tests of the calculation.

The square root has two signs. The other sign is the other way to assemble the same parts, with the slider on the far side of the crank pivot (the "slider to the left" option). The two are separate branches: the slider cannot pass from one to the other while the crank turns.

Why the speed is not steady

Differentiate s with respect to θ and you get the slider speed for each radian of crank turn:

ds/dθ = −r sin θ − r² sin θ cos θ / √(l² − r² sin² θ)

The second term comes from the tilt of the rod. It makes the motion lopsided: with the preset lengths the slider is fastest at about 76.7° (20.62 mm per radian), not at 90°, and the acceleration is -25.0 mm/rad² at the far end against 15.0 mm/rad² at the near end. A longer rod tilts less, and the motion gets closer to a pure sine wave. The rod is never more than 14.5° from the slide line with these lengths (that angle is asin(r/l)).

The chart and the table give these values per radian. For a crank turning at a constant ω rad/s, multiply the speed by ω and the acceleration by ω². The CSV download can do this for you from a speed in rpm.

Slider-crank or four-bar linkage?

A slider-crank is a four-bar linkage in which the output link is replaced by a straight guide (an output link of infinite length). Use it when the output must move in a straight line; use a four-bar linkage when it must swing or follow a curve.

What this does not tell you

How the numbers on this page are produced

The position is computed in closed form at 360 crank angles on a fixed branch; speed and acceleration are exact derivatives. The results are checked against the textbook formula above, against the specification's fixed values (100 mm, 60 mm, 40 mm) and against a separate general solver in automated tests. The crank angles of the two strokes are located on a 0.1° grid. Engine version 0.1.0.

Background reading: R. L. Norton, Design of Machinery (slider-crank position, velocity and acceleration analysis); J. J. Uicker, G. R. Pennock and J. E. Shigley, Theory of Machines and Mechanisms.