Redstone circuits

A redstone circuit is a structure that can be built to activate or control mechanisms.

Circuits can be designed to act in response to player activation, or to operate autonomously -- either on a loop, or in response to non-player activity such as mob movement, item drops, plant growth, etc. The mechanisms that can be controlled by redstone circuits range from simple devices such as automatic doors and light switches, to complex devices such as elevators, automatic farms, or even in-game computers. Understanding how to build and use redstone circuits and the mechanisms they can control will greatly increase the range of things that can be accomplished in Minecraft.

The subject of redstone structures is huge &mdash; this article provides only an overview of the many different types of redstone circuits which can be built. For full details and examples of these redstone circuits, see the main articles for each topic.

Redstone basics
Before describing the blocks used to build redstone circuits, or the types of circuits which can be built, an understanding of some basic concepts is required.


 * Redstone components
 * A redstone component is a block that provides some purpose to a redstone circuit.
 * A power component provides power to all or part of a circuit.
 * A transmission component passes power from one part of the circuit to another.
 * A mechanism component affects the environment (by moving, producing light, etc.).
 * A mechanism component affects the environment (by moving, producing light, etc.).


 * Power
 * Some blocks may be powered or unpowered. Think of a "powered block" as a block that is electrified (but safe to touch). Some blocks will show their powered state visibly (for example, redstone wire lights up, a piston extends, etc.), but other blocks may give no visual indication of their powered state other than their effect on other redstone components.
 * Opaque blocks can be strongly-powered or weakly-powered (a different concept than power level, see below). The only difference is that a weakly-powered block will not power adjacent redstone wire.


 * Power level
 * Power level can vary from 0 to 15. Most power components provide power level 15, but a few provide a variable amount of power depending on how they are set up.
 * Redstone wire transmits power to adjacent redstone wire, but its strength decreases by 1 for each block traveled. Redstone wire can thus transmit power up to 15 blocks before needing to be re-strengthened (either with a redstone repeater, or by controlling a power source to create a new signal).


 * Redstone update
 * When a change occurs somewhere in a redstone circuit, it can produce other changes in surrounding blocks in what is called a redstone update (not to be confused with Minecraft 1.5, known as the 'Redstone Update'). Each of these changes can then produce other changes in their surrounding blocks. The update will propagate following the redstone circuit rules within loaded chunks. A common source of confusion comes when attempting to send redstone signals long distances, and finding that the signal stops when it hits an unloaded chunk or that conversely, a sensing signal from an unloaded chunk never arrives.


 * Redstone tick
 * A redstone tick is the moment when Minecraft updates redstone components. Redstone updates occur 10 times per second, so a redstone tick occurs every 0.1 seconds. Redstone torches, redstone repeaters, and mechanism components require one or more ticks to change state, so it can take a number of ticks for a signal to propagate through a complicated circuit.
 * Redstone ticks differ from "game ticks" (20 per second) and "block ticks" (block updates that occur at each game tick). When discussing redstone circuits, a "tick" is always a redstone tick, unless otherwise specified.


 * Signals and pulses
 * Circuits with a stable output are said to produce a signal -- an ON signal if powered, or an OFF signal if unpowered. When a signal changes from OFF to ON and then back again, that is described as a pulse (or ON pulse), while the opposite is described as an OFF pulse.
 * Very short pulses (1 or 2 ticks) can cause problems for some components or circuits because they may fail to keep up with the rapidly changing states. For example, a sticky piston acts as a regular piston when confronted with a 1 tick pulse.


 * Circuit vs. mechanism
 * These terms are sometimes used interchangeably to describe structures which incorporate redstone components, but a useful distinction can be made between the two:
 * A circuit performs operations on signals (generating, modifying, combining, etc.).
 * A mechanism manipulates the environment (moving blocks, opening doors, changing the light level, producing sound, etc.).
 * All mechanisms will necessarily incorporate redstone components or circuits, but a circuit by itself doesn't have to have an effect on the environment (except possibly incidentally, such as a redstone repeater changing its light level when changing its power state, or a piston moving a block to fulfill a role within the circuit). Making this distinction allows us to talk about circuits without having to define a specific in-game purpose for them, allowing players to find their own reasons to use them.
 * This article, and the other articles on redstone circuits, discuss only circuits which operate on signals. For articles about mechanisms, see the list of tutorials at the end of the article.


 * Features
 * A number of features may be considered desirable design goals:
 * 1-Wide: A structure is 1-wide if at least one of its horizontal dimensions is only one block wide.
 * Flat: A structure is flat if it generally can be laid out on the ground with no components above another. Flat structures are often easier for beginners to understand and build, and fit nicely under floors or on top of roofs.
 * Flush: A structure is flush if it can be hidden behind a flat wall, floor, or ceiling and still provide utility to the other side. Flush is a desirable design goal for piston-extenders, piston doors, etc.
 * Silent: A structure is silent if it makes no noise (such as from piston movement, dispenser/dropper triggering, etc.). Silent structures are desirable for traps, peaceful homes, and for reducing lag produced by sound.
 * Tileable: To tile a structure means to repeat the structure in one or more dimensions (like the way tiles on a floor repeat in multiple directions). All structures are tileable, given enough space, so the design goal is to minimize the space required to tile the structure. Structures might be described as "2-wide tileable", or "2x4 tileable", etc. 1-wide tileable structures are desired for creating complex compact structures.
 * Other design goals may include reducing the delay a sub-circuit adds to a larger circuit, reducing the use of resource-expensive components (redstone, nether quartz, etc.), and re-arranging or redesigning a circuit to make it as small as possible.


 * Size
 * The wiki uses shorter width x longer width x height, including support/floor blocks, not including inputs/outputs.
 * A flat circuit is usually simply described by the area of its footprint (e.g., 3x4 for a circuit three block wide by four blocks long).
 * A circuit which incorporates significant height changes, or which fully utilizes all three dimensions by looping above itself, is described by the volume of the rectangular solid it occupies, usually with the height as the last value (for example, 3x4x5 for a circuit three block wide by four blocks long by five blocks high). Some members of the Minecraft community do not count the lowest layer of a circuit if it consists only of blocks required to support redstone components (for example, blocks underneath redstone wire) while others believe that any block necessary to the circuit should be counted in a circuit's size and blocks which do nothing but support redstone components are still necessary, in that removing them would break the circuit, and thus should be counted. Sizes on the wiki include support blocks.

