Compact, high-performance photoelectric sensor with background suppression and adjustable switching thresholds.