Automatic Reversing Circuit - Mk IV

  This page shows information for the 4th in the Automatic Reversing Circuit series and incorporates the best features and lessons learned from the preceding three versions. This circuit is designed for use with HO and N scale trains but could be used with other scales if the current draw for the locomotive is 1 amp or less.

  The time that the SHUTTLE waits at each end of the track can be individually adjusted from 30 second to more than 5 minutes. The circuit can also be adjusted to control the acceleration, braking rates and maximum speed of the SHUTTLE.

  The BRAKING distance can be as long as 1.5 meter (5 feet) with an HO scale locomotive traveling at approximately 20MPH.

  For the purposes of this page the term "SHUTTLE" can mean a train of of any length and is not restricted to just a locomotive.


Automatic Reversing Circuit Mk IV

  The following diagram is the complete schematic for the Automatic Reversing Circuit Mk IV.

  Operation is controlled by four infrared/visible light sensitive phototransistors (Q1, 2, 3, 4) that are mounted through the roadbed and between the rails. As the SHUTTLE passes over each sensor the corresponding section of the circuit is activated.

  Light Emitting Diodes (LED 1, 2, 3, and 4) indicate when the phototransistor sensors are covered and also which direction the SHUTTLE will travel when the wait timer has run out (LED 5 and 6).

  A throttle has been incorporated into the circuit and features automatic current limiting and a short circuit indicator (LED 7).

  The circuit uses a 74LS00 TTL logic integrated circuit to provide a memory function for the circuit. One half of this device controls the timers that determine how long the SHUTTLE will wait at each end of the track while the second half remembers the SHUTTLE's direction and controls the reversing relay.

  A basic description of how the circuit operates, general notes and information regarding a printed circuit board appear further down this page.


Automatic Reversing Circuit Mk IV - Basic Operation

  1.   To start: The SHUTTLE is sitting over the EAST end STOP sensor (Q1). The indicator - LED 1 is ON - Timer LM556 B is active.

  2.   When B timer completes its cycle its OUTPUT will go LOW and the indicator - LED 6 will turn ON. The direction relay, RELAY 1, will be set for EAST to WEST travel and the SHUTTLE will begin to accelerate.

  3.   The SHUTTLE will continue to accelerate to its maximum as set by R26.

  4.   When the SHUTTLE covers the BRAKE sensor Q3 the indicator - LED 3 will turn ON. The LM556 B timer is reset and the LM556 A timer is activated.

      At the same time as SHUTTLE covers sensor Q3 the the SLOW brake will be activated and the SHUTTLE will decelerate.

  5.   When the SHUTTLE covers the STOP sensor Q4 the indicator - LED 4 will turn ON and the QUICK brake will be activated. The SHUTTLE will stop in a distance of approximately 1/4 of a car length or less.

  6.   The SHUTTLE will wait at the WEST end of the track until the LM556 A timer completes its cycle.

  7.   When the LM556 A timer completes its cycle its output will go LOW and the indicator - LED 5 will turn ON. The direction relay, RELAY 1, will be set for WEST to EAST travel and the SHUTTLE will begin to accelerate.

  8.   When the SHUTTLE covers the BRAKE sensor Q3 the indicator - LED 3 will be ON but there will be no change in the circuit.

  9.   The SHUTTLE will continue to accelerate to its maximum.

  10.   When the SHUTTLE covers the BRAKE sensor Q2 the indicator - LED 2 will turn ON. The LM556 A timer is reset and the LM556 B timer is activated and begins its timing cycle.

      At the same time as SHUTTLE covers sensor Q2 the the SLOW brake will be activated and the SHUTTLE will decelerate.

  11.   When the SHUTTLE covers the STOP sensor Q1 the indicator - LED 1 will turn ON and the QUICK brake will be activated. The SHUTTLE will stop in a distance of approximately 1/4 of a car length or less.

  12.   The SHUTTLE will wait at the EAST end of the track until the LM556 B timer completes its cycle.

  13.   The cycle will now repeat itself with the SHUTTLE traveling between and waiting at each end of the track.


