Composite gadgets: spring box, secret box, combination lock, and more

15 min readUpdated Jun 2026

A composite gadget isn't a single mechanism — it's a conversation among several. A spring box is a hinge talking to a spring and a latch; a secret box is half a dozen sliders that yield to each other in sequence; a combination lock is a train of indexed discs that only agree on one position. Here's the trap that ruins most of these projects: every subsystem has its own clearance, its own optimal print orientation, and its own failure mode — and the whole object fails until every one of them works at once. You don't design a composite gadget; you design four or five small mechanisms and then apportion the tenths of a millimeter at each interface so they can coexist. What follows is how to apportion them.

Spring box: balancing the force that opens against the force that holds

The spring-lid box is the simplest composite and the best one for seeing how the whole class works: a hinge that lets the lid swing, a spring that pushes it open, and a latch that overcomes the spring and keeps it closed. Three parts in permanent tension. The spring — printed as a spiral, a rubber band, or an embedded steel coil — stores energy when you close it and returns it when you release the latch. Everything depends on sizing those two forces against each other: the one that opens and the one that holds.

diagram
Three subsystems in tension: the hinge lets it swing, the spring opens it, and the latch holds it; the assembly only works if the two opposing forces stay balanced.

The mistake is to size them separately. The latch — almost always a cantilever snap or a detent — has to engage with a margin that beats the force of the loaded spring, not the spring at rest. If the snap holds 2 N and the compressed spring pushes 2.5 N, the lid pops open on its own: the spring is actively prying the hook loose from the moment you latch it. Oversizing the snap to avoid that carries the opposite cost: it closes with slack and, far worse in a printed part, it keeps the hook pretensioned, which is a recipe for the plastic to creep (cold-flow) and for retention to relax over weeks. And there's no clean escape here: with the box closed, the hook by definition carries the spring's maximum force continuously, not a gentle bearing load. That's why relaxation will happen if you entrust retention to a pretensioned tab. The fix isn't to ask the hook not to be loaded — that's impossible here — but to let embedded hardware, a magnet, or a band hold the lid closed, and reserve the plastic for guiding, not for retaining under permanent load.

The two failure modes are spring fatigue and the latch not engaging. A spring printed as a flat spiral is appealing because you don't have to buy anything, but it's a cyclic flexure working at its limit every time you close the lid, and FDM adds its anisotropy: if the layers stack in the plane the spring flexes in, it can delaminate in very few cycles — how few depends on material and deflection: a brittle PLA flexed hard fails early; a lightly deflected, well-oriented PETG lasts thousands of cycles. That's why it almost always pays to embed hardware — a rubber band or a metal spring — where a printed part would fatigue, and reserve the plastic for geometry that only has to hold its shape, not survive cycles. If you insist on printing the spring, lay it flat so it flexes along the beads — the same reason Snap-fits that won't release gives for laying a cantilever flat: the flex must run along the weld between layers, never pull on it.

Secret box: clearance is the trick

A secret box lives and dies by its sliding clearances. The mechanism is a sequence: a panel that only moves once another has shifted aside, a detent that releases a slider, a false bottom that yields only after two or three moves in order. None of that carries load; it lives on fit precision. And the correct fit is a free slide, on the order of 0.10–0.15 mm per side so the sliders move smoothly with no perceptible play — the range detailed in Tolerances for moving parts — always remembering that this clearance is specified per side, not across the full width of the slot.

The clearance window has two edges, and overshooting either is a failure. Too much and the panels rattle: the clearance reveals where the part splits, the stops lose definition, and the secret is visible to the naked eye because a loose slot lets the sliding panel peek through. Too little and the box jams. And here FDM is treacherous: a printed hole or slot tends to come out narrower than its nominal dimension until you compensate for that bias, so a zero clearance on screen is already interference in the part. The good news is that your free-slide number, once calibrated on your printer, already absorbs that narrowing — you don't add it twice. The secret box is the purest example of why clearance is calibrated, not assumed: you need your measured number before you start, because the difference between "opens with a whisper" and "won't open" fits inside a tenth.

