Redstone circuits/Clock

Clock generators are devices where the output is toggling on/off constantly. The simplest stable clock generator is the 5-clock (designs B and C). Using this method, 1-clocks and 3-clocks are possible to make but they will "burn out" because of their speed, which makes them unstable. Redundancy can be used to maintain a 1-clock, even as the torches burn out; the result is the so-called "Rapid Pulser" (designs A and F). Slower clocks are made by making the chain of inverters longer (designs B'  and C'  show how such an extension process can be achieved). or, you could just use a repeater set to 3 or 4.

Using a different method, a 4-clock can be made (design D). A 4-clock is the fastest clock which will not overload the torches.

A 4-clock with a regular on/off pulse width is also possible as seen in design E. This design uses five torches, but can be constructed so that it has a pulse width of 4 ticks by employing the North/South Quirk. It is important that the orientation of this design (or at least the portion containing the stacked torches) be along the north/south axis.

The customary name x-clock is derived from half of the period length, which is also usually the pulse width. For example, design B (a 5-clock) will produce the sequence  on the output.

Designs F and G are examples of possible vertical configurations.

Design H is an unusual, stable 1-tick piston clock. For it to work, the block the piston moves must be placed last. The piston will extend and retract very quickly. The output wire appears to stay off because it's changing state faster than the game visually updates. Attaching a piston or other device to the output will show that it is working.

Repeater Clock
With the addition of Redstone Repeaters in the Beta 1.3 update, clock generators can be simplified to a single block, one Redstone torch and from one to any number of repeaters chained together, as shown in design A. The repeater delay must be at least two ticks, or the torch will burn out.

Another type of clock can be made with only Redstone Repeaters, as in design B. There are no torches to burn out, so they can run at very high speed (such as the 1-clock at left). However, unlike torch-based clocks, they do not start running on their own and must be triggered by hand or with a pulse generator.

Small Vertical Clock


This one is 3&times;2&times;1, not counting a required block of ground. It can output a 3, 4, or 5-tick cycle. To build:
 * Put three solid blocks in a "V" formation.
 * Put a redstone torch on one side of the bottom block.
 * Put redstone dust under the other side of the V (on a solid block).
 * Place a repeater on the middle block, pointing towards the dust. Set the repeater to at least 2 ticks (for a 3-clock).
 * A lever on any of the four solid blocks can stop the clock, forcing the output ON.

Output can be taken almost anywhere, except for the block under the repeater, and the blocks "crosswise" from the redstone dust. (That is, that redstone "wire" must be extended once in line with the clock before it can go sideways.) The repeater must be set to at least 2 ticks, or the torch will regularly burn out, and the period will be the repeater's delay plus 1.

Piston Clock
Pistons can be used to create new types of clocks with a modifiable pulse delay without the use of pulse generators. This allows other pistons to be clocked in a fashion that only leaves the arm extended for the time required to push an adjacent block, as shown in design A.

Design B requires two sticky pistons, but may be more stable. It is also easily controlled by just set one side Redstone high to stop it from running. The repeaters can be infinitely extended (up to practical limits such as space) to have very long delay clock.

Design C only needs one sticky piston, but at least one of repeaters must be set to 2 or more ticks. If both are set to 1 tick, the torch will burn out. The output signal can be taken from any part of the circuit. This design can also be controlled; a high input on the toggle line will stop the clock.

Design D is the simplest, requiring only a sticky piston and redstone wire, and is also controllable. It runs as long as the toggle line is on, and turns off when the toggle line is off. Repeaters can be added to increase its delay.

With the use of a sticky piston (and optional a non-sticky piston) you can create a 1 to 4 tick toggle-able clock. The non sticky piston (the bottom one) is needed for the 1 tick clock as a self repair mechanism. It prevents detaching of the moving block from the sticky piston. By using a repeater as connector for the sticky piston - below the moving block - you can adjust the speed of the clock. Schematic in Mordritch's JavaScript Redstone Simulator

