Callum Moseley

Rubik's Cube Solver

Rubik's Cube Solving Robot

Introduction

For our introduction to Software Engineering class at UW, we had a project to essentially build anything using an Arduino or similar microcontroller, to learn about concepts like project management. My two teammates and I decided to build a Rubik's Cube solving robot, something that I had seen online before and wanted to try building my own. The robot was designed from scratch by me in Solidworks, then 3D printed on my printer. We also developed all of the code to control it, except for the actual solving logic which was done using a library from Cube Explorer.

Functionality and Design

The main design is based on two motion axes: each able to move two rotating grippers in and out. When the axes are moved in, the grippers engage with the cube, and are able to rotate the faces. When one axis is moved out, then the other is able to rotate the cube to access the top and bottom faces, allowing all faces of the cube to be turned.

I used a lot of ideas and parts that I learned about through building 3D printers when designing the cube solver. For example, the motion axes are implemented using 3D-printed linear bearings on 8mm polished rods, and the motion is done by a drive belt connected to a pulley on a stepper motor on one side, and a bearing on the other.

Electronics and Code

The robot is run with a BeagleBone Black running Debian Linux. The board is connected using GPIOs to each stepper driver, and as well to a basic USB webcam. When run, the program grips the cube and takes an image of all 6 sides. The colour values are then converted to HSV, compared against each other, and a cube state with 6 colours is created. It passes the data to the solving algorithm which produces a series of moves. The algorithm is optimized to reduce redundant moves, and finally executed by the robot.

See it in action here.