Brick-compatible mechanisms

Rack-and-Pinion Slider

Convert turning motion into straight-line travel with a pinion gear, guided rack, and visible distance scale.

Rotate a small gear and a toothed bar walks sideways. This compact motion converter appears in steering systems, sliding doors, machine tools, and any design that needs controlled linear movement.

Difficulty
Beginner
Build time
45-70 min
Estimated cost
$0-$15
Age range
10-16
Workspace
A clear table about 90 cm wide

The finish line

What you will build

The rack travels at least 12 cm in a straight line without lifting from the pinion, and reversing the crank reverses travel with little hesitation.

Learning goals

  • Identify how rotation of a pinion gear produces horizontal rack translation.
  • Construct and explain a rotary-to-linear system.
  • Measure how the pinion diameter changes performance.
  • Diagnose losses caused by rack guide rubbing and tooth friction.

Before you build

Materials, tools, and safety

Reuse-material cost: Usually under $5 with an existing kit. Supervision: Adult help recommended for sharp or heated tools.

Tools

  • Ruler
  • Removable tape for motion marks

Low-cost swaps

  • Use equivalent brick-compatible parts from any kit.
  • Use cardboard beams and straw bearings for a larger demonstration model.
  • Use a cardboard strip with evenly cut teeth and a matching cardboard pinion for a larger model.

Project-specific safety

  • Keep fingers, hair, and loose sleeves clear of moving parts.
  • Turn the mechanism by hand; do not attach a high-speed motor.
  • Keep fingers clear of the rack ends and pinion mesh because the slider can create a pinch point against the frame.

Orient the build

Place the build so rotation of a pinion gear is on your left and horizontal rack translation is on your right. Call the side facing you the front, the far side the back, the tabletop the bottom, and the opposite face the top.

Build it

Step-by-step instructions

  1. Step 1

    Build the long base

    Create two rigid rails longer than the rack travel and brace them every 6 cm.

    Leave a straight central path for the rack.

  2. Step 2

    Make the lower guide

    Add smooth supports under the rack at both ends and near the pinion.

    Keep every support at the same height.

  3. Step 3

    Install the pinion shaft

    Mount the pinion above the rack path with bearings on both sides.

    Add a crank beyond the front rail.

    Builder checkpoint: After install the pinion shaft, the first subassembly should stay aligned when handled gently.

  4. Step 4

    Set mesh depth

    Slide the rack under the pinion until teeth overlap about halfway.

    Turn the pinion while holding temporary spacing.

    Watch for: If this stage binds or drifts, inspect rack lifting before adding more parts.

  5. Step 5

    Add top retainers

    Place smooth guides just above the rack so it cannot lift.

    Leave a thin gap that does not squeeze the rack.

  6. Step 6

    Add end stops and scale

    Install stops before the rack can leave its guides.

    Tape a ruler-like scale beside the travel path.

    Builder checkpoint: After add end stops and scale, operate the build slowly and confirm that horizontal rack translation begins without binding.

  7. Step 7

    Measure one revolution

    Align the rack pointer with zero and turn the pinion exactly once.

    Record travel and repeat in the reverse direction.

  8. Step 8

    Tune the guide gap

    Adjust one guide at a time until the rack moves smoothly without rocking.

    Test the full 12 cm path at low speed.

    Builder checkpoint: At the final checkpoint, The rack travels at least 12 cm in a straight line without lifting from the pinion, and reversing the crank reverses travel with little hesitation.

See the engineering

Why it works

Input
rotation of a pinion gear
Output
horizontal rack translation
Motion
rotary-to-linear
Energy losses
rack guide rubbing, tooth friction, backlash, rack lifting
Rack-and-Pinion Slider concept diagram with labeled input, output, and motion arrows.
The rotary-to-linear motion path, with the main efficiency losses called out.

Why this works

Rotary-to-linear conversion

Each pinion revolution advances a length of rack close to the gear's pitch circumference. Guides prevent the rack from rotating or separating, leaving translation as its allowed motion.

