The Absolute Beginner’s Guide to Everything Redstone by trunksbomb
If you’re here reading this, you either a) are an absolute beginner in making things with redstone and you want to learn how or :cool.gif: you just felt like clicking on the thread. I’m here to help out the person in case A, so the concepts in this guide will start off with the most basic topics regarding redstone. If you feel like any or all of this guide is “common sense” or “easy”, then you don’t have to read it. I’m not forcing you to read it, and I’m for sure not forcing you to comment on it. So if you’ve got any straight negativity to bring to the table, I ask you to find another table and bring your negativity there. If, on the other hand, you have some constructive criticism to bring to the table then, by all means, please do.
The most basic assumption I will make in this guide will be that you have found redstone and you are now trying to do something with it, but you haven’t yet figured it out. Redstone- as you may have noticed while mining it- can be in one of two states at any given time- powered or unpowered. When you come across a block of redstone in a mine or cave, it is initially in an unpowered state. If you happen to click on the redstone ore, you’ll notice that it lights up and starts emitting some red particles. This is the powered state of redstone. In comparison to binary, the unpowered state is off, or 0, and the powered state is on, or 1.
Once you’ve mined some redstone, you will have a various amount of redstone dust. Taking the redstone in hand, you’ll notice that when you place it on the ground, the very first piece forms a redstone cross on top of the block that it was placed on. Placing any redstone north/east/south/west of it will cause the redstone to form a line in that direction. You’ll also notice that when you first place redstone, it will be in its unpowered state (dark red).
Now that we’ve made some basic observations, how do we go about doing something with it? Logically, you must apply some type of power source to the redstone line you’ve placed. The most basic power source is a redstone torch, which is crafted with a stick and a piece of redstone dust. If you place a redstone torch by itself, notice that the default state is powered. If you place this at one end of your line, you’ll see that the line immediately turns “on” to its powered state (brighter red, emitting particles). You’ve now got your first live wire! But what do you do with it?...
How Signals Are Transmitted… An Important Concept!
Now that you know the most basic way to power a redstone line, what can you do with it? Before you can start doing things with redstone, you’ll need to know in what ways a signal is transmitted.
Start by following my example. Find a nice flat area and lay out a line of redstone- oh, say.. 5 blocks long. Again, notice that the line is unpowered. Now, place a redstone torch at one end and the line will become powered. You can think of this torch as now being a “source block” of power to the line.
For the sake of learning, place another redstone torch at the other end of the line. What happened? Nothing. This is because you’ve just placed two “source blocks” of power on the same line. They’re both powering the line, so the line continues to stay on. Nothing special there..
Now, destroy one of the torches. Place a block down where the torch used to be at the end of the line. On top of this block, place a redstone torch.. what happened? The torch switched to an unpowered state. This is an important concept; whenever a torch is receiving power, it will be unpowered. Also a very important concept to understanding redstone is that a redstone torch receives power from a line when it is mounted on a block that is at the same height as the source line. This may be easier to explain in pictures, so here we go!
As you can see in the first picture, torches placed on the ground at the same height as and adjacent to the line (wire) act as power sources. In order to turn a torch off, you must supply it with power. This is done by placing a block at the same height as the redstone wire and mounting the torch on one of the four sides as depicted in the second picture above. You may notice that I left out a torch facing the powered wire. Why is that? Because then you’ve simply got two source blocks powering the same wire. This is important to understand. When redstone wire comes into contact with a vertical face of a block, that face of the block then becomes an input. You can have anywhere from 1 to 5 inputs coming into a block (really you can have 6 but then there would be no output). Any face of the block that has a torch mounted on it therefore becomes an output for that block. In a block with 1 input and 1 output, the output will always be opposite of the input. That is, if the input is powered, the output will be unpowered and vice versa. This type of block is known as an INVERTER, and is the simplest logic gate we can make. We'll learn more about logic gates below.
Whew, that was a lot of concept for one paragraph.. and a lot of text. Let’s break it up with a picture!
In the top-left, you can see that a vertically-mounted torch will power any adjacent wires. The block directly beneath the torch was left out purposely, to show that that particular block is not needed. This is important when you get around to optimizing gate size and efficiency, as you'll be able to sneak some wire where that block would have been.
In the bottom-left, you can see a torch powering a wire directly beneath itself. This is good for short-distance vertical transmission when you need it. For compact, long-distance vertical transmission, you'll want to use the set-up in the top-left (above paragraph).
On the right is one that will mess you up if you're not aware of it, because it's not immediately obvious how it works. When a block is placed above a torch, that block receives power from that torch when the torch is ON. This block will then power any redstone wire adjacent to it. This is similar to a concept that we're already familiar with- buttons, levers, and pressure plates. All of these forms of inputs power the block they are on, which in turn will power any wire adjacent to it. The only difference between those mechanisms and this example is that the torch is powering a block above it- something the mechanisms can't do.
Proper inputs
A nuance to watch out for as a beginner is how you approach your inputs. Input wires must be coming straight into the face of the block. This means that you cannot run a wire north/south and have it connect to an output that is 1 block to the east or west of the wire (fittingly, you can't run it east/west and have it connect to an output 1 block north or south, either). Instead, move the output block one block farther away and lead the wire into the input of the block. To make sure everything connects as it should, ensure that all inputs finish with a straight piece of redstone (not a corner piece).
The wire on the left is a no-no because the wire leading into the input is a corner piece. The wire on the right is a yes-yes because it turns the corner and leads a straight piece of wire into the input. However, the same does not hold true for output. The first piece of wire leading out of an output can be either straight or a corner piece (or any formation of redstone, for that matter).
This does not hold true for outputs that are being powered by redstone on top of its block. Redstone wire can be in any formation if placed on top of a block whose outputs are on its vertical faces. Here is an example:
Please, before you move on, make sure that you understand the concepts we've already covered. Without a solid understanding of how signals get transmitted and how to ensure you've got proper inputs, you will struggle once you start making more complex circuitry. Go in-game, make some of the improper inputs and then fix them. The best way to learn is by doing it yourself. Make sure you understand how signals are transmitted, especially vertical transmission, as these can help you when you understand them and hurt you when you don't.
What do you think the contraption in the second picture does? If you don’t know what it does, test it out. What is the state of the output torch when neither input is powered? When both are powered? When only one is powered? Go ahead and test those three cases and try to figure it out. Still not sure? The output will be toggled (switched from powered to unpowered) when either or both of the inputs are powered. This is called a NOR gate. The output of a NOR gate is TRUE if and only if both inputs are OFF. If any of the inputs are turned ON, the output becomes FALSE (or, OFF). Aside from the INVERTER that we learned about previously, this is one of the simplest logic gates you can make. A logic gate is any combination of blocks, torches, and redstone that takes an input (or inputs) and creates an output.
Now we’re starting to learn how to make some logic gates. We’ve got a simple INVERTER and a NOR gate under our belts. What about an AND gate? An AND gate is only TRUE when all inputs are powered. Start with your output block. Place a torch on top of this- this will be your output. Run redstone wire from any two sides of the block- these are your inputs. Now how are we going to get the output to toggle only when both inputs are turned ON? As we’ve demonstrated, the output(s) on a block will toggle when any of the inputs gets turned on. Looking at that occurrence in a different light, this means that the output will stay off as long as at least 1 of the inputs is powered. So what do we want the default state of each input to be? We want the default input state to be powered. Then, when all of the inputs are unpowered, the output will toggle (turn ON in this case).
So we know what we want, but how do we accomplish it? If we were to attach our power sources directly to the wire already replaced, you’ve got a NOR gate (whose default input state is unpowered). How are we going to make it so that when we place a torch as the power source, it unpowers the input? An INVERTER! Go ahead and install an INVERTER on each of the inputs, with the output of the inverter leading to the inputs that we created first. Now you can pick a face of each INVERTER's block to be the inputs and run redstone out of them to where you'll place power sources. You’ve now got an AND gate! Go ahead and try it out. Start with placing one torch. Did it do anything? It shouldn’t have. Place a torch at each input. Did the final output turn ON? Yes! You’ve just created your first logic gate (INVERTER and NOR didn’t count, they’re too simple!)
Go ahead and try to make an OR gate. The output of an OR gate is TRUE (powered) when one or more of the inputs are powered. Think about it, design it, and open the spoiler below to see if your design works the same way as mine.
This picture also demonstrates an important concept: if two or more redstone wires are merged together, the wire will take the higher input at all times. Essentially, combining them acts as an OR gate. When either wire is powered, that whole section of wire will be powered.
Power Sources
So far, we've placed/removed torches as needed to act as input. A torch powered the line, and having no torch left the line unpowered. However, this is not desired. A torch with no input (the torches we've been using as power sources in our examples) is considered a CONSTANT (CONSTANTS are necessary in more advanced circuitry). Basically, we've been placing and removing CONSTANTS each time we needed to change the input, modifying the circuitry each time. Placing and removing torches is akin to opening up your computer and modifying the circuits instead of having a button that does the desired input for you. So, we need something that simulates USER INPUT instead of modifying the actual circuitry every time we need to change the input.
Thankfully, we’ve got just the remedy, and it comes in the form of levers, buttons, and pressure pads. Buttons and pressure pads are used to send a signal for about 1 second before cutting off again. A pressure pad will stay on as long as an object is on it (you, a mob, or an item). This is good for giving power to something that you only need for a few seconds (such as opening a door). Levers stay in whichever state you put them in.
Go ahead and make a few levers before continuing (cobblestone on bottom, stick on top). In each of the gates you’ve made, replace the torches you were using as power sources with these levers. When first placed, the levers are equivalent of not having placed a torch yet. When you toggle the lever, it’s the same thing as placing a torch to power the wire. Much more convenient, right?
Same Difference... or, Gate Construction Variation
Gates can be made in any number of ways. If you really wanted to, you could build everything out of OR gates, or NAND gates, or XOR gates.. so the examples you've seen so far are just some of numerous ways to make gates. Don't fall prey to thinking that the examples depicted in this guide are the end-all-be-all of logic gates. There are many more that I did not detail, and many combinations of them that form more advance circuitry. Experiment with different gates found in the links below to learn more.
What Can I Output To?
Output is not limited to making a torch turn on or off. Although you can do some pretty cool stuff just with torches (screens, timers, flashing decorations, etc), many other things can be powered by redstone as well!
From top to bottom, we have redstone opening doors, switching rail junctions, playing note blocks, and firing dispensers. Note blocks can be used to make anything from simple door bells or audible alarms to full-scale melodies. Dispensers are great for dispatching enemy mobs, since it fires arrows just like you would with a bow and arrow!
Redstone Simulator
As you're learning about redstone, you are undoubtedly going to see a lot of schematics being posted. What are they? A schematic is simply an easy-to-read diagram of a circuit. The easiest way to make, view, and edit schematics is to use a program called Redstone Simulator. However, interpreting these schematics can be a bit daunting at first, so here's a little explanation of the basics:
That should take care of it for the symbols. If you're interested in designing circuits in redstone, you pretty much need to know how to read these diagrams. I suggest getting the program and creating some of the logic gates we've made so far to get a good grasp on the subject. Now you'll be reading schematics with ease!
Latches, Flip Flops, and Clocks
These are essential components to doing anything substantial with redstone. Each have their own uses and are important in their own ways. Read my reply here to learn a little bit about these components (it's at the bottom of the post).
Material Implication
You may have heard of material implication before and not understood exactly what it means. To be honest, I still don't even completely understand how it works, but I've got a decent grasp on the concept. Check out my post here to learn a little bit about material implication (it's in the middle of the post).
More topics to be continued…
Conclusion
I hope that this guide has given you the very basics of redstone such that you can now pick up other guides on the forum (links at the bottom) and roll with what they’re talking about. If you like this guide, please let me know that my guide isn’t going to waste. If you think there’s something to add or you can explain it better, let me know and I’ll be sure to give credit where it’s due. Also, if you have links to more guides, feel free to post them.
Other Guides/Topics
Redstone Logic Gates and FAQs Compendium - viewtopic.php?f=3&t=111562
--A topic for everything redstone.
“red stuff” logic gates - viewtopic.php?f=35&t=16440
--A pretty large compendium of logic gates. Not a tutorial. (Archived, contains a lot of outdated information).
Minecraft Wiki: Redstone Circuits - http://www.minecraftwiki.net/wiki/Redstone_circuits
--A detailed list of circuits and how they work. Of particular interest is the topic of vertical transmission (at the bottom).
Redstone Simulator - viewtopic.php?t=17924
--A program for designing redstone circuits.
Credits
--imapiekindaguy - catching my careless mistake.
--DiEvAl - suggested [img] tags to make things smaller.
--icks - corrected my labeling of a NOR gate as an OR gate. Also clarified my description of inputs and outputs.
--Cadde - suggesting that I change my presentation of power transitions to be more clear ("How Signals Are Transmitted" section),clarifying between CONSTANTS and USER INPUT, detailing the numerous ways gates can be formed.
--CX gamer - credit for inclusion of alternate outputs ("What Can I Output To?" section).
--Laogeodritt - more careless mistakes, some clarifications.
Glad I could be of assistance! Although I knew boolean algebra beforehand, the fundamentals of how to use redstone didn't come to me at first. I couldn't figure out why the torches weren't cutting off (I was actually placing two torches as INPUTS and expecting one of them to behave as an OUTPUT- but I didn't know that!), so I gave up on redstone for a little while. I'm hoping to help out the people that had similar first-experiences with redstone.
Nice guide! Seems like a good guide for a redstone newbie - it's concise, yet spells things out clearly for newbies of (I would think) most backgrounds. There are a few things lacking here and there, though.
A few comments:
Buttons and levers are used to send a signal for about 1 second before cutting off again.
Buttons ... and pressure plates maybe? =P
- For forums and the web in general, you should probably separate paragraphs with whitespace (for plain text, like on fora, use two newlines). It makes things look less wall-of-text-y and easier to read.
- For logic gates, I'd suggest you make subheadings for each one (or just visually distinguish sections on different gates at a glance) and explain them from a more intuitive perspective - personally, I'd cover the idea by starting from the name (AND gate, etc.) to suggest an intuitive understanding. Otherwise, some people might not make that connection (particularly with the inverted gates - NAND, NOR, etc.), and simply try to memorize the truth-table definitions. I would also cover AND, OR, first because they're (IMO) easier to understand than NAND, NOR, and so on, and it seems more intuitive to teach basic boolean logic that way, even though Redstone designs are the other way around in terms of complexity.
- Elegant way of explaining block and torch input/outputs. I mostly learned it from messing around, and although I did find a "general rule" it was contrived and still relied on memorizing a few odd set-ups. Yours seems simpler to grasp in comparison.
- I wouldn't put the last section under "advanced concepts"; it seems like pretty fundamental "How the heck do I get this particular setup to work?!" type thing. I'd keep the word "advanced" for more complex wiring or even design considerations.
- Some suggestions for further topics:
--- Wire directionality (how to figure out whether a wire is powering something or not, or which wires connect to each other, mentioning adjacent wires on blocks one height-level apart connecting together, etc.)
--- Vertical transmission of power, in addition to the horizontal info you have right now. (upward and downward) [EDIT]
--- Hiding circuitry in one's home, etc. (an application of transmission behaviour - small section, but still useful to the beginner)
--- A few simple projects (basic door-opener, lock, alarm system), if you want this to be a complete beginner's guide. =P After all, there's always the eternal newbie's question(s), "But what does it do? / But what is it good for?"
--- Maybe an intro to sequential logic? RS NOR latches are pretty fundamental to a lot of designs - even the simple alarm/notification system!
Thanks for the criticism, Laogeodritt! I really do appreciate it.
I've made some changes in the guide and credited you accordingly. Once I add in some of your more in-depth suggestions (reworking logic gates section, example projects), I'll be sure to credit you again.
I'm not sure what you meant by wire directionality. If you mean what I think you mean, I explained that concept in the first section, "How Signals are Transmitted..." It may be my naive understanding, but I don't think referring to wires as having a direction is a good idea. When all your wiring is isolated (that is, none of them cross), then this would be a suitable explanation. But once you get to combining wires, which way is the direction flowing? Unless you mean the general "direction" from input to output.
All your suggestions sound great, and well within the scope of this guide. I know that all of those will add up to be about equal to the current length of the guide.. and I don't want to crowd things up! Hopefully I'll be able to keep things organized.. because I definitely want to include those things.
In other news...
I am working on an example redstone tutorial world. You have the option of taking the guided tour or heading directly to any of the sections. The planned sections are:
Thanks for the criticism, Laogeodritt! I really do appreciate it.
No problem! Glad I could help.
Anyway, seems like you're putting some good effort to make Redstone more accessible to the community. I'm not sure what's out there already in terms of beginner tutorials, but I know a lot of people say that they don't understand Redstone, so this should be quite appreciated for people. Good work, and keep it up! =]
I'm not sure what you meant by wire directionality. If you mean what I think you mean, I explained that concept in the first section, "How Signals are Transmitted..." It may be my naive understanding, but I don't think referring to wires as having a direction is a good idea.
Ahh, I think we misunderstand each other for "directionality". I just meant how the wires connect to each other, connect to blocks, send/receive power from torches — so direction meaning north-south, east-west,the various T-shapes, and so on. Not vectorial direction (going from north to south etc.). You covered it quite well in transmission and in proper inputs (and I think I had skimmed over it a bit too quickly before my last post).
Also, your understanding in terms of direction of "flow" of energy is quite good IMO. Wires are pretty much nodes (or ideal conductors) in terms of real-world electronics, and energy/signals basically digital voltage signals. Indeed, there is no movement or directionality within a wire, and for basic systems and gates/latches, you shouldn't think of the systems having that directionality at all. However, the fact that there is a one-tick delay for propagation of a change through each torch does imply an idea of directionality of a signal through different components, especially larger systems where that delay is less trivial; in that case, and in multi-stage systems, I think it's fair to consider a signal as having a direction.
(I'm an electrical engineering student and electronics hobbyist, so the comparison to real-life electronics comes naturally. XD)
I'm just trying to help those people that started out like me.. utterly confused by how to implement Boolean logic through redstone. I completely gave up on it after my first try due to frustration. I don't know if I didn't search hard enough, or read well enough, but the guides I read weren't much help. It was probably that I didn't read well enough! Haha.. thus, this was born. My baby!
Just a bit of a dabble paste (double post, for those certain peoples).
My computer's A/C adapter died on me, so I haven't been able to do anything MC related. The charger should be in by Friday (hopefully!), at which point there will be more added to this topic. I had started working on a sample redstone world (with the help of Cadde), but I haven't been able to complete it due to the aforementioned little problem.
Glad to see that this topic is getting so many views! (Views are what count, not posts).
I'm back! Got my new computer charger so I'm in business. Got no time tonight, and classes start tomorrow, so I'll be on this sometime this weekend. YES.
Send me a PM Cadde, with your world and the world that we were working on.
In other news...
Help me get the word out there about this topic! Put it in your signature, or link people to it when they ask basic questions about redstone. You can do the same for the Redstone FAQ Compendium too! Yeaaa! So far it's just been me self-advertising the threads. I can tell they're getting some use though because they're definitely getting a steady stream of views.
I am glad to see this thread, as I ignored the alpha one since I hadn't worked my way up to needing redstone. I am doing a similar thread on the behavior of liquids.(viewtopic.php?f=1020&t=119498)
Maybe we can get our heads together and combine the two. All I've seen redstone and water used together for are secret sand doors (and cannons, kind of - they have redstone and water in them). We have got to be able to do something better than just that.
Can anybody explain the 'levels' of redstone? What i mean is that sometimes I try to build a simple warning light from a wooden pressure plate over to a redstone torch, and it either works or doesn't work depending on how I create the wires and whether they go up a block or two blocks in height from where the main wiring is etc.
Also, I'm trying to build an alarm system on my roof using wooden pressure plates (about 16 of them) and have them all link up via redstone wires to a redstone inverter over to a redstone torch that when the pressure plates are stepped on the light should come on, however it's always on, and I don't know if this has to do with so many pressure plates being wired up or the direction that the wires go etc.
Maybe I'll add a dedicated section for the nuances of wiring, instead of having it as a subheading under the additional info. Who reads additional info, anyways?!
Basically, there's a few ways to make input.
Here is the legend for the symbols I will be using: = Redstone wire = just a plain, everday block = A redstone torch mounted on a vertical face of a block = A redstone torch mounted on the top of a block = The ground
First, we have a straight redstone wire leading into a block:
In this form, the input wire must be leading straight into the block. That is, the wire that is coming into contact with the vertical face of the block must be a straight wire (no corners, parallel, or three-way or four-way intersection pieces).
Next, we have redstone wire on-top of a block feeding vertically-mounted torches on the same block:
[]
[]
In this form, the input wire can be in any shape (straight, corner, three-way, four-way, parallel). Any way you feed input this way will work.
This next form is most commonly used as the final output in button/lever/switch-operated doors. This is a redstone torch feeding a block above it:
[] []
[] []
[] []
That one is pretty straight forward.
Last, we've got a vertically mounted redstone torch powering a redstone wire directly beneath it:
Hope that clarifies! Like I said, look for a dedicated section on that in the future.
Maybe we can get our heads together and combine the two. All I've seen redstone and water used together for are secret sand doors (and cannons, kind of - they have redstone and water in them). We have got to be able to do something better than just that.
I've seen a really simple counter design using a boat and water. The basic idea was to have a loop of water flowing around, and using a number of doors equal to the value n that you want to count to. A clock pulse of about 1s would open all the doors, allow the boat to travel through one door, hence advancing the counter. In one of the inter-door spaces, there would be a wooden pressure plate for the boat to activate, which is the output - it is HIGH for every n clock pulses, and LOW otherwise.
It's more compact and requires a lot less resources than making a ripple counter or synchronous counter using T or JK flipflops. I think a 5-counter takes about the surface area of a T flipflop, maybe 4-5 blocks high. Compare that to a 3-bit ripple counter AND the reset circuit...
(Only thing is that the doors are really noisy!)
I'm not sure of the specifics (as described, I don't think it works out if built naïvely), and I can't recall exactly where I saw it.
I think it used wooden pressure plates to "hollow out" the centre (prevent water from flowing in), rather than raised blocks. I'm not sure if it has importance to, say, the boat's freedom of movement... half-blocks would work out there I guess.
One limitation, right now, with using water/redstone systems is that there's no easy (and reversible) way to control flow of water via redstone; you can rely on particular behaviours and updating blocks via redstone to modify flow, but it's usually permanent until you reset the whole thing. A (non-mod) floodgate-type block would be rather useful.
I saw the same video, Lao. That was really impressive!
For the noise issue, you could just chain extenders to and from the counter and bury it deep and/or put it far away. Of course, this introduces a longer delay, depending on how far away it is. So there's a tradeoff- noisy, but fast; or quiet, but slow. You pick!
As far as redstone interacting with water, I'll probably put that under the Additional Info section. That way, the reader knows it exists without cramming the whole water/redstone deal in the thread. It's outside the scope of this guide, so feel free to make a guide and I will definitely link to it.
Also, do you think this guide (and the Compendium) would be more helpful in the Beta - Survival forum? It's not really suited for that as it truly is more of a discussion. I think it will get flooded out of there a lot more quickly than in here due to all the spam that circulates daily in that forum. This thread specifically does not get a lot of replies, but it gets a lot of views after someone has posted. People are using it, but it's generally the nature of the novice to read and not post. I'm fine with that, it's just that I don't think this guide gets as much exposure as it could.
by trunksbomb
If you’re here reading this, you either a) are an absolute beginner in making things with redstone and you want to learn how or :cool.gif: you just felt like clicking on the thread. I’m here to help out the person in case A, so the concepts in this guide will start off with the most basic topics regarding redstone. If you feel like any or all of this guide is “common sense” or “easy”, then you don’t have to read it. I’m not forcing you to read it, and I’m for sure not forcing you to comment on it. So if you’ve got any straight negativity to bring to the table, I ask you to find another table and bring your negativity there. If, on the other hand, you have some constructive criticism to bring to the table then, by all means, please do.
Table of Contents
[*:3usqo0so]The Basics of Redstone
[*:3usqo0so]How Signals are Transmitted
[*:3usqo0so]Proper Inputs
[*:3usqo0so]Logic Gates
[*:3usqo0so]Power Sources
[*:3usqo0so]Additional Information
[*:3usqo0so]Conclusion
[*:3usqo0so]Other Guides and Topics
[*:3usqo0so]Credits
The Basics of Redstone
The most basic assumption I will make in this guide will be that you have found redstone and you are now trying to do something with it, but you haven’t yet figured it out. Redstone- as you may have noticed while mining it- can be in one of two states at any given time- powered or unpowered. When you come across a block of redstone in a mine or cave, it is initially in an unpowered state. If you happen to click on the redstone ore, you’ll notice that it lights up and starts emitting some red particles. This is the powered state of redstone. In comparison to binary, the unpowered state is off, or 0, and the powered state is on, or 1.
Once you’ve mined some redstone, you will have a various amount of redstone dust. Taking the redstone in hand, you’ll notice that when you place it on the ground, the very first piece forms a redstone cross on top of the block that it was placed on. Placing any redstone north/east/south/west of it will cause the redstone to form a line in that direction. You’ll also notice that when you first place redstone, it will be in its unpowered state (dark red).
Now that we’ve made some basic observations, how do we go about doing something with it? Logically, you must apply some type of power source to the redstone line you’ve placed. The most basic power source is a redstone torch, which is crafted with a stick and a piece of redstone dust. If you place a redstone torch by itself, notice that the default state is powered. If you place this at one end of your line, you’ll see that the line immediately turns “on” to its powered state (brighter red, emitting particles). You’ve now got your first live wire! But what do you do with it?...
How Signals Are Transmitted… An Important Concept!
Now that you know the most basic way to power a redstone line, what can you do with it? Before you can start doing things with redstone, you’ll need to know in what ways a signal is transmitted.
Start by following my example. Find a nice flat area and lay out a line of redstone- oh, say.. 5 blocks long. Again, notice that the line is unpowered. Now, place a redstone torch at one end and the line will become powered. You can think of this torch as now being a “source block” of power to the line.
For the sake of learning, place another redstone torch at the other end of the line. What happened? Nothing. This is because you’ve just placed two “source blocks” of power on the same line. They’re both powering the line, so the line continues to stay on. Nothing special there..
Now, destroy one of the torches. Place a block down where the torch used to be at the end of the line. On top of this block, place a redstone torch.. what happened? The torch switched to an unpowered state. This is an important concept; whenever a torch is receiving power, it will be unpowered. Also a very important concept to understanding redstone is that a redstone torch receives power from a line when it is mounted on a block that is at the same height as the source line. This may be easier to explain in pictures, so here we go!
[img]http://img59.imageshack.us/img59/714/20101216224637.png[/img]
[img]http://img51.imageshack.us/img51/9354/20101216225635.png[/img]
As you can see in the first picture, torches placed on the ground at the same height as and adjacent to the line (wire) act as power sources. In order to turn a torch off, you must supply it with power. This is done by placing a block at the same height as the redstone wire and mounting the torch on one of the four sides as depicted in the second picture above. You may notice that I left out a torch facing the powered wire. Why is that? Because then you’ve simply got two source blocks powering the same wire. This is important to understand. When redstone wire comes into contact with a vertical face of a block, that face of the block then becomes an input. You can have anywhere from 1 to 5 inputs coming into a block (really you can have 6 but then there would be no output). Any face of the block that has a torch mounted on it therefore becomes an output for that block. In a block with 1 input and 1 output, the output will always be opposite of the input. That is, if the input is powered, the output will be unpowered and vice versa. This type of block is known as an INVERTER, and is the simplest logic gate we can make. We'll learn more about logic gates below.
Whew, that was a lot of concept for one paragraph.. and a lot of text. Let’s break it up with a picture!
[img]http://img141.imageshack.us/img141/9022/20110107233953.png[/img]
In the top-left, you can see that a vertically-mounted torch will power any adjacent wires. The block directly beneath the torch was left out purposely, to show that that particular block is not needed. This is important when you get around to optimizing gate size and efficiency, as you'll be able to sneak some wire where that block would have been.
In the bottom-left, you can see a torch powering a wire directly beneath itself. This is good for short-distance vertical transmission when you need it. For compact, long-distance vertical transmission, you'll want to use the set-up in the top-left (above paragraph).
On the right is one that will mess you up if you're not aware of it, because it's not immediately obvious how it works. When a block is placed above a torch, that block receives power from that torch when the torch is ON. This block will then power any redstone wire adjacent to it. This is similar to a concept that we're already familiar with- buttons, levers, and pressure plates. All of these forms of inputs power the block they are on, which in turn will power any wire adjacent to it. The only difference between those mechanisms and this example is that the torch is powering a block above it- something the mechanisms can't do.
Proper inputs
A nuance to watch out for as a beginner is how you approach your inputs. Input wires must be coming straight into the face of the block. This means that you cannot run a wire north/south and have it connect to an output that is 1 block to the east or west of the wire (fittingly, you can't run it east/west and have it connect to an output 1 block north or south, either). Instead, move the output block one block farther away and lead the wire into the input of the block. To make sure everything connects as it should, ensure that all inputs finish with a straight piece of redstone (not a corner piece).
[img]http://img196.imageshack.us/img196/7719/20101217002035.png[/img]
The wire on the left is a no-no because the wire leading into the input is a corner piece. The wire on the right is a yes-yes because it turns the corner and leads a straight piece of wire into the input. However, the same does not hold true for output. The first piece of wire leading out of an output can be either straight or a corner piece (or any formation of redstone, for that matter).
This does not hold true for outputs that are being powered by redstone on top of its block. Redstone wire can be in any formation if placed on top of a block whose outputs are on its vertical faces. Here is an example:
[img]http://img403.imageshack.us/img403/7190/20101219141446.png[/img]
Please, before you move on, make sure that you understand the concepts we've already covered. Without a solid understanding of how signals get transmitted and how to ensure you've got proper inputs, you will struggle once you start making more complex circuitry. Go in-game, make some of the improper inputs and then fix them. The best way to learn is by doing it yourself. Make sure you understand how signals are transmitted, especially vertical transmission, as these can help you when you understand them and hurt you when you don't.
Logic Gates
[img]http://img220.imageshack.us/img220/4133/20101217000427.png[/img]
[img]http://img69.imageshack.us/img69/7788/20101216232309.png[/img]
What do you think the contraption in the second picture does? If you don’t know what it does, test it out. What is the state of the output torch when neither input is powered? When both are powered? When only one is powered? Go ahead and test those three cases and try to figure it out. Still not sure? The output will be toggled (switched from powered to unpowered) when either or both of the inputs are powered. This is called a NOR gate. The output of a NOR gate is TRUE if and only if both inputs are OFF. If any of the inputs are turned ON, the output becomes FALSE (or, OFF). Aside from the INVERTER that we learned about previously, this is one of the simplest logic gates you can make. A logic gate is any combination of blocks, torches, and redstone that takes an input (or inputs) and creates an output.
Now we’re starting to learn how to make some logic gates. We’ve got a simple INVERTER and a NOR gate under our belts. What about an AND gate? An AND gate is only TRUE when all inputs are powered. Start with your output block. Place a torch on top of this- this will be your output. Run redstone wire from any two sides of the block- these are your inputs. Now how are we going to get the output to toggle only when both inputs are turned ON? As we’ve demonstrated, the output(s) on a block will toggle when any of the inputs gets turned on. Looking at that occurrence in a different light, this means that the output will stay off as long as at least 1 of the inputs is powered. So what do we want the default state of each input to be? We want the default input state to be powered. Then, when all of the inputs are unpowered, the output will toggle (turn ON in this case).
So we know what we want, but how do we accomplish it? If we were to attach our power sources directly to the wire already replaced, you’ve got a NOR gate (whose default input state is unpowered). How are we going to make it so that when we place a torch as the power source, it unpowers the input? An INVERTER! Go ahead and install an INVERTER on each of the inputs, with the output of the inverter leading to the inputs that we created first. Now you can pick a face of each INVERTER's block to be the inputs and run redstone out of them to where you'll place power sources. You’ve now got an AND gate! Go ahead and try it out. Start with placing one torch. Did it do anything? It shouldn’t have. Place a torch at each input. Did the final output turn ON? Yes! You’ve just created your first logic gate (INVERTER and NOR didn’t count, they’re too simple!)
An AND gate
[img]http://img80.imageshack.us/img80/9599/20101216234055.png[/img]
Go ahead and try to make an OR gate. The output of an OR gate is TRUE (powered) when one or more of the inputs are powered. Think about it, design it, and open the spoiler below to see if your design works the same way as mine.
This picture also demonstrates an important concept: if two or more redstone wires are merged together, the wire will take the higher input at all times. Essentially, combining them acts as an OR gate. When either wire is powered, that whole section of wire will be powered.
Power Sources
So far, we've placed/removed torches as needed to act as input. A torch powered the line, and having no torch left the line unpowered. However, this is not desired. A torch with no input (the torches we've been using as power sources in our examples) is considered a CONSTANT (CONSTANTS are necessary in more advanced circuitry). Basically, we've been placing and removing CONSTANTS each time we needed to change the input, modifying the circuitry each time. Placing and removing torches is akin to opening up your computer and modifying the circuits instead of having a button that does the desired input for you. So, we need something that simulates USER INPUT instead of modifying the actual circuitry every time we need to change the input.
Thankfully, we’ve got just the remedy, and it comes in the form of levers, buttons, and pressure pads. Buttons and pressure pads are used to send a signal for about 1 second before cutting off again. A pressure pad will stay on as long as an object is on it (you, a mob, or an item). This is good for giving power to something that you only need for a few seconds (such as opening a door). Levers stay in whichever state you put them in.
Go ahead and make a few levers before continuing (cobblestone on bottom, stick on top). In each of the gates you’ve made, replace the torches you were using as power sources with these levers. When first placed, the levers are equivalent of not having placed a torch yet. When you toggle the lever, it’s the same thing as placing a torch to power the wire. Much more convenient, right?
[img]http://img542.imageshack.us/img542/3543/20101216235054.png[/img]
Additional Information
Same Difference... or, Gate Construction Variation
Gates can be made in any number of ways. If you really wanted to, you could build everything out of OR gates, or NAND gates, or XOR gates.. so the examples you've seen so far are just some of numerous ways to make gates. Don't fall prey to thinking that the examples depicted in this guide are the end-all-be-all of logic gates. There are many more that I did not detail, and many combinations of them that form more advance circuitry. Experiment with different gates found in the links below to learn more.
What Can I Output To?
Output is not limited to making a torch turn on or off. Although you can do some pretty cool stuff just with torches (screens, timers, flashing decorations, etc), many other things can be powered by redstone as well!
[img]http://img121.imageshack.us/img121/2562/20101219140231.png[/img]
[img]http://img375.imageshack.us/img375/6894/20101219140727.png[/img]
[img]http://img16.imageshack.us/img16/7740/20110117142126.png[/img]
[img]http://img11.imageshack.us/img11/8780/20110117142620.png[/img]
From top to bottom, we have redstone opening doors, switching rail junctions, playing note blocks, and firing dispensers. Note blocks can be used to make anything from simple door bells or audible alarms to full-scale melodies. Dispensers are great for dispatching enemy mobs, since it fires arrows just like you would with a bow and arrow!
Redstone Simulator
As you're learning about redstone, you are undoubtedly going to see a lot of schematics being posted. What are they? A schematic is simply an easy-to-read diagram of a circuit. The easiest way to make, view, and edit schematics is to use a program called Redstone Simulator. However, interpreting these schematics can be a bit daunting at first, so here's a little explanation of the basics:
[img]http://img833.imageshack.us/img833/430/tutorialo.png[/img]
That should take care of it for the symbols. If you're interested in designing circuits in redstone, you pretty much need to know how to read these diagrams. I suggest getting the program and creating some of the logic gates we've made so far to get a good grasp on the subject. Now you'll be reading schematics with ease!
Latches, Flip Flops, and Clocks
These are essential components to doing anything substantial with redstone. Each have their own uses and are important in their own ways. Read my reply here to learn a little bit about these components (it's at the bottom of the post).
Material Implication
You may have heard of material implication before and not understood exactly what it means. To be honest, I still don't even completely understand how it works, but I've got a decent grasp on the concept. Check out my post here to learn a little bit about material implication (it's in the middle of the post).
More topics to be continued…
Conclusion
I hope that this guide has given you the very basics of redstone such that you can now pick up other guides on the forum (links at the bottom) and roll with what they’re talking about. If you like this guide, please let me know that my guide isn’t going to waste. If you think there’s something to add or you can explain it better, let me know and I’ll be sure to give credit where it’s due. Also, if you have links to more guides, feel free to post them.
Other Guides/Topics
Redstone Logic Gates and FAQs Compendium - viewtopic.php?f=3&t=111562
--A topic for everything redstone.
“red stuff” logic gates - viewtopic.php?f=35&t=16440
--A pretty large compendium of logic gates. Not a tutorial. (Archived, contains a lot of outdated information).
Minecraft Wiki: Redstone Circuits - http://www.minecraftwiki.net/wiki/Redstone_circuits
--A detailed list of circuits and how they work. Of particular interest is the topic of vertical transmission (at the bottom).
Redstone Simulator - viewtopic.php?t=17924
--A program for designing redstone circuits.
Credits
--imapiekindaguy - catching my careless mistake.
--DiEvAl - suggested [img] tags to make things smaller.
--icks - corrected my labeling of a NOR gate as an OR gate. Also clarified my description of inputs and outputs.
--Cadde - suggesting that I change my presentation of power transitions to be more clear ("How Signals Are Transmitted" section),clarifying between CONSTANTS and USER INPUT, detailing the numerous ways gates can be formed.
--CX gamer - credit for inclusion of alternate outputs ("What Can I Output To?" section).
--Laogeodritt - more careless mistakes, some clarifications.
A few comments:
Buttons ... and pressure plates maybe? =P
- For forums and the web in general, you should probably separate paragraphs with whitespace (for plain text, like on fora, use two newlines). It makes things look less wall-of-text-y and easier to read.
- For logic gates, I'd suggest you make subheadings for each one (or just visually distinguish sections on different gates at a glance) and explain them from a more intuitive perspective - personally, I'd cover the idea by starting from the name (AND gate, etc.) to suggest an intuitive understanding. Otherwise, some people might not make that connection (particularly with the inverted gates - NAND, NOR, etc.), and simply try to memorize the truth-table definitions. I would also cover AND, OR, first because they're (IMO) easier to understand than NAND, NOR, and so on, and it seems more intuitive to teach basic boolean logic that way, even though Redstone designs are the other way around in terms of complexity.
- Elegant way of explaining block and torch input/outputs. I mostly learned it from messing around, and although I did find a "general rule" it was contrived and still relied on memorizing a few odd set-ups. Yours seems simpler to grasp in comparison.
- I wouldn't put the last section under "advanced concepts"; it seems like pretty fundamental "How the heck do I get this particular setup to work?!" type thing. I'd keep the word "advanced" for more complex wiring or even design considerations.
- Some suggestions for further topics:
--- Wire directionality (how to figure out whether a wire is powering something or not, or which wires connect to each other, mentioning adjacent wires on blocks one height-level apart connecting together, etc.)
--- Vertical transmission of power, in addition to the horizontal info you have right now. (upward and downward) [EDIT]
--- Hiding circuitry in one's home, etc. (an application of transmission behaviour - small section, but still useful to the beginner)
--- A few simple projects (basic door-opener, lock, alarm system), if you want this to be a complete beginner's guide. =P After all, there's always the eternal newbie's question(s), "But what does it do? / But what is it good for?"
--- Maybe an intro to sequential logic? RS NOR latches are pretty fundamental to a lot of designs - even the simple alarm/notification system!
I've made some changes in the guide and credited you accordingly. Once I add in some of your more in-depth suggestions (reworking logic gates section, example projects), I'll be sure to credit you again.
I'm not sure what you meant by wire directionality. If you mean what I think you mean, I explained that concept in the first section, "How Signals are Transmitted..." It may be my naive understanding, but I don't think referring to wires as having a direction is a good idea. When all your wiring is isolated (that is, none of them cross), then this would be a suitable explanation. But once you get to combining wires, which way is the direction flowing? Unless you mean the general "direction" from input to output.
All your suggestions sound great, and well within the scope of this guide. I know that all of those will add up to be about equal to the current length of the guide.. and I don't want to crowd things up! Hopefully I'll be able to keep things organized.. because I definitely want to include those things.
In other news...
I am working on an example redstone tutorial world. You have the option of taking the guided tour or heading directly to any of the sections. The planned sections are:
1 - Basic Signals, Inputs, Outputs (completed)
2 - Logic Gates (started)
3 - Practical Implementations
4 - Sequential Logic
I'm basically transcribing this guide into signs in-game alongside interactive examples. Should make for a much better learning experience!
IP: 99.170.150.158
Server Status:
Anyway, seems like you're putting some good effort to make Redstone more accessible to the community. I'm not sure what's out there already in terms of beginner tutorials, but I know a lot of people say that they don't understand Redstone, so this should be quite appreciated for people. Good work, and keep it up! =]
Ahh, I think we misunderstand each other for "directionality". I just meant how the wires connect to each other, connect to blocks, send/receive power from torches — so direction meaning north-south, east-west,the various T-shapes, and so on. Not vectorial direction (going from north to south etc.). You covered it quite well in transmission and in proper inputs (and I think I had skimmed over it a bit too quickly before my last post).
Also, your understanding in terms of direction of "flow" of energy is quite good IMO. Wires are pretty much nodes (or ideal conductors) in terms of real-world electronics, and energy/signals basically digital voltage signals. Indeed, there is no movement or directionality within a wire, and for basic systems and gates/latches, you shouldn't think of the systems having that directionality at all. However, the fact that there is a one-tick delay for propagation of a change through each torch does imply an idea of directionality of a signal through different components, especially larger systems where that delay is less trivial; in that case, and in multi-stage systems, I think it's fair to consider a signal as having a direction.
(I'm an electrical engineering student and electronics hobbyist, so the comparison to real-life electronics comes naturally. XD)
No just kidding.
I'm just trying to help those people that started out like me.. utterly confused by how to implement Boolean logic through redstone. I completely gave up on it after my first try due to frustration. I don't know if I didn't search hard enough, or read well enough, but the guides I read weren't much help. It was probably that I didn't read well enough! Haha.. thus, this was born. My baby!
We apparently have pretty different views of "long". XD
Anyway, yeah, it was just a side-note on my thoughts of directed wires.
Thanks,
My computer's A/C adapter died on me, so I haven't been able to do anything MC related. The charger should be in by Friday (hopefully!), at which point there will be more added to this topic. I had started working on a sample redstone world (with the help of Cadde), but I haven't been able to complete it due to the aforementioned little problem.
Glad to see that this topic is getting so many views! (Views are what count, not posts).
Send me a PM Cadde, with your world and the world that we were working on.
In other news...
Help me get the word out there about this topic! Put it in your signature, or link people to it when they ask basic questions about redstone. You can do the same for the Redstone FAQ Compendium too! Yeaaa! So far it's just been me self-advertising the threads. I can tell they're getting some use though because they're definitely getting a steady stream of views.
Maybe we can get our heads together and combine the two. All I've seen redstone and water used together for are secret sand doors (and cannons, kind of - they have redstone and water in them). We have got to be able to do something better than just that.
This thread bores me.
Also, I'm trying to build an alarm system on my roof using wooden pressure plates (about 16 of them) and have them all link up via redstone wires to a redstone inverter over to a redstone torch that when the pressure plates are stepped on the light should come on, however it's always on, and I don't know if this has to do with so many pressure plates being wired up or the direction that the wires go etc.
Basically, there's a few ways to make input.
Here is the legend for the symbols I will be using:
First, we have a straight redstone wire leading into a block:
In this form, the input wire must be leading straight into the block. That is, the wire that is coming into contact with the vertical face of the block must be a straight wire (no corners, parallel, or three-way or four-way intersection pieces).
Next, we have redstone wire on-top of a block feeding vertically-mounted torches on the same block:
[]
[]
In this form, the input wire can be in any shape (straight, corner, three-way, four-way, parallel). Any way you feed input this way will work.
This next form is most commonly used as the final output in button/lever/switch-operated doors. This is a redstone torch feeding a block above it:
[] []
[] []
[] []
That one is pretty straight forward.
Last, we've got a vertically mounted redstone torch powering a redstone wire directly beneath it:
Hope that clarifies! Like I said, look for a dedicated section on that in the future.
Much appreciated.
I've seen a really simple counter design using a boat and water. The basic idea was to have a loop of water flowing around, and using a number of doors equal to the value n that you want to count to. A clock pulse of about 1s would open all the doors, allow the boat to travel through one door, hence advancing the counter. In one of the inter-door spaces, there would be a wooden pressure plate for the boat to activate, which is the output - it is HIGH for every n clock pulses, and LOW otherwise.
It's more compact and requires a lot less resources than making a ripple counter or synchronous counter using T or JK flipflops. I think a 5-counter takes about the surface area of a T flipflop, maybe 4-5 blocks high. Compare that to a 3-bit ripple counter AND the reset circuit...
(Only thing is that the doors are really noisy!)
I'm not sure of the specifics (as described, I don't think it works out if built naïvely), and I can't recall exactly where I saw it.
I think it used wooden pressure plates to "hollow out" the centre (prevent water from flowing in), rather than raised blocks. I'm not sure if it has importance to, say, the boat's freedom of movement... half-blocks would work out there I guess.
One limitation, right now, with using water/redstone systems is that there's no easy (and reversible) way to control flow of water via redstone; you can rely on particular behaviours and updating blocks via redstone to modify flow, but it's usually permanent until you reset the whole thing. A (non-mod) floodgate-type block would be rather useful.
For the noise issue, you could just chain extenders to and from the counter and bury it deep and/or put it far away. Of course, this introduces a longer delay, depending on how far away it is. So there's a tradeoff- noisy, but fast; or quiet, but slow. You pick!
As far as redstone interacting with water, I'll probably put that under the Additional Info section. That way, the reader knows it exists without cramming the whole water/redstone deal in the thread. It's outside the scope of this guide, so feel free to make a guide and I will definitely link to it.
Also, do you think this guide (and the Compendium) would be more helpful in the Beta - Survival forum? It's not really suited for that as it truly is more of a discussion. I think it will get flooded out of there a lot more quickly than in here due to all the spam that circulates daily in that forum. This thread specifically does not get a lot of replies, but it gets a lot of views after someone has posted. People are using it, but it's generally the nature of the novice to read and not post. I'm fine with that, it's just that I don't think this guide gets as much exposure as it could.
Did sssssssSSsomeone SsssaSSSsay sssSSSsssticky?