A redstone circuit is a structure that activates or controls mechanisms. Circuits can act in response to player activation, continuously on a loop, or in response to non-player activity (mob movement, item drops, plant growth, etc).
A useful distinction can be made between a circuit performing operations on signals (generating, modifying, combining, etc.), and a mechanism manipulating the environment (moving blocks, opening doors, changing the light level, producing sound, etc.). Making this distinction lets us talk about the various circuits separately, and let players choose whichever circuits are useful for their purposes. The machines controlled by redstone circuits can range from simple devices such as automatic doors and light switches to complex devices such as elevators, automatic farms, or even in-game computers. However, this article provides only an overview of redstone circuits as above. These can be used to control simple mechanisms, or combined as parts of a larger build. Each circuit type on this page has links to its own page, which will go into much greater detail about them and give schematics for multiple variations of each.
Other relevant articles:
Before working with any but the most basic Redstone circuits, an understanding of some basic concepts is required: "power", "signal strength", "redstone ticks", and "block updates". The Redstone mechanics article provides more information on these concepts. The Redstone components article adds a list and description of all blocks which interact with redstone power. The Mechanisms tutorial complements this article with an assortment of mechanism designs using circuits described here
Most circuits are described using Schematic diagrams; some of these require multiple images to show one or two layers per image. See the Help:Schematic page for details on how various blocks and components are represented.
The wiki describes circuit size (the volume of the rectangular solid it occupies) with the notation of shorter width × longer width × height, including support/floor blocks, but not including inputs/outputs.
Another method used for describing circuit size in the Minecraft community is to ignore non-redstone blocks simply used for support (for example, blocks under redstone dust or repeaters). However, this method is unable to distinguish between flat and 1-high circuits, as well as some other circuit differences.
Sometimes it is convenient to compare circuits simply by the area of their footprint (e.g., 3×4 for a circuit three-block wide by four blocks long), or by a single dimension important in a particular context (e.g., length in a sequence of sub-circuits, height in a confined space, etc.).
Several features may be considered desirable design goals:
- A structure is 1-high (aka "1-tall") if its vertical dimension is one block high (meaning it cannot have any redstone components that require support blocks below them, such as redstone dust or repeaters). Also see flat.
- A structure is 1-wide if at least one of its horizontal dimensions is exactly one block wide.
- A structure is flat if it generally can be laid out on the ground with no components above another (support blocks under redstone components are okay). Flat structures are often easier for beginners to understand and build, and fit nicely under floors or on top of roofs. Also see 1-high.
- A structure is flush if it doesn't extend beyond a flat wall, floor, or ceiling and can still provide utility to the other side, though redstone mechanisms may be visible in the wall. Flush is a desirable design goal for piston-extenders, piston doors, etc. Also see hipster and seamless.
- A structure is hipster if it is initially hidden behind a flat wall, floor, or ceiling and can still provide utility to the other side. See also flush and seamless.
- A structure is instant if its output responds immediately to its input (a circuit delay of 0 ticks).
- A structure is seamless if no redstone components are visible both before and after it completes its task (but it's okay if some are visible during operation). Seamless is a desirable design goal for piston-extenders, piston doors, etc. See also flush and hipster.
- A structure is silent if it makes no noise (such as from piston movement, dispenser/dropper triggering when empty, etc.). Silent structures are desirable for traps or peaceful homes.
- A structure is stackable if it can be placed directly next to other copies of itself, and they all can be controlled as a single unit. Also see tileable.
- A structure is tileable if it can be placed directly next to other copies of itself, and each copy can still be controlled independently. Also see stackable.
- Structures might be described as "2-wide tileable" (tileable every two spaces in one dimension), or "2×4 tileable" (tileable in two directions), etc. Some structures might be described as "alternating tileable", meaning they can be placed next to each other if every other one is flipped or a slightly different design.
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.
Some components are not available before a player has access to the Nether, which will limit the designs they can use. In particular, comparators, observers and daylight detectors require nether quartz, which can only be obtained from the Nether. Additionally, redstone lamps require glowstone, which is occasionally available from trading or witches, but is much more plentiful in the Nether.
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 that have proven useful to the Minecraft community, while the main articles describe the specific circuits that fall into those categories.
Some of these circuits might be used by themselves for simple control of mechanisms, but frequently the player will need to combine them into more complex circuits to meet the needs of a mechanism.
Some aspects of signal transmission can be helpful to understand: transmission types, vertical transmission, repeaters, and diodes.
- 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 dust on blocks diagonally upwards, either in a straight staircase of blocks, in a 2×2 spiral of blocks, or 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, glass and upside-down stairs can support redstone dust but don't cut redstone dust, 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. In Bedrock Edition, hoppers and glass can be used to create two-way vertical ladders that transmit signals both upwards and downwards.
- Torch towers and torch ladders: A redstone torch can power a block above it, or redstone dust 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. However, every torch inverts the redstone signal (i.e. changes it from powered to unpowered), so having an even number of torches is required.
- Observer towers: An observer can power a block of a redstone circuit above or below it, allowing vertical transmission both upwards and downwards. Placing blocks that can be activated, such as redstone dust, noteblocks, or doors, both above and below it creates a state change when the observer is looking downwards or downwards when the observer is looking upwards. Repeating this pattern means that updates will be chained.
- Daylight detector exploiting: You can use daylight detectors to send a Redstone signal downwards in 1 tick, but the path needs to be unobstructed by anything. You need to have a piston push a block over the sensor. It will detect the change in light and emit a Redstone pulse. This design is extendable upwards as far as you want, but you need to have the original hole open to sunlight. It also only works during the day, because it uses shadows to activate.
- Bubble columns: An observer can be used to detect the block update that occurs when a water source changes to a bubble column (or vice versa). When swapping the block below a column of water sources to soul sand or a magma block from some other block, the entire column will immediately change to bubble column blocks. This can be used to quickly transmit a redstone signal upwards to an observer facing the top water source/bubble column block.
- To "repeat" a signal means to boost it back up to full strength. The easiest way to do this is with a redstone repeater. Variations include:
- 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 that can't take input. For example, a signal cannot be pushed back into a circuit through a redstone torch except through the block it's attached to.
It's sometimes necessary to check signals against each other and only output a signal when the inputs meet some criteria. A circuit that performs this function is known as a logic gate (a "gate" that only allows signals through if the "logic" is satisfied).
In electronic or programming diagrams, logic gates are typically shown as if they were individual devices; However, when building redstone devices in Minecraft, all logic gates are formed from multiple blocks and components, which interact to produce the desired results.
|NOT A||off||off||ON||ON||Is A off?|
|A OR B||ON||ON||ON||off||Is either input on?|
|A NOR B||off||off||off||ON||Are both inputs off?|
|A AND B||ON||off||off||off||Are both inputs on?|
|A NAND B||off||ON||ON||ON||Is either input off?|
|A XOR B||off||ON||ON||off||Are the inputs different?|
|A XNOR B||ON||off||off||ON||Are the inputs the same?|
|A IMPLIES B||ON||off||ON||ON||If A is on, is B also on?|
- A NOT gate (aka "inverter") is on if its input is off. The simplest NOT gate is an input block with a redstone torch attached.
- An OR gate is on if any of its inputs are on. The simplest OR gate is to feed multiple signals into a single block or redstone wire.
- A NOR gate is on only if none of its inputs are on. The simplest NOR gate is to feed multiple signals into a block with a redstone torch attached.
- An AND gate is on only if all of its inputs are on.
- A NAND gate is on if any of its inputs are off.
- An XOR gate is on if its inputs are different.
- An XNOR gate is on if its inputs are equal.
- An IMPLY gate is on unless the first input is on and the second input is off.
Some circuits require specific pulses, other circuits use pulse duration as a way to convey information. Pulse circuits manage these requirements.
A circuit that is stable in one output state and unstable in the other is known as a monostable circuit.[note 1] Many pulse circuits are monostable because their OFF state is stable, but their ON state will quickly (or eventually) revert to OFF.
- Pulse generator
- A pulse generator produces a pulse of a specific duration.
- Pulse limiter
- A pulse limiter (aka pulse shortener) reduces the duration of pulses that are too long.
- Pulse extender
- A pulse extender (aka pulse sustainer, pulse lengthener) increases the duration of pulses that are too short.
- Pulse multiplier
- A pulse multiplier outputs multiple pulses for every input pulse (it multiplies the number of pulses).
- Pulse divider
- A pulse divider (aka pulse counter) only outputs a signal after a certain number of pulses have been detected through the input (the number of pulses is indicative of the number of loops).
- Edge detector
- An edge detector reacts to either a signal changing from OFF to ON (a "rising edge" detector), from ON to OFF (a "falling edge" detector), or both (a "dual edge" detector).
- Pulse length detector
- A pulse length detector reacts only to pulses in a certain range of durations (often only to pulses of one specific duration).
A clock circuit is a pulse generator that produces a loop of specific pulses repeatedly. 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 that 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).
- Observer clock
- A repeating clock made with Observers and Pistons (an Observer looking at a piston)
- Repeater clock
- A repeater clock consists of a loop of repeaters (usually either redstone repeaters or redstone torches) with occasional dust or blocks to draw off the appropriate pulses.
- Hopper clock
- A hopper clock produces timed pulses by moving items around between hoppers and drawing signals off with redstone comparators.
- Piston clock
- 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.
- Comparator clock
- The clock of short or moderate cycle length utilizing comparator's subtraction or signal fading feature. Clocks can also be built using daylight sensors, minecarts, boats, water flow, item despawn, etc.
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. There are five basic types of memory circuits. (A few circuits combine two different types.)
- RS latch
- An RS latch has two inputs, one to set the output on and another to reset the output back to off. An RS latch built from NOR gates is known as an "RS NOR latch", which is the oldest and most common memory circuit in Minecraft.
- T flip-flop
- A T flip-flop is used to toggle a signal (like a lever). It has one input, which toggles the output between on and off.
- Gated D latch
- A gated D latch has a "data" input and a "clock" input. When the clock input turns on, it sets the output to equal its data input. Not to be confused with a D flip-flop, which only sets the output equal to its data input on a clock rising transition.
- JK latch
- A JK latch has two inputs, one to set the output on and another to reset the output back to off (like an RS latch), but when both turn on simultaneously it toggles the output between on and off (like a T flip-flop).
- 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.
These circuits aren't generally needed for redstone projects, but might find use in complex projects, proofs of concept, and thought experiments. Some examples:
- Multiplexers and relays
- A multiplexer is an advanced form of logic gate that chooses which of two inputs 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). The reverse of this is a relay, which copies a data input to one of two outputs, depending on whether the additional input is ON or OFF.
- 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 that 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. As of Java Edition 1.11, many of the functions of BUDs were condensed into the observer, however, a BUD circuit can also detect other changes undetectable by observers, like a furnace finishing smelting or something being crafted in a crafting table. The addition of this was made to move toward feature parity with Bedrock Edition versions.
Many other complex circuits are possible.
The first step in building a redstone circuit is to decide what it will do and how, in general, it will operate.
- 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?
- What is an efficient first design?
- Although refinement often occurs in later stages of the build, starting on a strong foot to tackle the idea will be beneficial later on. Allowing an inefficient/flawed design to manifest can hinder development.
- How will the signal be transmitted from the controls to the mechanisms?
- Will signals need to be combined from multiple sources?
It can be helpful to choose a specific set of blocks the player uses to construct circuits. Then, when the player runs into these blocks during the excavation of new rooms in the base, the player knows they are about to damage a previously-built circuit. Common choices include stone bricks, snow block, wool and concrete. (Using different colors of wool and concrete is also a great way to keep track of different circuits)
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, placing 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 TNT after the rest of the circuit is complete will help to avoid such problems and the destruction of the device itself. This also applies to any other features of the circuit that may be accidentally activated with such actions (e.g., activating a dispenser before the circuit is ready).
When the circuit isn't working the way it should, take a look at it and try to find the problem. Work through the circuit and test various inputs to find where a signal is "dropped" or gained inadvertently.
- What part of the wiring actually is not behaving as expected?. Unexpected output behavior is usually only a symptom, where the actual problem resides somewhere in the wiring.
- Trying to draw power from a weakly-powered block? Maybe a redstone repeater is needed to either strongly-power the block or to pull power out of it.
- Trying to transmit power through a non-opaque block? Replace it with an opaque block, or go around it.
- Was a short-circuit created 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 the circuit activating when they shouldn't be? Maybe accidentally "crossed wires" are allowing a signal from one part of the circuit to activate another part of the circuit, or a repeater's output is being cycled back into its input.
- Did the circuit go off track from its intended behavior?
- Are pistons, dispensers, or droppers being indirectly powered when they shouldn't be?
- Is the circuit based on a tutorial from an older version of Minecraft which no longer works in the current version?
Once the circuit is working, consider if it can be improved (without breaking it).
- Can the circuit be faster?
- Reducing the number of components or distance a signal has to travel through can speed up the circuit.
- Can the circuit be smaller?
- Can fewer blocks be used?
- Can the redstone dust lines be shortened?
- Can compact logic gates be used in the circuit?
- Are unnecessary components used?
- Can the circuit be 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?
- If either of the above are a problem, can this be fixed by filtering the input?
- Did an update create the opportunity for a better circuit? (e.g., comparators, locking repeaters, observer, etc.)
- Can the circuit be quieter?
- Fewer sound-producing blocks (e.g. pistons, dispensers and droppers, doors, trapdoors, fence gates, and note blocks) will make your device more stealthy around other players.
- Can any lag be reduced? Machines with many redstone components frequently changing state can cause light, sound, particle, or update lag.
- Redstone dust creates hundreds of block updates whenever it changes states, and the more the signal strength changes, the more block updates it will produce. Reducing the length of redstone lines will significantly decrease lag. An alternative to redstone dust lines is to use lines of rails which update observers, as rails create much less block updates than dust.
- Hoppers and hopper minecarts especially may be trying to do several things every tick (accept items pushed into them, push items into other containers, check for item entities above them). Powering unneeded hoppers to disable them or placing containers (such as composters or droppers) above them to disable their item entity checks can help to reduce lag.
- Redstone torches and redstone lamps change their light level when they change state. Light changes can cause block light updates in hundreds of block tiles around each component. Concealing the component in opaque blocks or placing permanent light sources (torches, glowstone, etc.) nearby can reduce lag from block light updates.
- Several redstone components produce particles (redstone torches, redstone dust, but especially fireworks fired from dispensers). Too many particles may overload Minecraft's particle rendering and then some particles may fail to render until old particles have disappeared.
- Every time a block is moved by a piston it can produce block updates in its neighbors, so moving too many blocks at once can produce lag.
- Several redstone components produce sound when activated or deactivated (pistons, dispensers and droppers, doors, trapdoors, fence gates, and note blocks). Too many sounds at once can overload Minecraft's sound engine and produce lag.
- Note: Some players refer to edge detectors as monostable circuits