Here is a 4-high castle portcullis. It's raised from below using 4 stacked sticky pistons and 4 layers of gravel. It's pushed back down from above by 4 stacked pistons. (The top one is sticky, to help making raising easier.) It works quickly, and is at or near the theoretical fastest speed for this type of action. (Extending, then sequentially retracting 4 stacked pistons, using sticky pistons in the correct order to pull the other pistons back.)
It works equally well in SSP and SMP, but I filmed it in single player because the thing runs too fast to see with lag.
This was actually quite simple to build! It has been observed that the sequence of piston extension/retractions can be pretty complicated if you want to push, then pull back several pistons. In the case of four vertically stacked pistons there are 7 possible places to apply power. (rows 1-7) It turns out that row 6 isn't needed. If 1 indicating "power row 1" and !1 indicating "cut power to row 1", then an acceptable sequence is:
1,3,5,7,!7,!5,!3,!1,4,!4,2,!2,3,!3
That looks like a lot of actions to get in the right logical order, but if you look at each row by itself, what's happening is very simple. For example, row 1 turns on immediately, then stays on for a fixed length of time. That's just a single long pulse generator! Row 5 is the same, only with the pulse delayed a bit. Row 3 is the only one that takes two pulses. So just wire a common input up to a pulse generator for each row, with the right pulse length and delay, and the entire circuit is done!
Here's a diagram of what I believe is a fastest possible sequence for this piston action, along with the required redstone signals. See how simple they are, if you just look at the pulses required and not the logic? (Slightly faster is possible if you don't limit yourself to whole-tick delays and play games with the block update order, but that is finicky to do.)
The redstone can easily be compacted, but I made no effort here, since the pistons were the experimental component. Once I deploy it to the main world, I'll go back and make it smaller.
When WorldEdit catches up to pistons, I'll post the .schematic and copy it into a small world file. The build location was the redstone workshop at Defenestration. We're considering setting up a redstone/game mechanic testbed and museum online for tourists to the server. If anyone has suggestions there, I'd be happy to hear them, also.
At first I didn't understand your listed sequence, then I stopped being stupid and it made sense =P Correct me if im wrong but after achiving this sequence: 1,3,5,7,!7,!5,!3,!1 the four stacked pistons are already fully lowered and the remaining 4,!4,2,!2,3,!3 is just to make the gravity affected blocks fall back down in a more appealing way? Least this is how I understand it.
You need to play a little shuffling game to pull all the pistons back down all the way, because a sticky piston only pulls the block immediately above it.
Starting with:
8
7
6
5
4
3
2
1
After 1,3,5,7,!7,!5,!3,!1, the stack looks like:
8
7
6
5
4
3
2
1
So you fire 4 to pull the piston at 6 down to 5. Then you fire 2 to pull the piston at 4 down to 3. Then you fire 3 to pull the piston at 5 down to 4, then you're done!
Similar (though slightly longer) logic applies if you want to drag a block sideways or up 4 squares using sticky pistons without gravity to help.
Yeah..retracting sucks. Because unpowered pistons aren't 'sticky' so you have to have a really long sequence. With the we made, the down sequence required 21 operations for just 6 pistons (which is why going down takes so long)
I'm with you now. Damn my original interpretation was totally off. Setting up the proper sequence with redstone must have been a nightmare =/
No! It's super easy if you think about it the right way!
Instead of looking at it as a sequence of operations, just look at what each position is doing. Make that position do the right thing at the right time and let the tick-based timing keep everything in the right order. Except for position 3, each position powers on and off exactly once. So, just send a pulse of the right length and delay to that position and you're done. The timing of the pulse does all the logic for you.
So, for position 4, for example, I just send a 1-wide pulse with the right delay. The only one that takes two pulses is position 3, one long pulse for the first sequence, then a quick pulse at the end.
Seeing that "Hi" on the wall made me smile. :smile.gif: Fantastic job! I still haven't messed around to extend pistons that far myself, but I would be interested in a video tutorial if you ever decide to make one. With enough tinkering and the instruction you gave so far I might be able to get it though.
No! It's super easy if you think about it the right way!
Instead of looking at it as a sequence of operations, just look at what each position is doing. Make that position do the right thing at the right time and let the tick-based timing keep everything in the right order. Except for position 3, each position powers on and off exactly once. So, just send a pulse of the right length and delay to that position and you're done. The timing of the pulse does all the logic for you.
So, for position 4, for example, I just send a 1-wide pulse with the right delay. The only one that takes two pulses is position 3, one long pulse for the first sequence, then a quick pulse at the end.
Exactly. It really just takes planning out the simplest series of actions so that the wiring can reflect that. I did the same kind of thing with my 4-wide bridge :biggrin.gif:
Seeing that "Hi" on the wall made me smile. :smile.gif: Fantastic job! I still haven't messed around to extend pistons that far myself, but I would be interested in a video tutorial if you ever decide to make one. With enough tinkering and the instruction you gave so far I might be able to get it though.
Thanks! I probably won't have a chance to make a full tutorial, but as soon as WorldEdit catches up, I'll publish a compact version with smaller redstone. It can also run a few ticks faster.
Has anyone else done a tall portcullis/gate like this one? 5 high is definitely possible. 6 would be challenging, and 7 is definitely impossible using this method.
What's the easiest way to send a pulse? Toying around with redstone I found this works:
That's the reverse signal generator with one output connected directly to the bottom piston and the other connected to the top, but with this pulse generator attached.
BUT it requires an extra lead to the output source (top piston) or it becomes a clock if you join the two leads...
What's the easiest way to send a pulse? Toying around with redstone I found this works:
That's the reverse signal generator with one output connected directly to the bottom piston and the other connected to the top, but with this pulse generator attached.
BUT it requires an extra lead to the output source (top piston) or it becomes a clock if you join the two leads...
That will do what you want, but kinda the opposite. If it matters if the switch is in on or off state, just add an inverter at your switch.
Awesome thanks. This combined with lemurson's reverse signal generator (extended out for multiple pistons) will get pistons to extend and retract pulling one block around any number of times easily
Glad to see it helped :smile.gif: post more videos of your pistons! hehe
It would be great to know if there was a pattern or formula to know the absolute best way to deploy and retract X amount of pistons.
I want to build a hidden tower. Flip a switch and a tower 50 blocks high shoots from the ground.
I can only imagine the redstone and logic required lol.
I guess that could be the next big challenge for the pro redstone people. Develop a hidden 50 block tower!!
It would be great to know if there was a pattern or formula to know the absolute best way to deploy and retract X amount of pistons.
Here is one shortest way to do 4 pistons. There are several optimal answers.
Here's one for 5 pistons that I haven't double-checked yet. Hopefully it's correct and minimal. If you look at the beginning and end, you can see that a pattern is forming. I suspect it is a generally fastest solution for pistons, with the beginning sequence depending on how many blocks a piston can lift vs. what is to be lifted.
Annoyingly, the speed limitation turns out to be how fast a stack of gravel can fall! For the 4 piston version, you need to add a pause after the retraction at position 7, for example.
I'm not sure that's completely achievable. There are some limitations based on how many blocks pistons can push and the lack of movable redstone circuitry.
Yeah! It's fun to see how lots of people's piston workshops have the same or very similar designs lying around!
Yep! I had first designed the basic idea before the update, thinking that pistons could pull multiple retracted sticky pistons, but had to re-design soon after xD
I built a 3x4 version last night from scratch and used a few tricks I learned to save on complex logic. This version is very compact and can easily be built legit on servers and worlds not using editors.
In Action:
This is all the more room the circuit takes up:
An AND gate gives power to the top piston (piston 3) last but takes it away first.
After a short delay piston 2 receives power but holds it for a longer delay, thus retracting second.
The first piston receives power instantly, and the two repeaters hold power until until after pistons 2 and 3 are retracted.
Once Piston 1 is retracted a monostable circuit extends then retracts piston 2.
Rollback Post to RevisionRollBack
Playing Minecraft since [Friday, March 19, 2010, 9:20:21 PM] (First indev world save)
It works equally well in SSP and SMP, but I filmed it in single player because the thing runs too fast to see with lag.
This was actually quite simple to build! It has been observed that the sequence of piston extension/retractions can be pretty complicated if you want to push, then pull back several pistons. In the case of four vertically stacked pistons there are 7 possible places to apply power. (rows 1-7) It turns out that row 6 isn't needed. If 1 indicating "power row 1" and !1 indicating "cut power to row 1", then an acceptable sequence is:
1,3,5,7,!7,!5,!3,!1,4,!4,2,!2,3,!3
That looks like a lot of actions to get in the right logical order, but if you look at each row by itself, what's happening is very simple. For example, row 1 turns on immediately, then stays on for a fixed length of time. That's just a single long pulse generator! Row 5 is the same, only with the pulse delayed a bit. Row 3 is the only one that takes two pulses. So just wire a common input up to a pulse generator for each row, with the right pulse length and delay, and the entire circuit is done!
Here's a diagram of what I believe is a fastest possible sequence for this piston action, along with the required redstone signals. See how simple they are, if you just look at the pulses required and not the logic? (Slightly faster is possible if you don't limit yourself to whole-tick delays and play games with the block update order, but that is finicky to do.)
The redstone can easily be compacted, but I made no effort here, since the pistons were the experimental component. Once I deploy it to the main world, I'll go back and make it smaller.
When WorldEdit catches up to pistons, I'll post the .schematic and copy it into a small world file. The build location was the redstone workshop at Defenestration. We're considering setting up a redstone/game mechanic testbed and museum online for tourists to the server. If anyone has suggestions there, I'd be happy to hear them, also.
You need to play a little shuffling game to pull all the pistons back down all the way, because a sticky piston only pulls the block immediately above it.
Starting with:
8
7
6
5
4
3
2
1
After 1,3,5,7,!7,!5,!3,!1, the stack looks like:
8
7
6
5
4
3
2
1
So you fire 4 to pull the piston at 6 down to 5. Then you fire 2 to pull the piston at 4 down to 3. Then you fire 3 to pull the piston at 5 down to 4, then you're done!
Similar (though slightly longer) logic applies if you want to drag a block sideways or up 4 squares using sticky pistons without gravity to help.
No! It's super easy if you think about it the right way!
Instead of looking at it as a sequence of operations, just look at what each position is doing. Make that position do the right thing at the right time and let the tick-based timing keep everything in the right order. Except for position 3, each position powers on and off exactly once. So, just send a pulse of the right length and delay to that position and you're done. The timing of the pulse does all the logic for you.
So, for position 4, for example, I just send a 1-wide pulse with the right delay. The only one that takes two pulses is position 3, one long pulse for the first sequence, then a quick pulse at the end.
Exactly. It really just takes planning out the simplest series of actions so that the wiring can reflect that. I did the same kind of thing with my 4-wide bridge :biggrin.gif:
Thanks! I probably won't have a chance to make a full tutorial, but as soon as WorldEdit catches up, I'll publish a compact version with smaller redstone. It can also run a few ticks faster.
Has anyone else done a tall portcullis/gate like this one? 5 high is definitely possible. 6 would be challenging, and 7 is definitely impossible using this method.
The only way I could figure it out was to use a 2 pulse switch I made on each input to the pistons during retraction for a quick on/off pulse.
The hard part was hooking the whole process to 1 lever or pressure switch and keeping the redstone hidden.
I would be interested in downloading your map if you could upload it.
As you can see my version took a lot of work:
That's the reverse signal generator with one output connected directly to the bottom piston and the other connected to the top, but with this pulse generator attached.
BUT it requires an extra lead to the output source (top piston) or it becomes a clock if you join the two leads...
This is what I did.
http://oi53.tinypic.com/110954k.jpg
Your design is better then mine, but where would you place it in order to just have one output rather than two?
Basically I want output to go Switchup -> On. Switchdown -> off on (flash) OFF
Ok if I understand you want when the switch is on, to have the output always on. Then when you turn it off you want the output to go off/on/off?
Try this: http://oi51.tinypic.com/2ponl1k.jpg
That will do what you want, but kinda the opposite. If it matters if the switch is in on or off state, just add an inverter at your switch.
Awesome thanks. This combined with lemurson's reverse signal generator (extended out for multiple pistons) will get pistons to extend and retract pulling one block around any number of times easily
It would be great to know if there was a pattern or formula to know the absolute best way to deploy and retract X amount of pistons.
I want to build a hidden tower. Flip a switch and a tower 50 blocks high shoots from the ground.
I can only imagine the redstone and logic required lol.
I guess that could be the next big challenge for the pro redstone people. Develop a hidden 50 block tower!!
Here is one shortest way to do 4 pistons. There are several optimal answers.
Here's one for 5 pistons that I haven't double-checked yet. Hopefully it's correct and minimal. If you look at the beginning and end, you can see that a pattern is forming. I suspect it is a generally fastest solution for pistons, with the beginning sequence depending on how many blocks a piston can lift vs. what is to be lifted.
Annoyingly, the speed limitation turns out to be how fast a stack of gravel can fall! For the 4 piston version, you need to add a pause after the retraction at position 7, for example.
I'm not sure that's completely achievable. There are some limitations based on how many blocks pistons can push and the lack of movable redstone circuitry.
I did basically the same thing when I deployed the design with compacted redstone.
Yeah! It's fun to see how lots of people's piston workshops have the same or very similar designs lying around!
Yep! I had first designed the basic idea before the update, thinking that pistons could pull multiple retracted sticky pistons, but had to re-design soon after xD
In Action:
This is all the more room the circuit takes up:
An AND gate gives power to the top piston (piston 3) last but takes it away first.
After a short delay piston 2 receives power but holds it for a longer delay, thus retracting second.
The first piston receives power instantly, and the two repeaters hold power until until after pistons 2 and 3 are retracted.
Once Piston 1 is retracted a monostable circuit extends then retracts piston 2.
Playing Minecraft since [Friday, March 19, 2010, 9:20:21 PM] (First indev world save)