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. In later sections, we have circuits designed specifically to lengthen or shorten pulses, or pass pulses according to a minimum or maximum length.

Pulse Generators
A Pulse Generator creates a pulse output when the input changes. A pulse generator is required to clock flip-flops without a built-in edge trigger if the clock signal will be active for more than a moment (i.e., excluding Stone Buttons). This is an integral part of a T flip-flop, as it prevents the flip-flop changing more than once in a single operation.

Design A will create a short pulse when the input turns off. By inverting the input as shown in B, the output will pulse when the input turns on. The length of the pulse can be increased by adjusting the repeater, or even adding a second repeater on the side loop.

Designs A and B can be put together in parallel to report both the input's turning on, and off, as separate outputs. These can then be read to show when the input changes, regardless of its state.

Design C is the same as B, but in a vertical orientation.

Design D responds both when the input turns off and when it turns on ("dual-edge"). It produces a six tick pulse, and requires approximately double the space required by design C, not to mention many more repeaters.

Design E was noted as "fixed for 1.5". All repeaters are required, and it can go up to an 8-tick pulse.

Monostable Circuits
A monostable circuit sends an output pulse of determined length when triggered by an input pulse. Another way to describe it is as a device which turns itself off a specific time after it has been activated. They can be triggered by either a rising or falling edge of a pulse or both. The term monostable refers to the fact that only one state of the circuit is stable, while the unstable state reverts to the stable state after a set period (a bistable circuit is a latch). As a pulse will often lose duration as it passes through complex circuitry, monostable circuits are useful for re-lengthening the duration; the output always lasts the same amount of time, regardless of input duration.

Design A consists of an RS NOR latch with a delay hooked up to its reset. The trigger input activates the latch's SET input, and after a delay set by the repeaters, the RESET activates, turning the output off again. The delay (how long the output is high) can be made as long as desired, by adding more repeaters, or even a long-period timer such as a water clock.

Design B is a more compact version that fits into a (3x2x3) space. However, as shown, it produces a very short pulse (1 or 2 ticks). The duration is 2 less than the repeater delay, and said delay must be set to 3 or 4 for the circuit to work. Repeaters can be added to lengthen the output pulse, at the cost of increasing the size.

Alternatively, design C, a (7x2x1) vertical device can be built to fit neatly against/into a wall. As in the other cases, the length of time that the output is high can be adjusted by adding or removing repeaters. This design lacks the RS NOR latch of other designs and will only be useful in constant-input circuits. For momentary circuits, this design will not lengthen an input signal like the other designs, just cut the signal early.

A compact yet simple 2x1xn device, can also be built if you're constricted to long hallways with little room for width. However, due to the design, this only works with pulsed inputs and not with constant-input circuits. Unlike the previous designs, however, it can deal with 1-tick pulses.

Design D1 shows the basic device, which lengthens the incoming pulse by the delay on the second repeater. Pulses can be lengthened more by adding repeaters and/or increasing their delay, as in D2. Unfortunately, this version only works properly if the incoming pulse is at least two ticks long. Design D3 shows how to allow for 1-tick input pulses, at the cost of increasing the size to 3 wide. For all three variations, the number of ticks to lengthen the pulse by is equal to the sum of the delays on the repeaters not including the first one at the input. The dots by D2 and D3 indicate the repeating units to extend further.

Pulse limiter
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. Designs A and C can create 1 tick pulses, but design B can create a minimum of a 2 tick pulse.

Design A 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 B 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 1 tick for the torch. (Make sure that this yields a positive value!). For example: in the picture, the pulse is calculated as 4-1+1 = 4 or four ticks, assuming the activation pulse is at least that long. 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 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 extender
A pulse extender (aka "pulse sustainer", "pulse lengthener") increases the duration of a pulse.

