Top

Train RR Crossing LEDs Scheme 2


In order to implement a railroad crossing scheme, it is necessary to detect the position of the model train relative to the railroad crossing.  A pair of Reed Switches will do the trick in a relatively cost effective manner.

What is a Reed Switch? A Reed Switch is comprised of a set of swich contacts hermetically sealed in glass. For this application which is appriximately one inch and about one eighth inch in diameter. It has a sausage-like shape.   The switch contacts are normally open and will be energized when it is placed in close proximity with a magnet.

The following figure depicts a pair of Reed Switches, associated magnets, and a Twin Coil Latching Relay used to turn power on and off to the LED Flashing circuit previously described.

Let’s walk through the figure in detail.

1) Assume that the train can be going in either direction from Reed Switch A toward Reed Switch B, or from Reed Switch B toward Reed Switch A passing accross the railroad crossing.

2)  As it passes over Reed Switch A, which is located between the train rails, Magnet A attached below one of the train cars causes Reed Switch A to momemtarily causing Coil A of the latching Relay to to enegize through the Panel Mounted Switch. This in turn causes the +12 vdc return (Power Supply negative) to turn on the Flashing LED circuit, which are wired to the Cross Bucks.

3) P.S.  The latching Relay is needed because the Reed Switch (not a latch) will only close when it is close to the magnet. There is also a Panel Mounted Switch (Double pole, Double Throw, none momentary) which will permit bi-directional train sensing.

4) As the train passes over Reed Switch B, it will momentarily close causing Coil B to reset the Latching Relay back to its normally open position, thereby disconnecting the +12 Vdc Power Source from the Flashing LED circuit.

5) Reed Switch A can be located a suitable distance from the crossing (appoiximately 5 feet).

6) For bi-directional operation operation, Reed Switch B must also be located pass the crossing by about 5 feet.

7) Now when the train travels from Reed Switch B to Reed Switch A, the Panel Mounted Switch must be thrown to the down position in the figure causing the B Coil of the Latching Relay to become the “set coil” which will thereby connect the +12 Vdc Power Source to the Flashing LED circuit.

8) As the train travels over Reed Switch A, Coil A will act as the “reset coil”, thereby causing the +12 Vdc Power Source to be disconnected from the Flashing LED circuit.

9) There is a reason why the distance to and from the railroad crossing are both about 5 feet.  This is because it is wise to use one magnet placed as close as possible to the engine, allowing the Cross Buck lights to first turn on 5 feet before the crossroad and turn off 5 feet after the train has passed the crossroad in either direction.

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

 

Train RR Crossing LEDs Scheme 1

 

In order to implement a railroad crossing scheme, it is necessary to detect the position of the model train relative to the railroad crossing.  A pair of Reed Switches will do the trick in a relatively cost effective manner.

What is a Reed Switch? A Reed Switch is comprised of a set of swich contacts hermetically sealed in glass. For this application which is appriximately one inch and about one eighth inch in diameter. It has a sausage-like shape.   The switch contacts are normally open and will be energized when it is placed in close proximity with a magnet.

The following figure depicts a pair of Reed Switches, associated magnets, and a Twin Coil Latching Relay used to turn power on and off to the LED Flashing circuit previously described.

Let’s walk through the figure in detail.

1) Assume that the train will be going in the direction from Reed Switch A toward Reed Switch B, passing accross the railroad crossing.

2)  As it passes over Reed Switch A, which is located between the train rails, Magnet A attached below one of the train cars causes Reed Switch A to momemtarily causing Coil A of the latching Relay to to enegize. This in turn causes the +12 vdc return (Power Supply negative) to turn on the Flashing LED circuit, which are wired to the Cross Bucks.

3) P.S.  The latching Relay is needed because the Reed Switch (not a latch) will only close when it is close to the magnet.

4) As the train passes over Reed Switch B, it will momentarily close causing Coil B to reset the Latching Relay back to its normally open position, thereby disconnecting the +12 Vdc Power Source from the Flashing LED circuit.

5) Reed Switch A can be located a suitable distance from the crossing (appoiximately 5 feet).

6) Reed Switch B can be located pass the crossing by about 1 foot.

Important Concern:  This scheme will only work for a train traveling from Reed Switch A towards Reed Switch B. This is because Coil B would have to now become the “set coil” and Coil A would have to become the “reset coil”. If you link to the Model Railroad Train RR Crossing Scheme 2, you can see how to resolve this problem.

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

Turnout Indication LED Projects

