Minecraft – Send a redstone pulse when a circuit turns off

minecraft-java-editionminecraft-redstone

Is it possible to send a redstone pulse as a wire turns off?

I have a machine I'm trying to build that uses a timer and I'd like for something to happen at the very end of the timer running down after it has turned off.

The only way I can think to do this is to somehow build a machine that inverts the on circuit to power a piston and when the circuit turns off the piston retracts for a while and then powers on again.

Best Answer

As mentioned by @zzzzBov, what you are looking for is called falling edge detector. The wiki has a section on these, with multiple options to choose from, like these two:

Dust cut-off FED Repeater-lock FED

On the left, the sticky piston retracts the diamond block, allowing a signal to go through before the repeater turns off. When the power is turned on, the diamond block cuts off the signal before the repeater turns on.

The design to the right works using locked repeaters. When you unpower the input, the repeater on the right is unlocked just briefly enough to allow a signal through. On powering the input, the repeater is locked before it can change state.

Another option you have is to use a rising edge detector, also known as a monostable circuit, and invert the input using a redstone torch. There's plenty of designs available online.