Delay Timer Circuit for Model Railway needed

Discussion in 'The Projects Forum' started by Imagineering, Dec 2, 2008.

  1. Imagineering

    Thread Starter New Member

    Dec 2, 2008
    I have need of a relatively simple circuit that will achieve the following.

    I intend to have 3 separate independant inputs (ie. LED/Phototransistor Interruptor).
    If any single Phototransistor is triggered, a DPDT Relay changes state. (ie. if it's ON it turns OFF, if OFF it turns ON).
    There must be a delay of approx 5-10 seconds between the Trigger Input and the Relay change of state.

    At present I have a Model Railway with 3 tracks, (think of a Y). The Loco can move to all 3 legs of the 'Y' and is controlled by a simple 555 timer which changes Track Polarity. One of the arms of the 'Y' is about 1.5 Metres long and this determines the Timer setting. However, the other 2 legs of the 'Y' are only 300mm long and the delay before Polarity change is unacceptable. I have automatic Points control operating from the bottom leg of the 'Y' which work fine and is totally independant of the timing circuit.

    I need the timing delay to allow the Loco to stop & wait before reversing direction.
    There is a Diode imbedded in the Rail at each end of the 'Y' to stop the Loco untill the polarity is changed.
    I have a circuit using a LM556 as an 'Alternating Input Driver', which will change the state of a relay each time an input is detected. I also have a circuit which will allow me to use the Photo Interruptors, independantly driving an LM 339 to give an output to the LM556 Circuit. This works in theory, but I haven't tested it yet.
    I can competantly build circuits but unfortunately my electronics design is not up to scratch as my knowledge is limited in this area.

    Can anyone assist perhaps.

    New Zealand.
  2. SgtWookie


    Jul 17, 2007
    So, you want to completely automate the movement of an engine (and possibly tender) through the wye?
  3. Imagineering

    Thread Starter New Member

    Dec 2, 2008
    I'm already doing this with a 556 Timer which has a set delay before changing the Track Polarity. Because the 'Y' has different leg lengths, the wait time at the short legs is too long. The Layout distributes sweets to waiting children and their patience level is limited.

    What I need is a circuit that changes Track Polarity every time the Loco & Train reaches the end of each leg. There also needs to be a delay of 5-10 seconds between the arrival of the Loco and the Polarity change.

    I have an independant Circuit controlling the Points, so that doesn't need addressing.
  4. RiJoRI

    Well-Known Member

    Aug 15, 2007
    From my point of view, the QAD (Quick And Dirty) solution would be to use something like a BASIC Stamp and three sensors for this. The timing would differ depending on which sensor trips.

    Or, have the sensors near the termini of the three legs (it sounds like you have the sensor at the Y connection). Extend the power-on time to include the time of travel down one of the shorter legs: so if it takes 10 seconds to travel the long leg, and two seconds to travel the short leg, set the timer for 12 seconds. So you would get power on for the entire trip, power off for 5 or so seconds, polarity reversal, and start all over again.

  5. SgtWookie


    Jul 17, 2007
    Here's a multiple event timer I whipped up for someone awhile back, using a 4017 Johnson counter and a 40106 Schmitt-trigger inverter as a clock.

    See the attached.

    You need a number of events to happen in a controlled sequence.

    1) Train enters long leg of wye.
    2) PWM control starts to decrease speed of train to scaled walking speed.
    3) Train triggers sensor near 1st point of wye. PWM control decreases train speed to zero over a period of time.
    4) Polarity of track is reversed.
    5) Switch points thrown.
    6) PWM control increases speed of train to scaled walking speed.
    7) Train triggers sensor near 2nd point of wye. PWM control decreases train speed to zero over a period of time.
    8) Polarity of track is reversed.
    9) Switch points thrown.
    10) PWM control increases speed of train to scaled walking speed.
    11) Once entire train clears wye, speed of train increased to normal.