Miniature photoelectric sensor with a sensing range of 4 to 100 mm, suitable for proximity detection.