3D Printing Generator
DeutschEnglish

Planetary gear generator: print-in-place and stepped sets

A planetary gear set you can print in one go

A planetary gear is a small gearbox with a central sun gear, several planet gears around it and a ring gear with teeth on the inside. This generator builds printable planetary gear sets with true involute teeth. You choose the ratio you want and it picks matching tooth counts, then lays out the parts for printing: as a fully assembled print-in-place set, as separate parts with a carrier, or as a stepped two-stage gearbox with a very high ratio.

The examples show the range. The default set, the planetary gear 4:1 as print-in-place, comes off the bed assembled with a grip knob on the sun. The small fidget version fits in a pocket, and the stepped gearbox 52:1 shows how two ring stages reach a high ratio.

How the generator works

Everything runs in your browser. Nothing is uploaded, and the whole design is stored in the link behind “Share”. You pick a layout, give a ratio, adjust teeth and parts and download an STL or a 3MF file. When the generator has to change something, for example because the set would not fit on a 180 mm bed, it tells you in a message.

The sidebar has three sections: “Layout and ratio” (which becomes “Stepped gearbox” for the stepped layout), “Teeth” and “Ring and parts”. The “Layout” switch has three choices:

  • Print-in-place: ring, sun and planets stand on the bed in mesh and come out as one working set.
  • Separate parts: the same gears side by side with bores, optionally with a carrier plate that has one pin per planet.
  • Stepped: a two-stage gearbox with fused double planets, printed as separate parts.

The gear math follows the planetary gear solver and the ring gear of BOSL2, an OpenSCAD library, and the stepped layout uses the formulas of the AuroraSCAD library. Both are ported and checked against the originals (see the credits below).

Sun, planets, ring and the ratio

In a planetary gear one of the three elements (sun, ring, carrier) is held fixed, one is the input and one is the output. The “Ratio type” says which is which, input first:

Ratio typeFixedAllowed “Ratio”
Sun → carrierringabove 2
Carrier → sunringbelow 0.5
Ring → carriersunbetween 1 and 2
Carrier → ringsunbetween 0.5 and 1
Sun → ringcarrierabove 1
Ring → suncarrierbelow 1

Outside the allowed range the generator uses the nearest limit and says so. For the default type, sun to carrier with a fixed ring, the ratio is 1 plus ring teeth divided by sun teeth. In the standard set the ring always has the sun teeth plus twice the planet teeth.

You give a target and a limit: “Max. ring teeth” (20–150, default 50) is the largest tooth count the solver may use for the ring. More teeth hit the ratio more closely but make the set bigger. The default settings ask for 4:1 and get 17 sun, 16 planet and 49 ring teeth, which is 3.88:1. With five planets, up to 70 ring teeth and a target of 3.6, the solver finds the set with exactly 3.6:1. Asking for 1.341 with the ring as input and the sun fixed, with at most 28 ring teeth, gives 4:3 with 9 / 9 / 27 teeth.

“Planets” (2–8, default 3) sets the number of planet gears. If neighboring planets would touch, the generator uses fewer and says so. The six-planet set uses module 1.5 and measures 107.6 mm across. It asks for 3 and achieves 2.9:1 with 31 / 14 / 59 teeth.

Print-in-place: how the gears come free

In the print-in-place layout all gears stand on the bed in mesh. The flanks are kept apart by “Backlash”, play taken from every tooth on the pitch circle, and by “Root clearance”, the gap between a tooth tip and the bottom of the opposite tooth gap. The default backlash of 0.3 mm leaves a flank gap of about 0.28 mm, which suits a 0.4 mm nozzle at 0.2 mm layers. The generator caps the backlash at 0.3 times the module; more play needs a larger module.

Two things keep the planets in place: “Herringbone” (on by default) and the “Helix angle” (0–45°, default 25°). V-shaped teeth lock the planets and the sun axially, so the set cannot fall apart. With a helix angle of 0 the teeth are straight, and herringbone has no effect.

To free the gears after printing:

  1. Take the set off the bed and remove any brim.
  2. Hold the ring and turn the sun by its grip knob back and forth with firm force. Thin bridges from the first layers may crack; that is normal.
  3. Turn the sun a few full rotations until the planets orbit smoothly.
  4. If a planet stays stuck, push a thin blade into the gap between that planet and the ring at the bed side and wiggle it.
  5. Add a drop of PTFE or silicone grease. Oil can soften PLA.

If the set is still tight, reduce first-layer squish in your slicer, raise “Backlash” up to its cap, or use a larger “Module”. We have not test-printed these sets ourselves; the gaps are checked in the geometry tests and every example was sliced, but your printer decides how freely they run. Print the small fidget set first.

Separate parts, carrier and shafts

