Need a dual pulse timing circuit

Thread Starter

azfrankp

Joined Dec 29, 2024
11
My brain isn't working. Thought I could use a couple of 555 timing chips to create a simple 2 pulse circuit. The mechanics I'm trying to emulate is a PB switch that requires a push and release to start and another push and release to stop 10 seconds later triggered by the same input. I can't seem to find the correct 555 application or perhaps there is a better way. Thanks.
 

drjohsmith

Joined Dec 13, 2021
1,549
Micro processor , pic ?
You want a pulse out when a push button is pressed , and then another pulse out 10 seconds later ? What happens if button pressed agai n, or if button held on ?
A timing diagram and state diagram would be of use please.
 

AnalogKid

Joined Aug 1, 2013
12,043
First, let's clean up the question.

Press once. Output goes high. So far, ok.

Another again, Output goes low. These two lines describe a toggle flipflop, not a timer. Press, output goes high; press, output goes low. Repeat.

So where does the 10 second timer come in?

another push and release to stop 10 seconds later triggered by the same input.
One way to read this is that after the first button press, the output goes high and will remain there indefinitely. When the button is pressed for the second time, the output remains high an additional 10 seconds *after* the second button press, then the output goes low whether the button still is pressed or has been released.

- OR -

10 seconds after the second button press *is released*, the output goes low.

The difference between the two output situations is the difference between a true monostable and a retriggerable monostable.

Maybe give us some background on what you are trying to achieve - ?

Also, to clarify the question, consider working up a truth table. Outside, you have two input states: button pressed and button released; and two output states: high and low. Internally you have five inputs: Press #1, Release #1, Press #2, Release #2, Ten sec Timer stops; and four output conditions: Output goes high, output stays high, output goes low, output stays low, Ten sec Timer Starts. Note that the outputs are not monotonic; some may not occur, and some may occur more than once.

ak
 
Last edited:

sparky 1

Joined Nov 3, 2018
1,218
There are techniques using diagrams that add structure to timing. Electronics is always needing more sequence and timing.
Being able to see the whole picture accurately usually requires some drafting skill. Pencil and paper can work as long as you make it work.
The ability to draw a precision timing diagram makes it easier to decide on the best method of switching.

Here is one way to make a useful timing diagram. Declaring the operations can be changed also. A sloppy diagram can cause errors.
From a timing diagram you can test it using leds. Lable the test board and use different color leds. Red is sometimes stop ect.
Often the diagram needs some correction, spreadsheets make that easy when finished the final timing diagram can be printed.
Some have been known to dream timing diagrams others perfer to see them on an oscilloscope.

 
Last edited:

drjohsmith

Joined Dec 13, 2021
1,549
There are techniques using diagrams that add structure to timing.
Being able to see the whole picture accurately requires some drafting skill
The ability to draw a precision timing diagram makes it easier to decide on the best method of switching.
Here is an easy way to make a useful timing diagram. Declaring the operations can be changed also.
From a timing diagram you can test it using leds, You can lable a test board and use different color leds.
often the diagram needs some correction, excel is easy to change and the final timing diagram can be printed.

Even a picture of a sketch is a good step.
 

MrChips

Joined Oct 2, 2009
34,628
My brain isn't working. Thought I could use a couple of 555 timing chips to create a simple 2 pulse circuit. The mechanics I'm trying to emulate is a PB switch that requires a push and release to start and another push and release to stop 10 seconds later triggered by the same input. I can't seem to find the correct 555 application or perhaps there is a better way. Thanks.
Your description is not clear. What does the 10-second delay have to do with this operation?
Is it not simply, press once to start, press again to stop?
 

sghioto

Joined Dec 31, 2017
8,633
Maybe like this.
Press button, output goes High and inhibits push button switch for 10 seconds.
Press again anytime after 10 seconds and outputs goes Low.
1735510080518.png
 
Last edited:

Thread Starter

azfrankp

Joined Dec 29, 2024
11
First, let's clean up the question.

Press once. Output goes high. So far, ok.

Another again, Output goes low. These two lines describe a toggle flipflop, not a timer. Press, output goes high; press, output goes low. Repeat.

So where does the 10 second timer come in?



One way to read this is that after the first button press, the output goes high and will remain there indefinitely. When the button is pressed for the second time, the output remains high an additional 10 seconds *after* the second button press, then the output goes low whether the button still is pressed or has been released.

