This paper discusses the obstacle avoidance algorithm used for a mobile robot, Since the algorithm depends heavily on the performance of the ultrasonic range finders, these and the effect of their limitation on the obstacle avoidance algorithm were discussed as well.