With “Separate parts” the gears lie side by side so you can assemble them or mix them with other parts. Herringbone is not offered here, because it could not be assembled. “Carrier” adds a plate with one pin per planet. The pins are 0.3 mm thinner than the “Planet bore” (0–10 mm, default 3), which needs at least 1.5 mm for the pins. The ring gets taller by the plate thickness of 3 mm, so the finished set stands on its carrier.

The “Sun” option decides what the input gear gets: “Plain”, a “Grip knob” (default) for turning by hand, or a bore for a “Round bore”, “D-shaft bore” or “Hex bore” with the “Shaft diameter” (2–20 mm, default 5; across the flats for hex). The 5:1 gearbox stage has a 5 mm D bore, four planets and 5.09:1 from 11 / 17 / 45 teeth. The helical set gives 3:1 from sun to ring with the carrier fixed. “Ring shape” can be “Round” or “Hexagon”, so the ring does not roll away and fits a wrench or a pocket; the hex ring example has a 6.35 mm (1/4 inch) hex bore in the sun.

Stepped gearbox for very high ratios

The stepped layout puts two ring stages on top of each other. Each planet is a double gear: two gears of different tooth counts fused on one axis, one meshing with the input ring and one with the output ring. The output ring has a few more or fewer teeth than the input ring, so each turn of the carrier moves it only a little. That gives ratios of 50:1 and more in a very flat gearbox.

The fields in “Stepped gearbox” are:

  • “Sun teeth” (6–40, default 12) and “Planet teeth” (8–60, default 18); the input ring gets sun plus twice the planet teeth.
  • “Step per planet” (−3 to 3, default 1): the output ring has this many teeth times the number of planets more than the input ring. A negative step reverses the output.
  • “Output stage width” (3–30 mm) and “Stage gap” (0.4–3 mm, default 1).

The generator may move the sun by a tooth or two so the double planets are evenly spaced. The shown ratio is the number of sun turns per turn of the output ring. The examples reach 52:1 with four planets, 85:1 with a D bore in the sun and six screw holes in the output ring, and 70.4:1 with reversed output.

The stepped set is printed as parts: an input ring with a 1.6 mm floor, a sun with a knob or bore, the double planets, and an output ring printed teeth down with a lip that rests on the input ring. Put the sun in the input ring, place the planets around it, then turn the output ring over onto them and turn it slightly until the teeth drop in.

Teeth, module and size

“Module” (0.5–3 mm, default 1) is the pitch diameter divided by the number of teeth, so it sets the tooth size. Below module 0.8 the generator warns that the teeth get fine for a 0.4 mm nozzle. “Gear width” (3–40 mm, default 8) is the face width of sun, planets and ring; in the stepped set it is the input stage. “Root clearance” is −1 by default, which means module divided by 4. “Ring wall” (1–20 mm, default 3) is the wall behind the tooth gaps.

The layout must fit on a 180 mm bed; if it does not, the generator reduces the module and says so.

Colors and multi-material

The color slots are “Ring”, “Planets”, “Sun” and “Carrier”. The ring color is the base. Planets, sun and carrier follow the ring until you give them a color of their own; each different color becomes a separate part. The three-color example has a blue ring, yellow planets and a red sun, which makes the motion easy to follow.

Download “Multi-color 3MF (PrusaSlicer)” or “3MF (Bambu Studio / OrcaSlicer)” to get the parts assigned to extruders, or “STL per color (ZIP)” for any other slicer. On a single-extruder printer, use one color.

Printing the gears

Print every part flat as the generator places it. We sliced all examples with PrusaSlicer (Prusa MINI, 0.20 mm SPEED, Prusament PLA); none needed automatic supports:

ExampleRatioTeethFilamentTime
Print-in-place 4:13.88 : 117 / 16 / 4911.7 g52 min
Five planets3.6 : 125 / 20 / 6521.0 g1 h 24 min
Six planets, module 1.52.9 : 131 / 14 / 5940.5 g2 h 28 min
Stepped 52:152 : 116 / 16 / 48 + 5231.6 g2 h 29 min

The small fidget set takes 6.7 g and 39 minutes. Use a clean first layer and a well-tuned printer, because the gaps are only about a quarter of a millimeter. Fine teeth (module below 1) like 0.1–0.15 mm layers.

Use cases

Print-in-place sets are fidget toys, desk toys and teaching models that show how a planetary gear turns. The separate-part sets are a starting point for a gearbox stage on a small motor or a hand crank; the stepped gearbox is for very slow drives such as a camera turntable. For more mechanics, the spur gear generator makes single gears and racks, and the gyro fidget is another toy that moves.

Origin and license