- OR -

10 seconds after the second button press *is released*, the output goes low.

The difference between the two output situations is the difference between a true monostable and a retriggerable monostable.

Maybe give us some background on what you are trying to achieve - ?

Also, to clarify the question, consider working up a truth table. Outside, you have two input states: button pressed and button released; and two output states: high and low. Internally you have five inputs: Press #1, Release #1, Press #2, Release #2, Ten sec Timer stops; and four output conditions: Output goes high, output stays high, output goes low, output stays low, Ten sec Timer Starts. Note that the outputs are not monotonic; some may not occur, and some may occur more than once.

ak


Press once. Output goes high. So far, ok.

Another again, Output goes low. These two lines describe a toggle flipflop, not a timer. Press, output goes high; press, output goes low. Repeat.

So where does the 10 second timer come in?
Sorry, just to further explain. Trigger once (Either H to L or L to H), Output pulse H then L, wait 10 seconds, then pulse H to L again. Then wait for next trigger.

Background if you want to read:

I have a large 1:6 scale interactive train display (www.santatrain.com) that I built myself for the front yard. It is rather elaborate to the point where it has been featured on a HGTV special called "Most Outrageous Holiday Houses". One of the features I built is an erupting volcano when the train goes through the mountain. It is triggered by a magnetic track switch when the train is close. The smoke is created by activating a fog machine inside of the structure. These machines use to be simple in nature. Turn 'on' a rocker switch for smoke and turn it 'off' when you want it to stop. The track switch triggers a 555 timer circuit which triggers a relay that parallels the rocker switch for this purpose, and it works great. However, in the many years I've been doing this, I've had to replace the fog machines a few times because, despite cleaning, they get clogged up after sitting all year without use. The newer machines are all electronic and no longer have the rocker switch function. You push a button once and when it is released, the smoke starts. You press it again when you want it to stop. Pressing and holding the switch does nothing until it is released.

After scouring Amazon, I finally found one manufacturer that still produces the old style. Their newer models are also electronic so I'm afraid I won't be able to find one if needed in the future, so I want to change the electronics now.
 

sghioto

Joined Dec 31, 2017
8,633
Sorry, just to further explain. Trigger once (Either H to L or L to H), Output pulse H then L, wait 10 seconds, then pulse H to L again. Then wait for next trigger.
Still not clear. What is the purpose of the "wait 10 seconds"
What happens if the switch is pressed again before the 10 seconds has expired?
 

Thread Starter

azfrankp

Joined Dec 29, 2024
11
Micro processor , pic ?
You want a pulse out when a push button is pressed , and then another pulse out 10 seconds later ? What happens if button pressed agai n, or if button held on ?
A timing diagram and state diagram would be of use please.
Here is a timing diagram. Pulse widths are not critical but would desire .5 to 1 second.
 

Attachments

MrChips

Joined Oct 2, 2009
34,628
You still have not made it clear.
As far as I can gather, the components are:

- push button
- magnetic track switch
- fog machine

Let's see if we can decipher what you are trying to say.

(1) Train activates a magnetic switch. Fog machine comes on and goes off after 10 seconds.

Now, what is the purpose of the push button?
(2) Press the push button and fog machine turns on.
(3) Press push button again under 10 seconds, nothing happens.
(4) After 10 seconds, fog machine turns off.

(5) Press the push button and repeat cycles (3) and (4)?
 

Thread Starter

azfrankp

Joined Dec 29, 2024
11
Still not clear. What is the purpose of the "wait 10 seconds"
What happens if the switch is pressed again before the 10 seconds has expired?
The trigger to the circuit is a track switch (either N/O or N/C) and not a button, so this will only trigger once when the train goes by. The purpose of the 10 seconds is the length of time the volcano is erupting. 1st pulse turns the smoke on. 2nd pulse (10 seconds later) turns the smoke off. The circuit output is connected to a relay which parallels the push button switch on the Fog Machine.
 

Thread Starter

azfrankp

Joined Dec 29, 2024
11
You still have not made it clear.
As far as I can gather, the components are:

- push button
- magnetic track switch
- fog machine

Let's see if we can decipher what you are trying to say.

