Using this circuit diagram can be built optocoupler electronic circuit resistant at incident light. This optocoupler resistant at incident light is simple to make and is built using a 555 timer and some passive electronic components.
Timer 555 provides the optocoupler LED pulses at a frequency of 10 kHz. If at the receiver output will only be amplified signal having this frequency, no natural light or artificial light of day and will not disrupt the functioning of intense light barrier.
At a frequency of 10 kHz pulse, distance between pulses is 100us. At this frequency, the LED current can go quite high: about 45 mA.
In stand by mode current through circuit is around 30 mA, and in normal operating mode by current is 80 mA (not considered current in the relay).