Reliable miniature optical sensor with fast and secure alignment, suitable for industrial applications.