Skip to main content

Lego + ARM + David = Awesome Rubiks Cube Solver!

Some of you will know that I have a passion of great engineering and find beauty in clean and simple designs. This is one of those designs, not made to save the world, or make a corporate boss lots of money, but just because.

Back in April I visited the NEW (National Electronics Week) and while walking around came to the ARM stand. Here on simple clean stand stood two Lego Rubik Cube solvers and the engineer behind them - David Gilday. I took some time to talk to David about his designs but first lets think about what these builds achieve from a pure engineering point of view.

[video: http://www.youtube.com/watch?v=GQ3nN09yczY]

So the above is a standard Rubik Cube that has been around since the 1980’s. Task is as we all know to rotate the faces until all the same colour squares appear on the same face. Notice there is no use of screw drivers or knifes to disassemble and rebuild the cube solved which is the only way I have every done it. No this machine has to do it the hard way.
So the first challenge is to build a machine that can rotate the faces and flip the cube around to access the other faces. Here David has used Lego - that do anything construction tool that predates even the Rubik cube. Building a machine to do this is no easy task on its own. I’ve had Lego since I was about 5 and given enough time I guess I could build this but it would not look as good as what David has done.

Added to this is a Lego NXT which if you did not know is a 32bit ARM powered brain. This will drive motors - the motors that turn the cube. The NXT has one other cool feature that is important here - bluetooth. So the NXT’s roll is to receive instructions via Bluetooth to carry out given functions like turn the cube. Its not however responsible for the solve.

The solving of the Rubik cube is done by a mobile phone - ARM powered no less. This is the brains of the system, other than David. This instructs the Lego NXT to turn the cube and allows the phone via its camera is analyze each face. The phone’s micro then solve crunches to find the fasted solution. This is then executed by sending turn by turn instruction to the NXT.

Each of these tasks on their own is a challenge on their own but getting all of them to work and all designed, built, programed and tested as well as coming up with a solve algorithm by one person is impressive.

So who is David Gilday and what are his special engineering powers?

David told me that he and his brother were like most kids and enjoyed life and had nothing overly different from most of us. However as kids they got Lego and Maccano sets and soon learned the joy of building stuff. David like me loved Lego and used to build all sorts of stuff. Then in the 1980’s he got his hands on the Rubik Cube.

This is were David differs from most of us. In just a few days he had solved the Rubik's Cube for the first time and then again and again. Over time David became better and better at it. When watching him handle a Rubik's Cube at the show you can tell its part of him, the fluid movement and quickness of turns. This is someone who knows and understand how it works, something that's very important to why these solvers work so well.

Later on David got married and had a two kids and introduced them to Lego. Its was then that David, now an Principal Engineer at ARM, started building with Lego again. At first they put together a simple robotic build but David like all of us engineers could not stop there. He saw a Lego solver on the Internet and then set about the challenge of building his own.

However the power of the ARM phones David uses are still not super computers and processes the thousands of moves and combination would take ages. So David uses a clever trick. Its a bit like how you search the Internet for a solution to a problem. First you go to google and type in a few keywords. Google returns a short list, (ok it long to you and me, but not a computer) of possible matches. Next you then go though this list and pick the one best for you. It may take a few hits before you get what you want or the best price but you get there a lot quicker that visiting every website in the world. So David's solution has a pre-solve that gets the ARM core part of the way and then it can check out the best answers and tweak as required - normally under 2 seconds which is very impressive.

For the stand Rubik's Cube that's looking and solving it in around 20 seconds and around 20 moves - very impressive.

So before going any looking at the list of solving machine David has produced, and I recommend looking at them. Just think about the beauty of the project again.


== List of Solver Videos and blogs ==
(in date order, oldest first):

http://www.youtube.com/watch?v=GQ3nN09yczY        ARM Powered Nokia and LEGO Rubik's Cube Solver
http://www.youtube.com/watch?v=052JJGBxFH0          ARM Powered LEGO/Nokia 4x4x4 Rubik's Cube Solver
http://www.youtube.com/watch?v=Q7P7GfKFw90        ARM Powered Nokia/LEGO Speedcuber
http://www.youtube.com/watch?v=ylFb4pqAUd8         The Amazing ARM Powered Android Speedcuber
http://www.youtube.com/watch?v=b5b9BIBuOd4         ARM Powered Android LEGO MultiCuber 777
http://www.youtube.com/watch?v=77dbG6DPW_c      Speedcuber at ARM Techcon 2010
http://www.youtube.com/watch?v=P-S30fS944M          Android Megaminxer - How to solve Megaminx with your phone

Davids Personal Videos:

http://www.youtube.com/watch?v=GH4clQJ3VuA         Yellow Cube Machine
http://www.youtube.com/watch?v=JK2blJuaXx0            LEGO® 2x2x2 Rubik's Cube® Solvers
http://www.youtube.com/watch?v=t6DMaimg03E       LEGO® MultiCuber 5x5x5
http://www.youtube.com/watch?v=8xfeTQIOHGw       LEGO® MultiCuber 6x6x6
http://www.youtube.com/watch?v=kWrJdkXp_n4         LEGO® MultiCuber Relay 2x2x2 3x3x3 4x4x4 5x5x5
http://www.youtube.com/watch?v=Ji7rF7KdmqE           LEGO® Megaminxer