Phototransistor Placement

  The next diagram shows how the phototransistor sensors are placed along the SHUTTLE track.

Automatic Reversing Circuit Sensor Placement Diagram

  The BRAKE sensors (Q2, Q3) control the direction of the SHUTTLE and activate the braking that gradually slows the SHUTTLE. The BRAKING distance can be as long as 1.5 meter (5 feet) with an HO scale locomotive traveling at approximately 20MPH.

  The STOP sensors (Q1, Q4) activate a QUICK braking action that will bring the slowly moving SHUTTLE to a stop over a distance of less than 1/4 of a car length. The STOP sensors should be positioned just short of where the front of the SHUTTLE should stop.

  No specific distances are given as these will depend on the length of the track, the distance desired for braking and the operating characteristics of the SHUTTLE's motor. Of course the SHUTTLE track itself can be of any length desired.

  The brake sensors might have to be placed unequally to compensate for differences that the SHUTTLE motor may have when slowing in one direction versus the other. The only way to determine this is by experimentation but with good quality motors this should not be a factor in setting up the circuit.

  The diode stopping sections at each end of the track are optional and provide runaway protection should the circuit not operate properly.


The Brain Behind The Automatic Reversing Circuit

  The next diagram shows a more detailed view of how the 74LS00 is configured and its basic memory functions in the Automatic Reversing Circuit. The use of the 74LS00 as a SET / RESET type of Flip-Flop is one a classic - basic memory device.

74LS00 Logic Diagram

  Depending on which phototransistor is covered, the bottom half of the 74LS00 chip activates the corresponding timer.

  When the output of one of the timers goes to a LOW state the top half of the 74LS00 chip sets the direction the SHUTTLE will travel via the direction control relay.

Circuit Operation Notes

  1.   If the SHUTTLE stops before it has reached the STOP sensors (Q1, Q4) the circuit will still function correctly and reverse the SHUTTLE when the timer completes its cycle.

      This can sometimes occur until the motor has a chance to "Warm Up".

  2.   If the room lights are turned OFF the reversing circuit will go into a QUICK braking mode and stop the SHUTTLE.

      When the lights are turned ON again the circuit will resume its normal operation. However, depending on the direction of travel and how long the lights were OFF the SHUTTLE may reverse itself when it resumes operations.

  3.   Normally the QUICK brake is only active when one of the STOP sensors Q1 and Q4 is covered by the SHUTTLE. For this reason the throttles braking setting (R29) is adjusted so that the SHUTTLE is moving slow enough for it to stop in less than the length of the first car.

  4.   The purpose of the reversing relay being controlled by the top half of the 74LS00 is so that the direction of travel is changed when the SHUTTLE is going to leave its stopping point. This means that the SHUTTLE is at a full stop when the relay changes position and therefore the relay can have no effect on the braking of the SHUTTLE.


