Ratchet Mechanism

Input: blue cam.
Output: pink ratchet wheel rotating interruptedly with long dwells.
Both go and back motions of yellow ocsillating pawl make the wheel rotate in the same direction (one tooth).
The pawl keeps the ratchet wheel immobile during its dwells.
Red spring maintains contact between the pawl and the cam.