Redstonery › Circuits › Rising-edge detector
Pulse circuit
Rising-edge detector
Produce an event only when an input becomes active.
6 × 3 footprint1 layer11 blocksTested in 4 rotationsJava Edition 26.2
Layout
redstone dustrepeater or comparatorinputlamparrows point where a device sends its output; north is up
How it works
The comparator subtracts two differently delayed copies of the input. A rising edge makes a 4-game-tick raw output pulse; holding the input produces no further pulses. Wait 20 game ticks between input changes. The lamp remains visible four game ticks after the wire turns off.
- A subtract comparator compares two copies of the input with different repeater delays.
- On a rising edge, the main input arrives before the cancellation input, creating a four-game-tick raw pulse. Returning off prepares the next event.
Timing
Measured at the output: a pulse of 4 game ticks (0.20 s) per event.
Inputs and outputs
- Inputlever (x 0, y 0, z 0)
- Outputraw pulse (x 4, y 0, z 0)
- Indicatordicator: lamp (x 5, y 0, z 0)
Blocks you need
5 × redstone dust, 3 × repeater, 1 × lever, 1 × comparator, 1 × redstone lamp.
Build it in the game: 11 commands
Relative to where you stand, with x running east and z running south. Paste one line at a time into chat, or into a chain of command blocks. The block art is the game's own; the layout is what the page above shows.
setblock ~0 ~0 ~0 minecraft:lever[face=floor,facing=north,powered=false] setblock ~1 ~0 ~0 minecraft:redstone_wire setblock ~2 ~0 ~0 minecraft:repeater[facing=west,delay=1] setblock ~3 ~0 ~0 minecraft:comparator[facing=west,mode=subtract] setblock ~4 ~0 ~0 minecraft:redstone_wire setblock ~5 ~0 ~0 minecraft:redstone_lamp setblock ~1 ~0 ~1 minecraft:redstone_wire setblock ~1 ~0 ~2 minecraft:redstone_wire setblock ~2 ~0 ~2 minecraft:repeater[facing=west,delay=2] setblock ~3 ~0 ~2 minecraft:redstone_wire setblock ~3 ~0 ~1 minecraft:repeater[facing=south,delay=1]