There's one failure mode the correct clearance doesn't solve on its own: adhesion between large flat faces. Two parallel panels with a lot of surface area, even with exactly the right gap, stick together through suction and stiction, and they take noticeable effort to break free from rest, which ruins the feel of a clean mechanism. The countermeasure is to reduce contact area: guide the slider with narrow rails or ribs instead of full flat faces, and add lead-in chamfers so the panel finds its track without snagging.

The stops that mark the end of each move are the other fine detail. They have to halt the slider dead and repeatably, because the sequence depends on each panel reaching exactly its unlock position. A stop with badly set clearance turns a deterministic mechanism into one that only sometimes opens, which is the worst thing that can happen to a puzzle.

Combination lock: indexing notches at the edge of nozzle resolution

The combination lock pushes indexing to the extreme. Each numbered disc seats in discrete positions thanks to a detent — a bump that drops into a series of notches and gives a click at each position — and each disc also has a gate, a notch in its inner perimeter. Only when all three or four discs turn to their correct number do all the gates line up in a single row and let the follower — a bar or a pair of tabs — pass through, which then releases the bolt. It's indexed retention — detents that stop each disc at its number — working alongside a follower that reads the combination. As long as a single gate is misaligned, its wall blocks the follower and the lock won't open.

The physical challenge is purely one of FDM print resolution. The detent notches and, above all, the gates are small features — on the order of one or two bead widths — and a 0.4 mm nozzle can't cleanly resolve a notch narrower than its own bead: it rounds it, fills it in, or lets the detent drop between two positions at once. If the notches come out soft, the discs don't give a clean click and the combination becomes fuzzy, with numbers that almost line up. And if the gate comes out narrower than its nominal — which is exactly what FDM does to any uncompensated slot — the follower won't enter even when it's perfectly aligned. Design the notches wide enough that your nozzle resolves them with clean walls, compute the follower's clearance against the gate as a free slide, and orient the discs so those fine features don't fall on overhangs.

There's one failure that isn't about manufacturing but about security, and it's the best known of these locks: decoding by feel. If you apply torque to the follower while turning each disc, the disc whose gate faces the follower offers a distinct resistance or click and gives away its digit one at a time, exactly like a cheap combination lock. With the large clearances FDM gives, this is trivial. If you want the lock to deserve the name, fine-tune the follower clearance so it doesn't "read" each disc separately, and add false gates or spacer discs to confuse anyone trying to decode by feel.

Vernier and spirograph: when precision is the mechanism

These two break the pattern: they have no force or retention to balance; their only mechanism is geometric accuracy. A vernier works by facing two scales of slightly different pitch against each other, so that the alignment of a mark on the moving scale with one on the fixed scale gives you the fraction of a millimeter. It's worth pinning down exactly what this relies on. If you print both scales on the same machine and the same orientation, a uniform scale error — say, an X axis 1% long — affects the fixed rule and the vernier equally, and the vernier principle, which reads which mark coincides and not an absolute length, survives that scaling: what is wrong in proportion is the rule's absolute scale, not the interpolation. The vernier does break when the two scales are printed with different anisotropy or backlash — one in X and the other in Y, or one rotated relative to the other — because then their pitches no longer scale alike and the coincidence stops falling where it should. Before printing one, calibrate the machine's pitches and keep both scales in the same orientation; the vernier is at once a good test of that calibration and ruthlessly exposed when it's missing.

The spirograph introduces real kinematics: an inner toothed wheel that rolls without slipping inside a ring, tracing a hypotrochoid — the hypocycloid case with the pen in a hole inside the disc — whose shape depends on the tooth ratio between wheel and ring. It's not an epicycloid: that's traced by a wheel rolling on the outside. Here the failure is one of meshing. If the play between teeth is too tight, the wheel binds against the ring and jams; if it's too generous, the wheel skips teeth mid-trace and the drawing is spoiled before you notice. The balance is the same backlash any pair of printed gears asks for: enough that they roll free after absorbing the tooth widening FDM causes, without so much that they lose the step. And the tooth ratio isn't cosmetic: it determines how many petals the figure has and whether the trace closes, so choose it by counting teeth, not by eye.

Marble run and windup: friction and torque dominate