Turnout Position Indication – If you want to save some money by not buying an expensive system here is a suggestion for building your own system which has the following attributes:

(1) Use of Green and Red LEDs on your Main Control Panel to indicate Turnout position, Green straight ahead, Red to the right or left.

(2) Use of only Green LEDs on a separate Yard Panel to depict the turnout train path selected.

(3) For those turnouts that require momentary toggle switches to activate dual coil switch machines, for example ATLAS or PECO a Latching Circuit can be used to memorize the recently activated turnout position.

(4) A series of signal heads placed near each turnout which will track the turnout position selected on the Main or Yard Control Panel. More about Signal Heads in another paragraph.

The one disadvantage to the scheme is that it does not actually give the operator any feedback as to whether or or not the Turnout has been thrown because it only latches the last momentary toggle switch position.

The figure below depicts the overall concept in block diagram form.

Detailed Description of above diagram

The diagram depicts two Power Supplies.

Power Supply #1 is a 12 vdc, 1 amp wall-wart type or equivalent, that is used to energize the twin coil machines (Turnouts). Notice that the two coils are tied together via a jumper wire. Notice that + 12 vdc from PS #1 is hard-wired to both coils. Either coil is energized by the application of the PS#1 Return line via momentarily toggling Switch S1 to either one side or the other. Notice that S1 is a momentary double pole switch mounted on the Control Panel.

Power Supply #2 is a 12 vdc, 1 amp wall-wart type or equivalent, that is used as a power source for the Latch Network. As either coil is energized by the application of the PS#1 Return line via momentarily toggling Switch S1 a SET or RESET Signal is created and routed to the Latching Network. The SET and RESET inputs are normally biased at + 12 vdc from PS# 2. If a SET is selected via S1, then the input to resistor R1 becomes a Logic zero (12 vdc Return) and the RESET input to R2 remains at a Logic one (+12 vdc). If a RESET is selected via S1, then the input to resistor R2 becomes a Logic zero (12 vdc Return) and the SET input to resistor to R1 remains at a Logic one (+12 vdc).

The important thing to remember is that the Output of the Latching Network (Q) will hold or memorize the last state (SET or RESET) that was last toggled to by S1.

Voltage-wise the Output of the Latching Network will either be +12 vdc or zero vdc. If it is +12vdc, then the Green LED on the Control panel will be lit. If it is Zero vdc, then the Red LED will light.

What I have described above is available on one fourth of an Integrated Circuit (Chip). Therefore, one Integrated Circuit such as the CD 4044BC will program four Turnouts. It is possible to fit four of these Integrated Circuits into a Radio Shack Project Enclosure (7 x 5 x 3), giving one the capability to control sixteen turnouts.