Circuit types
Although the number of ways to construct circuits is endless, certain patterns of construction occur over and over again. The following sections attempt to categorize the circuits which have proven useful to the Minecraft community, while the main articles describe the specific circuits which fall into those categories.

Some of these circuits might be used by themselves for simple control of mechanisms, but frequently you will need to combine them into more complex circuits to meet the needs of a mechanism.

Transmission circuit
Some aspects of signal transmission can be helpful to understand: vertical transmission, repeaters, and diodes.


 * Transmission types
 * Digital: A simple on/off transmission.
 * Analog: A transmission which outputs the same signal strength as the input.
 * Binary: Multiple digital lines where each line represents a single digit in a binary number.
 * Unary: Multiple digital lines which represent a number by which line is powered.


 * Vertical transmission
 * Although horizontal signal transmission is pretty straight-forward, vertical transmission involves options and trade-offs.
 * Redstone staircases: The simplest way to transmit signals vertically is by placing redstone wire on blocks diagonally upwards, either in a straight staircase of blocks, in a 2×2 spiral of blocks, or in another similar variation. Redstone staircases can transmit signals both upwards and downwards, but can take up a lot of space and will require repeaters every 15 blocks.
 * Redstone ladders: Because glowstone, upside-down slabs and upside-down stairs can support redstone wire but don't cut redstone wire, signals can be transmitted vertically (upwards only) by alternating these blocks in a 2×1 "ladder". Redstone ladders take up less space than redstone staircases, but also require repeaters every 15 blocks.
 * Torch towers: A redstone torch can power a block above it, or redstone wire beneath it, allowing vertical transmission both upwards or downwards (different designs are required for each). Because it takes each torch a little time to change state, a torch tower can introduce some delay into a circuit, but no repeaters are necessary.
 * Other forms of vertical transmission are possible, using pistons, water, etc.


 * Repeater
 * To "repeat" a signal means to boost it back up to full strength. The easiest way to do this is with a redstone repeater, but some circuits may require repeater circuits such as "instant repeaters" that repeat a signal without the delay introduced by a redstone repeater, or "two-way repeaters" which can repeat a signal in either direction.


 * Diode
 * A "diode" is a one-way circuit that allows a signal to travel only in one direction. It is used to protect another circuit from the chance of a signal trying to enter through the output, which could incorrectly change the circuit's state or interfere with its timing. It is also used in a compact circuit to keep one part of the circuit from interfering with another. Common choices for a diode include a redstone repeater or a height elevation to glowstone or an upside-down slab which won't transmit a signal back downwards.
 * Many circuits are already one-way simply because their output comes from a block which can't take input. For example, you can't push a signal back into a circuit through a redstone torch except through the block it's attached to.

