8-Channel Train Detector DET8

BLOCKsignalling DET8

Detects the Presence of Trains in up to 8 Locations

The BLOCKsignalling 8-channel train detector is a cost-effective way to monitor the presence of trains on sections of track anywhere on your layout.  Using the included photoelectric detectors, the module drives leds to indicate when trains are present.

The various settings on the module can easily be adjusted to tailor the operation to your own requirements.  For instance, the leds can set to operate only when the train is immediately above the detector, useful for coupling and uncoupling operations or anywhere where a train needs to be positioned precisely. 

Alternatively, the inputs can be used in pairs, with one channel triggering an led and the other channel resetting that led.  For instance, this could be used on sections of track to detect a train entering and leaving.

Designed to be very simple to connect up without any soldering necessary.

Supplied complete with 9 photoelectric sensors.

 

Connecting Up

Each of the photoelectric sensors are located in the track bed below the trains, so that a train passing overhead obstructs the light and can be detected by the DET8 module.

The sensor connected to channel 9 is used as a reference, providing greater detection reliability for the track sensors by sensing the normal background lighting levels and automatically adjusting the detection threshold of each channel to suit.

Unused inputs are ideally connected ground.  This is essential for Program 10 (see later).

train detector schematic wiring diagram

 

Power Supply

The controller is designed for use with a DC power supply of between 10V and 25V, or an AC power supply of between 10V and 16V.

Where there is a choice, the recommended power supply is 12V DC.

 

Led Connection

When using leds it is important to connect them the right way around.

The negative lead (cathode) is identified by a flat on the side of the led body, and by having a shorter lead.

Incorrect connection can damage the module.

You can use resistors with pre-wired leds, designed for use on 5V or 12V without problems.

red led wiring

 

 

Wiring Diagrams

Here is a closer view of the complete wiring if all channels are used.

The reference sensor must be connected.

train detector reference sensor

train detector reference sensor

 

Here, we have chosen all the green leds to be connected to the C2- output, so that when this switches they are illuminated.  The red leds are connected to the C1- output.  You can swap this around if it suits your requirements better.

 

Programming Introduction

As supplied, each of the 8 channels will operate Program 3 with the module set to trigger instantaneously on each channel. 

This means that for each channel with two leds connected, one will be on and the other will be off (the one connected to C2- will be on and the one connected to C1- will be off).

If the sensor is then covered, the leds will switch over (ie the one connected to C2- will switch off and the one connected to C1- will switch on).

For the following sections, we have chosen the convention that a green led is connected to C2- and a red led is connected to C1-, so normally only the green led will be on and when the sensor is covered only the red led will be on.

If you cover and uncover the leds (say with your hand) you will see the leds instantly switch between red and green.  This is an easy way to check wiring and gain familiarity with the operation.

If required, channels can be programmed to use different modes, the first four modes alter the time before the leds change back after a channel is uncovered (instantaneously, after 5 seconds, after a variable time which applies to several channels, or after a individual time set for only that channel). 

The next three modes "lock" a channel after its sensor is covered, only unlocking it after another channel's sensor is covered (the next channel up, channel 8, or any other channels not using the same program).  Further details of these modes are given below.

The operation is very flexible, where different channels can use different modes at the same time, with different reset times, so it is recommended that notes are taken if a particularly complex arrangement is chosen.

For most purposes, the programming will be quick and easy, but the possibilities exist if a complex requirement needs to be met.

Programming instructions are given next to the programming diagram towards the end of this text.

 

 

Program 3 (Instantaneous Mode)

This is the default mode when the module is supplied.

If a sensor is uncovered, then its associated led connected to C2- (green) is lit and the one connected to C1- (red) is extinguished.

If the sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

If the sensor is then uncovered again, then the led connected to C2- (green) is lit and the one connected to C1- (red) is extinguished.

train detector schematic wiring diagram

 

Program 4 (4 Second Timeout Mode)

If a sensor is uncovered, then its associated led connected to C2- (green) is lit and the one connected to C1- (red) is extinguished.

If the sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

If the sensor is then uncovered again, then after 4 seconds the led connected to C2- (green) is lit and the one connected to C1- (red) is extinguished.

This mode can be used to detect trains, but ignore the gaps between carriages.

train detector schematic wiring diagram

 

Program 5 (Variable Timeout Mode)

This program uses timeout value which can be chosen by the user.  So, for instance, if a 20 second timeout is required on channels 1,3 and 4, then the variable timeout value can be set to 20 seconds and channels 1,3 and 4 allocated to use it.

The variable time set applies to all channels using this mode.

Set the duration of the variable timeout in memory 18.  The default value is 2 seconds and a maximum of 240 seconds can be set.

The operation is otherwise similar to program 4.

 

Program 6 (Individual Timeout Mode)

This program uses timeout value which can be chosen by the user for each individual channel.  So, for instance, if a 12 second timeout is required on channel 1 and a 3 second delay is required on channel 7, this is possible. 

The timeout values are stored in locations 21-28 for channels 1 to 8 respectively.  The default value is 10 seconds and a maximum of 240 seconds can be set.

The operation is otherwise similar to program 4.

 

Program 7 (Flip-Flop Mode)

This mode pairs two channels together, so that one channel resets the other.

Channels 1,3,5 and 7 can be used in this mode, and they will be reset by channels 2,4,6, and 8 respectively.

For example if the channel 1 sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.  At the same time, on channel 2, the led connected to C1- (red) instantly extinguishes and the one connected to C2- (green) is lit.

If the channel 2 sensor is then covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.  At the same time, on channel 1, the led connected to C1- (red) instantly extinguishes and the one connected to C2- (green) is lit.

