STLGen

All generators › Gears and drives

Rack and pinion maker

A gear and a toothed bar that turn rotation into straight travel.

Drag to turn, scroll or pinch to zoom. Grid squares are 10 mm.
Building the model…
Saves an STL file in millimetres, ready for your slicer.

Your download is almost ready

8 seconds

Your download is ready

Your download is starting

should appear in your downloads folder in a moment. Click here if it does not start.

If you find STLGen useful, please consider buying me a coffee. Coffees and a few simple ads are what keep this website free, and they pay for new features, like the simple CAD program that is coming soon.

Buy me a coffee
Rack and pinion maker

Turning rotation into straight travel

A rack and pinion turns the rotation of a gear (the pinion) into straight movement of a toothed bar (the rack). It is used in sliding doors, camera sliders, linear actuators, steering and toy mechanisms. Press "Run" to watch the rack slide.

  • Runs in your browser
  • Nothing is uploaded
  • No sign-up
  • Free STL download

Tips and questions

1Setting it up
  • Tooth size (module) is shared by both parts. Each turn of the pinion moves the rack by pi times the module times the pinion teeth: module 2 with 16 teeth moves about 100 mm per turn.
  • More rack teeth make a longer rack. Each rack ends on half a tooth gap, so two racks butt together into a longer one.
  • Fixing holes let you screw the rack down; set how many and their size.
  • Play between teeth stops it binding; raise it if the printed parts feel stiff.
2Mounting

Place the pinion shaft so the pinion's pitch circle just touches the rack's pitch line; the page shows the distance. Both parts print flat with no supports.

?Questions
How far does the rack move per turn?

Pi × module × number of pinion teeth. The fact box shows the exact value for your settings.

Can I join two racks?

Yes. Each rack ends on half a tooth gap, so the tooth spacing continues when two are placed end to end. Fix both firmly so they stay in line.

What shaft hole should I use for a motor?

Many small motors have a 5 mm D-shaft. Set the pinion shaft hole to the shaft size plus 0.1 to 0.2 mm and choose the D-shaft hole shape.

More generators