Logic circuit
It's sometimes necessary to check signals against each other and only output a signal when the inputs meet some criteria. A circuit which performs this function is known as a logic gate (a "gate" that only allows signals through if the "logic" is satisfied). Although there are many different possible "logics" that could be checked, the two most common ones are the OR Gate and the AND Gate (possibly with inputs or outputs inverted).


 * OR Gate
 * An OR Gate produces an ON output if any of its inputs is ON (i.e., its output is ON if input A is ON or input B is ON, or input C is ON, etc.).


 * AND Gate
 * An AND Gate produces an ON output only if all of its inputs are ON (i.e., its output is ON if input A is ON and input B is ON and input C is ON, etc.).

Inverting a signal (such as with a redstone torch) is also considered a logical operation (a NOT gate, because it produces output only when there is NOT input).

Pulse circuit
Some circuits require specific pulses, other circuits use pulse duration as a way to convey information. Pulse circuits manage these requirements.

A circuit which is stable in one output state and unstable in the other is known as a monostable circuit. Many pulse circuits are monostable because their OFF state is stable, but their ON state will quickly revert back to OFF.


 * Pulse Generator
 * A pulse generator produces a pulse of a specific duration.


 * Pulse Limiter
 * A pulse limiter (a.k.a. pulse shortener) reduces the duration of pulses which are too long.


 * Pulse Extender
 * A pulse extender (a.k.a. pulse sustainer, pulse lengthener) increases the duration of pulses which are too short.


 * Pulse Delay
 * A pulse delay circuit delays a pulse by a specific duration. Pulse delay circuits can be designed to only delay the rising edge of a pulse ("positive delay"), only the falling edge ("negative delay"), or both.


 * Edge Detector
 * An edge detector reacts to either a signal changing from OFF to ON (a "rising edge" detector) or from ON to OFF (a "falling edge" detector), or both (a "dual edge" detector).


 * Pulse Duration Tester
 * A pulse duration tester reacts only to pulses in a certain range of durations (often only to pulses of one specific duration).


 * Oscilloscope
 * An oscilloscope is a sequence of redstone repeaters all set to a 1-tick delay. By seeing how many repeaters light up, you can observe the duration of a pulse. By running multiple oscilloscopes in parallel, you can compare the duration and delay of pulses produced by different circuits.

Clock circuit
A clock circuit is a pulse generator that produces a loop of specific pulses over and over again. Some are designed to run forever, while others can be stopped and started.

A simple clock with only two states of equal duration is named for the duration of its ON state (e.g., for example, a clock which alternates between a 5-tick ON state and a 5-tick OFF state is called a 5-clock) while others are usually named for their period (the time it takes for the clock to return to its original state; for example, a "1-minute clock" might produce a 1-tick pulse every 60 seconds).


 * Repeater clocks
 * A repeater clock consists of a loop of repeaters (usually either redstone repeaters or redstone torches) with occasional wire or blocks to draw off the appropriate pulses.


 * Hopper clocks
 * A hopper clock produces timed pulses by moving items around between hoppers and drawing signals off with redstone comparators.


 * Piston clocks
 * A piston clock produces a loop of pulses by passing a block back and forth (or around, with many pistons) and drawing off a pulse when the block is in a certain location.

Clocks can also be built based on minecarts, boats, item despawn, etc.

Memory circuit
Unlike a logic circuit whose state always reflects its current inputs, a memory circuit's output depends not on the current state of its inputs, but on the history of its inputs. This allows a memory circuit to "remember" what state it should be in, until told to remember something else.


 * T Flip-Flop
 * A T Flip-Flop is used to toggle a signal (like a lever). It has a primary input and a "clock" input, and its output changes state ("toggles") only when both the primary input and the clock input are ON at the same time. In practical redstone circuits, the clock input is often omitted from the circuit so that the output toggles whenever the primary input turns ON (turning it into a T Latch).


 * RS Latch
 * An RS Latch is used when you need greater control of the circuit's output state. It has two separate inputs, a SET input and a RESET input. Its output is set to ON when SET turns ON, and remains ON until RESET turns ON (no matter what SET does). When the output is OFF, it remains OFF until SET turns ON.
 * An RS latch built from NOR gates is known as an "RS NOR Latch".


 * Counter
 * Unlike T Flip-Flops and RS Latches which can only hold two states (ON or OFF), a counter can be designed to hold a greater number of states.

