FPGA-Based Rubik’s Cube Solver

FPGA-Based Rubik's Cube Solver

 

Alex Whiteway, Sungjoon Park and Rameez Qurashi built a great FPGA-Based Rubik’s Cube Solver. The system uses 3 robotic grippers to manipulate the cube, a camera to “see” what state the cube is in at the beginning and an Altera Nios II FPGA computes how to solve the cube. There are lots of algorithms available, the team looks at many of them and decided to roll their own solution. It isn’t as optimized as some solutions but was one they could code in the time available. The solution the system takes is the 5 step process seen here. 

“The software consists of code for cube scanning and solving. The cube scanning works by reading in the raw YUV 444 data from a pixel buffer that the Altera IP video cores use to store data our camera and output it to a VGA screen. The scanning code creates 9 lowpass filter kernels at uniform locations corresponding to the expected location of cubies on each face of the cube. We use these filters on each channel of the YUV data. We chose to do this lowpass filtering to mitigate the effect of noise in individual pixels. We then created threshold values to assign a color value to each cubie based on the result of the lowpass filter of each channel. In order to reduce color misidentifications, we take 25 samples of each kernel and use the mode as the final result. For further error-checking, we compare the total amount of color values for each cubie and check it against the total number of colors of each cubie for a normal Rubik’s cube (9/color) and we rescan the cube if these numbers do not match. Because of limitations with our three arm setup only allowing us to scan 4 faces we have to use the arms to creatively rotate certain faces to present all of the cubies to the scanner, slightly scrambling the original cube orientation more in the process. This method will not allow us to present the left and right center cubies, but these are inferred in software. After the cube is finished scanning, it sends the color values of the faces to the cube solving code.”

 

 

FPGA-Based Rubik's Cube Solver_2Â