Redstone circuits/Pulse

Here we have several groups of circuits with related purposes. They all produce an output pulse in response to a rising or falling edge, but they have different emphases and tradeoffs. In rough order of pulse length, they include Edge Detectors, Pulse Generators, and Monostable Circuits.

Pulse Limiters
Design A and C can create 1 tick pulses, but design B can create a minimum of a 2 tick pulse.

A pulse limiter limits the length of a pulse. It is useful in sequential bit activation to prevent multiple bits from being activated by the same pulse.

Design A limits "off" pulses in a circuit that's expected to be "on" (both input and output). It can create pulses of any length down to 1 tick. When the input turns off the circuit generates an off-pulse of length equal to whichever is shorter: the input pulse, or the delay of the right repeater minus the delay of the left repeater, plus the delay of the torch. (Make sure that this yields a positive value!) or the length of the initial pulse, whichever is shorter. For example: in the picture, the pulse is calculated as .4 + .1 - .1 = .4 or four ticks, assuming the activation pulse is >= 3 ticks. Be aware of the North/South quirk, as this can affect the delay of the torch. When the input is turned back on, the limiter will not emit a second pulse.

Design B limits "on" pulses in a circuit that's normally "off". It can produce pulses of 2 or 3 ticks long (2 less than the repeater delay). The repeater must be set to at least a 3 tick delay, or the signal will not be sent.

Design C uses pistons instead of torches, allowing it to produce "on" pulses as short as 1 tick. When the input turns on, a signal will pass through until the piston activates and breaks the circuit. For a longer pulse, repeaters can be added to the upper branch.

Pulse Sustainer
A pulse sustainer is used to lengthen the duration of a pulse type input (such as a button or pressure plate). Here we have two specialized examples, each with its own weakness.

In design A, the pulse input uses a piston to unblock the redstone torch's circuit. After the signal is delayed by the Redstone repeaters, the circuit is closed once again via the other piston. Note that these are regular pistons, not sticky ones. The output signal can be taken from anywhere along the Redstone repeater circuit segment.

Design B is a potentially more compact approach without pistons.

Both of these circuits must be used with caution. In design A, if the input pulse lasts long enough for the second piston to activate before the first has retracted, it will become stuck in the "on" state until fixed manually. Design B has the opposite problem: if the input turns off before the pulse has reached the last repeater, two separate pulses will be sent on the output instead of a single, longer one. A monostable circuit may be a safer solution.

Detecting Pulse Length
Sometimes it is useful to be able to detect the length of an pulse generated by another circuit, and specifically whether it is longer or shorter than a given value. This has many uses, such as special combination locks (where you have to hold down the button), or detecting Morse code.

To test for a long pulse, we use an AND gate with Redstone repeaters attached. These will only allow the signal to pass through if it has a signal length longer than the delay of the repeaters.

This short pulse detector uses, not including input and output wiring, a space of 3x4x2. The repeater T is the timing control. Any signal from input that is less than the T+1 ticks in length will pass through, giving a possible range of 2 to 5 ticks. Any signal that makes it through will not change in tick length, so pulse sustainers or monostable circuits may be required on very short pulses.