An infrared proximity sensor is a sensor that detects any object when it close to the sensor. The circuit is an important part of an automatic faucet, robot, and touchless switch.
Electronic components list
Proximity sensor circuit diagram
Note: another leg of R2 connect to Vcc, Replace it with 50 K variable resistor if you want to adjust the sensor range.