9

I'm looking at a simple circuit breaker pulse generator such as this one: enter image description here found in the Minecraft Wiki page.

I can duplicate the circuit, and it works exactly as described; push a button or move a lever, and the output of the circuit makes a brief pulse (based on the delay of the relay).

What I don't understand is, how does it work? Is the concept of a pulse generator "hard coded" into Minecraft for a given block pattern, or is there an actual redstone process which can be described?

For instance, the piston must have a block on top of it for the generator to work. Is the block the "ingredient" that tells Minecraft this is a circuit generator? Or is there something inherent in the Redstone propagation that explains why it works? Similarly the relay must be right next to the piston (either before or after). It would seem to me that for basic Redstone propagation, I could have the relay way from the piston connected with dust, but that won't work.

  • 1
    How does a redstone pulse generator work? Very well, thank you. – Paul D. Waite Sep 2 at 8:29
  • Have you learned the rules of redstone? – user253751 Sep 2 at 9:33
  • Also have you tried experimenting? E.g. if you remove the piston (so the circuit is just an overcomplicated repeater) what happens? What happens if you remove the piston and also replace the repeater with dust? Why are they different? – user253751 Sep 2 at 9:33
26

No, Minecraft is not hardcoding the pulse generator. There is a specific logical progression that makes this circuit make sense.

Here are the steps that occur.

  1. On the first tick, the player activates the redstone dust. The redstone dust powers both the diamond block and the piston.
    The repeater realizes that it is now powered through the diamond block, but doesn’t activate yet because it is set to 1 tick delay. The piston also realizes that it is powered, but does not extend yet because it has a hardcoded delay of one tick.
  2. On the second tick, the repeater activates, having waited its one tick delay. At the same time, the piston extends, having waited its built-in one tick delay.
    The repeater realizes it isn’t powered anymore, because the sticky piston’s extension cuts off the power to the repeater. However, because it is on 1 tick delay, it doesn’t turn off until the 3rd tick.
  3. On the third tick, the repeater turns off, having waited its delay of one tick after realizing it isn’t powered anymore.

The repeater turned on during tick #2 and turned off during tick #3. Therefore, the pulse lasted one tick.

Questions you posed in your original post

Why is the block on top of the piston required?
The block on top of the piston is required because the redstone dust will “reach through” it to power the repeater. In redstone terms, this is called “soft powering”.
You can see how this would make sense by removing the piston and keeping the diamond block, making it a transmission circuit. Now it becomes obvious that you need the diamond block for the circuit to function correctly.

Why can’t you use a pinch of redstone dust in lieu of the repeater?
The redstone dust on the left is soft powering the diamond block. (a redstone dust in a dot shape actually points in all four directions at once.) A repeater is able to detect the soft powering of the diamond block and output a signal. Redstone dust cannot detect soft powering, but it can detect “hard powering”. (where a block is being powered by a repeater, comparator, or redstone torch.) Because the diamond block is only being soft powered, you cannot use the redstone dust to detect the soft powering of the diamond block. You must use a repeater.

Need picture examples? I’ll post them later today.

| improve this answer | |
  • Thank you for a such a clear answer. I kept seeing examples of pulse generators, but none had explanations. The fundamental I was missing was the idea of the soft vs hard power. It all makes sense now! – Carlos N Sep 1 at 20:09
  • 1
    It may also be worth considering that the button isn't needed here, you just need something to produce an input signal to power the redstone that the button would power (and it obviously has to result in the diamond block being powered). If using an input pulse instead of a button, you end up with what in electronics is known as a 'one-shot' or 'monostable mutlivibrator'. They're used in a number of applications in real world electronics, including as switch debouncers and frequency dividers. – Austin Hemmelgarn Sep 2 at 1:54
  • 1
    @ExpertCoder14 There are numerous odd edge cases when it comes to working with redstone (for example, the very fact that a 'dot' of redstone points in all four directions, or how you can use half slabs to walk a signal upwards), so just because something seems obvious to those of us who have actually spent time working with it does not mean that it is to everyone. – Austin Hemmelgarn Sep 2 at 2:08
  • 2
    Note that in recent versions a dot no longer functions this way, and a redstone cross is instead used for four way signals – Redwolf Programs Sep 2 at 2:37
  • Also redstone dust operates on an update order that is completely distinct from every other redstone component. So the repeater can appear as 1 gt delay rather than 2 with manual input. To fully explain piston timings and weird edge cases requires knowledge of redstone Update Order, the order of how block and redstone updates are processed. Nothing in timing edge cases is trivial. – qwr Sep 2 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.