Compact and reliable photoelectric sensor with background suppression and a sensing range of 25 mm to 300 mm.