Train Detection

DCCWiki, a community DCC encyclopedia.

Various methods are available for detecting the location of trains (locomotives and/or rolling stock) on a model railroad. Some of these are specific to Digital Command Control whereas others are unrelated to DCC but included here for completeness.

Overview

RFID detector used on the prototype.

Train Detection can be divided into three broad categories by location accuracy:

  • Block detection - whether a train is located somewhere on a particular section of track, or block.
  • Location detection - whether a train is located at a specific point on the layout.
  • Proximity detection - whether a train is located at or near a point on the layout.

It can also be categorized by the type of information reported:

  • General - any locomotive or piece of rolling stock is reported.
  • Classifying - only locomotives or only specially-fitted locomotives or pieces of rolling stock are reported.
  • Identifying - the specific ID of a suitably-equipped locomtive or piece of rolling stock is reported.

Lastly, it can be categoried by the technology used:

  • Optical - detectors that use Infra Red or visible light.
  • Conductive - detectors sensitive to the track supply current or voltage.
  • Proximity - detectors sensitive to objects nearby.

General Detection

We'll start off with the various generic detection methods, i.e. methods that detect all locomotives and/or all pieces of rolling stock:

Optical Detection

Many references can be found to various designs for optical detection, making use of Light Dependent Resistors (LDR) or Photo Transistors and IR detector pairs. Each has its own challenges and applications depending on the track layout, detection requirements, sensitivity and expense.
Advantages:
  • Independent of the operational control system, i.e. DC or DCC control and power on the track.
  • Can detect a small area of the block, and if paired, can detect direction of occupancy
  • Does not need any resistors or modifications to rolling stock.
Disadvantages
  • Can be more complicated to align detector pairs.
  • In the case of LDRs can be sensitive to ambient light and require careful shielding.
  • Can look between rolling stock and appear to be unoccupied. This can be countered by diagonal placement.

Light Dependent Resistor

Probably the most common detector used in the past was the LDR or Light Dependent Resistor. This is an electronic device which changes its resistance in proportion to the amount of light to which it is exposed.
A detection circuit deploying a LDR would typically use an incandescent light or LED on one side of the track, and an LDR on the other and detect the interruption of light impacting the LDR, as a locomotive or stock moving or standing on the track in front of the detector.
Advantages:
  • Has a natural hysteresis due to its lower switching speed.
Disadvantages
  • Can be more complicated to align detector pairs.
  • Is sensitive to ambient light and require careful shielding.

Photo Transistors and IR Detector Pairs

A more current and popular optical detection solution these days is the IR Detector pair. This circuit makes use of a matched Infrared Transmitter and receiver spanning the track to detect occupancy.
Advantages:
  • Has longer range and can be designed to detect over longer distances, even down the track.
  • Is not as sensitive to ambient light and thus more reliable that LDRs.
Disadvantages
  • Hysteresis must be designed into the detection circuit to cater for the quick switching speed of an IR photo detector, else errors can be detected.

Conductive Detection

