CubeBot

Inspiration

Boredom

What it does

Solves cubes autonomously.

How We built it

Hundreds of hours of Solidworks, Python, Arduino, gluing, and staring at a 3D printer extruder.

Other than the previously mentioned Pi and Arudino and glue, we also used 9 servo motors (RIP 1 servo motor due to incorrect wiring), duct tape, tears, and PLA. Other tools used but not included were scissors and a file. The file proved to be very useful due to our subpar 3D printer.

The programming was done in C, Python, and the Arduino IDE. Basically what happens is Python is used to determine the colors of the cube using OpenCV, a C program solves the cube using Kociemba's Algorithm, and a Python program converts the output of the C program to an optimized move order specific to our hardware. The move sequence is then passed to the Arduino, which assigns servo rotation sequences to each move, does a bit of turning, and solves the cube.

The C implementation of the Kociemba Algorithm was primarily acquired from online sources however a few modifications were added to fit our design.

Challenges We ran into

In order to minimize volume, we made all the hardware as compact as possible. This required extensive thought when designing 3D printed components in Solidworks, and it became especially difficult when optimizing camera position. In order to have the device wireless and completely self contained, we utilized a Raspberry Pi camera, which unfortunately has a field of view of less than 50 degrees. In order to scan an entire side of the cube, the camera had to be mounted in a hole drilled beneath the cube with special lighting surrounding it. Additionally, software modification was necessary to slightly shift the cube in order to accurately view all nine cubelets.

Also, our 3D printer was, you could say, not good. Printing parts took many many attempts and many, many hours. In the end, however, it seems like it works. Thank you super glue.

What we are proud of

We are very proud of CubeBot's small figure, minimal cost, and ability to solve a cube quickly. The entire project cost around $150, while starter Lego Mindstorm kits start at $400. And our best analysis and solve time is 35s.

What We learned

Prototyping hardware projects requires a lot of time, especially when 3D printed components are utilized. The 3D printed components were critical for this project, however, in order to make custom fitting components. Also, before this, we did not have much experience with OpenCV, so that was fun.

What's next for CubeBot

CubeBot now lives on a shelf and has a dim future. He hopes to run for president one day.