Redstonery
RedstoneryCircuits › Two-hopper piston clock
Clock circuit

Two-hopper piston clock

Create a repeating interval from alternating item transfer.

8 × 4 footprint2 layers20 blocksTested in 4 rotationsJava Edition 26.2
Open in the simulatorBuild it in the game

Layout

Layer 0 (on the floor)
hopper [facing=east] at x 3, z 0hopper [facing=west] at x 4, z 0comparator [facing=east, mode=compare] at x 2, z 0comparator [facing=west, mode=compare] at x 5, z 0stone at x 1, z 0stone at x 6, z 0stone at x 0, z 0stone at x 7, z 0lever [face=floor, facing=north, powered=false] at x 3, z 3redstone dust at x 3, z 2redstone dust at x 4, z 2repeater [facing=south, delay=1] at x 3, z 1repeater [facing=south, delay=1] at x 4, z 1
Layer 1 (1 up)
redstone dust at x 1, z 0redstone dust at x 0, z 0redstone dust at x 6, z 0redstone dust at x 7, z 0sticky piston [facing=east] at x 2, z 0sticky piston [facing=west] at x 5, z 0redstone block at x 3, z 0
redstone dustrepeater or comparatorinputhopper, dropper or dispenserpistonredstone blocksolid blockarrows point where a device sends its output; north is up

How it works

Two opposing hoppers exchange four items while a movable redstone block locks one hopper at a time. The pistons change ends when a hopper empties. Pause locks both hoppers; releasing it resumes the transfer. Reset restores four items. Changing the item count changes the timing and needs a new period measurement. With four items, the occupancy output repeats every 52 game ticks: strength 1 for 50 ticks and 0 for 2. It is a narrow empty-hopper marker, not a symmetric square wave.

  1. Two opposing hoppers exchange four items while a movable redstone block locks one hopper at a time.
  2. Comparator readings drive the pistons to exchange the locked side. The Pause lever locks both hoppers; releasing it resumes the process.

Timing

Measured at the output: a period of 52 game ticks (2.60 s), 50 ticks high and 2 low, repeating for the 600 ticks the test watches.

Inputs and outputs

  • InputPause (x 4, y 0, z 3)
  • Inputtimer items (4 initially) (x 4, y 0, z 0)
  • Outputleft hopper occupancy signal (x 2, y 1, z 0)

Blocks you need

6 × redstone dust, 4 × stone, 2 × hopper, 2 × comparator, 2 × sticky piston, 2 × repeater, 1 × redstone block, 1 × lever.

Build it in the game: 21 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 ~4 ~0 ~0 minecraft:hopper[facing=east]
setblock ~5 ~0 ~0 minecraft:hopper[facing=west]
setblock ~3 ~0 ~0 minecraft:comparator[facing=east,mode=compare]
setblock ~6 ~0 ~0 minecraft:comparator[facing=west,mode=compare]
setblock ~2 ~0 ~0 minecraft:stone
setblock ~7 ~0 ~0 minecraft:stone
setblock ~2 ~1 ~0 minecraft:redstone_wire
setblock ~1 ~0 ~0 minecraft:stone
setblock ~1 ~1 ~0 minecraft:redstone_wire
setblock ~7 ~1 ~0 minecraft:redstone_wire
setblock ~8 ~0 ~0 minecraft:stone
setblock ~8 ~1 ~0 minecraft:redstone_wire
setblock ~3 ~1 ~0 minecraft:sticky_piston[facing=east]
setblock ~6 ~1 ~0 minecraft:sticky_piston[facing=west]
setblock ~4 ~1 ~0 minecraft:redstone_block
setblock ~4 ~0 ~3 minecraft:lever[face=floor,facing=north,powered=false]
setblock ~4 ~0 ~2 minecraft:redstone_wire
setblock ~5 ~0 ~2 minecraft:redstone_wire
setblock ~4 ~0 ~1 minecraft:repeater[facing=south,delay=1]
setblock ~5 ~0 ~1 minecraft:repeater[facing=south,delay=1]
item replace block ~4 ~0 ~0 container.0 with minecraft:stone 4