Many other memory circuits are possible.

Miscellaneous circuits
These circuits aren't generally needed for your typical project, but might find use in complex projects, proofs of concept, and thought experiments. Some examples:


 * Multiplexers
 * A multiplexer is an advanced form of logic gate which chooses which input to let through as output based on an additional input (for example, if input A is ON then output input B, otherwise output input C).


 * Randomizers
 * A randomizer produces output signals unpredictably. Randomizers can be designed to produce a pulse at random intervals, or to randomize which of multiple outputs are turned ON (such as random number generators, or RNGs). Some randomizers use the random nature of Minecraft (such as cactus growth or dispenser slot selection), while others produce pseudo-randomness algorithmically.


 * Multi-bit circuits
 * Multi-bit circuits treat their input lines as a single multi-bit value (something other than zero and one) and perform an operation on them all at once. With such circuits, possibly combined with arrays of memory circuits, it's possible to build calculators, digital clocks, and even basic computers inside Minecraft.


 * Block Update Detectors
 * A block update detector (BUD, or BUD Switch) is a circuit which "reacts" to a block changing its state (for example, stone being mined, water changing to ice, a pumpkin growing next to a pumpkin stem, etc.). BUDs react by producing a pulse, while T-BUDs (Toggleable BUDs) react by toggling their output state. These are generally based on subtle quirks or glitches in device behavior; current circuits most often depend on pistons.

Many other complex circuits are possible.

Planning
The first step in building a redstone circuit is to decide what it will do.


 * How and where will it be controlled?
 * Will the circuit be controlled by the player, by mob movement, or something else?
 * What mechanism components will it control?
 * How will the signal be transmitted from the controls to the mechanisms?
 * Will signals need to be combined from multiple sources?

Construction
It can be helpful to choose a specific set of blocks you use to construct circuits. Then, when you run into these blocks when digging out new rooms in your base, you know you're about to damage a previously-built circuit. Common choices include stone brick, snow block, and wool. (Using different colors of wool is also a great way to keep track of different circuits)

Be careful when building circuits near water or lava. Many redstone components will "pop" (turn into items) when washed over by liquids, and lava will destroy any items it contacts.

Be careful when building circuits to activate TNT (traps, cannons, etc.). Circuits in mid-construction can sometimes briefly power up unexpectedly, which might activate TNT. For example, if you place a redstone torch on a powered block, it won't "figure out" that it should be turned off until the next tick, and can briefly power another part of the circuit until then. Placing your TNT after the rest of the circuit is complete will help to avoid such problems and the destruction of the device itself.

Problem-solving
When your circuit isn't working the way you think it should, take a look at it and try to find the problem.


 * Are you trying to draw power from a weakly-powered block? Maybe you need a redstone repeater to strongly-power the block, or to pull power out of the block.
 * Are you trying to transmit power through a non-opaque block? Replace it with an opaque block, or go around it.
 * Did you create a short-circuit and a redstone torch that should be powered is now burned out? Fix the short-circuit and update the torch to get things going again.
 * Are parts of your circuit activating when they shouldn't be? Maybe you've accidentally "crossed wires" allowing a signal from one part of the circuit to activate another part of the circuit.
 * Did the behavior you were using get removed?
 * Are pistons or dispensers being indirectly powered?

Refining
Once your circuit is working, consider if it can be improved (without breaking it).


 * Can you make the circuit faster?
 * Reducing the number of components a signal has to travel through can speed up the circuit.
 * Can you make the circuit smaller?
 * Can you use fewer blocks?
 * Can you shorten the redstone wire lines?
 * Can you make the circuit more robust?
 * Will the circuit still work when activated by a very short pulse?
 * Will the circuit still work when activated and deactivated rapidly in succession?
 * Did an update create the opportunity for a better circuit? (e.g. pistons, locking repeaters, etc.)
 * Can you make it quieter ?

Video
Redstone (Schaltkreise) Circuitos de Redstone Circuits de redstone Vöröskőáramkörök 레드스톤 회로 Redstone-schakelingen Obwody z czerwonego kamienia Схемы из красного камня 红石电路