CS 107E • Computer Systems from the Ground Up • Winter 2023
CuBot: Rubik’s Cube Solver
A robot that can scramble and solve Rubik’s cubes, all built and run from a bare metal Raspberry Pi
In collaboration with Pierre Labroche
Demo
The solve command (and all other commands) is activated via keyboard connected to the Raspberry Pi. The Pi then calculates a solution, displays the moves on the screen, and moves the motors/updates the graphics in real time to solve the cube.
The Robot
CuBot is comprised of 6 stepper motors wired to drivers and a power supply that connects to any standard outlet. It is encased in a clear acrylic enclosure that is fully serviceable. 3D printed parts connect the motors to the cube itself.
CuBot was first modeled in Fusion 360 CAD software. Parts were then laser cut and 3D printed as necessary.
CuBot is designed so that the cube can be removed by the user and manually scrambled. The user can then manually input the state of the cube using the attached keyboard and graphics.
The Code
CuBot runs off a bare metal Raspberry Pi. Unlike a hosted system (such as your computer), the Pi is just a piece of metal and all coding functionalities had to be written from scratch.
CuBot comes with scrambling, debugging, and solving capabilities, all of which can be activated with the attached keyboard. Upon solving, the monitor will display the solve move sequence, the current graphical state of the cube, and the solve time.
Due to the bare metal restriction, CuBot uses a unique implementation of Kociemba’s algorithm, currently the most efficient algorithm for solving Rubik’s cubes known to man. This means that even when the robot is run slowly (as shown in the demo video), the solve is still extremely fast due to the low number of moves.
Photo Gallery