Redstonery › Circuits › Comparator clock
Clock circuit
Comparator clock
Use feedback to alternate a comparison result.
5 × 3 footprint1 layer9 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
A subtract comparator cancels its own output. A repeater restores the feedback to 15 so this is a digital high/low clock, not merely changing analog strength. The lamp averages short pulses; inspect the output wire.
- The comparator subtracts a returning side signal from its main input.
- The feedback path must let the useful output fall low again; a value changing between two positive strengths is not automatically an on/off clock.
Timing
Measured at the output: a period of 8 game ticks (0.40 s), 4 ticks high and 4 low, repeating for the 600 ticks the test watches.
Inputs and outputs
- Inputenable (x 0, y 0, z 0)
- Outputclock wire (x 2, y 0, z 0)
- Indicatordicator: short pulses overlap the lamp delay (x 4, y 0, z 0)
Blocks you need
4 × redstone dust, 2 × repeater, 1 × lever, 1 × comparator, 1 × redstone lamp.
Build it in the game: 9 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=true] setblock ~1 ~0 ~0 minecraft:comparator[facing=west,mode=subtract] setblock ~2 ~0 ~0 minecraft:redstone_wire setblock ~2 ~0 ~1 minecraft:redstone_wire setblock ~2 ~0 ~2 minecraft:redstone_wire setblock ~1 ~0 ~2 minecraft:redstone_wire setblock ~1 ~0 ~1 minecraft:repeater[facing=south,delay=1] setblock ~3 ~0 ~0 minecraft:repeater[facing=west,delay=1] setblock ~4 ~0 ~0 minecraft:redstone_lamp