Page 1 of 1

Extend pulse for S seconds

Posted: Thu Nov 01, 2018 7:50 pm
by zOldBulldog
timedGreen.jpg
timedGreen.jpg (23.92 KiB) Viewed 4997 times
Complete:
Constants block:
Circuit block:

Did you ever have a pulse, but what you need is a signal that stays on for S seconds? For example (but not limited to) to enable a train signal and give a train enough time to pass after its state is evaluated at a Stop and determined that it "can" be allowed through. This will do it.
(It might be possible to do this more efficiently, but I could not find such a circuit so I made this)

COMPONENTS:

- Left block = constant generation.
- Right block = actual circuit.
- Top green constant combinator and lamp are for testing only.

USAGE:

- Set the S combinator to the number of seconds you need the signal to stay on.
- Replace the green constant combinator with whatever creates your pulse (right now it is looking for green > 0 to start operating).
- Replace the lamp with whatever you want to control (right now you should use green > 0 as your device condition).

- NOTE: If instead of a pulse you generate an input signal that stays on... the clock will restart at the end of the S seconds, and keep restarting until you turn the input signal off and it ends its cycle.

- If you need multiples of this circuit, you do not need to repeat the constant generation piece. You can place two circuits and feed them the constants using a red wire, and you can even daisy chain them as shown in the screenshot below.
timedGreenX2.jpg
timedGreenX2.jpg (38.31 KiB) Viewed 4997 times
Chained example:

If you can think of a more efficient/compact way to achieve this, or if you find any errors that need correcting please let me know. I will evaluate the changes and update the post with improvements.

Re: Extend pulse for S seconds

Posted: Sun Jan 01, 2023 3:02 am
by braxbro
I know this post is old, but this can be done in 2 combinators: an arithmetic combinator set to each % N => each feeding back into itself, connected to both the input and the output of a decider combinator set to each < N => 1 each. N of course being the extender length in ticks.

Bonus: this extends pulses of different signals independently, and you could specify an extender length via another signal on the opposite input, if you so chose.

Re: Extend pulse for S seconds

Posted: Thu Nov 16, 2023 9:48 pm
by thegroundbelowme
braxbro wrote:
Sun Jan 01, 2023 3:02 am
a decider combinator set to each < N => 1 each
Could you explain what this means a little more clearly? I know what "each < N" means, but I'm fairly baffled by "each < N => 1 each"

Re: Extend pulse for S seconds

Posted: Fri Nov 17, 2023 4:47 am
by Nidan
thegroundbelowme wrote:
Thu Nov 16, 2023 9:48 pm
I know what "each < N" means, but I'm fairly baffled by "each < N => 1 each"
A decider combinator with:
Condition: each < N
=>
Output: each 1