The following is a method to allow day and night detection using Infrared/Visible light sensitive phototransistors and a simple LM339 voltage comparator circuit.
A phototransistor is mounted between the rails so that it is covered by the train as it passes. A system widely used in model railroading.
For daytime operation the room lights would be on and when the train blocks this light the train is detected. However when the room lights are dimmed or turned off for night operation, under normal conditions the phototransistor would go dark and act as if it was covered by a train and give a false detection.
To prevent the phototransistor from going dark when the lights are dimmed, mounted above the detector at ceiling height is one or more infrared light emitting diodes.
With the room darkened the phototransistor will see the infrared light and remain in an 'ON' or conducting state. As far as the phototransistor is concerned it is always illuminated by visible or infrared light.
The detector for this circuit uses a voltage comparator the same as those on the Visible and Infrared Light Detectors page at this site.
The major change is the mounting of infrared emitters mounted at ceiling height above the detectors phototransistor.
The next diagram shows the relationship between the diameter of the infrared beam and the distance from the emitter for a beam angle of 20 degrees. The farther the detector is from the emitter the light falling on it is proportionally weaker and this is the reason for the use of multiple emitters.
Because the beam of the emitter widens as the distance increases, one emitter group could cover several tracks. For example a double track main or a yard throat would only need one set of emitters for a group of detectors that are close together.
An emitter with a 30 degree beam angle would cover a proportionally wider area but the light intensity would also be lower.
The information provided on this page is very general and if used by others some experimentation will be required to determine the number of emitters required, the best positioning of the phototransistor detectors for a given installation.
Care must be taken when mounting the emitters near a room ceiling so that no potential fire hazards are created, whether by excessive currents or faulty wiring.
For testing, four infrared LED's connected in series were used for the emitter portion of the circuit. Initial testing showed that with four LED's an emitter to detector distance of at least seven feet could be achieved. At the shorter distances that would be encountered on most layouts one to three emitters could be used.
The current through the LED's for the tests was 30 milliamps. The LED's were wired in series in order keep the total current as low as possible (The four emitters share the same 30 milliamps). This would be important in an installation with numerous emitter groups.
The emitter and detector should be a matched pair for maximum sensitivity. Emitter diodes are commonly available with 20 or 30 degree beam angles and with current ratings up to 50 milliamps. Ask your supplier for for a copy of the component specification sheets for the emitter and detector that you plan to use.
A weighted string line is the simplest method to line up the emitter and detector.
If more than one track is to be protected by phototransistor sensors only one emitter group would be required so long as the beam covers all of the tracks involved. In this case the group would be mounted over the center of the multiple tracks. In the case of a yard the emitters could be placed in a line across the tracks to maximize coverage.
Certain cars such as tank cars may give detection difficulties due to the open nature of their underframes. This will be a problem with just about any above the track visible light detection system.
If the layout room has a finished ceiling it might be difficult to mount and wire the infrared emitter diodes without disturbing the ceiling. Conversely, if the room has valanced lighting it would not be difficult to install them.
It is possible that the emitter LED's could be disguised by mounting them in a decorative trim. They are low power devices and generate very little heat, approximately 30 milliwatts each at 30 milliamps. The current limiting resistor should be mounted in an area with good air circulation.
Infrared light is not visible to the naked eye, however, a digital camera can be used to view the IR light if it does not have an IR blocking filter on the lens.
The image may not be very bright but close-up or in a darkened area the light should be visible on the camera's display screen.
For information on Voltage Comparators please see the Voltage Comparator Information page at this site.
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.
07 April, 2010