Minecraft Wiki
Supeika (talk | contribs)
No edit summary
(Undo revision 1970147 by 71.212.171.107 (talk))
Tags: Undo contains YouTube embed
(34 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{move|Redstone circuit|reason=[[Mechanics]] is a redirect page. The current page title is awkward.}}
 
{{move|Redstone mechanics/Circuit|reason=[[Mechanics]] is a redirect page. It doesn't make sense to have a subpage on a subpage of a redirect. General discussion at [[Minecraft Wiki talk:Community portal#Mechanics/Redstone problem|the community portal]].}}
 
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 '''redstone circuit''' is a structure that activates or controls mechanisms. Circuits can act in response to [[player]] or [[entity]]/[[mob]] 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 '''[[Tutorials/Mechanisms|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.
 
  +
 
A useful distinction can be made between a '''circuit''' performing operations on signals (generating, modifying, combining, etc.), and a '''[[Tutorials/Mechanisms|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 provides greater detail about them and give schematics for multiple variations of each.
   
 
Other relevant articles:
 
Other relevant articles:
{{see also|Mechanics/Redstone|Redstone components|Tutorials/Mechanisms|Tutorials/Redstone tips}} 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".
+
{{see also|Redstone mechanics|Redstone components|Tutorials/Mechanisms|Tutorials/Redstone tips}} 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 [[Mechanics/Redstone|Redstone mechanics]] article provides more information on these concepts.
+
* The [[Redstone mechanics]] article provides more information on these concepts.
* The [[Mechanics/Redstone/Components|Redstone components]] article adds a list and description of all blocks which interact with redstone power.
+
* The [[Redstone components]] article adds a list and description of all blocks which interact with redstone power.
 
* The [[Tutorials/Mechanisms|Mechanisms tutorial]] complements this article with an assortment of mechanism designs using circuits described here.
 
* The [[Tutorials/Mechanisms|Mechanisms tutorial]] complements this article with an assortment of mechanism designs using circuits described here.
 
* The [[Tutorials/Redstone tips|Redstone tips]] tutorial gives general advice about building.
 
* The [[Tutorials/Redstone tips|Redstone tips]] tutorial gives general advice about building.
Line 20: Line 19:
 
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.
 
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|flat]] and [[#1-high|1-high]] circuits, as well as some other circuit differences.
+
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|flat]] and [[#1-high|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.).
 
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.).
Line 63: Line 62:
 
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.
 
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, [[Redstone Comparator|comparators]], [[Observer|observers]] and [[Daylight Detector|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.
+
Some components are not available before a player has access to the Nether, which limits the designs available. In particular, [[redstone comparator]]s, [[observer]]s and [[daylight detector]]s require [[nether quartz]], which is available only from the Nether. Additionally, redstone lamps require [[glowstone]], which is occasionally available from [[trading]] or [[witches]], but is much more plentiful in the Nether.
   
 
== Circuit types ==
 
== Circuit types ==
Line 69: Line 68:
 
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.
 
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 of these circuits might be used by themselves for simple control of mechanisms, but frequently the player needs to combine them into more complex circuits to meet the needs of a mechanism.
   
 
=== Transmission circuit ===
 
=== Transmission circuit ===
Line 79: Line 78:
 
;[[Transmission circuit#Vertical transmission|Vertical transmission]]
 
;[[Transmission circuit#Vertical transmission|Vertical transmission]]
   
[[File:MCRedstone VertTransPositive.png|thumb|Transmitting signals upwards]]
+
[[File:MCRedstone VertTransPositive.png|thumb|Transmitting signals upward]]
[[File:MCRedstone VertTransNegative.png|thumb|Transmitting signals downwards]]
+
[[File:MCRedstone VertTransNegative.png|thumb|Transmitting signals downward]]
 
[[File:PE Vertical Redstone Ladder.jpg|thumb|Examples of two-way vertical ladders {{in|be}}]]
 
[[File:PE Vertical Redstone Ladder.jpg|thumb|Examples of two-way vertical ladders {{in|be}}]]
 
: Although horizontal signal transmission is pretty straight-forward, vertical transmission involves options and trade-offs.
 
: 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 staircases:'' The simplest way to transmit signals vertically is by placing [[redstone dust]] on blocks diagonally upward, either in a straight staircase of blocks, in a 2×2 spiral of blocks, or another similar variation. Redstone staircases can transmit signals both upward and downward but can take up much space and requires repeaters every 15 blocks.
:* ''Redstone ladders:'' Because [[glowstone]], upside-down [[slab]]s, [[glass]] and upside-down [[stair]]s 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|be}}, glass and pistons can be used to create two-way vertical ladders that transmit signals both upwards and downwards, glowstone, hoppers, and slabs allow the dust to power upwards but not downwards.
+
:* ''Redstone ladders:'' Because [[glowstone]], upside-down [[slab]]s, [[glass]] and upside-down [[stair]]s can support [[redstone dust]] but don't cut redstone dust, signals can be transmitted vertically (upward 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|be}}, glass and pistons can be used to create two-way vertical ladders that transmit signals both upward and downward, glowstone, hoppers, and slabs allow the dust to power upward but not downward.
:* ''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.
+
:* ''Torch towers and torch ladders:'' A [[redstone torch]] can power a block above it, or redstone dust beneath it, allowing vertical transmission both upward or downward (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]], [[Note Block|noteblocks]], or [[Door|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.
+
:* ''Observer towers:'' An [[observer]] can power a block of a redstone circuit above or below it, allowing vertical transmission both upward and downward. Placing blocks that can be activated, such as [[redstone dust]], [[Note Block|noteblocks]], or [[Door|doors]], both above and below it creates a state change when the observer is looking downward or downward when the observer is looking upward. Repeating this pattern means that updates are 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.
+
:* ''Daylight detector exploiting:'' You can use daylight detectors to send a Redstone signal downward 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 detects the change in light and emit a Redstone pulse. This design is extendable upward as far as you want, but you need to have the original hole open to sunlight. It also works only 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|bubble column]] (or vice versa). When swapping the block below a column of water sources to [[Soul Sand|soul sand]] or a [[Magma Block|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.
+
:*''Bubble columns:'' An [[observer]] can be used to detect the block update that occurs when a [[water]] source changes to a [[Bubble Column|bubble column]] (or vice versa). When swapping the block below a column of water sources to [[Soul Sand|soul sand]] or a [[Magma Block|magma block]] from some other block, the entire column immediately changes to bubble column blocks. This can be used to quickly transmit a redstone signal upward to an observer facing the top water source/bubble column block.
   
 
;[[Transmission circuit#Repeater|Repeater]]
 
;[[Transmission circuit#Repeater|Repeater]]
Line 98: Line 97:
 
;[[Transmission circuit#Diode|Diode]]
 
;[[Transmission circuit#Diode|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.
+
: A "diode" is a one-way circuit that allows a signal to travel 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 does not transmit a signal back down.
   
 
: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.
 
: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.
Line 106: Line 105:
 
{{main|Logic circuit}}
 
{{main|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 that performs this function is known as a '''logic gate''' (a "gate" that only allows signals through if the "logic" is satisfied).
+
It's sometimes necessary to check signals against each other and output a signal only when the inputs meet some criteria. A circuit that performs this function is known as a '''logic gate''' (a "gate" that allows signals through only 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.
+
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.
   
{| style="float: right; margin: 0 0 0.5em 0.5em; text-align: center;" class="wikitable"
+
{| class="wikitable" style="float: right; margin: 0 0 0.5em 0.5em; text-align: center;"
  +
|+Logic gate outputs<!-- This is a confusing chart. Please make it easier to understand. --><br>
|+ Logic Gate Outputs<br>
 
 
<span style="font-weight: normal;">Shows the output (red) of each gate, for each combination of inputs A and B (green).</span>
 
<span style="font-weight: normal;">Shows the output (red) of each gate, for each combination of inputs A and B (green).</span>
 
! A
 
! A
Line 120: Line 119:
 
! {{tc|in!}} !! {{tc|in}} !! {{tc|in!}} !! {{tc|in}}
 
! {{tc|in!}} !! {{tc|in}} !! {{tc|in!}} !! {{tc|in}}
 
|-
 
|-
| [[Logic circuit#NOT gate|NOT A]]
+
| [[Redstone_circuits/Logic#AND gate|A AND B]]
| {{tc|out}} || {{tc|out}} || {{tc|out!}} || {{tc|out!}}
+
| {{tc|out!}} || {{tc|out}} || {{tc|out}} || {{tc|out}}
| style="text-align: left;" | Is A off?
+
| style="text-align: left;" | Is A and B on?
 
|-
 
|-
| [[Logic circuit#OR gate|A OR B]]
+
| [[Redstone_circuits/Logic#NOT gate|NOT]] [[#IMPLY gate|(A IMPLIES B)]]
| {{tc|out!}} || {{tc|out!}} || {{tc|out!}} || {{tc|out}}
+
| {{tc|out}} || {{tc|out!}} || {{tc|out}} || {{tc|out}}
| style="text-align: left;" | Is either input on?
+
| style="text-align: left;" | Is A on and B off?
 
|-
 
| [[Redstone_circuits/Logic#NOT gate|NOT]] [[#IMPLY gate|(B IMPLIES A)]]
 
| {{tc|out}} || {{tc|out}} || {{tc|out!}} || {{tc|out}}
 
| style="text-align: left;" | Is B on and A off?
 
|-
 
|-
| [[Logic circuit#NOR gate|A NOR B]]
+
| [[Redstone_circuits/Logic#NOR gate|A NOR B]]
 
| {{tc|out}} || {{tc|out}} || {{tc|out}} || {{tc|out!}}
 
| {{tc|out}} || {{tc|out}} || {{tc|out}} || {{tc|out!}}
 
| style="text-align: left;" | Are both inputs off?
 
| style="text-align: left;" | Are both inputs off?
 
|-
 
|-
  +
| A
| [[Logic circuit#AND gate|A AND B]]
 
| {{tc|out!}} || {{tc|out}} || {{tc|out}} || {{tc|out}}
+
| {{tc|out!}} || {{tc|out!}} || {{tc|out}} || {{tc|out}}
| style="text-align: left;" | Are both inputs on?
+
| style="text-align: left;" | Is A on?
 
|-
 
|-
| [[Logic circuit#NAND gate|A NAND B]]
+
| [[Redstone_circuits/Logic#XOR gate|A XOR B]]
| {{tc|out}} || {{tc|out!}} || {{tc|out!}} || {{tc|out!}}
 
| style="text-align: left;" | Is either input off?
 
|-
 
| [[Logic circuit#XOR gate|A XOR B]]
 
 
| {{tc|out}} || {{tc|out!}} || {{tc|out!}} || {{tc|out}}
 
| {{tc|out}} || {{tc|out!}} || {{tc|out!}} || {{tc|out}}
 
| style="text-align: left;" | Are the inputs different?
 
| style="text-align: left;" | Are the inputs different?
 
|-
 
|-
| [[Logic circuit#XNOR gate|A XNOR B]]
+
| [[Redstone_circuits/Logic#NOT gate|NOT A]]
  +
| {{tc|out}} || {{tc|out}} || {{tc|out!}} || {{tc|out!}}
  +
| style="text-align: left;" | Is A off?
  +
|-
  +
| [[Redstone_circuits/Logic#XNOR gate|A XNOR B]]
 
| {{tc|out!}} || {{tc|out}} || {{tc|out}} || {{tc|out!}}
 
| {{tc|out!}} || {{tc|out}} || {{tc|out}} || {{tc|out!}}
 
| style="text-align: left;" | Are the inputs the same?
 
| style="text-align: left;" | Are the inputs the same?
 
|-
 
|-
  +
| B
| [[Logic circuit#IMPLY gate|A IMPLIES B]]
 
  +
| {{tc|out!}} || {{tc|out}} || {{tc|out!}} || {{tc|out}}
  +
| style="text-align: left;" | Is B on?
  +
|-
  +
| [[Redstone_circuits/Logic#NOT gate|NOT B]]
  +
| {{tc|out}} || {{tc|out!}} || {{tc|out}} || {{tc|out!}}
  +
| style="text-align: left;" | Is B off?
  +
|-
  +
| [[Redstone_circuits/Logic#NAND gate|A NAND B]]
  +
| {{tc|out}} || {{tc|out!}} || {{tc|out!}} || {{tc|out!}}
  +
| style="text-align: left;" | Is either input off?
  +
|-
  +
| [[Redstone_circuits/Logic#IMPLY gate|A IMPLIES B]]
 
| {{tc|out!}} || {{tc|out}} || {{tc|out!}} || {{tc|out!}}
 
| {{tc|out!}} || {{tc|out}} || {{tc|out!}} || {{tc|out!}}
 
| style="text-align: left;" | If A is on, is B also on?
 
| style="text-align: left;" | If A is on, is B also on?
  +
|-
  +
| [[Redstone_circuits/Logic#IMPLY gate|B IMPLIES A]]
  +
| {{tc|out!}} || {{tc|out!}} || {{tc|out}} || {{tc|out!}}
  +
| style="text-align: left;" | If B is on, is A also on?
  +
|-
 
| [[Redstone_circuits/Logic#OR gate|A OR B]]
  +
| {{tc|out!}} || {{tc|out!}} || {{tc|out!}} || {{tc|out}}
  +
| style="text-align: left;" | Is either input on?
 
|}
 
|}
   
Line 191: Line 214:
 
Some circuits require specific pulses, other circuits use pulse duration as a way to convey information. Pulse circuits manage these requirements.
 
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 [[Pulse circuit#Monostable circuit|monostable circuit]].<ref group="note">Note: Some players refer to edge detectors as monostable circuits</ref> Many pulse circuits are monostable because their OFF state is stable, but their ON state will quickly (or eventually) revert to OFF.
+
A circuit that is stable in one output state and unstable in the other is known as a [[Pulse circuit#Monostable circuit|monostable circuit]].<ref group="note">Note: Some players refer to edge detectors as monostable circuits</ref> Many pulse circuits are monostable because their OFF state is stable, but their ON state soon reverts to OFF.
   
 
;[[Pulse circuit#Pulse generator|Pulse generator]]
 
;[[Pulse circuit#Pulse generator|Pulse generator]]
Line 206: Line 229:
   
 
;[[Pulse circuit#Pulse divider|Pulse divider]]
 
;[[Pulse circuit#Pulse divider|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).
+
: A pulse divider (aka pulse counter) outputs a signal only after a certain number of pulses have been detected through the input (the number of pulses is indicative of the number of loops).
   
 
;[[Pulse circuit#Edge detector|Edge detector]]
 
;[[Pulse circuit#Edge detector|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).
+
: An edge detector reacts to either a redstone signal changing from OFF to ON (a "rising edge" detector), from ON to OFF (a "falling edge" detector), or switching between ON and OFF in either order(a "dual edge" detector).
   
 
;[[Pulse circuit#Pulse length detector|Pulse length detector]]
 
;[[Pulse circuit#Pulse length 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 pulse length detector reacts only to pulses in a certain range of durations (often only to pulses of one specific duration).
 
<!-- expose when section is written in main article
 
<!-- expose when section is written in main article
 
;Pulse delay
 
;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.
+
: A pulse delay circuit delays a pulse by a specific duration. Pulse delay circuits can be designed to delay only the rising edge of a pulse (positive delay), the falling edge (negative delay), or both.
 
-->
 
-->
   
=== Clock circuit ===
+
===Clock circuit ===
   
 
{{main|Clock circuit}}
 
{{main|Clock circuit}}
Line 226: Line 249:
 
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).
 
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
+
;Observer clock 1
:A repeating clock made with Observers and Pistons (an Observer looking at a piston)
+
:A repeating clock made with Observers and Pistons (an Observer looking at a piston).
  +
:;Observer clock 2
  +
:: A repeating clock made with two Observers with their faces facing each other.
   
;Repeater clock
+
; Repeater clock
 
: A repeater clock consists of a loop of repeaters (usually either [[redstone repeater]]s or [[redstone torch]]es) with occasional dust or blocks to draw off the appropriate pulses.
 
: A repeater clock consists of a loop of repeaters (usually either [[redstone repeater]]s or [[redstone torch]]es) with occasional dust or blocks to draw off the appropriate pulses.
   
 
;Hopper clock
 
;Hopper clock
: A hopper clock produces timed pulses by moving items around between hoppers and drawing signals off with redstone comparators.
+
:A hopper clock produces timed pulses by moving items back and forth between 2 hoppers feeding into each other and taking a redstone output with comparators.
   
 
;Piston clock
 
;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.
+
:A piston clock produces a loop of pulses by passing a block back and forth (or around, with many pistons) and drawing off a redstone pulse when the block is in a certain location.
   
; Comparator clock
+
;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 sensor]]s, [[minecart]]s, [[boat]]s, water flow, item despawn, etc.
+
:The clock of short or moderate cycle length utilizing comparator's subtraction or signal fading feature. Clocks can also be built using [[daylight sensor]]s, [[minecart]]s, [[boat]]s, water flow, item despawn, etc.
   
=== Memory circuit ===
+
===Memory circuit===
   
 
{{main|Memory circuit}}
 
{{main|Memory circuit}}
Line 248: Line 273:
   
 
;RS latch
 
;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 "[[Mechanics/Redstone/Memory circuit/Basic RS-NOR|RS NOR]] latch", which is the oldest and most common memory circuit in ''Minecraft''.<!-- This is only mentioned here because people will search for "RS NOR 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 "[[Mechanics/Redstone/Memory circuit/Basic RS-NOR|RS NOR]] latch", which is the oldest and most common memory circuit in ''Minecraft''.<!-- This is only mentioned here because people search for "RS NOR latch." -->
   
 
;[[Memory circuit#T flip-flop|T flip-flop]]
 
;[[Memory circuit#T flip-flop|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.
+
: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
 
;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.
+
: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 sets the output equal to its data input on a clock rising transition.
   
 
;JK latch
 
;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).
+
: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).
   
 
;Counter
 
;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.
+
: Unlike T flip-flops and RS latches, which can hold two states (ON or OFF), a counter can be designed to hold a greater number of states.
   
 
Many other memory circuits are possible.
 
Many other memory circuits are possible.
Line 272: Line 297:
 
;Multiplexers and relays
 
;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 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.
   
 
;Randomizers
 
;Randomizers
 
{{Main|Tutorials/Randomizers}}
 
{{Main|Tutorials/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.
+
: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
   
: 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''.
+
: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
 
;Block update detectors
 
{{Main|Tutorials/Block update detector}}{{Main|Tutorials/Comparator update detector}}
 
{{Main|Tutorials/Block update detector}}{{Main|Tutorials/Comparator update detector}}
   
: 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|''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 {{el|be}} versions.
+
: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|''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 {{el|be}} versions.
   
 
Many other complex circuits are possible.
 
Many other complex circuits are possible.
Line 294: Line 319:
 
**
 
**
   
== Video ==
+
== Video==
   
<div style="text-align:center">{{yt|grM9zUygDJs}}</div>
+
<div style="text-align:center">{{yt|grM9zUygDJs}}<div style="text-align:left">The next one only works in [[1.17]]+<div style="text-align:center">{{Yt|y8gc6B_AmZE}}</div><br />
   
== References ==
+
==References==
<references group="note"/>
+
<references group="note" />
   
 
{{Redstone}}
 
{{Redstone}}

Revision as of 16:06, 20 June 2021

A redstone circuit is a structure that activates or controls mechanisms. Circuits can act in response to player or entity/mob 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 provides 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.
  • The Redstone tips tutorial gives general advice about building.

Describing Circuits

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.

Size

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.).

Features

Several features may be considered desirable design goals:

1-high
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.
1-wide
A structure is 1-wide if at least one of its horizontal dimensions is exactly one block wide.
Flat
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.
Flush
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.
Hipster
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.
Instant
A structure is instant if its output responds immediately to its input (a circuit delay of 0 ticks).
Seamless
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.
Silent
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.
Stackable
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.
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 limits the designs available. In particular, redstone comparators, observers and daylight detectors require nether quartz, which is available only from the Nether. Additionally, redstone lamps require glowstone, which is occasionally available from trading or witches, but is much more plentiful in the Nether.

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 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 needs to combine them into more complex circuits to meet the needs of a mechanism.

Transmission circuit

Main article: Transmission circuit

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

Vertical transmission
MCRedstone VertTransPositive

Transmitting signals upward

MCRedstone VertTransNegative

Transmitting signals downward

PE Vertical Redstone Ladder

Examples of two-way vertical ladders in Bedrock Edition

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 upward, either in a straight staircase of blocks, in a 2×2 spiral of blocks, or another similar variation. Redstone staircases can transmit signals both upward and downward but can take up much space and requires 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 (upward 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, glass and pistons can be used to create two-way vertical ladders that transmit signals both upward and downward, glowstone, hoppers, and slabs allow the dust to power upward but not downward.
  • Torch towers and torch ladders: A redstone torch can power a block above it, or redstone dust beneath it, allowing vertical transmission both upward or downward (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 upward and downward. 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 downward or downward when the observer is looking upward. Repeating this pattern means that updates are chained.
  • Daylight detector exploiting: You can use daylight detectors to send a Redstone signal downward 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 detects the change in light and emit a Redstone pulse. This design is extendable upward as far as you want, but you need to have the original hole open to sunlight. It also works only 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 immediately changes to bubble column blocks. This can be used to quickly transmit a redstone signal upward to an observer facing the top water source/bubble column block.
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. Variations include:
Diode
A "diode" is a one-way circuit that allows a signal to travel 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 does not transmit a signal back down.
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.

Logic circuit

Main article: Logic circuit

It's sometimes necessary to check signals against each other and output a signal only when the inputs meet some criteria. A circuit that performs this function is known as a logic gate (a "gate" that allows signals through only 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.

Logic gate outputs
Shows the output (red) of each gate, for each combination of inputs A and B (green).
A ON ON off off Question Answered
B ON off ON off
A AND B ON off off off Is A and B on?
NOT (A IMPLIES B) off ON off off Is A on and B off?
NOT (B IMPLIES A) off off ON off Is B on and A off?
A NOR B off off off ON Are both inputs off?
A ON ON off off Is A on?
A XOR B off ON ON off Are the inputs different?
NOT A off off ON ON Is A off?
A XNOR B ON off off ON Are the inputs the same?
B ON off ON off Is B on?
NOT B off ON off ON Is B off?
A NAND B off ON ON ON Is either input off?
A IMPLIES B ON off ON ON If A is on, is B also on?
B IMPLIES A ON ON off ON If B is on, is A also on?
A OR B ON ON ON off Is either input on?
NOT gate
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.
OR gate
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.
NOR gate
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.
AND gate
An AND gate is on only if all of its inputs are on.
NAND gate
A NAND gate is on if any of its inputs are off.
XOR gate
An XOR gate is on if its inputs are different.
XNOR gate
An XNOR gate is on if its inputs are equal.
IMPLY gate
An IMPLY gate is on unless the first input is on and the second input is off.

Pulse circuit

Main article: 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 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 soon reverts 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) outputs a signal only 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 redstone signal changing from OFF to ON (a "rising edge" detector), from ON to OFF (a "falling edge" detector), or switching between ON and OFF in either order(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).

Clock circuit

Main article: Clock circuit

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 1
A repeating clock made with Observers and Pistons (an Observer looking at a piston).
Observer clock 2
A repeating clock made with two Observers with their faces facing each other.
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 back and forth between 2 hoppers feeding into each other and taking a redstone output with 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 redstone 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.

Memory circuit

Main article: 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. 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 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).
Counter
Unlike T flip-flops and RS latches, which can 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 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.
Randomizers
Main article: Tutorials/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 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.

Video

The next one only works in 1.17+

References

  1. Note: Some players refer to edge detectors as monostable circuits