For pulses shorter than a second or two, use a repeater or a repeater line pulse extender. For pulses longer a few seconds, a dropper-latch pulse extender will usually be the best choice (it's relatively small and silent).


 * Redstone Repeater


 * 1×1×2, 1-wide, flat, silent
 * circuit delay: 1 to 4 ticks, output pulse: 1 to 4 ticks


 * For any input pulse shorter than its delay, a redstone repeater will increase the duration of the pulse to match its delay. For example, a 3-tick repeater will turn a 1-tick pulse or a 2-tick pulse into a 3-tick pulse.


 * Additional repeaters will only delay the pulse, not extend it (but see repeater line pulse extender below).


 * Repeater Line Pulse Extender


 * 2×N×2, flat, silent
 * circuit delay: 0 ticks, output pulse: 1 to 4 ticks per repeater


 * The input must be a pulse at least as long as the longest-delay repeater in the line (usually 4 ticks). If not, add a repeater before the circuit to extend the initial pulse.


 * Dropper-Latch Pulse Extender


 * 2×6×2 (24 block volume), flat, silent
 * circuit delay: 5 ticks, output pulse: 5 ticks to 256 seconds


 * Each item in the middle hopper adds 8 ticks (0.8 seconds) to the output pulse. The output pulse can be fine-tuned by increasing the delay on the 1-tick repeater by up to 3 ticks, decreasing the delay on the 4-tick repeater by up to 3 ticks, or by replacing the 4-tick repeater with a block to decrease the delay by 4 ticks (these adjustments affect the total pulse duration, not per item, allowing pulse durations of any tick amount from 5 ticks to 256 seconds).


 * Hopper-Clock Pulse Extender


 * A hopper-clock pulse extender is a hopper clock with one of the sticky pistons replaced with a regular piston so that it won't pull the block of redstone back, but instead wait for the input to trigger a new clock cycle.


 * A hopper-clock pulse extender with a single item in its hoppers produces a 4-tick output pulse. Each additional item adds 8 ticks to the output pulse (unlike the dropper-latch pulse extender, the output of a hopper-clock pulse extender can only be adjusted in 8-tick increments).


 * While waiting for the input to turn on, the sticky piston is actually in a state where it is powered but doesn't know it (like a stuck-piston BUD circuit) until "woken up" by the input changing its power level. This will only work as long as the input power level is different than the resting output of the powered comparator (unintuitively, it will even work if the input power level is less than the comparator output). In addition, any other block update or nearby redstone update can trigger the powered sticky piston, so care should be taken to keep other circuit activity away from the sticky piston.


 * Earliest Known Publication: 4 May 2013




 * SR Latch Pulse Extender


 * An sr latch pulse extender works by setting the output on with a latch, then resetting the latch after some delay.


 * Both of the circuits below use a trick to double the delay produced by the repeaters, by first powering the output from the latch, then from the repeaters. This means that any 1-tick adjustment to the repeater loop will produce a 2-tick adjustment in the output pulse.



Pulse length detector
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 (F). These will only allow the signal to pass through if it has a signal length longer than the delay of the repeaters. Design G does the same with a piston AND gate. Note that a pulse that does get through will be shortened by the delay amount, possibly down to 1 tick!

The short pulse detector H uses, not including input and output wiring, a space of 3x4x3. The repeater D is the timing control. Any signal from input that is less than the D+1 ticks in length will pass through, giving a range of 2 to 5 ticks for the filter. Any signal that makes it through will not change in length.

Edge detector
An edge detector outputs a pulse when it detects a specific change in its input.


 * A rising edge detector outputs a pulse when the input turns on.
 * A falling edge detector outputs a pulse when the input turns off.
 * A dual edge detector outputs a pulse when the input changes.

An inverted edge detector is usually on, but outputs an off-pulse (it turns off, then back on again) when it detects a specific change in its input.


 * An inverted rising edge detector outputs an off-pulse when the input turns on.
 * An inverted falling edge detector outputs an off-pulse when the input turns off.
 * An inverted dual edge detector outputs an off-pulse when the input changes.

Rising edge detector
A rising edge detector outputs a pulse when its input turns on (the rising edge of the input).

Any rising edge detector can also be used as a pulse limiter, or (with a player-activated power component) as a pulse generator.


 * Circuit Breaker


 * 1&times;3&times;3 (9 block volume), 1-wide
 * circuit delay: 1 tick, output pulse: 0.5 ticks


 * The circuit breaker is the most commonly used rising edge detector due to its small size and adjustable output.


 * Variations: The output repeater may be set to any delay, which will also lengthen the output pulse to equal the delay. When oriented north-south, the output repeater may be replaced by any mechanism component, causing the mechanism component to receive a 0.5-tick activation pulse.


 * Dust-Cut Rising Edge Detector
 * features vary (see schematics)


 * A dust-cut rising edge detector works by moving a block so that it cuts the output dust line after only one tick.


 * Because of the output's fractional length, a 1-tick repeater may be needed to force a sticky piston to drop its block.




 * Subtraction Rising Edge Detector
 * features vary (see schematics)


 * A subtraction rising edge detector works by using the subtraction mode of a redstone comparator to shut off the output pulse.


 * Variations: Remove the final block and dust to increase the output pulse to 2 ticks.


 * Earliest Known Publication: 7 January 2013 (basic concept) and 3 May 2013 (1-tick output refinement)




 * Locked-Repeater Rising Edge Detector
 * features vary (see schematics)


 * Uses repeater locking to shut pulses off after 1 tick.


 * Variations: If the input doesn't have to be at the same height as the output, you can move the torch so that it's attached to the top of the block it's currently above, and run the input into that block.




 * Dropper-Hopper Rising Edge Detector


 * 1&times;4&times;2 (8 block volume), 1-wide, silent
 * circuit delay: 3 ticks, output pulse: 3.5 ticks


 * When the input turns on, the dropper pushes an item into the hopper, activating the comparator until the hopper pushes the item back.


 * The initial block is required to activate the dropper without powering it (which would deactivate the adjacent hopper, preventing it from returning the item to turn off the output pulse).


 * Because the output comes from a comparator used as an inventory counter, the output power level will only be 1 (with a stackable item) or 3 (with a non-stackable item) -- add a repeater for a higher power level output.


 * Variations: You can reduce the size of the circuit by putting the hopper on top of the dropper.


 * Moved-Block Rising Edge Detector
 * features vary (see schematics)


 * Uses the same principle as the circuit breaker -- power the output through a block, then remove the block to keep the output pulse short.


 * Earliest Known Publication: 14 March 2013 and 29 March 2013




 * NOR-Gate Rising Edge Detector
 * features vary (see schematics)


 * A NOR-gate rising edge detector compares the current power to the power from 2 ticks ago -- if the current power is on and the previous power was off, the output torch flashes on briefly.


 * All of these designs use a trick to limit the output pulse to a single tick. A redstone torch cannot be activated by a 1-tick pulse from exterior sources, but a torch activated by a 2-tick exterior pulse can short-circuit itself into a 1-tick pulse. Remove the block over an output torch to increase the output pulse to 2 ticks.



Falling edge detector
A falling edge detector outputs a pulse when its input turns off (the falling edge of the input).


 * Dust-Cut Falling Edge Detector


 * 1&times;4&times;3 (12 block volume), 1-wide
 * circuit delay: 0 ticks, output pulse: 2 ticks


 * When the input turns off, the piston immediately retracts the block, allowing the still-powered repeater to output a signal for 2 ticks. When the input turns on again, the piston cuts the connection before the signal can get through the repeater.


 * Moved-Block Falling Edge Detector


 * 1&times;3&times;3 (9 block volume), 1-wide
 * circuit delay: 1.5 ticks, output pulse: 0.5 ticks


 * For some directions and input methods, the repeater may be needed to be set to 3 ticks to operate mechanism components.


 * Earliest Known Publication: 27 May 2013


 * Locked-Hopper Falling Edge Detector


 * 1&times;4&times;2 (8 block volume), 1-wide, silent
 * circuit delay: 1 tick, output pulse: 4 ticks


 * When the input turns off, it takes 1 tick for the torch to turn back on, giving hopper A a chance to push its item to the right and activate the output.


 * This circuit requires time to reset (to push the item back into hopper A), so the fastest input clock it can handle is a 4-clock.


 * Because the output comes from a comparator used as an inventory counter, the output power level will only be 1 (with a stackable item) or 3 (with a non-stackable item) -- add a repeater for a higher power level output.


 * Earliest Known Publication: 22 May 2013


 * Locked-Repeater Falling Edge Detector
 * 2&times;3&times;2 (12 block volume), flat, silent
 * circuit delay: 2 ticks, output pulse: 1 tick


 * When the input turns on, the output repeater is locked before it can be powered by the block behind it. When the input turns off, the output repeater is unlocked and is briefly powered by the block behind it, producing a 1-tick output pulse.


 * Variations: Increase the delay on the output repeater to increase the output pulse length (up to 4 ticks), but also the circuit delay.




 * NOR-Gate Falling Edge Detector
 * features vary (see schematics below)


 * A NOR-gate falling edge detector compares the current power to the power from 2 ticks ago -- if the current power is off and the previous power was on, the output torch flashes on briefly.


 * All of these designs use a trick to limit the output pulse to a single tick. A redstone torch cannot be activated by a 1-tick pulse from exterior sources, but a torch activated by a 2-tick exterior pulse can short-circuit itself into a 1-tick pulse. Remove the block over an output torch to increase the output pulse to 2 ticks.



Dual edge detector
A dual edge detector outputs a pulse when its input changes (at either the rising edge or the falling edge of the input).


 * Moving-Block Dual Edge Detector


 * 1&times;4&times;3 (12 block volume), 1-wide
 * circuit delay: 1 tick, output pulse: 1 tick


 * The block of redstone moves when the signal turns on and when it turns off. While it is moving it cannot power the dust below it, so the output torch turns on until the block of redstone stops moving. The block over the output torch short-circuits it into a 1-tick pulse -- remove the block and take the output directly from the torch to increase the output pulse to 1.5 ticks.


 * Variations: To get an output on the same side as the input, the torch can be placed on the other side of the bottom blocks (but without the block above it, which would clock the piston). The piston and block of redstone can be moved to the side of the dust, rather than on top of the dust, producing a shorter but wider circuit.


 * Earliest Known Publication: 28 January 2013


 * Dust-Cut Dual Edge Detector
 * features vary (see schematics)


 * The simple version splits the difference between a rising edge detector and a falling edge detector to produce an output of 1 tick on each edge. The instant version adds an unrepeated rising edge detector to reduce the rising edge circuit delay to 0 ticks.




 * Locked-Repeater Dual Edge Detector
 * features vary (see schematics)


 * A locked-repeater dual edge detector uses the timing of repeater locking to detect signal edges.


 * The nor-gate design uses a trick to limit the output pulse to a single tick. A redstone torch cannot be activated by a 1-tick pulse from exterior sources, but a torch activated by a 2-tick exterior pulse can short-circuit itself into a 1-tick pulse. Remove the block over the output torch (and the dust on the block it's attached to) to increase the output pulse to 3 ticks.


 * Earliest Known Publication: 16 April 2013 (NOR-gate locked-repeater FED) and 1 May 2013 (OR-gate locked-repeater FED)



Inverted rising edge detector
An inverted rising edge detector is a circuit whose output is usually on, but which outputs an off-pulse on the input's rising edge.


 * OR-Gate Inverted Rising Edge Detector
 * 1&times;3&times;3 (9 block volume), 1-wide, silent
 * circuit delay: 1 tick, output pulse: 1 to 3 ticks (off-pulse)


 * An OR-gate inverted rising edge detector compares the current and previous input -- if the current input is on and the previous input was off, the output turns off for a brief period.


 * Earliest Known Publication: 1 June 2013


 * Moving-Block Inverted Rising Edge Detector
 * 1&times;4&times;3 (12 block volume), 1-wide, instant
 * circuit delay: 0 ticks, output pulse: 1.5 ticks (off-pulse)


 * This is a moving-block inverted dual edge detector with a repeater added to suppress the output on the falling edge.

Inverted falling edge detector
An inverted falling edge detector (IFED) is a circuit whose output is usually on, but which outputs an off-pulse on the input's falling edge.


 * OR-Gate Inverted Falling Edge Detector
 * features vary (see schematics below)


 * The input has two paths to the output, timed so that the output will blink off briefly when the input turns off.


 * Moved-Block Inverted Falling Edge Detector
 * 1&times;4&times;2 (8 block volume), 1-wide, instant
 * circuit delay: 0 ticks, output pulse: 2.5 ticks (off-pulse)


 * Earliest Known Publication: 4 June 2013


 * Locked-Repeater Inverted Falling Edge Detector
 * 2&times;3&times;2 (12 block volume), flat, silent
 * circuit delay: 2 ticks, output pulse: 1 tick (off-pulse)


 * When the input turns on, the output repeater is locked before it can turn off. When the input turns off, the output repeater is unlocked and is briefly un-powered by the block behind it, producing a 1-tick output off-pulse.

Inverted dual edge detector
An inverted dual edge detector is a circuit whose output is usually on, but which outputs an off-pulse when its input changes.


 * Moving-Block Inverted Dual Edge Detector


 * 1&times;3&times;3 (9 block volume), 1-wide, instant
 * circuit delay: 0 ticks, output pulse: 1.5 ticks (off-pulse)


 * Variations: The piston and block of redstone can be moved to the side of the dust, rather than on top of the dust, producing a flat 2-wide circuit.


 * OR-Gate Inverted Dual Edge Detector
 * 3&times;4&times;2 (24 block volume), flat, silent
 * circuit delay: 2 ticks, output pulse: 3 ticks (off-pulse)


 * Uses the timing of repeater locking to detect pulse edges.