General Notes

  1.   For the best operating results this circuit requires a locomotive with very good running qualities such as one with can type motors. The running qualities of the locomotive will ultimately determine the BRAKING and ACCELERATION rates and distances for this circuit.

  2.   The SHUTTLE does not have to be covering any of the four phototransistor sensors when the circuit's power is turned ON. The SHUTTLE must be between the STOP sensors to ensure proper circuit start up.

  3.   The waiting times for the circuit are dependent on R12/R13/C5 for the LM556 A timer and R18/R19/C6 for the LM556 B timer. With the values shown on the schematic the calculated waiting times are from 30 seconds to approximately 5 minutes.

  4.   The specifications of phototransistors Q1, 2, 3 and 4, are not critical and any that respond in the infrared / visible light range should work for this circuit. Those used for testing this circuit were "KIGHTLITES - KID-7404".

  5.   The phototransistors require normal room light to operate but the circuit could be adapted for day or night operation. For one possible method of doing this please refer to the Day and Night Infrared Detection page at this site.

  6.   There are 0.22 microfarad capacitors (C1, 2, 3, 4) at the sensor input terminals to reduce the chance of electrical noise causing the circuit to malfunction.

      If noise at the input terminals still presents a problem a 10K ohm resistor can be placed between the input terminal and the phototransistor sensor. Careful routing of the sensor wiring can reduce many noise problems.

  7.   The STOP sensor Q1 receives its power from the output of the LM556 B timer (PIN 9) while the STOP sensor Q4 receives its power from the output of the LM556 A timer (PIN 5).

      This is so that the STOP sensor that the SHUTTLE is covering is disabled when the circuit changes direction at the end of its wait. This causes the QUICK brake to be turned OFF when the SHUTTLE is ready to leave its stopped position.

  8.   The SHUTTLE can cover both the BRAKE and STOP sensors at one end of the track simultaneously without affecting the operation of the circuit. This means that the SHUTTLE can be a train that is longer than the braking distance.

  9.   The circuit is designed to operate on an AC supply voltage of between 12 and 16 volts at 2 Amps. The voltage of the supply determines the maximum output voltage of the throttle.

      For an AC supply voltage of 12 VAC the maximum output of the throttle will be approximately 8 volts. This would be more than enough to operate N and HO Scale SHUTTLES at a reasonable speed. (The ATLAS locomotive used to test this circuit traveled at approximately 20 MPH at 5 Volts.)

      For an AC supply voltage of 16 VAC the maximum output of the throttle will be approximately 11.5 volts.

      The advantage of using the lowest possible supply voltage is the reduction in the amount of heat produced by the throttle's power transistor (Q3).

      The circuit could also be powered from a 12 Volt battery or a battery eliminator type power supply.

      The detection and control section of the circuit operates on 5 Volts. This allows the AC power input to the circuit to be as low as 10 Volts without affecting the overall operation of the circuit.

  10.   The throttle has a designed capacity of 1 Amp but this could be increased to 2 Amps if adequate air circulation is provided for cooling of the throttles power transistor. Larger currents could be handled if the power transistor were to be mounted on an external heat sink.

      The resistor R32 sets the current limiting level for the throttle.

  11.   The Automatic Reversing Circuit could also be used to operate an automated locomotive test track. In this case it might be desirable to use control potentiometers that are mounted away from the circuit board for easier adjustment.

      While this throttle has its own built in DC throttle, it could be used to control external throttles including DCC units if these could accept a DC voltage as a speed control and an external input for direction changes.


Parts Lists and Digi-Key Stock Numbers

  The following table shows the parts list for the Automatic Reversing Circuit - Mk IV. The list shows the Digi-Key stock numbers as well as the schematic part numbers

Qty   DigiKey Part   DigiKey Description   Circuit Part Number
1 - 296-1393-5 - IC QUAD DIFF COMPARATOR 14-DIP - LM339A, B, C, D
1 - 296-1626-5 - IC QUAD 2-IN NAND GATE 14-DIP - 74LS00
1 - 296-1395-5-ND - IC DUAL OPERATIONAL AMP 8-DIP - LM358
1 - LM556CNFS-ND - IC TIMER DUAL MONO 14-DIP - LM556A + B
1 - LM7805CT-ND - IC REG 1A POS -40-+125DEG TO-220 - VR1
4 - 160-1030 - PHOTOTRAN NPN 3MM IR DARK - Q1, 2, 3, 4
3 - 2N3904FS - IC TRANS NPN SS GP 200MA TO-92 - Q 6, 8, 9
1 - 2N3906FS - IC TRANS PNP SS GP 200MA TO-92 - Q5
1 - 497-2541-5 - TRANS NPN DARL 100V 10A TO-218 - Q7 (TIP142)
1 - RS401LDI - RECT BRIDGE GPP 50V 4A RS-4L - CR1
6 - 160-1712 - LED 3MM GREEN DIFFUSED - LED1, 2, 3, 4, 5, 6
1 - 160-1665 - LED 3MM 632NM ALINGAP RED CLEAR - LED7
12 - 1N4148DICT - DIODE SWITCHING 75V 500MW DO-35 - D1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13
1 - 1N4001DICT - RECTIFIER GPP 50V 1A DO-41 - D11
        RESISTORS    
