There are certain mechanisms that we want to remain
locked once they have stopped—for example, a winch on
a crane or a rail-crossing barrier. If such mechanisms are
motorized, a stopped motor will keep them stopped, but
only until the load on the mechanism overcomes the motor’s
resistance and starts to drive it backward. This scenario is
likely in the case of a heavy load, such as what a crane might
carry.
One way to lock a mechanism completely is by using a
worm gear (discussed in Chapter 5), but a worm gear reduces
your speed dramatically and lacks the ability to unlock a
mechanism. One better alternative is using a ratchet.
A LEGO ratchet has two elements: a freely spinning gear
and a pawl, the small lever that stops the gear from spinning
(see Figure 8-7). The pawl allows a gear to rotate in one
direction but blocks it instantly when it starts to rotate in
the opposite direction.