(1) Train activates a magnetic switch. Fog machine comes on and goes off after 10 seconds.

Now, what is the purpose of the push button?
(2) Press the push button and fog machine turns on.
(3) Press push button again under 10 seconds, nothing happens.
(4) After 10 seconds, fog machine turns off.

(5) Press the push button and repeat cycles (3) and (4)?
I think the button confusing everyone. I only used it for illustration purposes. I used it to talk about how the Fog Machine normally operates. In other words, pretend the button isn't there for this circuit I'm trying to build. I hacked the machine by opening it up and soldered two wires from the relay controlled by the pulse circuit onto the N/O Push button switch on the machine. The process is automatic and the button should never come into play. However, since it is still connected to the machine it would still start and stop the smoke accordingly if pushed. You are correct in assuming that if you pushed the manual button in the middle of the timing cycle after its been triggered, the smoke would turn off prematurely and the timing would be upset as well. However, the machine is inaccessible to the outside and that should never happen.
 

sghioto

Joined Dec 31, 2017
8,633
If the track switch is N/O does it stay closed when tripped by the train until it has passed?
The second pulse is when the train returns to the same track switch?
 
Last edited:

MrChips

Joined Oct 2, 2009
34,628
So, for the purpose of this design, we can assume that there is no push button.

(1) A passing train triggers a switch transition. It could be normally open or normally closed.
(2) The circuit energizes a relay (normally open) for x-ms. We don't know how many milliseconds as yet.
(3) After 10 seconds, the circuit energizes the relay again for x-ms.

Do I have this right?
 

Thread Starter

azfrankp

Joined Dec 29, 2024
11
If the track switch is N/O does it stay closed when tripped by the train until it has passed?
The second pulse is when the train returns to the same track switch?
Yes, that is correct.

If I use the N/O side of the track switch, it is always open until the train passes. When it does, the switch closes for about 100 to 300 ms until it the magnetic field from the train's magnet is no longer present.
 

Thread Starter

azfrankp

Joined Dec 29, 2024
11
Yes, that is correct.

If I use the N/O side of the track switch, it is always open until the train passes. When it does, the switch closes for about 100 to 300 ms until it the magnetic field from the train's magnet is no longer present.
I don't want to confuse you again since I answered before I saw your last post. The track switch simply energizes when a magnetic field approaches and returns to it's standby state when no magnet is present. N/O will close or N/C will open. That should trigger the start of the two-pulse circuit. The circuit will repeat the next time the train passes.
 

MrChips

Joined Oct 2, 2009
34,628
You need two monostable mulitivibrators, one set for 10 seconds duration, and another set for 300 milli-seconds.
They are both configured to trigger on either rising or falling voltages.

The track sensor triggers the 10-second monostable. The output is fed to the 300-ms monostable which triggers on either rising or falling voltage. Its output energizes the relay.
 

sghioto

Joined Dec 31, 2017
8,633
I don't want to confuse you again since I answered before I saw your last post. The track switch simply energizes when a magnetic field approaches and returns to it's standby state when no magnet is present. N/O will close or N/C will open. That should trigger the start of the two-pulse circuit. The circuit will repeat the next time the train passes.
I think this is all that's needed.
Relay activates for appx 1 second every time the train passes by the switch.
1735519700672.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,173
The trigger to the circuit is a track switch (either N/O or N/C) and not a button, so this will only trigger once when the train goes by. The purpose of the 10 seconds is the length of time the volcano is erupting. 1st pulse turns the smoke on. 2nd pulse (10 seconds later) turns the smoke off. The circuit output is connected to a relay which parallels the push button switch on the Fog Machine.
OK, and that explanation is quite clear to me!! The train enters the tunnel, the smoke starts, ten seconds later the smoke stops. And it is all one sequence, started from a single trigger pulse.

So it could be achieved with a 555 timer triggered by the train, using the present trigger scheme, and the a dual one-shot (CD4528, or similar) one side set to trigger on the rising edge of the 555 pulse, and the other side set to trigger on the falling edge of that 555 pulse. And then a logical "OR" gate to deliver the output of the two as needed.

OR a simple added switch to give a momentary pulse as the train enters the tunnel and a second momentary pulse as it exits the tunnel. That could be from two reed switches and one magnet on the train. The switches wired in parallel. No electronics and no timers.
 
Top