Many references can be found to various designs for conductive detection, making use of the detection of any current being consumed on the track block, as an indication that the block is occupied. This is the most common form of block detection used on DCC layouts.
Advantages:
  • Is independent of the ambient lighting environment around the track.
  • Will detect an entire block`s occupancy and can detect direction of occupancy (Block to Block)
  • Can detect any rolling stock in the block that is drawing electrical current.
Disadvantages
  • Circuit is dependent of the operational control system, i.e. Direct Current or Digital Command Control, and power on the track, and is more complicated to design for DCC.
  • Track needs to be broken into electrically isolated blocks.
  • Needs the addition of a resistor on the insulated axles of rolling stock (like guard Vans (caboose)) if they are to be detected on the block, which in turn draws more current overall.

Voltage Drop

The simplest form of circuit uses a Diode (two Back to Back Diodes for DCC) in the power feed to the block, and measures the Voltage Drop (Vdrop) across the diode to detect current flowing across the tracks, and thus occupancy. It would be similar to the diode arrangements used for Asymmetrical DCC.
Advantages:
  • Simple circuit to design and low cost
Disadvantages
  • Diode causes a voltage drop to the track.
  • Diode must be able to accommodate short circuit currents !!
  • Circuit design is complicated for DCC and ideally track power and detection feedback should be electrically isolated

If one diode fails, it could break the circuit with the track, rendering that section dead. Only half the DCC signal would be present. This could also trigger the decoder to switch to analog mode and cause the locomotive to accelerate out of control.

Some circuits require the use of resistor wheel sets. A resistor is affixed to the axle, and connected to each wheel. The current flowing though the resistor triggers the detector.

Resistor wheel sets can be made yourself, or purchased from your hobby shop. They add cost to the system, as it may be necessary to add a pair to the car for reliable operation. A typical application would be the caboose/van.

Current Transformer

Design uses the conductor that feeds the power to the track, passing through a Current Transformer (CT) and a detection circuit to measure the current generated in the CT. Design needs to cater for the DCC signal noise but works for both DC and DCC.
Advantages:
  • Does not cause any voltage drop to the track.
  • Is isolated from the track voltage and current.
  • Is more immune to noise than Voltage Drop circuit.
Disadvantages
  • Circuit is more expensive than Voltage Drop circuit
  • Must be rated for short circuit current but is more tolerant.

Hall Effect Current Sensor

Design uses the conductor that feeds the power to the track, passing over/through a Hall Effect sensor (HE) and a detection circuit to measure the sensor response. Design needs to cater for the DCC signal noise, but works for both DC and DCC.
Advantages:
  • Does not cause any voltage drop to the track.
  • Is isolated from the track voltage and current.
  • Is more sensitive to current passing through the tracks.
Disadvantages
  • Circuit is more expensive that Voltage Drop circuit
  • Must be rated for short circuit current but is more tolerant.
Can also be used in some cases to detect the Magnetic Field generated by the Motor in the Locomotive as it passes over the sensor, embedded between the tracks!

Proximity Detection (Metallic or Ultrasonic)

Design uses a Proximity Sensor (PS) to detect a metallic object passing within a short distance of the sensor. The sensor can be embedded between the tracks and detect the Locomotive or Rolling stock passing over it.
Advantages:
  • Is isolated from the track power.
  • Detects a larger area with less errors.
Disadvantages
  • Circuit is much more expensive than any of the others.
  • Metallic Proximity Sensor will only detect the Locomotive, and not plastic rolling stock.
  • Ultrasonic sensors are prone to noise from other occupied tracks. ie Not good in a yard.

Classifying Methods

These methods can distinguish between different types of rolling stock.

Conductive Detection

As described above, conductive detection can be made to detect specific items of rolling stock if they are fitted with resistive axles. Items with normal axles will be "invisible" to the detector.

Reed Sensors

This is Roco's preferred method of train detection, and they manufacture all the necessary components. Design uses reed switches placed inside or between track sleepers and are triggered by magnets on the train's undercarriage. Same idea used in burglar alarms to detect windows or doors opening.
"Advantages:"
  • Not affected by light
  • Cheap and simple to install
  • Reed switches are available at electronics retailers
  • A special train can be exempted from triggering things by not adding a magnet
"Disadvantages:"
  • Requires small magnets to be attached to underside of locomotives (available from Roco)
  • Reed switches will melt if large currents are passed through them; requiring a special module or a relay

Identifying Methods

Lastly, we'll briefly touch on methods that can identify the exact locomotive or item of rolling stock.

Bidirectional Communication

This is a DCC-specific method of block detection where mobile decoders transmit their indentity using Transponding or RailCom. If the track is divided into blocks, a locomotive can be detected and identified by the receiver connected to that section of track.

In this example a block could be a power district or a power district divided into smaller units.

Radio Frequency IDentification

231px-EPC-RFID-TAG.svg.png

With lower cost RFID (Radio Frequency Identification) components and tags becoming available, this technology could have implications in the future. Tags which can be mounted on a truck frame are available for less than US $1.50.

RFID tag with a grain of rice

Using a small RFID tag installed in rolling stock or motive power, it is possible to not only to detect the presence of a train, but the motive power and the manifest. Mounting a small grain of rice RFID tag on the underside of a truck frame has been found to be effective.

As the train passes an RFID reader hidden beneath the track or in the scenery (which includes buildings), every tag is read and transmitted to a connected computer. The software can then determine which cars have passed the detector. The computer then can track where that car is. This is possible as every tag has a unique number.

A DCC application would be able to link the locomotive's RFID to a database containing all the details of it, included installed decoder, etc. It could even be used to link it to a specific set of CVs. All the user would need to do is wave the detector near the locomotive and the RFID tags and the computer do the rest.

If all the rolling stock is tagged it would be possible to know, for example, when a car leaves or enters a yard or passes a station. If operations software allows it, it would know if the car is in the yard or not, and be able to verify the consist as it passes a reader.

It could also be used to maintain a club database with information on the model's ownership.

There is a Yahoo Group dedicated to the application of RFID in model railroading.

Parallax is a supplier of RFID components.

Grand idea Studio designer of the reader sold by Parallax.

CTI Electronics offers an RFID system for their software

Model Railroad Control Systems has a full range of RFID components and tags. They also offer a complete starter set, with a RaspberryPI based RFID server, a reader, and 10 tags to get you started.

See Also

Block detection

Circuit for a low cost occupancy detector

The Model Railway Show (podcast) has some pictures of an RFID setup on their Flickr Page. There is more discussion on Episode 46 of the podcast.

Presentation on RFID: RFID In Model Railroading

RFID

Model Railroader published an article on RFID:

RFID for Model Railroad Operations
Authors: Chris Drome, Seth Neumann Model Railroader December 2014