|Robots can solve a lot of puzzles including Rubik's cube / Photo by shutterstock|
A robot built by MIT graduate students Ben Katz and Jared Di Carlo was able to solve the Rubik’s Cube in 0.38 second, which is 40 percent faster than the previous record of 0.637 second, according to Timothy B. Lee, reporting for Ars Technica.
The 0.38 second is the time spent in acquiring the image from the webcam, detecting the colors, generating a solution and the actual rotation of the faces of the cube.,
Kollmorgen ServoDisc Motors to the Rescue
Di Carlo said the faster time was realized when they used a custom-built motor controller instead of the stepper motors that were used in other robotic Rubik’s Cube solvers. By using a customized nonlinear minimum-time sliding mode controller featuring six Kollmorgen ServoDisc motors, the robot was able to make the Rubik’s Cube turn in 15 milliseconds.
The Kollmorgen motors have high torque-to-inertia ratio, allowing for greater angular accelerations while using less power. There were also no heavy still laminations on the motors and no steel to saturate, thus allowing the motors to rotate very rapidly. For instance, they were spinning over 1000 revolutions per minute while making a 10-millisecond quarter-turn move with the cube.
Each motor came with a US Digital 2000 line optical encoder attached to the back. The encoders had one-fourth-inch bores through the optical disks but none of the motors had one-fourth-inch shafts. To make the motors match the encoders, one-fourth-inch holes were reamed in the back of the motors using a lathe machine. To mount the encoders, one-fourth-inch dowel pins were pressed into the holes.
The custom motor controllers were made from gate drives, a 12-volt external power supply, and bootstrapped gate drive optoisolators. An STM32F303K8 Nucleo board was used in running the motor controllers. Commands are sent to each controller over a differential serial interface and there are two extra general-purpose input-output pins to synchronize the six motors. The controller is composed of 100V field-effect transistors, one of which blew twice when the cube locked up.
An AND BOARD was used in synchronizing and preventing the six faces from colliding when the cube was being turned. Each motor controller sends a digital output to the AND BOARD and receives a digital input driven by the output of the AND gate. When a motor starts to move, it turns off the output of the AND BOARD and turns it back once it stops moving.
Room for Improvement
Katz claimed the robot can still be improved but the tuning process is so time-consuming since the debugging needs to be done with the high-speed camera, and mistakes either destroy the cube or the FETs. He added that they have lost interest in tuning the robot further but that it is still possible to pare down the time by another 100 milliseconds.
What they discovered in their quest to solve the Rubik’s Cube was that it needed to be very tight if a robot was going to handle it, Katz noted. This is so unlike humans who prefer to have the cube very loose when trying to complete it. If the cube is loose, the outer faces push outwards when the center faces are being turned very rapidly. It needed to be tightened very well to prevent the cube from disintegrating during rapid turning.
The speed cubes used had pop-off caps at the center of each face and underneath each cap is a screw that can be used in adjusting the amount of slop in the cube. Square drives were machined and inserted into the recess below the cap, thus eliminating the need to modify cubes.
To monitor the status of the cube during turning, a PlayStation 3 Eye webcam was placed at opposite corners of the cube, enabling three sides of the cube to be observed by either webcam. Since the webcams could not properly distinguish the red faces from the orange faces, they decided to make orange faces black for better contrast. The webcams were capable of capturing 187 frames per second when running in Linux.
Open CV was used for color detection and an implementation of Kociemba’s Two-Phase algorithm called minphase2 was chosen as the program to tell the robot how to turn the cube optimally. Open CV identifies all the colors, generates a description of the cube and sends it to the minphase2 solver. The resulting solved string is transformed into a compact cube sequence message and sent to all motor controllers simultaneously via a USB to the serial adapter attached to a differential serial IC. It takes the robot about 45 milliseconds to turn the cube. The bulk of the time is spent waiting for the webcam driver and detecting the colors.
|Rubik's cube - a game for the intelligent / Photo by shutterstock|
To make the robot the following equipment was used.
- 6 Kollmorgen ServoDisc U9/N9 series motors
- 6 custom motor drivers
- 2 PlayStation Eye cameras
- 1 Rubik’s Cube