Obstacle avoidance: cliff detection: stuck prevention and wall follow are all necessary features for robotic systems. This reference design uses optical time-of-flight (ToF) techniques to build small and cost-effective proximity sensor systems to achieve these features and solve the problem of universal IR solution which is quite sensitive to ambient and object color by a single proximity and distance sensor analog front end (AFE) (OPT3101) with three external near-infrared (NIR) LEDs and one photodiode.