REDSTONEPEDIA › Circuits › Pulse shapers
One pulse on every switch (dual-edge detector)
30-tick pulse · 29 blocks
Every time the input changes, on or off, the output gives one short pulse of 30 ticks (1.5 s).
starts after 6 ticks (0.3 s) · needs an input of at least 40 ticks (2 s) · fits in 5×2×6
Every size 12
The best design for each size: pick one to see it.
| size | blocks | numbers |
|---|---|---|
| 2 ticks (0.1 s) | 2 blocks | starts after 2 ticks (0.1 s) · needs an input of at least 2 ticks (0.1 s) |
| 4 ticks (0.2 s) | 4 blocks | starts after 6 ticks (0.3 s) · needs an input of at least 4 ticks (0.2 s) |
| 6 ticks (0.3 s) | 4 blocks | starts after 8 ticks (0.4 s) · needs an input of at least 8 ticks (0.4 s) |
| 8 ticks (0.4 s) | 4 blocks | starts after 10 ticks (0.5 s) · needs an input of at least 15 ticks (0.75 s) |
| 10 ticks (0.5 s) | 8 blocks | starts after 1 tick (0.05 s) · needs an input of at least 20 ticks (1 s) |
| 16 ticks (0.8 s) | 13 blocks | starts after 4 ticks (0.2 s) · needs an input of at least 30 ticks (1.5 s) |
| 18 ticks (0.9 s) | 22 blocks | starts after 6 ticks (0.3 s) · needs an input of at least 40 ticks (2 s) |
| 24 ticks (1.2 s) | 13 blocks | starts after 4 ticks (0.2 s) · needs an input of at least 60 ticks (3 s) |
| 30 ticks (1.5 s) (this page) | 29 blocks | starts after 6 ticks (0.3 s) · needs an input of at least 40 ticks (2 s) |
| 32 ticks (1.6 s) | 13 blocks | starts after 4 ticks (0.2 s) · needs an input of at least 60 ticks (3 s) |
| 34 ticks (1.7 s) | 27 blocks | starts after 6 ticks (0.3 s) · needs an input of at least 80 ticks (4 s) |
| 40 ticks (2 s) | 13 blocks | starts after 4 ticks (0.2 s) · needs an input of at least 80 ticks (4 s) |
Try it
Hold IN under the view for a long press, tap it for a short one: the box marked OUT turns red while the output is on. Press play under the view to watch a demo on a loop; touch any other control to take over.
How this design does it: One 30-tick pulse every time the input turns on and every time it turns off, for inputs held at least 2 seconds (40 ticks): pulse-dual-edge-reset's copper bulbs, observer and repeater loop with four blocks fewer; a fixed length, not an extendable family.
Build it
Download .litematic Download the design as text
The .litematic opens in Litematica (Minecraft 26.3): every block of the design in one region. The text file is the same build written as plain text, block by block.
Blocks used: comparator copper bulb observer redstone wire repeater stone
Details: how it works, measurements and properties
In depth
Every time the input changes (turns on or turns off), the output gives one short pulse of L = 30 ticks (1.5 s), 6 ticks (0.3 s) after the change. It handles every input pulse of 40 ticks (2 s) or longer.
Use it to react to any change of a lever, in both directions.
How to try it
Press play under the view to watch the demo on a loop (the badge reads demo with the step it is on; the same sequence is drawn as a timing diagram below). Touch any control to stop it and try the circuit yourself.
To try it: press and hold the IN button of the bar (or the cell tagged IN) to power that input; a quick tap sends a short 2-tick pulse.
Inputs are tagged in lime; the output is tagged OUT: the orange glass marker next to it glows while the output is on (the output strip by the demo badge shows its last 40 game ticks, 2 seconds). Drag to look around, pinch or scroll to zoom, step one game tick at a time with the step button.
Inputs and output over time
The input follows this schedule (the 3D view's demo plays the same). Lime: an input is on; orange: the output is on (taller = a stronger signal, 1 to 15). Time runs left to right in game ticks (20 ticks = 1 s).
Swipe the diagram sideways: the whole sequence lasts 2125 ticks (1 min 46.25 s).
Step by step (15 lines)
in 2 ticks (0.1 s): +6 for 30 <- not handled in 3 ticks (0.15 s): +6 for 30 <- not handled in 4 ticks (0.2 s): +6 for 30 <- not handled in 5 ticks (0.25 s): +6 for 5, +36 for 30 <- not handled in 6 ticks (0.3 s): +6 for 6, +36 for 30 <- not handled in 8 ticks (0.4 s): +6 for 8, +36 for 30 <- not handled in 10 ticks (0.5 s): +6 for 10, +36 for 30 <- not handled in 15 ticks (0.75 s): +6 for 15, +36 for 30 <- not handled in 20 ticks (1 s): +6 for 20, +36 for 30 <- not handled in 30 ticks (1.5 s): +6 for 30 <- not handled in 40 ticks (2 s): +6 for 30, +46 for 30 in 60 ticks (3 s): +6 for 30, +66 for 30 in 80 ticks (4 s): +6 for 30, +86 for 30 in 120 ticks (6 s): +6 for 30, +126 for 30 in 160 ticks (8 s): +6 for 30, +166 for 30
Measurements
| metric | value | what it means |
|---|---|---|
| L | 30 ticks (1.5 s) | the length of the output pulse |
| delay | 6 ticks (0.3 s) | the time from the input's edge to the start of the output pulse |
| min-pulse | 40 ticks (2 s) | the shortest input pulse handled correctly (every longer one works too) |
Notes from its designer
One 30-tick pulse every time the input turns on and every time it turns off, for inputs held at least 2 seconds (40 ticks): pulse-dual-edge-reset's copper bulbs, observer and repeater loop with four blocks fewer; a fixed length, not an extendable family.
Properties
| Study | Pulse shapers |
|---|---|
| Kind | One pulse on every switch (dual-edge detector) |
| Blocks placed | 29 (not counting the input levers or buttons the view adds) |
| Box | 5×2×6 (60 blocks of space) |
| Made of (the blocks that change state) | comparator, copper bulb, observer, redstone wire, repeater |
| Inputs / outputs | IN (repeater) / OUT |
| Design file | pulse-dual-edge-reset-v60-29b-0 |
The design file
Design file (34 lines)
# One pulse on every switch: 30-tick pulse · 29 blocks # https://vjeux.github.io/redstonepedia/circuits/pulse/pulse-dual-edge-reset-v60-29b-0.html name: pulse-dual-edge-reset-v60-29b-0 circuit: dual-edge port input: 2 1 3 port output: 3 1 0 origin: 0 0 -3 palette: A minecraft:repeater[delay=4,facing=north,locked=false,powered=false] B minecraft:repeater[delay=4,facing=south,locked=false,powered=false] C minecraft:comparator[facing=north,mode=compare,powered=false] O minecraft:observer[facing=south,powered=false] R minecraft:redstone_wire S minecraft:stone W minecraft:waxed_copper_bulb[lit=false,powered=false] c minecraft:comparator[facing=west,mode=compare,powered=false] o minecraft:observer[facing=west,powered=false] r minecraft:repeater[delay=1,facing=south,locked=false,powered=false] layer 0: SSOSS S...S ....S S..SS ..S . . layer 1: RRRRR A...B W...B CoWcR ..r ..O ..W