Look for: Mark one pinion tooth and measure how far the rack moves during exactly one revolution.

Where the energy goes

Efficiency and losses

The ideal model leaves out rack guide rubbing, tooth friction, backlash, rack lifting. These effects turn some input energy into heat, sound, vibration, or unwanted motion, so measured performance will be lower than an ideal calculation.

Look for: Run the build slowly and locate the first place where rack guide rubbing becomes visible or audible.

Math bite

Predict rack travel

Formula: travel ≈ π × pitch diameter

  • Pitch diameter ≈ 24 mm
  • π ≈ 3.14

Substitute: travel ≈ 3.14 × 24 mm = 75.4 mm

Result: One pinion turn should move the rack about 7.5 cm.

Larger pinions create more travel per turn but require more input torque for the same rack force.

Pitch diameter is approximate, and backlash or slip changes measured travel.
Brick-building meme reading: Chuck Norris does not build LEGO; he roundhouses the bricks into sculptures.
The rack was asked to translate. It interpreted that as sideways and upward.Image supplied by the site owner.

Make it behave

Test, troubleshoot, and tune

Controlled test

Start here: Move the unloaded rack from the center through one full pinion turn.

Success looks like: The rack travels straight, stays engaged, and returns to its start within 3 mm after reverse motion.

Measure: Travel per turn and reversal error.

Change: the pinion diameter

Keep constant: rack, guide spacing, frame, rotation amount, and start mark

  1. small pinion
  2. medium pinion
  3. same pinion after tightening guides
Troubleshooting guide
SymptomLikely causeConfirm itFix
The rack lifts and skipsTop retention is too high or mesh is shallowPress lightly on the rack during a test turnLower the retainers without adding rubbing
Travel becomes tight near one endGuides are not collinearMove the rack by hand with the pinion removedRealign supports to one straight reference edge
The rack moves diagonallySide clearance is excessiveMeasure the gap at both endsAdd side guides with equal running clearance
Reverse motion has a long delayBacklash is largeRock the crank gently and watch the rackDeepen mesh slightly while preserving free motion

Choose your tradeoff

Reduce guide clearance until side play is small, then back off if rubbing rises. A larger pinion increases distance per turn but reduces ideal rack force for the same input torque.

Keep experimenting

Try another version

Easier

Pointer slider

Move a paper arrow along a labeled scale without load.

Performance

Dual-side rack

Guide a wide carriage with two synchronized pinions.

Creative

Steering link

Connect the rack ends to two pivoting wheel arms.

Build together

Classroom and access options

Classroom version

Teams can compare the pinion diameter while keeping rack, guide spacing, frame, rotation amount, and start mark. Assign builder, tester, recorder, and explainer roles; have each team predict the result before collecting three trials.

Access adaptations

  • Use high-contrast tape to distinguish input and output parts.
  • Replace a small crank with a wider handle for an easier grip.
  • Attach a large colored tab to the rack end so position is easy to see and grasp.

Reflect on the design

  1. How did the pinion diameter change the measured result?
  2. Where did rack guide rubbing affect the build most strongly?
  3. What evidence shows that rotary-to-linear conversion explains the motion?
  4. Which change would improve horizontal rack translation without creating a new problem?
Glossary
Rotary-to-linear conversion
Each pinion revolution advances a length of rack close to the gear's pitch circumference.
Input
The action or energy supplied to a system; here it is rotation of a pinion gear.
Output
The useful response produced by a system; here it is horizontal rack translation.
Efficiency
The fraction of input energy that becomes useful output instead of friction, sound, heat, or unwanted motion.

Build your dreams

One build can start the next.

Share what you learned, change one variable, and help another builder understand what worked.

Explore more guides

Sources and build notes

An original BrickLabClips interpretation of a standard mechanical mechanism.

  • Mechanism verification: Standard kinematics were checked for motion direction, constraint, clearance, and likely friction points.

Written and edited by BrickLabClips. Published 2026-07-22; updated 2026-07-22.

Next builds

Related guides