Top

Model Railroad Crossing Flashing LED Project

In this section,one of the most useful Integrated Circuits or IC, more commonly known as the 555 Timer chip will be discussed.  It should be noted that IC’s or chips are very reliable and cheap relative to a circuit constructed from individual discrete components. This section discusses the 555 Timer chip and the 556 Timer chip which is actually two 555 Timer chips packed in one package. The 555 Timer chip is the eight pin version and the 556 Timer chip is the 14 pin version since it is two chips in one.

See Typical Pinout Diagrams below for each of the chips:

 

For the purposes of this website, the detailed operation of the chip will not be discussed, since it is actually part of an Electronics Engineering curriculum  and thus beyond the scope of this paragraph.  However, enough detail will be provided to package a set of Flashing LEDs for various model railroad projects.

Flashing Railroad Crossing

See the following schematic diagram for information:


As shown in the above circuit diagram, you must use a power supply between + 4.5 and +15 vdc.  The 555 chip develops a square wave at its output pin as shown.  The square wave out will swing between  + Vs and zero volts dc at some periodic rate.  Since it is a square wave, the amount of time it is at + Vs volts is equal to the amount of time it is at zero volts.  This is achieved by the proper selection of resistors and capacitors as described below. Note that if the output is equal to +Vs then LED CR1 will illuminate, and while the output square wave is at zero volts then LED CR2 will illuminate.  Hence, the LEDs will flash on and off as the square wave transitions from +Vs to zero at a rate that is determined below.

Given that we use a +12 vdc Power Supply, and assuming that 2 vdc will appear across each of the LEDs, then 10 vdc will appear each of the 1.5K Resistors.  Hence, using Ohms Law the current passed by each LED will be calculated by the following formula:

Current = Voltage/Resistance  or Current = 10 vdc/1500 ohms      =  6.6 milliamps

It is recommended that you use 3 mm red and green LEDs for HO scale and 5mm for O gauge.  One cost effective thing to do is to purchase signal heads and pop out the existing incandescent bulbs with the appropriate LEDs.

LED Timing Determination

There are three components (resistors R1 and R2 and capacitor C1)  that determine the rate at which the LEDs flash on and off which is determined by the period of the square wave.

More specifically the time that the output is positive is equal to t1 = .7(R1 + R2)C1

The time that the output is positive is at zero volts is equal to t2 = .7(R2)C1

Therefore the total period of the square wave is t1 + t2 = T

Now lets assume that R2 is much, much larger than R1, then we get,

T = t1 + t2 = .7 (R1 + R2)C1 +  .7(R2)C1  Generally, R2 is 10 times larger than R1

Now let R1 = 10k; R2 = 100k; C1 = 1 uf

We now get T = (0.7)(10k + 100k)(1xE-6) + (0.7)(100k)(1xE-6) = (0.7)(110k)(1xE-6)+ (0.7)(100k)(1xE-6) = 0.147 sec.

Translating T into a Frequency we get Frequency = 1/T = 1/0.147 = 6.8  Hz
Therefore the LEDs will flash at 6.8 Hz or 6.8 cycles/sec

Additional Improvements

(1) Place a 2200 uf  Electrolytic Capacitor between the positive (Vs+) and negative  (GND) as close as possible to the 555 Chip, Solder it to pin 8 and pin 1, + and – respectively. This will reduce any power supply ripple.

(2) There will have to a circuit which will enable or turn this 555 timer on prior to the train approaching the railroad crossing and  interrupt the power supply voltage as the  last car of the train passes the crossing.  The following links  discuss two ways of accomplishing this.

Link 1:  Train RR Crossing LEDs Scheme 1

Link 2: Train RR Crossing LEDs Scheme 2

Note: Scheme 1 will only operate with the train going in one direction.

Scheme 2 will only operate with the train operating in either direction.

 

The 555 Timer datasheet is available at the following link:

http://www.national.com/ds/LM/LM555.pdf

In general, the following vendors are recommended for any of the above electronic components. :

Radio Shack – Local Store or on-line at  www.radioshack.com

Futurelec at  www.futurlec.com

If you wish to acquire a better understanding of Electronics Theory, I suggest you go to  the following  link: Electronics

Bottom