Rubiks Cube Solver

This will follow my hopefully successful attempt of a Rubiks cube solver.
well, it better be successful because its a school project :P

Before I even considered the design of the mechanical part of my robot, I created the code that solves the Rubik's cube. It solves the cube using the "layer by layer" method. This is by no means the most efficient way to solve the cube, but it is the way i personally solve the cube. It produces solutions in about 100 moves.
My cube solving python code
The main idea is to have the user scramble a Rubik's cube, then place it into a set of robot claws controlled by an Arduino. The original concept was to have a webcam to then decide the state of the cube, however if this proves too ambitious the user will enter each piece into the computer running a python script. The python script will solve the cube, then send the list of moves to the Arduino which will do the physical solving of the cube.

So after a bit of hot glue and popsicle sticks, i have somewhat of a first prototype:
It is different to my original idea, which was to have two robot hands. This design seemed to be to difficult to achieve without buying expensive claws, and I am on a small budget. Heres a quick video of my new design working. So far all it does is spin one face, but i am working on a system to flip the cube.

I have designed an arm using Lego and a couple of servos to flip the cube. It seems a bit shaky, but i think the design is heading in the right direction.
I decided to create a more ridged arm, as the previous arm was very flimsy. This one is made from Lego super-glued together, and also gets rid of the silly copper wire my teacher gave me to attach the servos - replacing them with cable ties. This created a very sturdy, reliable design.

After designing the cube solving algorithms, and the mechanical part of my robot, all i need to do is code the microcontroller. For this i decided to use an Arduino Uno (i would have tried my Raspberry Pi if i had time). This translates the string of moves the python script outputs, flips the cube around, and spins the correct face.



My Rubik's Cube solving Robot will solve the cube in approximately 10 minutes - a number I would like to greatly reduce using a web camera for colour recognition, and more efficient cube solving algorithms.

Before sending my project away to Brightsparks, i figured it needed a little cleaning up.
I trimmed down the excess popsicle sticks and covered the ugly scrap wood i used with some plain white card. I created a neat GUI using Python to enter the colours of the cube, as i did in fact run out of time to implement a camera.

What makes my project different from all the other cube solvers out there is a few things.

  • It is a 100% original design. I was not aware of any Rubik's Cube solving robots until I was about half way through my project. 
  • Minimal budget. I used cheap and easily accessible materials I found around my classroom.
  • My age. I am a year 12 student (17 year old) with relatively less experience than university students who have attempted this project.


This project I undertook as a fun project has brought me great success. I mentioned earlier about entering my project into the New Zealand Brightsparks Competition. I won this technology competition, scoring $1000 and some free sessions with a patent lawyer (obviously for a future project). This competition entered me into the Realise the Dream Competition. I continued to the final 20 students and won $500 and a weeks travel around New Zealand with these students, visiting research institutes along the way. I also won a major prize in Realise the Dream - an all expenses 9 day trip to Taiwan to enter the Taiwan International Science Fair to compete against students from around the globe, which will be held in jan/feb 2013.

13 comments:

  1. Looks Great! Sounds like a complicated project. Good Luck!

    ReplyDelete
  2. this is amazing. Even your cat is in awe of your work.
    Thanks for sharing it

    ReplyDelete
  3. Excellent project, James. I was laughing out loud watching your Lego man flip the cube over (laughing quietly, as it's the middle of the night here in Japan).
    Best of luck in Taiwan!

    You made Hackaday (hackaday.com) over the weekend, BTW.

    ReplyDelete
    Replies
    1. thanks for the positive feedback, it really means a lot to me :) and i was super ecstatic when i saw my project on Hack a Day!!! my life is complete!!!

      Delete
  4. thats a great project... nice.

    ReplyDelete
  5. Excellent Job Man.!! At just 17, you've done a wonder job. Really inspired from your work. Good wishes for you future.!!

    ReplyDelete
  6. Can you please write the C code for the solver with two side hands and a bottom hand? We're doing the same project using ARM processor.

    ReplyDelete
  7. Can you please write the C code for the solver with two side hands and a bottom hand? We're doing the same project using ARM processor.

    ReplyDelete
  8. Can you teach me how you created this GUI?

    ReplyDelete
  9. How did you do the entire mechanical part?

    ReplyDelete