Autonomous Rubik’s Cube Solver
Project
Purpose: Learning to solve a Rubik’s cube can be a daunting task and to do it efficiently can take a long time. We wanted to build a robot that could solve a Rubik’s cube without any input from the user. The main functions of the ARCS are:
- Identify the layout of the squares on each side of the cube.
- Figure out a series of moves to solve the cube.
- Use stepper motors to manipulate the cube into a solved state.
System
Methods
- Four stepper motors with four linear actuators control the cube.
- 3D printed cube grippers and rail system attach to motors.
- Single Board Computer (SBC) is a Raspberry Pi Zero W2. (picture)
- OpenCV C++ library assists in cube tile detection.
- PiGpio C++ library allows interfacing to LED, button, and motors via General Purpose IN/Out (GPIO). (picture of CV image)
- Off-the-shelf stepper motor drivers interface SBC to stepper motors. (picture)
- Relay board allows simple control of linear actuators. (picture)
Conclusion
The ARCS system is able to:
- Detect the state of the cube.
- Find a solution to solve the cube.
- Manipulate the cube into a solved state using motors.
Potential improvements:
- Use Pi’s Wi-Fi capability to make a guide on how to solve the Rubik’s cube.
- Optimize the algorithm to solve the cube.
- Improve the motor speed.
Lessons learned:
- Simple is often better for computer vision methods.
- Have details of design figured out before ordering parts.
- Plan adequate time for debugging and troubleshooting.