Toggle Navigation
Digital Imaging: Imagine the Possibilities
Teledyne Logo

The Rubik and the Robot

A multi-talented control and automation team applies its mechanical, electrical, and software engineering chops to celebrate—and solve—a timeless puzzle.

Article Update – May 28, 2014: The Beyond Rubik’s Cube exhibit has opened at the Liberty Science Center (LSC), and has seen some great coverage but also a reveal of some new details.

See  Anthony Brooks, the exhibit’s “speed cuber-in-residence,” compete against Faber’s Rubik-solving system at the exhibit. Brooks set the world record at the LSC last year, and even solved it single-handed. Bloomberg picked up the story, interviewing both Anthony and Paul Hoffman, president and CEO of the Liberty Science Center.

The Wall Street Journal also covered the event in an excellent article titled “It’s Hip to be Square,” as did NBC Nightly News. also had a great profile on how much of a success the complicated puzzle really was:

Ideal projected it would sell about 1 million Rubik’s Cubes. In the first three years alone, 100 million of the toys were sold. At one time, the top three books on the best-seller list, according to Hoffman, were books devoted to solving Rubik’s Cube.

“We put everything into it,” says Greg Raciti, talking about his team’s unusual project at Faber Industrial Technologies. “It’s made out of the things we integrate and distribute in our work, like industrial HMI, servos, detectors, robotics, image processing and logic—plus the vision system. It’s all the stuff that we do in this one exhibit.” And it’s all to solve a puzzle.

Based in Clifton, New Jersey, Raciti and his team at Faber are creating a Rubik’s Cube-solving robot that will be ready to see the world. The first stop is 20 minutes away at the Liberty Science Center and its “Beyond the Rubik’s Cube” exhibit for the 40th anniversary of the celebrated puzzle.

The entire exhibition is the result of a creative partnership between Liberty Science Center, Google, and other participants like Faber. Focused on education in both sciences and art, it’s designed to showcase the process of invention, the math and science of puzzles, and the interplay of design and engineering.

An Uncommonly Popular Puzzle
The Rubik’s Cube was invented in 1974 by Ernő Rubik, who worked at an Applied Arts and Crafts school in Budapest. An engineer at heart, he was trying to solve the structural problem of moving the elements around the object without the whole thing falling apart. As an indication of how challenging the puzzle is, it took Rubik more than a month before he was able to solve the Cube himself.

Today more than 350 million cubes have been sold worldwide, making it the world’s top-selling puzzle game and possibly the world’s best-selling toy. Although it’s been around for awhile, the Rubik’s Cube is still very popular, with international competitions held every year and records still being broken. One reason is its good looks. Another reason is the daunting challenge it presents both man and machine. The number of possible states of a 3x3x3 Rubik’s Cube (there are other sizes and versions now) is measured in the quintillions (Here is a PPT that explains it. Warning: Math).

Permutations that can be reached solely by turning the sides of a 3x3 Rubik's Cube.

Building a Solution and an Experience
The Faber exhibit will involve a combination of technical prowess and creative showmanship. Referred to as “The Robot Race,” it will allow anyone to bring their own Rubik’s cube and race the machine to solve the puzzle. Other, dedicated robotic cube-solving solutions already exist. The current speed champ, the Cubestormer III, uses parts and multiple motors from Lego kits and the camera and processing power of a mobile phone to solve the puzzle.

The Faber team took an entirely different approach to solving the Rubik’s Cube, one from their realm of expertise. “It’s built out of machine vision parts,” says Raciti, “so we wanted to play that up, make it look industrial and impressive.” The system is built around a Denso VS-650 six-axis articulated machine arm, a Teledyne DALSA GEVA 1000 vision system, and two Genie GigE cameras. All the software runs in the same Microsoft Windows environment. “That’s part of the magic,” explains Raciti. “We’re using a Windows PC for all of our software. I can even use Visual Basic directly on it to develop.” In the end, it shows how versatile the building blocks of industrial solutions really are. The industry continues to grow and diversify, and the tools have to keep pace with whatever gets thrown at them. “Essentially, you could unplug this and use it for something else. You couldn’t do that with the Cubestormer.”

