3D Printing Generator
DeutschEnglish

Print a shaft coupler: adapters for D, hex and keyed shafts

A shaft coupler made to measure

A shaft coupler joins two shafts that sit on one line: a motor shaft and a lead screw, a gearbox and a knob, a potentiometer and an extension. Store-bought couplers come in standard sizes, and once one side is a D shaft, an inch size or a hex, finding the right one gets tedious. With this generator you design your own shaft coupler: each side gets its own bore, and you choose the fixing, the middle section and, if you like, a flexible section. At the end you download an STL file that prints without supports.

The result suits hobby projects: stepper to lead screw, small gear motors, encoders, potentiometers, hand cranks and models. The example gallery has ready configurations, for instance the stepper coupler 5 mm D to 8 mm or the inch adapter to 8 mm.

How the generator works

The generator runs entirely in your browser. Nothing is uploaded, and your design lives in the share link, which stores only the values that differ from the defaults. Bookmark it or pass it on. The preview updates with every change, and notes appear right in the editor, for example when the outer diameter had to be raised.

The steps: measure the shafts, enter bore shape and diameter for side A and side B, choose the fixing, check the preview, download the STL. Measure with calipers rather than trusting a data sheet, because printed parts react to a tenth of a millimeter.

A bore per side

The two sides are independent. That gives a straight coupler (equal bores) or an adapter (different bores, even different shapes). Under “Bore type” you pick one of five shapes:

  • Round: a plain shaft, held by set screws or the clamp slit.
  • D: a shaft with one flat, as on many stepper motors. The set screw presses on the flat and holds much better than on a round shaft.
  • Double-D: two parallel flats, typical for small gear motors and encoders.
  • Hex: for hex shafts and bits. The “Shaft diameter” value is the width across flats here.
  • Keyed: a round shaft with a keyway.

“Shaft diameter” runs from 2 to 25 mm. The usual sizes are presets: 3, 4, 5, 6, 6.35 (¼ inch), 8, 10 and 12 mm. For D and double-D shafts there is also “Width across the flat” (1–25 mm). On a D shaft you measure from the round side to the flat, on a double-D between the two flats. Both are measured with calipers right on the shaft.

“Bore depth” sets how far the shaft goes into the coupler (4–60 mm). As a rule of thumb use twice the shaft diameter; a shorter bore holds worse, a longer one only makes the coupler longer. If the bore is very short for the chosen screw, the editor warns you.

Clearance

“Clearance” (0–0.5 mm, default 0.15 mm) is the play per side between shaft and bore. At 0.1 to 0.2 mm the shaft fits on most printers without force. If the shaft will not go in, raise the clearance; if it wobbles despite tight screws, lower it. Test the fit with a short sample, for example the adapter for the smallest shaft.

Middle section and shaft stop

The “Middle section” is the solid length between the bores (0–40 mm, default 2 mm). It separates the shafts and carries the “Shaft stop”: a smaller hole in the middle, so each shaft ends at a fixed depth and the two shaft ends do not butt together. The stop needs a middle section that is long enough. The flexible slits need at least 6 mm, in practice more like 14 mm as in the flexible example.

Outer diameter

With “Outer diameter automatic” the generator picks the smallest diameter that fits both bores, the screws and their nuts with a sound wall. That is right for almost every case. Turn it off and you set the “Outer diameter” yourself (8–60 mm, default 22 mm), for example so the coupler fits a housing. If your value is too small for the screws, it is raised to the minimum automatically and the editor shows the warning “The outer diameter is too small for the screws” with the new value. If the required diameter would exceed 60 mm, choose a smaller screw size or smaller bores.

Fixing: set screws or clamp slit

“Fixing” offers two ways to hold the shaft.

Set screws press radially on the shaft, on the flat of D shafts. You choose one or two screws per side; two sit 90° apart and hold more firmly. This is simple and good for D shafts, but it can dent a soft round shaft.

Clamp slit: a slit splits the sleeve on one side and a cross screw pulls the bore tight around the shaft. That holds more evenly and leaves no mark, for example on a lead screw. See the clamp coupler 5 to 8 mm.

“Screw size” is M3, M4 or M5. With “Captive nut” on, a hex nut drops into a slot that is open at the top, so you simply insert it from above after printing. Off, you get a tap-size hole in which the screw cuts its own thread. That saves the nut but is less durable, especially if you loosen the screw often.

Which screw you need is shown by the editor under the fixing, for each side: count, size, length and whether it uses a nut or threads into the plastic. Stick to these lengths: a screw that is too long pushes on the far side, one that is too short does not bite.

Flexible middle

With “Flexible middle” steep helical slits are cut through the wall of the middle section. They take up small offsets and angle errors between the shafts. You choose the “Number of slits” (2–4) and the “Slit width” (0.8–2 mm); more and wider slits make the middle softer. The slits rise at 60°, so they print without supports. The middle section must be at least 6 mm long and its wall not too thin; otherwise the generator leaves the slits out and tells you. On the lower side a tap-size hole replaces the nut slot, because the slot would cross the slits.

The flexible middle is no true bellows coupling. It helps with small alignment errors, for example between a stepper and a lead screw, as in the flexible clamp coupler for ¼ inch.

