This circuit can be used as an Infrared beam barrier as well as a proximity detector.
The circuit uses the very popular Sharp IR module (Vishay module can also be used). The pin nos. shown in the circuit are for the Sharp & VIshay modules. For other modules please refer to their respective datasheets.
The receiver consists of a 555 timer IC working as an oscillator at about 38Khz (also works from 36kHz to 40kHz) which has to be adjusted using the 10K preset. The duty cycle of the IR beam is about 10%. This allows us to pass more current through the LEDS thus achieving a longer range.
The receiver uses a sharp IR module. When the IR beam from the transmitter falls on the IR module, the output is activated which activates the relay and de-activated when the beam is obstructed. The relay contacts can be used to turn ON/OFF alarms, lights etc. The 10K preset should be adjusted until the receiver detects the IR beam.
When there is nothing in front of them, the IR beam is not reflected onto the module and hence the circuit is not activated. When an object comes near the device, the IR light from the LEDs is reflected by the object onto the module and hence the circuit gets activated.
If there still a lot of mis-triggering, use a 1uF or higher capacitor instead of the 0.47uF.