Picture of Rubik's Cube Solver

- - - - - - -

Kitables made their own kit called the "Rubisolver" based on this Instructable.

Check out their website:

- - - - - - -

So here's a project I've been working on for a while...

This robot that can solve a Rubik's cube using Arduino.

I learned how to solve a Rubiks cube last year, and I was also into Arduino, so eventually I ended up with an idea to make my own Rubik's cube solver.

Like many people searching for "Rubik's Cube Solver" on Google, one of the first robots I found was the Tilted Twister design by Hans Andersson:

[Play Video]

I looked around at some other Rubik's cube solvers, but I liked that design because of it's (relative) simplicity, so I built a similar version of it with popsicle sticks, an Arduino and 2 servos.

In the end, my robot takes about 20 minutes to enter the cube state and solve.

Remove these adsRemove these ads by Signing Up

Step 1: Materials


- Arduino UNO R3

- 2 servos (I used Hitec HS-311's)

- wires

- USB cable

You can get all of these parts from any robotics store. I got them from


- popsicle sticks

- wooden skewers

- thin plywood

- wooden wheel (skewer must fit inside the hole)

- hot glue

- paper towel roll


- Arduino IDE - (Algorithms in C++)

- Python 2.7+ and Tkinter - (GUI)

- Pyserial

Step 2: Electronics

Picture of Electronics
Wiring up the servos to the Arduino is pretty straightforward

1. Connect the yellow (signal) wires from the push and rotation servos to pin 6 and 9, respectively.

2. Connect the positive and negative wires to the 5v power source and ground. Sometimes the servos had jitters, so I think a few capacitors could have smoothed out the current.

1-40 of 92Next »
twooters8 days ago

Hi guys whenever I enter python the GUI comes up but doesnt show the colors when I click. here is a screenshot of what it looks like how do I fix this?

Screen Shot 2014-11-16 at 1.04.59 AM.png
make sure u have the right virsion of python and that u dnt change enything else than the com port and baud rate.
Thanks man im going to work on it more today

Shadi where the Video of it in action, Cannot wait to see it M8ty.

voilaaa!! i just tweeked the mechanism a little to get the best accuracy for a the 5 to 8 min solves...thanks man for this project.
matt2uy (author)  shaditheman12314 days ago
Nice robot!
How did you get it to solve in 8 minutes?

Hi Matt, I cannot wait to see the video of this 5/8 min in action, man that's fast. Bet you cannot wait to see the code tweaking as well, he must be using a negative wait time between actions ?.

Hi, 5/8 min that is mega fast, you will have to do a video of it in action and upload the code, I tried to speed up the one i made and got it down to 15ish min from17ish min but it was shaking it's self to bits and would start to walk round the table when in action.

I see you have powered your servos from a separate power supply as the Arduino will not pass enough mAh's. I have modded my one so it can do two different cubes that I have 55mm and 57mm (one at a time that is)

suchitmintu1 month ago

#ser = serial.Serial(COM0, 9600)

ser = serial.Serial(COM3, 9600)

...this is my modification on my windows and when i run send cube state .py file i get this error....

Traceback (most recent call last):

File "C:\Python27\", line 18, in <module>

ser = serial.Serial(COM3, 9600)

NameError: name 'COM3' is not defined

....and also should my arduino software stay open with python cause it keeps on telling me serial port already in use? ....plz help

i want to try this program in windows so please help

u have to put quotations..('com3'...
saarsh032017 days ago

Which arduino you used from the website below? I am a bit confused

matt2uy (author)  saarsh032016 days ago
Arduino Uno R3. But any arduino could be used.


splodgie made it!1 month ago

Hi, Well after waiting weeks for the servo to turn up I completed the the Project (98% ish, still needs a bit of cleaning up to call it finished). Used a Arduino Nano V3 as it was cheaper, $2.50, 2x Servo's $6.50 of eBay, £1.00 2x 50 Garden marker sticks from Wilko's, Tube of Uhu glue from £1 shop, (guess what it cost), and about 40Hrs work in total, Setting it up and working out the bugs was a bit of a pain but part of the fun as well, made it so it all pulls apart if needed, so in all it cost about £10.

One things sure without the Instructable and Matt2uy ,I could never have worked it out, The best bit when it's working is the way it och's the cube into line so it's squared up for the next move, brilliant bit if coding Matt.

As you can see in the video I had a play with the GUI code to make it easy for me to use, (I know nothing about coding apart from look and see, and maybe that may work).

Did a quick Video to show it working. Now it's time to get some sleep .

Thanks again for the Instructable.


matt2uy (author)  splodgie1 month ago
That's awesome!

I watched your video and I think your mechanical design is a lot more reliable and well constructed than the one I made.

It's really awesome to see someone actually use my instructable to help make their own robot!

When you're 100% done, I think you should make an instructable if you want.


Hi Matthew, Thanks for your comment and very happy you like my attempt at taking your design and hard work in trying to replicate it in the best way I could.
I tried to stay within the materials used and method of your design, (A evo design based on the master prototype).
As you know getting it to work after you have made your design is the hard part, or you are very lucky if it works first time.

I may try to show some of the design and the measurements I have in my copy at a later date. As some one said ' the way it works and the materials used to complete the mind bogeying complication of completing the Rubik's cube just has to makes you smile'. you should be on Dragons Den with it.


matt2uy (author)  splodgie1 month ago

Yes, getting it to work probably took up more time than actually making it for me, but that was probably due to my build quality.

I probably won't be on Dragons Den, but I hope that this project is a stepping stone for some more projects I'll be making.

suchitmintu1 month ago

yes sir downloaded the file but not working

suchitmintu1 month ago

sir made adjustments but now the cursor is simply blinking, as the program says that alternations of y can be seen but nothing is coming so plz try to help me out

thank you

buddhikag1 month ago

How to fix this? Please,

i used 3.4 python.and after i got that prb iv installed its working fine.

#ser = serial.Serial(COM0, 9600)

ser = serial.Serial(COM3, 9600)

...this is my modification on my windows and when i run send cube state .py file i get this error....

Traceback (most recent call last):

File "C:\Python27\", line 18, in <module>

ser = serial.Serial(COM3, 9600)

NameError: name 'COM3' is not defined

....and also should my arduino software stay open with python cause it keeps on telling me serial port already in use? ....plz help

(removed by author or community request)

windows 7 64 was on com3 ....

Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32

Type "copyright", "credits" or "license()" for more information.

>>> ================================ RESTART ================================


Traceback (most recent call last):

File "C:\Users\......\Desktop\2", line 18, in <module>

ser = serial.Serial('/dev/ttyACM4', 9600)

File "C:\Python27\lib\site-packages\serial\", line 38, in __init__

SerialBase.__init__(self, *args, **kwargs)

File "C:\Python27\lib\site-packages\serial\", line 282, in __init__

File "C:\Python27\lib\site-packages\serial\", line 66, in open

raise SerialException("could not open port %r: %r" % (self.portstr, ctypes.WinError()))

SerialException: could not open port '/dev/ttyACM4': WindowsError(3, 'The system cannot find the path specified.')


How do i solve this??plz help!!!!

matt2uy (author)  shaditheman1231 month ago
Step 5 and 6 in the "how to use" step would probably help.
All abot Dogs2 months ago
This is a very good for me I love the way it solves the problem and I can't even solve a Rubik's cube
You2134 months ago

i'm getting this error how do i fix it the arduino is plugged in.. both servos do the test thing when you do plug it in and I try to get the gui working and it does this

splodgie You2132 months ago
(removed by author or community request)
matt2uy (author)  splodgie2 months ago
If you're testing out the code, take a look at step 7 (probably step 4-9 within that step).
splodgie matt2uy2 months ago
(removed by author or community request)
matt2uy (author)  splodgie2 months ago
Great! Make sure you post a video or make an instructable when you're done so we check it out.
diy_bloke4 months ago

My solution is always to just take a knife, pop out all the colored elements and rearrange them back in solid fields, but yr solution is pretty good too

You2134 months ago

this one is the real one the other one i screwed up a couple things

matt2uy (author)  You2134 months ago

I redid step 7, and within that step I think step 4 to 9 would help

This is genious. Not only it works, but it is elegant!
matt2uy (author)  pablo de paris5 months ago
Thank you! Though I don't think it's as elegant as some of the other solvers out there.
berq matt2uy4 months ago

There are dozens of other machines that do what yours does. But what makes your project SPECIAL is its significant LACK of elegance! It's the way you so wonderfully finessed the opposing forces of crude and sophisticated into working together that makes people smile when they look at it, whether out of appreciation or because it made their brains do a back-flip. After all, popsicle sticks and glue are supposed to be what 2nd graders use to make ugly picture frames for their parents to throw away; they aren't for making robots! And to make such lowly building materials do what you made them do... that takes an uncommon type of engineering and creative brilliance. Your mind is a gift. I hope it serves you well, whatever you end up doing.

matt2uy (author)  berq4 months ago

Thanks for the comment. I'll keep doing what I love to do!

stmaus4 months ago

I'm trying to make your software work and the serial monitor just keeps giving me "Cross". Is the orientation sensitive when entering each face, and if so what is the standard?

1-40 of 92Next »