Why the coupler prints standing

The coupler prints with the shaft axis vertical and the larger bore on top. There are reasons:

  • The bores are then vertical holes and come out round and to size, without supports.
  • The perimeters run around the bore, so the pressure of the set screws and the clamp acts as hoop stress right along the extrusion lines.
  • The lower bore ends in a shallow cone instead of a flat ring, so its roof prints without supports. The upper bore has a flat floor.
  • Screw holes and slits are shaped so that no overhang is flatter than 60°.

We sliced all twelve examples in PrusaSlicer (Prusa MINI, 0.20 mm SPEED, Prusament PLA). None needs automatic supports. The stepper coupler of the hero example weighs 4.4 g and prints in 31 minutes; the examples range from 1.4 g for the small N20 coupler to 10.7 g for the large keyed coupler with M4 screws. Print times run from 16 to 50 minutes.

Material and settings

PLA is enough for light duty. PETG is a bit tougher and creeps less over time; ABS and ASA tolerate the heat next to a motor better. Print with at least three, preferably four walls and high infill, because on such small parts the walls decide the strength. A layer height of 0.2 mm is fine; finer layers make the bores smoother. After printing, remove the first-layer edge with a deburring tool if needed before you push the shaft in.

Important: light duty only

Printed couplers are meant for hobby motors and small mechanisms, not for high torque. Plastic creeps under constant load: a tightened screw loses tension over time, and the coupler can slip on the shaft. This is worse with heat and with shocks, such as starting a heavily loaded motor. Layers also resist shear worse than the plastic itself. For torque peaks, or wherever a failure could damage something or hurt someone, use a metal coupler. Inspect printed couplers regularly, retighten the screws and add threadlocker if needed. On clamp couplers tighten the screw only until the shaft sits securely: too much force tears the slit.

Typical uses

UseIdea
Stepper to T8 lead screw5 mm D to 8 mm, set screws or clamp
Inch shaft to metric shaft¼ inch (6.35 mm) to 8 mm
Small gear motor3 mm D to 4 mm, one screw per side
Hex shaft or bitHex to round shaft
Encoder or potentiometerDouble-D or D to round, extension
Larger motor with a key12 mm keyed to 10 mm, M4 screws

Origin and license

The idea of a parametric shaft coupler with an adapter function comes from the model Customizable shaft buddy: a shaft coupler/adapter generator by TylerBletsch (Printables 36584, CC-BY-4.0). It served as inspiration only: the geometry, code and texts here are our own design, and nothing was copied. All licenses and sources of the project are listed on the licenses page.

Ready? Open the generator or browse the examples first.

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
Side A
Shaft diameter5 mm2 – 25 mmMeasured shaft diameter on side A (hex: width across flats). The clearance is added automatically.
Width across the flat4.5 mm1 – 25 mmD shaft: from the round side to the flat; double-D: between the two flats. Measure it with calipers.
Bore depth12 mm4 – 60 mmHow far shaft A goes into the coupler. About 2 × the shaft diameter grips well.
Side B
Shaft diameter8 mm2 – 25 mmMeasured shaft diameter on side B (hex: width across flats). A different value than side A makes a step-down adapter.
Width across the flat7 mm1 – 25 mmD shaft: from the round side to the flat; double-D: between the two flats. Measure it with calipers.
Bore depth12 mm4 – 60 mmHow far shaft B goes into the coupler. About 2 × the shaft diameter grips well.
Body
Clearance0.15 mm0 – 0.5 mmPlay per side between shaft and bore. 0.1–0.2 mm suits most printers; raise it if the shaft does not go in.
Middle section2 mm0 – 40 mmSolid length between the two bores. Needed for the shaft stop and the flexible slits (at least 6 mm).
Outer diameter22 mm8 – 60 mmOuter diameter of the coupler. If it is too small for the screws, it is raised to the minimum.
Screws
Set screws per side21 – 2One, or two at 90° to each other for a firmer hold.
Flexible middle
Number of slits32 – 4More slits make the middle softer in bending and torsion.
Slit width1 mm0.8 – 2 mmWidth of each slit at the outer surface.

Frequently asked questions

Do I need supports for the coupler?

No. It prints standing with the larger bore on top. Bores, screw holes and slits are shaped so that all twelve examples slice without automatic supports.

How strong is a printed coupler?

Strong enough for hobby motors and small mechanisms, not for high torque. Plastic creeps and the coupler can slip on the shaft. Check it regularly and retighten the screws.

Set screws or a clamp slit?

Set screws are simple and hold well on D shafts because they press on the flat. The clamp slit pulls the bore tight all around and leaves no mark, for example on lead screws.

What happens if the outer diameter is too small?

The generator raises it to the minimum the screws and nuts need and shows a warning with the new value. With the automatic option it picks the smallest fitting diameter itself.

Which clearance should I choose?

Usually 0.1 to 0.2 mm per side. If the shaft will not go in, raise the clearance; if it is loose even with tight screws, lower it.

What is the flexible middle for?

Steep helical slits make the middle section yielding and take up small misalignment between the shafts. It does not replace a metal coupler under heavy load.

Origin & license