5 - 470KQBK - RES 470K OHM 1/4W 5% CARBON FILM - R2, 3
5 - 390KQBK - RES 390K OHM 1/4W 5% CARBON FILM - R1, 4
5 - 100KQBK - RES 100K OHM 1/4W 5% CARBON FILM - R5, 6, 13, 19, 27
5 - 22KQBK - RES 22K OHM 1/4W 5% CARBON FILM - R30
5 - 10KQBK - RES 10K OHM 1/4W 5% CARBON FILM - R15, 16, 25
5 - 3.3KQBK - RES 3.3K OHM 1/4W 5% CARBON FILM - R22, 23
5 - 2.2KQBK - RES 2.2K OHM 1/4W 5% CARBON FILM - R21, 31
5 - 1.0KQBK - RES 1.0K OHM 1/4W 5% CARBON FILM - R14, 17
5 - 1.0KH - RES 1.0K OHM 1/2W 5% CARBON FILM - R33
10 - 470QBK - RES 470 OHM 1/4W 5% CARBON FILM - R7, 8, 9, 10, 11, 20, 24
1 - 0.62W-2 - RES .62 OHM 2W 5% METAL OXIDE - R32
3 - 3352T-1-105LF - POT 1.0M OHM THUMBWHEEL CERM ST - R12, 18, 28
1 - 3352T-1-254LF - POT 250K OHM THUMBWHEEL CERM ST - R29
1 - 3352T-1-103LF - POT 10K OHM THUMBWHEEL CERM ST - R26
        CAPACITORS    
4 - 495-1106 - CAP .22UF 63V METAL POLY - C1, 2, 3, 4
2 - P10298 - CAP 330UF 35V ELECT FC RADIAL - C5, 6
2 - P11212 - CAP 10UF 25V ELECT FC RADIAL - C7, 10
1 - P10309 - CAP 2200UF 35V ELECT FC RADIAL - C8
1 - P10323 - CAP 100UF 50V ELECT FC RADIAL - C9
        OTHER    
1 - HS110 - HEAT SINK TO-3 1.25" COMPACT - Q7 HEATSINK
1 - HS106 - HEAT SINK TO-220 .375" COMPACT - VR1 HEATSINK
3 - ED1601 - TERMINAL BLOCK 5MM VERT 2POS PCB - TERMINAL BLOCK
1 - ED1602 - TERMINAL BLOCK 5MM VERT 3POS PCB - TERMINAL BLOCK
1 - Z123 - RELAY PC MNT DPDT 2A 5VDC - RELAY 1

Return to the Main Circuit Index


Please Read Before Using These Circuit Ideas

  The explanations for the circuits on these pages cannot hope to cover every situation on every layout. For this reason be prepared to do some experimenting to get the results you want. This is especially true of circuits such as the "Across Track Infrared Detection" circuits and any other circuit that relies on other than direct electronic inputs, such as switches.

  If you use any of these circuit ideas, ask your parts supplier for a copy of the manufacturers data sheets for any components that you have not used before. These sheets contain a wealth of data and circuit design information that no electronic or print article could approach and will save time and perhaps damage to the components themselves. These data sheets can often be found on the web site of the device manufacturers.

  Although the circuits are functional the pages are not meant to be full descriptions of each circuit but rather as guides for adapting them for use by others. If you have any questions or comments please send them to the email address on the Circuit Index page.

Return to the Main Circuit Index

05 September, 2009