In this study, with the help of sensors and encoders, the modification of an existing vacuum cleaner into an autonomous robot is explained. The autonomous motion method proposed in this study is tested with a simulation program in MATLAB as well as on an existing vacuum cleaner. In an environment with unknown obstacle numbers, size, position and orientation, the distance to the robot is measured with the sensors and motion direction and the distance traveled is measured with the encoders. Inside the wire dispensing mechanism, another encoder is used to measure the maximum allowed distance to travel. The robot keeps the motion information on a digital map and completes the cleaning job autonomously.