555 timer circuit design

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
Again the question is how long do the sensors stay activated.
I assuming the sensor deactivates once the train has passed the sensor which normally takes how long would you say?
Yes, it depends on the length of the train and how fast it is going. I'd day maybe 10 seconds on average.
 

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
First try if I have this figured correctly.
When first powered up the Green LED1 on Signal 1 is ON.
When the train activates Sensor 1, power is applied to the 555 timer and a 10 second delay determined by C2 and R1 begins.
At the end of the 10 seconds the output of the 555 goes High and triggers flip flop IC2 turning ON the Red LED2.
Sometime after the train has passed Sensor 1 I'm assuming it shuts OFF which will reset IC1.
Mosfets M1 and M2 are the drivers for the LEDs. R2 and R3 values dependent on the LED type.
The other half of IC2 can be used for the Signal 2 circuit.
View attachment 358397
Yes that looks about right and I apologize for the delayed response. All along I have thought that the 555 is what I need as an on-delay but I have not been able to figure out how to reset it automatically. I am not sure but I think you may be reading too much into the IR sensors. These IR sensors actuate my S1 and S2 SPST relays as shown on my schematic. Once a train passes over the IR sensor, the relays actuate and it doesn't matter how long the train is on the IR sensor. If you want to read more about the IR sensors and how they control the relays then please see this website. I am using a D2T-3W. There is a link to an installation guide which shows the on-board spst relays at the bottom of page 4 (relays nomenclature is shown as Y1 and Y2 as opposed to my S1 and S2). Thank you again for your help. https://www.azatrax.com/dual-train-detector.html
signal schematic ok to delete.jpg
 

sghioto

Joined Dec 31, 2017
8,634
Version #2:
IC1 configured as a one shot timer.
Sensor 1 contact when closed starts 10 second timer IC1.
Once the timer starts doesn't matter if Sensor 1 contact is open or closed the timer will finish the count.
1762540067306.png
 

sghioto

Joined Dec 31, 2017
8,634
Over the weekend I will complete your schematic to show both signals.
To be clear are Sensor 1 and 2 only activated when a train is approaching the side of the sensor before the Signal LEDs ?
i.e. Will a ccw train that leaves the Switch and travels pass Sensor 2 , will it activate Sensor 2 and vice versa for a cw train passing Sensor 1?
If Signal 1 turns red is Signal 2 suppose to turn green simultaneously and vice versa?
 
Last edited:

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
No train can continuously go around the reversing loop. All trains enter the loop from one end and then exit it onto the mainline at the other end. There is another loop on the layout that is not shown.

Here is a sequencing example that may help:

  1. A ccw train enters the loop. Signal 1 is already green for the CCW train from the past CW train exiting the loop.
    1. Sensor 2 is not affected by the train.
  2. The ccw train activates sensor 1 which throws the switch so the train can exit. The sensor also throws the SPST relays I have drawn on my one-line. These SPST relays will control my signals.
  3. Signal 1 stays green for ~ 10 seconds an then changes to red. Signal 2 stays red for about 10 seconds and then turns green.
  4. The next train comes along and enters the loop cw. Start at the top but in reverse:
    1. Signal 2 is already green for the CW train from the past CCW exiting train.
    2. and so on....

Key points that relate to your questions:
1) no train can continuously go around the reversing loop. They come in, reverse their direction and then exit.
2) The sensor that a train goes over as it exits prepares the signals for the next train that will enter in the opposite direction. For instance, an exiting ccw will turn Signal 1 red and signal 2 green simultaneously (after the ~ 10 second delay) for the next incoming train which will enter the loop in the cw direction.
3) Remember, the signals face east (see plan with compass rose). This means that trains can only see the exiting signal. For example, a ccw train that enters the loop cannot see signal 2 but does see signal 1 as he exits.

Sorry for any confusion and I appreciate your help.

ok to delete.jpg
 

sghioto

Joined Dec 31, 2017
8,634
When first powered ON is Signal 1 green and Signal 2 red or vice versa?
If Signal 1 is green that would mean only a CCW train can enter the loop first, correct?
 
Last edited:

sghioto

Joined Dec 31, 2017
8,634
A ccw train enters the loop. Signal 1 is already green for the CCW train from the past CW train exiting the loop.
  1. Sensor 2 is not affected by the train.
Since the sensors are only activated by exiting trains I only see the need for one 10 second delay circuit.

1762615232060.png
 
Last edited:

Plamen

Joined Mar 29, 2015
111
Hi
I have read a lot about the 555 timer and the different modes that it offers. Of course, my needs are just a bit different. I am looking for suggestions on how to design my circuit. I have been thinking that a 555 is the way to go but now I am unsure. This is what I want my circuit to do once it is activated :
  1. Perform a delayed start of about 10 seconds
  2. Energize a relay that will change the led that is on for my stop light from red to green
  3. Reset itself to wait for another activation and do it all over again but change the stoplight from green to red.
My scenario is a 12 volt model train that is activating existing IR sensors which in turn would activate the delayed start sequence above. My circuit will be powered by 12 v dc.
Thank you in advance for any suggestions. Dave
Consider 4541 timer. It has wide time delay range and power supply range. It also offers various triggering options (by power up or by ext signal). It also allows selection of output (active low or high). I have used it for automatic garage door closer with 10 minutes delay before closing itself.
 

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
Since the sensors are only activated by exiting trains I only see the need for one 10 second delay circuit.

