The paper discusses a study on a real-time collision avoidance algorithm for collaborative robotics applications. Within the work it is considered that a vision system detects the position of an obstacle and defines an ellipsoid which completely includes it. A similar virtual ellipsoid is considered to include the end effector, and its pose is computed based on the robot configuration. The distance between ellipsoids is input into the collision avoidance algorithm based on the method of artificial potentials. The tuning of the algorithm is described herein, along with an analysis of its performance under different operating conditions. The results of two collision avoidance tests are also presented. For the first test, the end-effector must avoid a fixed obstacle placed along a planned path. For the second test, the obstacle is moving, following a trajectory that intersects that of the end-effector. Finally, the behavior of the algorithm with increasing velocities of the end-effector and obstacle is analyzed.