I am currently designing a circuit, where output is switched on and off as obstacle passes IR (Infrared) beam, produced by IR LED and received by IR sensor (IR photo-transistor). The problem is that IR sensor is greatly affected by light from surrounding sources, like celling lamp. IR sensor's output is compared with comparator and if IR sensor is greatly illuminated by white light, comparator switches on the output as if IR LED would illuminate on sensor's surface.
simulate this circuit – Schematic created using CircuitLab
Is it normal for IR sensor to react to visible light the same way it reacts to IR radiation?
This is kind of a problem since sensor of this circuit is constantly exposed to visible light and sometimes as an obstacle passes the IR beam, comparator just won't switch off the output because there is too much radiation from visible light.
Is there any other way to detect obstacle as it passes and breaks the IR beam of radiation without receiving part (sensor at input of comparator) being influenced by surroundings light sources, which produce visible light?
Both IR LED as sensor and IR sensor (photo-transistor) react the same way as they are being illuminated by visible light. I still don't get it why IR sensor detects visible light as it should only detect IR radiation, I think.
Would replacing IR LED and IR sensor with UV LED and UV sensor solve my issue?