Four-bar linkage calculator

Set the four link lengths and see immediately whether the input can rotate fully, how far the rocker swings, where the transmission angle gets dangerous and what curve the coupler traces.

Closed-form preview

Grashof class
—
s + l
—
p + q
—
Input range
—
Rocker swing
—
Min transmission μ
—
Max transmission μ
—
Loop-closure residual (closed form)
—
ψ (output)μ (transmission)
Open in full solver

Lengths are in consistent units. The preview follows the open assembly branch; the full solver adds dynamics, forces and diagnostics.

What this calculator computes

A four-bar linkage has a fixed ground link d, an input crank a, a coupler b and an output rocker c, joined by four pin joints. It has a single degree of freedom: choose the input angle θ and everything else follows. Despite its simplicity it generates an enormous range of motions, from windscreen wipers and suspension arms to walking robots and the Watt and Chebyshev straight-line mechanisms.

Quantity Meaning
Grashof class Which links can rotate fully, from the link lengths alone
Input range Full 360° if the input is a crank, otherwise the arc between toggle positions
Rocker swing Total angle swept by the output link
Transmission angle μ Angle between coupler and rocker, which sets how well force is transmitted
Loop-closure residual How exactly the drawn geometry satisfies both link-length constraints

The Grashof condition

Sort the four lengths into shortest s, longest l and the other two p, q. The linkage is Grashof when

s + l ≤ p + q

and then at least one link can make full revolutions relative to the others. Which motion you get depends on where the shortest link is:

Shortest link Grashof (s + l < p + q)
Input crank a Crank-rocker: input rotates fully, output oscillates
Ground d Double-crank (drag link): both side links rotate fully
Coupler b Double-rocker: neither side link rotates fully, but the coupler does
Output c Rocker-crank: output rotates fully, input oscillates

If s + l > p + q the linkage is a non-Grashof triple-rocker: no link can rotate fully. If s + l = p + q it is a change-point mechanism, which passes through a configuration where all links are collinear. There it can switch assembly branch unpredictably, so real designs usually avoid it.

Position analysis

With the ground pivots at O₂ = (0, 0) and O₄ = (d, 0), the crank pin is at A = a(cos θ, sin θ). The second moving pin B is the intersection of a circle of radius b around A and a circle of radius c around O₄. The distance between those centres is

e² = a² + d² − 2ad cos θ

and the loop closes only while |b − c| ≤ e ≤ b + c. The two circle intersections are the open and crossed assembly branches; the preview follows the open one. The classic closed-form alternative is Freudenstein’s equation relating input θ to output ψ:

K₁ cos ψ − K₂ cos θ + K₃ = cos(θ − ψ),   K₁ = d/a,   K₂ = d/c,   K₃ = (a² − b² + c² + d²) / (2ac)

Writing that equation at three chosen (θ, ψ) pairs gives a linear system for K₁, K₂, K₃. That is three-precision-point function synthesis, available in MBSD as mbsd.planar.synthesis.freudenstein_3pt.

Transmission angle

The transmission angle μ is the angle between coupler and rocker:

cos μ = ( b² + c² − a² − d² + 2ad cos θ ) / (2bc)

When μ approaches 0° or 180° the coupler pushes almost along the rocker, so force transmission collapses and friction or tolerances can lock the linkage. A common design rule keeps 40° ≤ μ ≤ 140° over the whole motion. For a crank-rocker the extremes occur at θ = 0° and θ = 180°. The calculator warns when μ drops below 40°.

Coupler curves

Any point rigidly attached to the coupler traces a closed coupler curve. Move the coupler-point offset slider to explore them: figure-eights, cusps, and nearly straight segments that are the basis of straight-line and dwell mechanisms. Coupler curves are where four-bar synthesis gets interesting, and where a full solver with dynamics earns its keep.

The same linkage in Python

The linkage shown by default, checked with the open-source MBSD Core synthesis helpers:

import numpy as np
from mbsd.planar.synthesis import FourBar, rocker_angles

linkage = FourBar(ground=3.2, crank=1.0, coupler=3.0, rocker=2.5)
print(linkage.grashof_class())         # crank-rocker

theta = np.linspace(0.0, 2.0 * np.pi, 721)
psi = rocker_angles(linkage, theta)
print(f"rocker swing: {np.degrees(np.ptp(psi)):.1f} deg")   # 49.6 deg

For forces, joint reactions and time histories, build the linkage from bodies and pins with Mechanism.planar(), or open it in the full browser solver.

NEED MORE THAN A PREVIEW?

Your mechanism, validated.

Custom joints, offset masses, contact, 3D, or a model that disagrees with the test rig. We build inspectable models and tell you why the numbers are right.