For security purposes, most doors are equipped with one of two types of door lock mechanisms: deadbolt locks, and simple locks found inside the doorknob. The doorknob lock, which we all come in contact with on a regular basis, is more complex than you might think. A series of pins and springs work together with the key to unlock the door. These pins and springs are housed in a small cylinder which runs through the center of the doorknob. The most commonly used design in doorknob locks is the pin-and-tumbler design. When the door is unlocked, the cylinder is effectively released from its casing and is given the freedom to rotate. When the door is locked, pins are protruding from the cyclinder into grooves in the casing, keeping the cylinder in place and the door locked.
The Pin-and-Tumbler Mechanism
Inside the cylinder is a series of small pins of varying length. Normal doorknob locks have five pairs of pins which interact with a single key to lock or unlock the door. The pins are placed in pairs with one on top of the other. Each pair rests in a shaft which is drilled through the cylinder and the housing around the cylinder. Springs at the top of the shaft keep the pins in place.
When there is no key inserted, the lower pins are all inside the cylinder, and half of the upper pins rest in the cylinder and half in the housing. These upper pins keep the cylinder from turning.
The Role of the Key
When a key is inserted, the notches on the key push the pin pairs upwards. If the incorrect key is inserted, parts of the pins will still rest in between the cylinder and the housing, not allowing the cylinder to move. The correct key for a lock is designed in such a way that, when inserted, will push all the pin pairs just enough so that the point of contact between the pins in each pair aligns with the point of contact of the cylinder and the housing.
That is, the upper pin rests completely inside the housing, and the lower pin rests completely inside the cylinder. This clears the shear line, which is the line that connects the cylinder to the housing, and gives the cylinder the freedom to rotate. The door can be locked or unlocked through this motion of the cylinder.
The Locking Mechanism
The cylinder is attached to a part called a cam, which rotates with the cylinder. When the correct key rotates the cylinder, the cam releases a spring which shoots a part called the tang forward into the wall, locking the door. To unlock the door, the process must be reversed. Door knobs are usually are equipped with a button on the inside which, when pressed, will trigger the spring and lock the door.
To minimize the need to use a key to leave your home, these locks are designed so you can turn the doorknobs to unlock the door from the inside. However, a key is still required to open the door from the outside.