Extend pulse for S seconds

This board is to show, discuss and archive useful combinator- and logic-creations.
Smart triggering, counters and sensors, useful circuitry, switching as an art :), computers.
Please provide if possible always a blueprint of your creation.
Post Reply
zOldBulldog
Smart Inserter
Smart Inserter
Posts: 1161
Joined: Sat Mar 17, 2018 1:20 pm
Contact:

Extend pulse for S seconds

Post by zOldBulldog »

timedGreen.jpg
timedGreen.jpg (23.92 KiB) Viewed 4788 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 4788 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.

braxbro
Burner Inserter
Burner Inserter
Posts: 12
Joined: Sun Jan 01, 2023 2:54 am
Contact:

Re: Extend pulse for S seconds

Post 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.
Attachments
extender.PNG
extender.PNG (56.99 KiB) Viewed 2333 times
Last edited by braxbro on Sun Jan 01, 2023 3:02 am, edited 1 time in total.

thegroundbelowme
Burner Inserter
Burner Inserter
Posts: 10
Joined: Sun Nov 26, 2017 4:03 am
Contact:

Re: Extend pulse for S seconds

Post 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"

Nidan
Fast Inserter
Fast Inserter
Posts: 225
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Extend pulse for S seconds

Post 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

Post Reply

Return to “Combinator Creations”