Photoelectric miniature sensor with maximum precision