The planetary gear solver, the ring gear and the helical and herringbone tooth extrusion are ported from BOSL2 by Revar Desmera, an OpenSCAD library licensed under BSD-2-Clause. The stepped layout ports the formulas and the fused double planets of the stepped planetary gear in AuroraSCAD by Orion Lawlor (Aurora Robotics Lab), released under the Unlicense. The BOSL2 port was checked against the OpenSCAD original for volume and bounding box on four designs. New are the browser editor, the print-in-place gaps, the bed layouts, carrier, bores, grip knob, the stepped parts and the multi-color export. The generated gears are yours to use. More details are on the license page. Ready to start? Open the generator or browse the examples.

All parameters

The numeric settings of the generator with their default values and allowed ranges. Text, fonts, patterns and colors are set directly in the generator.

ParameterDefaultRangeMeaning
Layout and ratio
Planets32 – 8Number of planet gears. If neighboring planets would touch, the generator uses fewer and says so.
Max. ring teeth5020 – 150Largest tooth count the solver may give the ring. More teeth hit the requested ratio more closely but make the set larger.
Ratio40.05 – 20Desired ratio of the chosen type. The solver picks whole tooth counts, so the achieved ratio (shown below) can differ slightly.
Stepped gearbox
Sun teeth126 – 40Teeth of the input sun. The generator moves it by a tooth or two if the planets would not be evenly spaced.
Planet teeth188 – 60Teeth of both planet gears; the input ring gets sun + 2 × planet teeth.
Step per planet1-3 – 3Teeth the output stage gains per planet. The output ring has step × planets more teeth than the input ring; ±1 gives the highest ratio, negative steps reverse the output.
Output stage width8 mm3 – 30 mmHeight of the output ring and the upper planet gears.
Stage gap1 mm0.4 – 3 mmVertical gap between the two rings. The output ring rests on the input ring with a lip of this height.
Teeth
Module1 mm0.5 – 3 mmTooth size: pitch diameter divided by the number of teeth. Module 1 has teeth about 2.25 mm tall; below 0.8 the teeth get fine for a 0.4 mm nozzle.
Gear width8 mm3 – 40 mmHeight of the teeth (face width) of sun, planets and ring. In the stepped set it is the input stage.
Helix angle25 °0 – 45 °Slant of the teeth; 0 gives straight teeth. Sun and ring lean one way, the planets the other way.
Backlash0.3 mm0 – 0.6 mmPlay between the flanks, taken from each tooth on the pitch circle. 0.3 mm gives about 0.28 mm of gap for print-in-place; use less for separate parts.
Root clearance-1 mm-1 – 1 mmGap between a tooth tip and the bottom of the opposite tooth gap. −1 uses the standard value (module / 4).
Ring and parts
Ring wall3 mm1 – 20 mmWall thickness of the ring behind the bottoms of its tooth gaps.
Planet bore3 mm0 – 10 mmHole through each planet for a carrier pin or an axle (the pins are 0.3 mm thinner). 0 = no bore.
Shaft diameter5 mm2 – 20 mmDiameter of the shaft in the sun (across the flats for a hex shaft). The bore gets 0.1 mm of clearance per side.

Frequently asked questions

Do I need supports?

No. Every part lies flat on the bed and the teeth are straight or slanted walls. A PrusaSlicer check of all 12 examples, including the stepped gearboxes, found no need for automatic supports.

How do I free the gears of a print-in-place set?

Hold the ring and turn the sun by its grip knob back and forth with firm force until the teeth snap free of each other. Then turn it a few full rotations. If a planet stays stuck, a thin blade between planet and ring at the bed side helps.

Why is the achieved ratio different from the one I typed?

A gear set only works with whole tooth counts, so the solver picks the closest set it can build with the “Max. ring teeth” you allow. The achieved ratio is shown under the ratio field. More ring teeth get closer to your target.

How do I fit the gear set on a motor shaft?

Under “Sun” choose “D-shaft bore”, “Hex bore” or “Round bore” and enter the “Shaft diameter”. The bore gets 0.1 mm of clearance on each side. We have not measured torque or service life, so test with a light load first.

Can I print the gears in several colors?

Yes. Ring, planets, sun and carrier have their own color slots. A slot with a different color becomes a separate part in the multi-color 3MF, or its own STL in the ZIP.

Is the stepped gearbox print-in-place too?

No. Its two rings would hang in the air in a single print, so the stepped layout prints the input ring, the output ring, the double planets and the sun as separate parts that you assemble.

Origin & license

  • BOSL2 by Revar Desmera · BSD-2-Clause · code ported – planetary_gears() solver, ring gear and helical/herringbone extrusion ported from gears.scad to TypeScript
  • AuroraSCAD by Orion Lawlor (Aurora Robotics Lab) · Unlicense · code ported – stepped planetary formulas and fused double planets ported from gear.scad