The last change is remembered, even if the power is removed.

If both sensors are covered, the leds will flicker, until one is uncovered, and this last state will be shown (they will be constantly setting and resetting).

When selected to this mode, the previously selected mode for the next channel up will be overridden.

An example use of this program would be to indicate track occupancy over two sections.

train detector schematic wiring diagram

 

Program 8 (Reset by Channel 8 Mode)

If a channel is chosen to use this mode, when its sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

It will stay this way, until the channel 8 sensor is covered, then the led connected to C1- (red) instantly extinguishes and the one connected to C2- (green) is lit.

When the channel 8 led is uncovered, then its associated led connected to C2- (green) is lit and the one connected to C1- (red) is extinguished, and if it is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

The last change is remembered, even if the power is removed.

If both sensors are covered (the channel using this mode and channel 8), the leds will flicker until one is left uncovered (they will be constantly setting and resetting).

If several channels are using this mode, they can be triggered individually (locked) until channel 8 is covered (when they are all released).

When selected to this mode, the previously selected mode for the channel 8 will be overridden.

 

Program 9 (Reset by any Channel in Group Mode)

If a channel is chosen to use this mode, when its sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

It will stay this way, until another channel using this mode is covered, then the led connected to C1- (red) instantly extinguishes and the one connected to C2- (green) is lit.

The last change is remembered, even if the power is removed.

If only one channel is selected to this mode, then it will not be possible to reset it, at least two channels need to use this mode.

In the following diagram, channels 1,2 and 3 have been selected to program 9.

train detector schematic wiring diagram

 

Program 10 (Reset by any Channel NOT in Group Mode)

If a channel is chosen to use this mode, when its sensor is covered, the led connected to C2- (green) instantly extinguishes and the one connected to C1- (red) is lit.

It will stay this way, until another channel NOT using this mode is covered, then the led connected to C1- (red) instantly extinguishes and the one connected to C2- (green) is lit.

The last change is remembered, even if the power is removed.

If sensors using this mode and sensors NOT using this mode are covered, then the leds will flicker unitl one is left uncovered (they will be constantly setting and resetting).  To prevent this, locate the sensors at least a train length apart.

Note: Unused channels must be connected to ground, otherwise as soon as an input is triggered, it will be instantly reset.

 

Setting the Detection Threshold

There are three methods of setting the detection threshold.

The recommended one is to use a separate sensor connected to Channel 9 (the Reference Sensor), to measure the general background light levels.  This will track changes in light levels and automatically adjust the trigger levels for each channel to compensate.

There is a simple screwdriver adjustment on the pcb which allows you to vary the sensitivity of the circuit if required.  The need for this is dependent on how well the sensor is obscured by the train passing overhead, and is dependent somewhat on the model rail scale in use.

model train detector set sensitivity

 

Programming Flow Diagram

The diagram below shows the programming options available. Each input consists of two values, for example to set channel 1 to use program 3, you will need to enter the code 3-1 (the 3 selects Instantaneous mode (program 3), and the 1 selects channel 1 to use this mode).

Programming is performed switching off the power, holding down the Push Button, and then switching on the power.

The red led on the PCB flashes at 1 second intervals.  When the required number of flashes is seen (see the diagram for the list of possible choices) the button is released to store the first value. At this point the led comes on for five seconds to confirm the value is stored.

The led then starts flashing again, and this time the button needs to be pressed to store the second value. Wait until you have seen the required number of flashes, the press the button firmly for a second.

Once the two values to be stored are entered, the led flashes 10 times rapidly, and the module starts operating using the new setting.

Most values entered can range between 1 and 255 (see below for limits).  If more are seen, or the programming is aborted by switching off, then the programming must be repeated.

Following the diagram is a detailed explanation of all the settings.

CDS cell model train detector

 

 

 

Troubleshooting

If you have problems with the module, the following tests should allow you to confirm if the module is operating correctly.

 

Test 1

This test confirms the power supply is of the correct polarity, and that the microprocessor and associated components on the PCB are functioning.

Connect only the power supply and turn on the power.

The red led on the PCB should light steadily for 1 second and then either extinguish or flicker (depending on the software version).

If the led does not light for 1 second, check the supply polarity, and that the supply voltage is over 7V.


Test 2

This test confirms the control panel leds are wired correctly.

Connect up the leds as shown below, recheck the wiring, then apply power.

The green led only should light.

If both leds light, then most likely they are wired with the reverse polarity. This can damage the module and the leds.

It does not matter if your leds have resistors in their leads, these can remain and will not affect the operation.

 

Test 3

This test confirms the reference sensor has been wired correctly.

Connect the photocell sensors as shown below.

The photocells should point in roughly the same direction and have the about same level of light on them.

The adjuster on the PCB alters how the measured level of light on Sensor 1 is compared to the level on the Reference sensor.

Turn the adjuster fully anti-clockwise. In this position the level on Sensor 1 can be below that on the reference sensor, and still trigger the DET8.

The red led should be extinguished and the green led should be lit.

Turn the adjuster fully clockwise. In this position the level on Sensor 1 can be above that on the reference sensor, and still trigger the DET8.

The green led should be extinguished and the red led should be lit.

 

Test 4

This test confirms Sensor 1 is functioning.

Turn the adjuster so that the red led is just lit (somewhere slightly clockwise of the central position).

Now cover Sensor 1.

The red led should extinguish and the green led should light.

 

Test 5

This test confirms the Reference sensor is functioning.

Turn the adjuster so that the red led is just lit (somewhere near the central position as in test 4).

Partially cover Sensor 1 so that the red led is extinguished and the green led is lit.

Now cover the Reference led to exclude the light.

The green led should be extinguished and the red led should be lit.