Day and Night Infrared Detection

  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.

Day and Night Detector Circuit

  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.

Day and Night Detector Schematic

  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.

Infrared Light Emitter Beam Diagram

  An emitter with a 30 degree beam angle would cover a proportionally wider area but the light intensity would also be lower.

Day and Night Phototransistor Detection Notes

Is The IR LED Working?

  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.

LM339 Data sheet - National Semiconductor (.pdf)

LM393 Data sheet - National Semiconductor (.pdf)

Pinout Diagram For Various Devices.

Return to the Main Page

Please Read Before Using These Circuit Ideas

  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.

Return to the Main Page

07 April, 2010