February 1, 2014

# RUBIK’S CUBE SOLVING ROBOT

This is a Rubik’s cube solving robot which uses MATLAB, real time image processing and thieslethwaite algorithm along with six servo motors and a webcam to solve the cube automatically.

Working :

The scrambled cube is placed at the center of the three grippers, held properly and is then scanned one face at a time by taking image of the corresponding face using a webcam mounted at the top. Then, the cube is turned and similarly, other sides are scanned sequentially. Each image obtained is then processed using image processing through MATLAB. First, the edges of the cube in the image are identified and the rest of the back ground is cut and then cube is centered to the image. This is divided into 9 cells and the color of each cell is identified whereby the face is represented in a matrix form. This is repeated for all the other sides .Thus the current state of the whole scrambled cube is finally represented in a Matrix. This is then fed to the algorithm (written in MATLAB) which will process it and finally gives the solution steps required to solve the cube. This output given by the algorithm is again processed and corresponding motion of the arms and grippers are carried out at each step to solve the cube.

To control the hardware using MATLAB, an Arduino Uno was used. Arduino was connected to the servo motors and linked to MATLAB using the serial communication. MATLAB sends command to Arduino to rotate the servo using serial communication during each step.

There are 3 arms with a symmetrical gripper in each arm. This gripper is controlled by a servo motor and 2 spur gears. The spur gear at 1:1 gear ratio ensures the symmetrical opening and closing of the 2 grips which is necessary to hold the cube properly at the Centre after during step. In total, it uses six standard 1800 servo motors, two on each arm.

MatLab gui is used to give an interface during scanning of the cube. The output of the solution can also be viewed through MatLab.

Problems Faced :

Each Gripper is made out of single piece wood by hand. So the quality of fabrication is not up to the mark and hence slight alignment problems are still creating troubles in between. This can be eliminated by manufacturing it accurately through CNC.

The Robot is able to solve the cube in an average of around 6 mins. It is capable of solving the cube faster. But there are certain constrains associated with 1800 servo motors. If they are replaced with better quality 3600 feedback servos or stepper motors, then the robot can be made to solve the cube at a around 2 mins or lesser. Also, the no: of rotations carried out by the motors can be reduced drastically.