The Latching Network can be packaged as part of the Control Panel with or without an enclosure. Remember that an enclosure usually requires connectors that mate to the outside world. The Detailed Schematic Information below reflects an actual design to control 16 turnouts (4 Chips to control 16 Turnouts packaged in a Project Enclosure with the following 37 pin connectors for interface to the Control Panel and the Track Signal Heads.

Connector Data

For Large Project Box:

Quantity = 2; Part Number DUBSCM37; Description 37 Contact Male Solder Cup Connector

Quantity = 2; Part Number DUBSCF37; Description 37 Contact Female Solder Cup Connector

Quantity = 2; Part Number DSUBCH37; Description 37 Pin Connector Hood

Detailed Schematic Information for Chip U1

Four Chips U1 through U4 are used in a large Project Box to control 16 Pecos on my layout. The above Schematic shows the necessary interconnections. Specifically the J1 connector is a 37 pin P/N ? used to interface with the Main Control Panel which contains the LED Turnout Position Indicators attached to the appropriate spot on the pictorial of the track layout which appears on the panel surface. It also interfaces U1 and U2 to the Track Signal Heads on the layout via the Main Front Panel LEDs. There is also another connector J2 which is also part of the Project Box. It interfaces with U3 and U4.

The resistors (Rs) depicted above are all of the same value, 10k, 1/4 watt. Each resistor is wired to some sort of bus terminal within the Project Box. The other ends of the resistors are wired to the associated signal pin on the Chip.

Detailed Schematic Information for Chip U2

In the figure below it can be seen that U2 is wired in a similar fashion to U1, except that it reflects being used with Turnouts 5 through 8.

Detailed Schematic Information for Chip U3

In the figure below it can be seen that U3 is wired in a similar fashion to U1, except that it reflects being used with Turnouts 9 through 12 and it uses connector J2 on the Project Box.

Detailed Schematic Information for Chip U4

In the figure below it can be seen that U3 is wired in a similar fashion to U2, except that it reflects being used with Turnouts 13 through 16 and it uses connector J2 on the Project Box.


Signal Heads

Signal Head wiring is relatively simple in concept. Each Signal Head is generally made up of one green LED and one red LED.  The can be wired in parallel to the corresponding LEDs on the Control Panel. Refer to the figure below  and simply wire the positive side of the Red LED on the Control Panel to the positive side of the RED LED on the Signal Head; likewise wire the negative side of the Green LED on the Control Panel to the negative side on the Signal Head.

In the above figure, resistors R3 and R4 are each about 750 ohms each if the Signal Head LEDs are also used.  This is because we have pairs of diodes in parallel so that the overall circuit draws twice the current. Normally R3 and R4 would would have been 1500 ohms each.

P.S. You can save some money by buying existing Signal Heads and removing the existing light bulbs and replacing them with LEDs.

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

Fire Engine Flashing LED Project

In this section, a model train  timer circuit for flashing led projects using one of the most useful Integrated Circuits or IC, more commonly known as the 556 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. The 556 Timer chip is actually two 555 Timer chips packed in one package.  The 556 Timer chip has a 14 pin configuration since it is two chips in one.

See Typical Pinout Diagrams below:

 

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.

Fire Engine Flashing LEDs

The following photograph depicts a Fire Engine (HO Scale) with two 2 mm rectangular clear white lens LEDs that illuminate to a red color in place of the original non-functioning placed over the cab area.  It is also possible to replace two other original non-functioning LEDs at the rear of the truck. We can use the 556 Chip to implement the four LEDs to flash at a periodic rate.

See the following schematic diagram for  information reflecting the A side of the chip:

As shown in the above circuit diagram, you must use a power supply between + 4.5 and +15 vdc.  The 556  chip Section A develops a square wave at output pin 5 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 CR1A  will illuminate, and while the output square wave is at zero volts then LED CR2A  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

LED Timing Determination

There are three components (resistors R1A  and R2A and capacitor C1A)  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(R1A + R2A)C1A

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

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

Now lets assume that R2A is much, much larger than R1A, then we get,

T = t1 + t2 = .7 (R1A + R2A)C1A +  .7(R2A)C1A  Generally, R2A is 10 times larger than R1A.

Now let R1A = 10k; R2A = 100k; C1A = 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

See the following schematic diagram for  information reflecting the B side of the chip:

As shown in the above circuit diagram, you must use a power supply between + 4.5 and +15 vdc.  The 556  chip Section B develops a square wave at output pin 9 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 CR1B  will illuminate, and while the output square wave is at zero volts then LED CR2B  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

LED Timing Determination

There are three components (resistors R1B  and R2B and capacitor C1B)  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(R1B + R2A)C1B

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

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

Now lets assume that R2B is much, much larger than R1B, then we get,

T = t1 + t2 = .7 (R1B + R2B)C1B +  .7(R2B)C1B  Generally, R2B is 10 times larger than R1B.

Now let R1B = 10k; R2B = 100k; C1B = 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

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

Additional Improvement

There must be a 2200 uf  Capacitor between the power supply input between pins 14 and 7 to reduce ripple. It should be physically placed as close as possible to the 556 chip.

 

A datasheet for the 556 Timer is available at the following link:   http://www.national.com/ds/LM/LM556.pdf

 

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

 

 

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

-12 vdc Series Regulators 79xx

In the Voltage Regulator section a zener diode was used in combination with an PNP transistor to provide greater current output than the Zener Regulator section. The previously referenced section discussed circuits that were built with discrete components such as a zener diode and an PNP transistor.

In this section, the aforementioned components are replaced by an Integrated Circuit or IC, more commonly known as a chip. This is what the world of Microelectronics has brought to us. 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 -12 volt Series Regulator, Part Number 7912. It is part of the 79xx group of regulators which are comprised of the following: 7905, 7906, 7909, 7910,7912, 7915, 7918, 7920, and 7924 where the last two digits of the part number reflect the output voltage.

See Typical Circuit Diagram below:

Two capacitors are used one at the input (C1 = o.1 uf) and one at the output (C2 = 0.1 uf) for filtering purposes. It is possible that the regulator will work without these. The 7812 chip will require a heat sink if we expect a 1 amp output current. More about that later. One of the nice features of the 7812 chip is that it has built-in short circuit protection and over heating protection (thermal overload). As per datasheets available on the internet, the chip input can vary between Vin = -14 to-35 vdc.  However, you’d better have a large heat sink and fan, if you are serious about a -35 vdc input.

Actually good design dictates that the input voltage Vin should be 2 to 3 vdc higher than the expected -12 vdc output.

See Diagram Below for physical pictorial of 7812 chip.

How does one select the proper heat sink?

The purpose of a heat sink is to transfer heat away from the integrated circuit. The heat sink is rated by its ability to transfer heat. This quantity is known as Thermal Resistance and is measured in degrees centigrade divided by watts.

If the thermal resistance of the heat sink is very low, then it is a good heat sink.

To determine the heat sink rating required, perform the following.

(1) Determine the power to be dissipated (Pd) as follows:

Pd = (Vin – Vout) x Output Current where Vin = -14 vdc; Vout = -12 vdc; and Output Current = 1 amp

Refer to previous -12v Regulator Sketch

Pd = (14 – 12) x 1amp = 2 x 1 = 2 watts

(2) As per the 7912 datasheet, the maximum Temperature rating is + 125 deg centigrade.

(3) Using this formula for Fahrenheit to Centigrade conversion to translate a room temperature of 72 deg F.

C = 5/9(F – 32) = 5/9(72-32) = 5/9 (40) = 22 deg centigrade

Note: If our circuit were in a case, we would have to know what the internal case temperature is.

(4) Use this formula to find the maximum thermal resistance of the heat sink.

Rth max = (Max Temp Rating of IC – Room temp) divided by Pd = (125-22)/2 = 103/2 = 52 deg centigrade per watt

(5) Carrying out the above formula a little bit further, 52 deg centigrade per watt times 2 watts = 104 deg centigrade. Now, we add room temperature to that and we get 104 + 22 =126 deg centigrade which is beyond the 125 deg centigrade specification. Therefore, we need a heat sink. Reference 7812 datasheet.

(6) Now, we add room temperature to that and we get 52 + 22 = 74 deg centigrade which is safely below the 125 deg centigrade specification.

P.S. If you want to learn about positive voltage Series Regualtors visit the following: + 12 vdc Series Regualtors 78XX

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

+ 12 volt Series Regulators 78XX

In the Voltage Regulator section, a zener diode was used in combination with an NPN transistor to provide greater current output than the Zener Regulator section. The previously referenced section discussed circuits that were built with discrete components such as a zener diode and an NPN transistor.

In this section, the aforementioned components are replaced by an Integrated Circuit or IC, more commonly known as a chip. This is what the world of Microelectronics has brought to us. 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 +12 volt Series Regulator, Part Number 7812. It is part of the 78XX group of regulators which are comprised of the following: 7805, 7806, 7809, 7810,7812, 7815, 7818, 7820, and 7824 where the last two digits of the part number reflect the output voltage.

See Typical Circuit Diagram below:

Two capacitors are used one at the input (C1 = o.1 uf) and one at the output (C2 = 0.1 uf) for filtering purposes. It is possible that the regulator will work without these. The 7812 chip will require a heat sink if we expect a 1 amp output current. More about that later. One of the nice features of the 7812 chip is that it has built-in short circuit protection and over heating protection (thermal overload). As per datasheets available on the internet, the chip input can vary between Vin = +14 to +35 vdc.  However, you’d better have a large heat sink and fan, if you are serious about a +35 vdc input.

Actually good design dictates that the input voltage V in should be 2 to 3 vdc higher than the expected +12 vdc output.

See Diagram Below for physical pictorial of 7812 chip.

Notice that there are several packaging variations of the 7812 chip. There are also several variations of heat sinks associated with each package variation.

How does one select the proper heat sink?

The purpose of a heat sink is to transfer heat away from the integrated circuit. The heat sink is rated by its ability to transfer heat. This quantity is known as Thermal Resistance and is measured in degrees centigrade divided by watts.

If the thermal resistance of the heat sink is very low, then it is a good heat sink.

To determine the heat sink rating required, perform the following.

(1) Determine the power to be dissipated (Pd) as follows:

Pd = (Vin – Vout) x Output Current where Vin = +14 vdc; Vout = +12 vdc; and Output Current = 1 amp

Refer to previous +12v Regulator Sketch

Pd = (14 – 12) x 1amp = 2 x 1 = 2 watts

(2) As per the 7812 datasheet, the maximum Temperature rating is + 125 deg centigrade.

(3) Using this formula for Fahrenheit to Centigrade conversion to translate a room temperature of 72 deg F.

C = 5/9(F – 32) = 5/9(72-32) = 5/9 (40) = 22 deg centigrade

Note: If our circuit were in a case, we would have to know what the internal case temperature is.

(4) Use this formula to find the maximum thermal resistance of the heat sink.

Rth max = (Max Temp Rating of IC – Room temp) divided by Pd = (125-22)/2 = 103/2 = 52 deg centigrade per watt

(5) Carrying out the above formula a little bit further, 52 deg centigrade per watt times 2 watts = 104 deg centigrade. Now, we add room temperature to that and we get 104 + 22 =126 deg centigrade which is beyond the 125 deg centigrade specification. Therefore, we need a heat sink. Reference 7812 datasheet.

(6) Now, we add room temperature to that and we get 52 + 22 = 74 deg centigrade which is safely below the 125 deg centigrade specification.

P.S. If you want to learn about negative voltage Series Regulators visit the following: – 12 vdc Series Regulators 79xx

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

Voltage Regulator Circuits For Model Trains

DC Voltage Regulator (NPN & Zener Regulator)

There are instances where it is handy to have a regulated DC voltage power supply for  use on your model railroad layout.  In a previous section I used a 9.1 volt Zener Diode to develop a 9.1 vdc regulator.  However, this type of circuit which has many model railroad applications is limited by the current carrying capability of the zener diode. In this section this approach has been modified to include the addition of an NPN transistor which enhances the current output of the regulator.   See the figure below for the Zener NPN Transistor Voltage Regulator Circuit Diagram.

Assume we are feeding the above circuit with a variable supply which is adjustable from zero to +12 vdc.

The diode being used is a BZX79B9V1  500 milliwatt Zener Diode. In order to find out the current limiting resistor R1 we must the perform the following.

Set Variable DC Supply to + 12 vdc.

Remove Transistor Q1 from the circuit (nothing attached to zener or R1.)

Max Zener Power from Datasheet = 500 milliwatts

Maximum Zener Current = Max power/Zener Voltage = 500 mw/9.1 = 55 ma

R1 = Voltage accross R1/Max Zener Current = (12-9.1)/55 ma = 55 ohms

Let’s use R1 = 56 ohms for our circuit.

Now lets discuss the NPN Transistor (Radio Shack Part Number TIP31)

Maximum Specifications VCE = 1.2 volts;  VBE= 1.8 volts; IC= 3 amps; Power = 40 watts

With input set to + 12vdc, base to emmitter voltage  = 0.6 vdc, and the circuit output = 9 – 0.6 = + 8.5 vdc

Izt = 5 ma which represents the minmum turn-on current for the BZX79B9V1 Zener ( Reference datasheet on internet).

Since Izt = 5 ma, then the load will have 55 ma – 5 ma =50 ma

Remember that the load associated with the Zener is the NPN Transistor, and we must use the DC current gain between the base and collector,( hFE = 10 to 50 as per datasheet on internet for Radio Shack  Tip31 NPN Transistor)

In this instance the collector current will vary as follows as the input voltage to the overall circuit is changed from zero to +12 vdc.

Zener output of 9.1 vdc appears when minimum zener turn-on current Izt is reached.

For hFE = 10, Collector Current = 10 x 50 ma = 500 ma

For hFE = 50, Collector Current = 50 x 50 ma = 2500 ma = 2.5A

The NPN will dissipate 2.5A x (12-9.1) = 2.5 x 2.9 = 7.25 watts which is well below the 40 watts maxium spec.

Negative DC Voltage Regulator (PNP & Zener Regulator Circuit)

The PNP Regulator will use a negative variable input power supply which will yield a negative regulated power supply. The Zener Diode must also be reversed.

Now we are feeding the above circuit with a variable supply which is adjustable from zero to – 12 vdc.

The diode being used is still a BZX79B9V1  500 milliwatt Zener Diode. In order to find out the current limiting resistor R1 we must the perform the following.

Set Variable DC Supply zero  to – 12 vdc.

Remove Transistor Q1 from the circuit (nothing attached to zener or R1.)

Max Zener Power from Datasheet = 500 milliwatts

Maximum Zener Current = Max power/Zener Voltage = 500 mw/9.1 = 55 ma

R1 = Voltage across R1/Max Zener Current = (12-9.1)/55 ma = 55 ohms

Now lets discuss the PNP Transistor (Radio Shack Part Number TIP42)

Maximum Specifications VCE = 1.5 volts;  VBE= 5.0 volts; IC= 6 amps; Power = 65 watts

With input set to – 12vdc, the zener voltage = – 9.1 vdc, and the circuit output = (-9.1 – 0.6) = negative  9.7  vdc

Izt = 5 ma which represents the minimum turn-on current for the BZX79B9V1 Zener ( Reference datasheet on internet).

Since Izt = 5 ma, then the load will have 55 ma – 5 ma =50 ma

Remember that the load associated with the Zener is the PNP Transistor, and we must use the DC current gain between the base and collector,( hFE = 15 to 75 as per datasheet on internet for Tip42)

In this instance the collector current will vary as follows as the input voltage to the overall circuit is changed from zero to -12 vdc.

Output of neg 9.1 vdc appears at zener when minimum zener turn-on current Izt is reached.

For hFE = 15, Collector Current = 15 x 50 ma = 750 ma

For hFE = 75, Collector Current = 75 x 50 ma = 3750 ma =3.75A

The PNP will dissipate 7.5A x (12-9.1) = 7.5 x 2.9 = 21.75 watts which is well below the 65 watts maxium spec.

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

Zener Voltage Regulator

Question: I have quite an extensive model train layout with many devices which operate by battery power.  As a result there is a need to use many types of batteries of all types and sizes. Very often I know what the voltage requirement of the device but do not know the current being drawn when the device is turned on. How can I measure the current being drawn?  I do not have an ammeter to use to make the measurement.  John, Brooklyn, N.Y.

Answer: You can measure the current that the batteries are drawing, performing the following steps:

1)    Determine what battery or batteries are presently used.