A marble run and a windup mechanism seem worlds apart, but they share an enemy: friction. The marble run chains ramps, spirals, and lifters, and its whole success rests on the marble keeping enough energy to reach the end. Every change of direction, every rough wall, every too-shallow stretch robs it of speed; a ramp with ample theoretical slope still falls short once printed because the layer texture and the small steps between layers brake the ball. Here the rolling element rules: a standard glass or steel marble (16 mm) rolls far better than a small or printed sphere, because the effective rolling friction grows as the diameter shrinks and the printed surface is never as smooth as glass. Design with generous slope — on the order of 6° to 10° as a practical minimum for a glass ball on well-oriented FDM — wide radii of curvature so the marble doesn't slam into walls, and orient the tracks so the surface it rolls on comes out as smooth as possible: a ramp printed upward with layer steps brakes far more than a well-oriented flat face.

The windup is the most complete composite, because it's a whole energy chain. A spring — flat spiral or wound — stores energy when you tension it, and a gear train releases it, regulated by an escapement that releases it tooth by tooth so it doesn't empty all at once. Be careful not to confuse the escapement with a ratchet: a ratchet only prevents reverse rotation, it meters nothing, so a windup with a ratchet but no escapement always discharges in one go. The two failure modes pull in opposite directions, which is why they're so instructive: either the spring doesn't deliver enough torque to move the train — and then the friction of every mesh and axle adds up and eats the energy before it reaches the end — or the escapement doesn't hold and the spring discharges in one useless burst. You gain margin on both fronts with the same measure: reduce friction. Use generous axle clearances, but no play that lets the gears wander off-center; teeth with their correct backlash; and — again — embedded hardware where the plastic would fall short: a steel spring delivers a torque no printed spring matches, and a metal shaft in a printed bushing turns with a fraction of the friction of plastic on plastic. The escapement or ratchet, on the other hand, is worth printing in the correct orientation, because its retaining tooth works under repeated impacts and delaminates if its layers run across the tooth.

What each composite gadget inherits, and where the tuning lives
Gadget Subsystems it combines Critical interface Dominant failure mode
Spring box hinge + spring + latch snap retention vs. spring torque lid that pops open, or spring fatigue
Secret box sliders + detents + stops sliding clearance per side reveals the trick (loose), jams (tight), or sticks (large faces)
Combination lock indexed discs + gates + follower fine notches vs. nozzle resolution fuzzy click, follower that won't pass, or decoding by feel
Vernier two scales faced together same orientation and identical scaling false reading if the scales scale differently
Spirograph toothed wheel and ring backlash of the inner mesh binding or tooth skipping
Windup spring + train + escapement train friction vs. available torque won't start, or discharges all at once

The rule that ties them together: budget each clearance, don't inherit it

If you take away one idea, let it be this: a composite gadget inherits every failure mode of each subsystem it carries inside, and the object is no more reliable than its worst-calibrated interface. There's no single trick that saves them all; only the patient work of treating each moving interface separately and giving it its correct clearance — free slide for a slider, backlash for a gear, mounting clearance for a snap, interference for a press-fit shaft — remembering always that FDM closes holes, widens shafts, and thickens walls, so the nominal dimension is never the real dimension.

Three principles run through all of these objects. The first is to orient every flexure — spring, snap tab, ratchet tooth — in the plane of the layers, so it flexes along the beads and not pulling on the weld between them; it's the lesson of Layer orientation for motion, and in a gadget with several flexures it sometimes forces you to split the part so each one comes out well oriented. The second is not to ask the plastic for what it can't give: springs that deliver real torque, shafts that turn without wear, retentions that don't relax over the months — these are solved with embedded hardware — magnets, bearings, inserts, steel springs — where a printed part would fatigue or wear out, as detailed in Embedded hardware: magnets, bearings, and inserts. The third is to calibrate your printer once and reuse those numbers at every interface, because the difference between a gadget that works and a paperweight fits, like almost everything in this craft, inside a tenth of a millimeter.

If your gadget includes joints that fit between parts rather than move, the other half of composite objects is printed joinery: Printed joinery: dovetails and joints gives you the fixed unions that hold the rest of the mechanism together.