USING TRAIN DETECTION
TNT Homepage
These are easy to assemble train detectors that work very well for sensing the arrival of a train at a specific point on your railroad.
They use Radio Shack 276-0142 Infrared Emitter and Detector pairs. The photodiode is mounted beneath the track in a hole drilled in the benchwork table top.
The IR LED is mounted in a signal bridge, light pole, a bridge over the track, or a pedestrian overpass. A total of four locations are provided for within TNT.
Printer port pins 11, 12, 13, and 15 are used as shown below. I have found that when a separate power supply is used for the 5V of the detector pairs, it is neccessary to connect the ground of the supply to chassis ground of the COM port cable to enable proper signal levels for detection.
Alternately, the emitter detector pair can be mounted horizontally between buildings,
on bridges, telephone poles, or a trackside signal relay box.
Here are some pictures of a typical setup during mockup and testing. The actual
installation can be accomplished to minimize the
appearance of the wires and devices.



The simple connection to parallel port and 5 volt supply using Radio Shack parts.
The TNT software is setup to allow rapid scripting of train movements. Menu driven
scenario writing is accomplished by defining "STOP' on detection, "MARK" on detection, "LINK" on detection, and, "LEARN" on detection. These simple elemental operations can then be run as a daisy chain, or repeat sequence fashion, for
quick and easy train automation and scheduled train running based upon the fast clock and position dependant train detection events.
For instance, by positioning a string of cars just beyond a detector, a loco can be run to the detector, then advanced at "coupling speed"
for a few seconds, then stopped, it's direction reversed, a wait for departure performed, and then, at departure time,
the entire train pulled out from a siding, all by automated computer control. The entire scripted sequence requiring only a half dozen, or so, queues.
One hundred queues are currently available within each TNT scenario, and may be performed at any time within the session. Additionally, scenarios can be linked by detector events. This allows a virtually unlimited number of scenario queues to be used.
With the detector mounted under the rails in a recessed hole, interference from the TV IR remote is eliminated. Also, any light received from
the IR remote while in an uncovered state will not trigger a detection sequence, and while it is occluded by a train the possibility of false open is minimized.
IR remote activity is infrequent, in any event. Ambient room lighting
doesn't cause interferrence unless direct intense incandescent lighting is used. Flourescent lighting and subdued lighting
causes no interference. Remember, train detection is caused by abscence of light when train is present, not by too much light when it is exposed to light.
Precise alignment of the emitter detector pair is required for reliable operation. This is done by moving the emitter until
reliable operation is obtained, and securing the installation with Goo or rubber cement. Another way of mounting the emitter above
the rails is to use simple light stands made from wire coat hangers, these are adjustable, but are susceptible to displacement
if disturbed by a careless hand movement. Of couse, keep the light path clear from obstructions caused by careless application of glue, paint, plaster or ballast.