For example: 9 volt, 1.5 volt AA, 1.5 volt AAA

2)    If the device uses one 9 volt battery, one must remove the battery from the battery holder and make the following connection shown in the figure. One can use clip leads to attach the 9 volt battery positive (+) terminal to either side of a 1 ohm resistor. Then connect the other side of the 1 ohm resistor to the positive (+) terminal in the devices battery box. Then connect the negative (-) terminal of the battery box to the negative (-) terminal on the battery.

1)    Using the hook-up shown in the figure, use a digital voltmeter to measure the voltage across the one ohm resistor,then use Ohm’s law to calculate the current that the 9 volt device is drawing during its operation.

2)    Ohms Law states the Current = Voltage/Resistance

3)    For this example,  if the digital voltmeter, reads 20 millivolts, then the current = 20mv/1 ohm = 20 ma, then a 9.1 Zener Voltage Regulator can be built to supply the voltage in lieu of the 9 volt battery. Use a power supply that is at least 3 vdc higher than the Zener diode voltage.

Details using BZX79-C9V1 500 mw Zener Diode (Reference Internet for zener diode data sheet)

 Given the following:

1) Diode Voltage = 9.1 vdc +/- 0.1 vdc

 2) Test Current  = 5ma = Best operating Zener Current (available from data  sheet for the BZX79-C9V1 (9.1 vdc zener)

 3) Load  is the device with the original battery box which  requires 20ma based previous measurement on device.

This load is across the 9.1 vdc zener. See above figure.

 Calculations:

 I total = I zener + I load                    Kirchoff’s Laws

          or

I total = 5 ma + 20 ma = 25 ma.

 R1 resistance value = Voltage across R1/I total as per Ohms Law

           or

 R1 = 12-9.1 = 2.9 vdc/25 ma = 116 ohms where (12-9.1)  is application of  Kirchoff’s Law

 9.1 volt Zener has a BZX79-C9V1 part number.

Data sheet indicates that the maximum power rating = 500 mw.

 Maximum Zener Current = Max Power/Zener voltage

                                       o r

0.5 watt/9.1 vdc = 55 ma  with load (Battery Box) disconnected.

 With Battery Box  removed, Zener power = 9.1vdc x 5ma = 45.5 milliwatts

 This choice of diode is perfectly safe even with a +/- 0.1 vdc variation of voltage tolerance and subsequent power change.

Notice that what we have achieved is the building of a  Zener Diode Voltage Regulator to replace the battery pack within the original battery box using the very basic Zener Diode Voltage Regualtor Circuit shown above.

The Battery voltage source to the Zener diode can actually be a variable or fixed voltage power pack  whose DC voltage is three to five volts greater than the Zener’s voltage.  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