Day and Night Infrared Detection

11,023

Circuit Image

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.

The proposed circuit utilizes a phototransistor that is sensitive to both infrared and visible light, allowing it to effectively detect the presence of a train by monitoring light levels in its vicinity. The phototransistor is strategically positioned between the rails of the model train track, ensuring that it is shielded from ambient light when a train passes over it. This configuration is particularly advantageous in model railroading applications where accurate detection of train presence is crucial for signaling and control systems.

The LM339 voltage comparator serves as the core component for processing the output from the phototransistor. The comparator is designed to compare the voltage signal generated by the phototransistor with a predefined reference voltage. During daytime operation, when the room lights are on, the phototransistor receives ample light, resulting in a higher output voltage. When a train passes and blocks the light, the output voltage from the phototransistor drops significantly, triggering the LM339 to change its output state and indicating the presence of a train.

For night operation, the challenge arises from the fact that when the room lights are dimmed or turned off, the phototransistor may not receive sufficient light, leading to a condition where it appears to be blocked by a train even in the absence of one. To mitigate this issue, the circuit can incorporate an additional light source or a secondary detection mechanism that maintains a baseline light level, ensuring that the phototransistor does not falsely indicate a train's presence.

In summary, this circuit design effectively integrates a light-sensitive phototransistor with an LM339 voltage comparator to create a robust train detection system that operates reliably under varying lighting conditions, making it an ideal solution for model railroading enthusiasts. Proper calibration of the reference voltage and consideration of ambient light conditions are essential for optimal performance.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. 🔗 External reference