How it Works
The user puts it in a fitted holding nest, where the first camera takes a fast monochrome picture of the cube from the side with a backlight. This step ensures that it is indeed, Rubik’s cube in the nest. “Is it two cubes? Is there garbage on top? Since people were handing this off, we needed to verify.” Then the door is locked and the machine vision magic starts. The Denso arm travels on a servo-driven linear slide to show three sides of the cube to the color GigE camera. The Sherlock vision software analyzes each side, building a color map that is turned into a string to be processed in an open-source algorithm, done in C. Twenty seconds gets it to twenty moves or less, and then outputs a text file. The string is sent back to Sherlock, which interprets it and sends it to the robot. The Denso arm then makes the necessary moves. “That’s the slowest part of the solution,” says Raciti, “It’s like doing it with one hand. Put it down, pick it up.” With more time, what could they have done with two arms?

“It was a lot of fun. There was a lot of camaraderie because we are all nerds at heart. We all collaborated.”

Creative Collaboration
The Faber team consisted of an engineering department of five that typically works with customization. “It was a lot of fun. There was a lot of camaraderie because we are all nerds at heart. We all collaborated. One worked on the algorithm. One worked on the servo. One worked on fabrication. I worked on the vision system.”

Although the team had a working version months ago, it didn’t yet have the flair needed for an exciting educational experience. That required further collaboration. “It’s not just about functionality, it’s about presentation,” says Raciti. To do that, the team at Faber worked with a display design team for the museum, Maltbie. “They were interested in what we could do. It was all about building trust between the engineering and creative teams. They would come with requests, and we would need to give solutions. Because this was one of the most complicated exhibits, we had to work closely together. It worked out well, and as complex a solution as ours is, it turned out to be one of the easiest for them to deal with.” The creative influence went both ways, with the creative team offering up ideas on how to ensure the Faber system would impress. The engineers even had the opportunity to get artistic, creating special display parts on their 3D printer and even hand-painting the target.

“We really wrung every last bit of performance and functionality out of this thing, from the cameras to the Ethernet.”

An Industrial Solution, Built to Travel
The show is distributed by Exhibits Development Group. “Beyond the Rubik’s Cube” will remain in the US for two years, and then begin a world tour. “That was one of our big challenges,” explains Raciti. “Industrial machines are not made to travel.” Because the exhibit would be moving, the team needed to make it maintainable while on the road. They dedicated port-to-remote control and troubleshooting, and included two webcams to show what the system is doing. As long as it’s connected to the network, Raciti and his team can fix most problems remotely: “It’s the same sort of thinking we apply to our customer’s solutions – no one should travel unless it’s really necessary. Especially when this thing is going to go everywhere.”

It’s the first system they’ve ever built to be travel-ready, as the exhibit will be transported in shipping containers across the United States, Europe, and Asia. That presented some unusual engineering problems. “Industrial power is 200V, so at a normal consumer 120V, it pulled a lot of current and tripped all breakers at first. It’s also not normal to even have a power switch. You don’t want to be switching this machine off and on.” The team ended up rethinking the power system, with a smart UPS control of a 24v DC and the 12v supply. An APC system monitored the power, and through a USB connection could do a soft shutdown of the Windows-based computer before it suffered a hard shutoff.

“That was one of our big challenges; this is going to see the world, but industrial machines are not made to travel.”

The work is all about to pay off. The exhibition will launch at the Liberty Science Center in April 2014. Greg Raciti’s team is still working to optimize everything about a system that has been pushed to its limits to perform, and still be portable: “We really rung every last bit of performance and functionality out of this thing, from the cameras to the Ethernet.” The team still has a week or so to make the finishing touches, before it needs to be delivered to the museum. It has been such a challenging process over the last few months, but it has also been a lot of fun. The team is probably having a hard time letting go: “We’re hoping they let us keep it another week, just so we can refine it even more.”