View attachment 358502
Thank you so much for your help. I have a few questions:

  1. The NE 555 is in monostable mode. It is configured as a one-shot timer and then resets itself after its countdown is complete. Correct?
  2. You have an extra IC2 not connected to anything. This is not needed, correct?
  3. Please confirm C1, C2, C4 are nano Farads units.
  4. Please confirm which R and C are used to determine the 10 second delay for the 555 timer. I am using this formula:
    a. = 1 . 1 × × (ohms and Farads).
  5. Please tell me the purpose of IC2 (CD4027). What does this do?
 

sghioto

Joined Dec 31, 2017
8,634
Thank you so much for your help. I have a few questions:
  1. The NE 555 is in monostable mode. It is configured as a one-shot timer and then resets itself after its countdown is complete. Correct? It actually resets after the delay and when the sensor deactivates.
  2. You have an extra IC2 not connected to anything. This is not needed, correct? IC2 has two independent circuits inside the chip. Only need one so the unused input pins are connected to ground.
  3. Please confirm C1, C2, C4 are nano Farads units. Correct, nf means Nano Farad.
  4. Please confirm which R and C are used to determine the 10 second delay for the 555 timer. I am using this formula:
    a. = 1 . 1 × × (ohms and Farads). C3 and R3 determine the delay, the formula is correct.
  5. Please tell me the purpose of IC2 (CD4027). What does this do?
  6. IC2 is a Flip-Flop functioning as a latch with outputs on pins 1 and 2. The latch holds the Signal LEDs on between sensor activations.
  7. Each time the 10 second delay ends it pulses IC2 to reverse the Signal LEDs.
 

sghioto

Joined Dec 31, 2017
8,634
Latest modification adding C5 and R9.
This provides a reset on IC2 so that the Signal LED status is always correct when initially powered up.
BTW what are your thoughts on using a microprocessor chip?
1762644130131.png
 

eetech00

Joined Jun 8, 2013
4,705
HI

Here's an alternate circuit to consider. It hasn't been tested, but uses NE555's and three 2N7000 mosfets.
Initially, whenever the entrance signal1 is green, exit signal2 is red. Entrance signal1 changes to red, behind the train, after 10 seconds. Note in the graph the signals do not change until after 10 seconds, once detected by the sensor.


1762643802631.png
 

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
  1. The NE 555 is in monostable mode. It is configured as a one-shot timer and then resets itself after its countdown is complete. Correct? It actually resets after the delay and when the sensor deactivates.
  2. You have an extra IC2 not connected to anything. This is not needed, correct? IC2 has two independent circuits inside the chip. Only need one so the unused input pins are connected to ground.
  3. Please confirm C1, C2, C4 are nano Farads units. Correct, nf means Nano Farad.
  4. Please confirm which R and C are used to determine the 10 second delay for the 555 timer. I am using this formula:
    a. = 1 . 1 × × (ohms and Farads). C3 and R3 determine the delay, the formula is correct.
  5. Please tell me the purpose of IC2 (CD4027). What does this do?
  6. IC2 is a Flip-Flop functioning as a latch with outputs on pins 1 and 2. The latch holds the Signal LEDs on between sensor activations.
  7. Each time the 10 second delay ends it pulses IC2 to reverse the Signal LEDs.
I am a little fuzzy when you say 'when the IR sensor deactivates' in bullet point one. When a train goes over an IR sensor, the IR sensor quickly sends a signal to the base unit (D2T-3W) which causes the train track switch to be thrown, reverses polarity in the reversing loop and it throws the spst relays that are within the D2T-3W (spst relays are staggered between open and closed - both are never open or closed at the same time). The train is still travelling over the IR sensor for another 8 seconds or can stop on the IR sensor. My point is that I think the IR sensor is deactivated quickly as soon as the locomotive goes over it since it has already done its job: polarity change, throw track switch and thrown the spst relays. The spst relays won't actuate again whether the train stops on them, takes 1 second or 50 seconds to clear them. It's a one and done operation for that IR sensor and control is then handed over to the other IR sensor and associated spst relay. So, does my definition of 'deactivation' throw any wrenches into your design? It seems to me that the IR sensor deactivates in a split-second and the 10 second 555 timer governs.

I suppose I could have a problem if I had a slow train (> 10 seconds) and then my signals would not be in sync but I can handle that with operations and can always put in a longer delay.

Thank you again for your help.
 

Thread Starter

Jibebuoy

Joined Nov 5, 2025
59
Latest modification adding C5 and R9.
This provides a reset on IC2 so that the Signal LED status is always correct when initially powered up.
BTW what are your thoughts on using a microprocessor chip?
View attachment 358517
I'm not sure what you mean re: correct LED status upon power up. Shouldn't sensor 1 and 2 relays control that?
When you say a microprocessor chip are yo referring to an Arduino? I've dealt with those successfully in the past and they are fun but if what you have works then that is good enough for me. This is definitely above my skill level.
 

sghioto

Joined Dec 31, 2017
8,634
I am a little fuzzy when you say 'when the IR sensor deactivates' in bullet point one.
I just mean when the relay contact opens. It only takes a brief closure to start the timer.
Not sure either how long the relay contacts actually stay closed when the sensor is activated.
I suppose you could check that out but probably not that important.
 
Top