Draft preview. This model is still under review; read its limitations before using it.
Workshop/4 min exploration

Why does only the right key turn the lock?

Why does only the right key turn the lock?

A cylinder lock looks like a solid barrel. Inside it, two rows of pin segments sit above a plug that can only turn when every gap between them lines up at the same height. Change the key or how far you push it in, and watch whether the plug turns.

3D model

Explore the model and follow its moving parts.

Read the full explanation ↓
Drag to rotate · Scroll to zoom · Select a part

What to remember

The plug turns only while every pin stack has its gap on the shear line. One stack off by even a little is enough to lock it, and the key works by lifting segments that are not joined together.

What actually frees the plug to turn?

Follow the explanation

Back to the model ↑

How the parts work together

  1. Start with no key

    Springs push each stack down. Every driver pin crosses the shear line into the plug, so five pin stacks lock the plug. Try to turn it and nothing moves.

  2. Look at the shear line

    Switch to the section view. The dashed line marks the plug's outer surface, the boundary between the turning plug and the fixed body. That is the height the gaps have to reach.

  3. Push the key in part of the way

    Half in, no step is under its chamber yet, so the pins ride on the blade's flat body and still cross the shear line. Push it in a little further and each pin sits on the step that belongs to its neighbour, which is just as wrong.

  4. Seat the correct key

    Now every step is under its own chamber. Each key pin top meets the shear line exactly, and each driver pin sits entirely in the lock body. Nothing spans the boundary.

  5. Turn the plug

    This step switches to the whole lock: press Play and the plug turns, carrying the key with it. Come back to the section and notice that the key pins have travelled with the plug while the driver pins and springs stayed behind in the lock body. The two segments were never joined, and that separation is what let the plug pass. The section holds the plug at home on purpose, because once it turns the two rows no longer share a plane.

  6. Try the wrong key

    One land is the wrong height, so that stack's gap sits off the shear line and the plug will not turn, even though the other four stacks line up. With the short land the driver pin still reaches down into the plug; with the long land the key pin is pushed too far and intrudes into the lock body instead. Either way a segment spans the boundary.

The main parts

Lock body
The fixed housing. Its bores hold the driver pins and the springs, and its inner surface is the upper half of the shear line.
Plug
The cylinder that turns inside the lock body. Its pin chambers carry the key pins, and the keyway groove runs along it.
Driver pins
The upper segments. Springs push them down so they cross the shear line into the plug, which is what stops the plug turning.
Key pins
The lower segments, sitting in the plug. They are separate from the driver pins above them, so a raised driver pin stays behind in the body while the plug turns.
Springs
They press each stack down. Inserting the key pushes the stacks up, so the springs shorten.
Key
A blade whose top edge steps up under each chamber. The step heights decide how far each key pin rises.
Shear line
The boundary between the plug and the lock body. It is the only height at which a pin gap can let the plug turn.

One discovery leads to another.

MachinesInside an inline-sixMachinesWhy gears change everythingHuman bodyThe remarkable human ankleMechanicsHow ball bearings work