Minecart Clock
Minecart clocks are simple, easy to build and modify, but are somewhat unreliable. Minecart clocks are made by creating a small circular track of minecart rails with one or more minecart booster and detector rail, and running an empty minecart through the loop. The cart is propelled endlessly by the boosters and generates a Redstone signal as it passes over the detector rail. Minecart Clocks can be extended or shortened easily by adding and removing track to adjust the delay between signals. Perhaps the biggest disadvantage to using a minecart clock is the fact that it is easily disrupted by the player or mobs, or the fact that it requires more space to be constructed in. Finally, the necessity of gold in the construction of the booster rails may be a limiting factor to players without access to it. In snapshot 12w38b however, C418 gave minecarts their own sounds that intensify depending on their current velocity. An example of how to create a really stable minecart clock is shown in the video below.

Cactus Clock
These clocks utilize growth of a cactus to generate pulses, generating a five-minute long pulse roughly every 25 minutes (i.e. it turns on every half hour or so). Though the pulses are irregular, making it unsuitable for clocks or computers, the long span makes this clock type highly suitable for sugar cane farms, melon farms, and pumpkin farms.

Cactus clocks are built by connecting a single-cactus cactus farm to a wooden pressure plate. The signal wil stay on until the item despawns, which takes 5 mins.

To approximately halve the time-span, hook up two of these clocks to an OR gate. To multiply the time-span, hook the output of this clock to a suitable counter. Hooking two of these clocks to an AND gate gets a clock that cycles roughly every 15 hours (30min * 30min / 60min/h = 15h).

Half-Day Minecart Clock
An advanced Rail T Flip-Flop is a critical component in the Half-Day Clock, as it relies on the item decay code to send power to booster rails and trigger two separate mine-cart pressure plates. The Half-Day timer always toggles state after 5 minutes even with large amounts of lag, making it the most accurate clock currently in Minecraft.

Boat Clock
Boat clock is a clock which toggles on and off in about 9 seconds with minimal lag. This uses a boat in between a piston and pressure plate below and a cobweb above. When a boat falls onto the pressure plate, it activates a piston, pushing the boat into a cobweb which slows its fall down.

Factorial stacking of clocks
Clocks with different periods may be connected to an AND gate in order to generate larger periods with the least resources possible. One way to make a ONE MINUTE CLOCK (600 ticks) would be to use 150 repeaters. Or you could connect two clocks with the periods of 24 and 25 ticks (that's 13 repeaters) to an AND gate.

Note that if your clock's ON state is longer than 1 tick, you'll have to place a Long Pulse Detector at the end of your clock, to ignore imperfect syncs.

Controllable Clock
Controllable clocks are a combination of a 5 Clock and an AND or a NAND gate. The output ends at the first inverter of the clock, and one of the AND inputs is the output of the 5th inverter of the clock.

Toggle-able Clock
By adding an inverter instead of a repeater at any point in an average clock and wiring a lever to the main block of this inverter, a clock that can be toggled on and off can be created. It is important to either use 3 or more repeaters (or delay if less are used), as it seems to burn out otherwise.

It is also possible to create a compact toggle-able clock by means of a button (or other Redstone pulse) using 2 modified pulse limiters (as shown) in series. A rising edge on the toggle line will turn the clock on or off. You may have to modify the repeater(s) in the first pulse limiter to give more delay and therefore a longer pulse, and more reliable shut-off. A signal received on the output line can also toggle the state of the clock, so it should be isolated in any circuits it connects to.



By using a piston to complete a circuit, and taking advantage of how redstone travels through a moving block, a compact toggleable clock can be created with an output as short as 1 tick.

By increasing the delay of the 2 left-most repeaters, clocks of other speeds can be achieved.

A simple control can be created by using a Repeater Clock with a sticky piston to block the output.

Hopper Toggle-Clock
It is possible to make a more compact version of the traditional toggle-clock by linking four hoppers in a circular pattern, dropping an item in one hopper, and using a redstone comparator as the output. To make the clock toggle-able, simply add a toggle output to the side input of the comparator.

The down side to these clocks is the fact that they must be manually restarted if one logs out from the map.

(2 hoppers facing each other works too, resulting in a 4-clock.)



Blink Device


This device creates energy in an irregular sequence. It is a variant of the "Rapid Pulser" design shown above, except that each torch pulses in an irregular pseudo-random pattern as each torch coming on turns the other three (and itself) off, and occasionally burning out before being reset by a block update after several seconds, during which time other torches blink.

You can build this device by placing a block with one Redstone torch on every side. Place some Redstone on top of the block, place a new block on top of each torch, and then wire it up to different circuits.

红石电路/时钟