How to Design a Hoeken’s Straight-Line Linkage in Excel (with VBA Simulator)
The Hoeken’s Linkage is a mechanical engineer's favorite magic trick. It is a four-bar mechanism that converts simple rotational input into a near-perfect straight-line output.
Unlike the Watt Linkage (which traces a figure-8), the Hoeken’s Linkage creates a "tear-drop" shape with a long, flat bottom (see Figure 1). This makes it the standard choice for walking robots and intermittent linear actuators.
But how do you find the link lengths? If you guess, you get a wobble. This guide provides practical "Golden Ratios" and an Excel VBA tool to simulate the motion path.
1. The Geometry: Practical Design Ratios
To achieve a usable straight line, link lengths must follow specific proportions relative to the Crank Radius (R). While optimal ratios vary depending on stroke requirements, a widely used set for general-purpose design is shown below.
| Component | Variable | Practical Ratio Formula |
|---|---|---|
| Input Crank | L1 | 1.0 (Reference) |
| Ground Distance | L4 | 2.0 × L1 |
| Coupler Arm | L2 | 2.5 × L1 |
| Follower | L3 | 2.5 × L1 |
| Coupler Extension | L2_ext | 5.0 × L1 (Total length to tip) |
Engineering Note: These ratios are a widely used practical approximation that produces a very good straight-line segment. Exact Hoeken dimensions depend on optimization criteria such as flatness length, deviation tolerance, and usable crank angle.
If you have a motor with a 10mm crank arm:
- Ground Pins spacing = 20mm
- Coupler & Follower length = 25mm
- Total Coupler Length (to the tip) = 50mm
2. Simulating the Path in Excel (VBA)
Before you 3D print your parts, you should visualize the "Teardrop" curve to ensure the straight-line portion meets your stroke requirements.
This VBA script calculates the X,Y coordinates of the linkage tip for a full 360° rotation.
The VBA Code
Function HoekenPath(CrankLen As Double, AngleDeg As Double, OutputType As String) As Variant
' Hoeken Linkage Kinematics Solver
' Uses standard optimization ratios: Ground=2*Crank, Coupler=2.5*Crank
Dim rad As Double
Dim L1 As Double, L4 As Double, L2 As Double, L3 As Double, L2_total As Double
Dim Ax As Double, Ay As Double
Dim dist As Double
Dim Px As Double, Py As Double
' 1. Define Geometry
L1 = CrankLen
L4 = 2 * CrankLen ' Ground
L2 = 2.5 * CrankLen ' Coupler (Pivot to Pivot)
L3 = 2.5 * CrankLen ' Follower
L2_total = 5 * CrankLen ' Full Coupler Length
' 2. Convert Input Angle to Radians
rad = AngleDeg * 3.14159 / 180
' 3. Calculate Crank Position (Point A)
Ax = L1 * Cos(rad)
Ay = L1 * Sin(rad)
' 4. Calculate Ground Pivot for Follower (Point D is at x=L4, y=0)
' We need intersection of circle from A (radius L2) and D (radius L3)
' Distance between A and D (Ground Pivot)
dist = Sqr((L4 - Ax) ^ 2 + (0 - Ay) ^ 2)
' ---> GEOMETRY VALIDITY CHECK
' This check ensures the two circles can actually intersect.
If dist > (L2 + L3) Or dist < Abs(L2 - L3) Then
HoekenPath = CVErr(xlErrNum)
Exit Function
End If
' Circle Intersection Math
Dim a As Double, h As Double
Dim x0 As Double, y0 As Double
Dim Bx_sol As Double, By_sol As Double
' 'a' is the distance from Point A to the midpoint between the intersection points
a = (L2 ^ 2 - L3 ^ 2 + dist ^ 2) / (2 * dist)
' 'h' is the distance from that midpoint to the intersection points
h = Sqr(L2 ^ 2 - a ^ 2)
' (x0, y0) is the midpoint
x0 = Ax + a * (L4 - Ax) / dist
y0 = Ay + a * (0 - Ay) / dist
' Calculate Intersection Point B (Connecting Pivot)
' Hoeken uses the "lower" intersection in standard orientation
Bx_sol = x0 - h * (0 - Ay) / dist
By_sol = y0 + h * (L4 - Ax) / dist
' 5. Calculate Tip Position (Point P)
' P is extending along the line defined by A and B
Dim dx As Double, dy As Double
Dim lenAB As Double
dx = Bx_sol - Ax
dy = By_sol - Ay
lenAB = Sqr(dx * dx + dy * dy)
' Project Point P by the total coupler length
Px = Ax + (dx / lenAB) * L2_total
Py = Ay + (dy / lenAB) * L2_total
' Return X or Y coordinate
If UCase(OutputType) = "X" Then
HoekenPath = Px
Else
HoekenPath = Py
End If
End Function
Usage in Excel:
- Open the VBA Editor (ALT + F11) and Insert a Module.
- Paste the code above.
- In Cell A1, type your Crank Length (e.g., 10).
- In Column B, list angles 0 to 360.
- In Column C, use
=HoekenPath($A$1, B2, "X"). - In Column D, use
=HoekenPath($A$1, B2, "Y"). - Highlight Columns C and D and Insert > Scatter Chart (with smooth lines).
This VBA solver intentionally selects the open Hoeken configuration. Advanced users may modify the circle-intersection sign to explore other configurations. If Excel returns a
#NUM! error, the linkage has likely reached an impossible or toggle position due to invalid input lengths.This model assumes ideal planar motion and neglects joint clearance, elastic deformation, and manufacturing tolerances.
3. Practical Applications
Why go through this trouble? The Hoeken’s Linkage is favored because it creates a long, straight path while maintaining low velocity variation during the straight-line phase. This is critical for:
- Walking Robots: The "flat" part of the curve becomes the foot's contact with the ground, providing stable traction. The curve part lifts the leg up and forward.
- Pick and Place Units: Creating linear insertion motion using a cheap rotary motor.
- Film Advancers: (In legacy projectors) pulling film down frame-by-frame.
Ready to build? All you need is a 3D printer and some basic rod ends.
FAQ: Is Hoeken’s Linkage Better Than a Slider-Crank?
It depends on the application. A slider-crank creates perfectly straight motion but requires a sliding prismatic joint, which introduces friction and requires lubrication. A Hoeken’s Linkage creates *approximate* straight motion using only revolute (pin) joints, which are lower friction, easier to seal, and require less maintenance, making them ideal for dusty or harsh environments.
Conclusion
The Hoeken’s Linkage proves that complex motion doesn't require complex control systems. With simple geometry (Ratio 1 : 2 : 2.5 : 2.5), you can achieve precise linear motion.
Related Guides:
- Theory: Original Hoeken's Linkage Theory (2011 Archive)
- Actuation: Calculate Motor Torque for your Mechanism
Disclosure: Some links in this guide may be affiliate links. This does not affect engineering recommendations.
Comments