Documentation > nControl > Getting Started
This article explains how the train detection sensor works and how to chose correct values for the configuration parameters.
How does the sensor detect trains?
Fig 1. presents the basic layout of the train detection sensor. The sensor has an infra-red (IR) light emitting diode (LED) that beams out IR light and an IR receiving diode that detects the amount of infra-red light coming towards the sensor.
Making sure the sensor works
Start by making sure the sensor is connected and working well. The green intensity bar at the bottom of the tile indicates the amount of IR light detected by the sensor. When there is nothing in front of the sensor you should have a small green bar, like shown on Fig 3a. When you put something in front of the sensor the green bar should increase and move to the right. It should look like Fig 3b. If the green bar doesn't change when putting something in front of the sensor, the sensor is not working. Check the cables and connectors; verify the channel and controller settings and try again.
Setting the threshold value
The amount of detected IR light indicates whether there is an train in front of the sensor or not: a small amount of detected IR indicated there is nothing and a high amount of detected IR light indicates there is a train. A threshold value is used to separate these two domains. So if the amount of detected IR light is higher than the threshold value nControl considers it has detected a train. The threshold level is indicated on the sensor tile by the vertical gray line on the intensity bar, see Fig 4.
The amount of reflected IR light by the train depends on the surface that is reflecting it. Dark and irregular surfaces reflect less IR than light colored and smooth surfaces. So if you are using dark trains you might have to lower the threshold value to make the intensity bar crosses the threshold value when the train passes in front of the sensor, otherwise you won't detect the train. The threshold value is a compromise between keeping it high enough to make sure you don't have any false detections; and low enough to make sure you're not missing any passing trains. Setting the idle time
When the amount of detected IR light crosses the threshold level, nControl considers it detected a train and executes the trigger event script. However, the amount of reflected light will not be the same for every part of the train. For example, the space in between two cars will reflect much less light than the sides of the cars. As such the level of detected IR light might drop below the threshold level and each car might trigger the event script.
|