Tag Archives: Rubik’s cube solver


Rubik’s cube solver

Alex Whiteway, Sungjoon Park, and Rameez Qurashi (students at Cornell) designed FPGA-driven mechanical arms to solve Rubik’s cube. They used three mechanical arms to hold and rotate the cube. Each arm consists of two servo motors: one for rotating the arm and another for controlling the grip of a mechanical claw attached to the arm. With the help of the arms, a camera scans all six faces of the cube. The faces information is passed into Rubik’s cube solving algorithm, which then determines the moves needed to solve the cube. The move instructions are fed to the FPGA, which then generates PWM signals for the servos to rotate the cube accordingly, until the cube is solved. The robot was their final project design for Prof. Bruce Land’s ECE 5760 course on Advanced Microcontroller Design and system-on-chip.

Rubik's cube solver

Rubik’s cube solver

They write,

The results did not quite meet our expectations (100% solve rate, 100% scanning accuracy, a solve time of under 3 minutes not including scanning time). We met the solve rate criteria and were close with scanning accuracy, but our design is much slower than our original goal solve time. Given more time, we would like to implement more efficient algorithms in order to reduce solve time even further. The most efficient algorithms solve a cube in 20 moves or less, however these are difficult to implement in such a short amount of time. We also would like to increase our scanning accuracy to 100%. With our current setup, the whole cube has to be rescanned if the scanned cube is incorrect. We will change this to only rescan those faces which contain a color that is detected more than expected, or to infer aberrant cubies based on the color of its neighbors. We also would have liked to add a fourth arm since it will reduce the amount of actions needed by the claws to perform a move which would decrease total solving time, and reduce the scanning time since we could scan the whole cube with only 6 rotations. Though the solver did not meet all expectations, it performs reasonably well.

FPGA-controlled robot solves Rubik’s cube

Alex Whiteway, Sungjoon Park, and Rameez Qurashi‘s final project for their ECE 5760 course at Cornell was FPGA-controlled mechanical arms to solve Rubik’s cube. While the arms rotate the cube, each cube face is scanned by a camera and the scanned data are passed into a Rubik’s cube solving algorithm, which then computes what the next moves would be towards solving the cube. The move instructions are sent to the FPGA, which in turn sends PWM signals to the servos to rotate the cube accordingly.

FPGA-controlled Rubik's solver

FPGA-controlled Rubik’s solver

They write,

A variety of Rubik’s cube solvers (including a few FPGA implementations) have been created as hobby projects, but there are as of now no FPGA implementations that physically solve a cube. The other FPGA implementations merely give the user instructions on how to solve a specific cube. The most efficient Rubik’s cube solvers used more complex and efficient algorithms than we did, but because of time constraints we used a less efficient, but still effective algorithm detailed below. We sped up certain stages of this algorithm by creating lookup tables to look up the most effective combination of moves instead of computing a possibly suboptimal solution. We could have used a fourth arm to improve our solving time by decreasing the number of moves necessary to solve the cube, but we chose not to purchase a fourth arm due to budget constraints. Since the servos take up to a few seconds per move, the Nios has usually completed the solving algorithm before the arms are able to complete the first move.

Here’s the Youtube video of their cube solver in action: