Mechanism for Deg. Rotation

Input: green shaft of a chamfered lever rotating continuously.
Output: one tooth blue ratchet wheel that quickly turns 90 deg. and then stops. One revolution of the input corresponds one revolution of the output.
The green lever pulls the wheel via blue spring.