Introduction: ARS - Arduino Rubik Solver
ARS is a complete system to solve Rubik's cube: yes, another robot to solve the cube!
ARS is a three years long school project made with 3D printed parts and laser cut structures: an Arduino receives the correct sequence generated by an home made software, ARS Studio, through USB port, then moves forward and backward six stepper motors till the end.
ARS is based on great mr. Kociemba algorithm: as told on his website, Herbert Kociemba is a German cuber from Darmstadt, Germany who invented this algorithm in 1992 in order to find near optimal solutions to 3x3 cube, improving on the Thistlethwaite Algorithm.
In this Instructable instructions will be explained about building robot structure, and using the open source software developed to generate the proper sequence needed to solve the cube using Kociemba's algorithm.
More infos on Kociemba and his work:
- about God's number, the number of moves an algorithm would take in the worst case to solve the cube. At long last, God's Number has been shown to be 20 by Kociemba and his friends
- an interview to Herbert Kociemba
- info about Kociemba's software, from whis ARS Studio comes from
Following steps will deal on mechanical structure and software use.
Supplies
You will need:
- 4x shaft 8x572mm
- 2x pulley shaft 8x80mm
- 8x threaded bar 6x67mm
- 8x threaded bar 6x122mm
- 7x 40x40x10 DC Fan
- 32x hex bolt grade ab_iso M4x25x14
- 32x hex nut style M4
- GT2 timing belt 2m
- 1x breadboard
- 32x nut M6 blind
- 16x bearing LM8UU 8x15x24
- 54x screw M4 x 7.5mm
- 54x washer 4.5x9x1mm
- 32x screw M3x15mm
- 1x arduino UNO
- 6x NEMA 17 stepper motors
- 6x A4988 Pololu drivers
- 12V power supply: a simple ATX from an old computer is good
Step 1: ARS - Arduino Rubik Solver: Resources
Materials, drawings and software are here:
Step 2: Assembling the Structure: Overall View
ARS robot is made of some parts and components, assembled together in order make it possible to slide forwardand backward two carriages with four stepper motors.
Step 3: Assembling the Structure: Arduino and Stepper Drivers Box
First part is the simplest: an Arduino box where you will position Arduino UNO, the breadboard and A4988 Pololu drivers
Step 4: Assembling the Structure: Upper Motor Box
Upper motor box contain the carriage slider motor. Carriage is moved with a GT2 timing belt.
Each carriage and his connected motor is independent from other motors.
Step 5: Assembling the Structure: Lower Motor Box
Lower motor box contain the lower carriage slider motor. Also this carriage is moved with a GT2 timing belt.
Two level sliding carriages permit a simpler structure than others seen in Maker Faires.
Step 6: Assembling the Structure: Upper and Lower Carriages Supports
Upper and lower carriages supports bring the motors connected to claws moving forward and backward the cube.
These support are similar, differencing only on overall height in order to have two slider levels.
Step 7: Assembling the Structure: Roof Tower
A roof tower has been added to be able to mount a simple webcam for future improvements.
Step 8: ARS Studio Software: Generating the Sequence
ARS Studio is an Open Souce Software able generate the correct sequence to solve your Rubik Cube with Kociemba's algorithm in less than 25 moves (better, in God's number max moves!).
Step 9: ARS Studio Software: Cube Setting Up
Clone the repository, the go to: ARS Studio\ARS Studio\bin\Debug and launch Ars Studio.exe
Cube need to be filled by colors, as they appear in reality: an automated version is under construction, it will be totally autonomous. By now you have to describe the cube to the software.
So follow these 3 steps:
- choose one color from the palett
- fill the cube
- click on "Risolvi" (italian for "Solve")
Your sequence is ready!
Step 10: ARS Studio Software: Start Solving
Now click on "Stringi pinze" (italian for "Close claws"), then "INVIA" ( = "GO").
The sequence will be sent to Arduino which will move steppers according to sequence.
Step 11: ARS: Arduino Sketch
Arduino sketch is as long as simple.
Arduino receive the sequence from USB computer port and read it from the serial monitor.
The steppers require 12v to works, it need a power supply. It requires two magnetic sensor to works well. They are under the motor supports, one for each disections. When connecting the stepper motors to A4988 drivers and Arduino UNO pins pay attention to direction.
Sequence commands are:
a = stepper 1 rotate for 90°
b = stepper 1 rotate for -90°
c = stepper 2 rotate for 90°
d = stepper 2 rotate for -90°
e = stepper 3 rotate for 90°
f = stepper 3 rotate for -90°
g = stepper 4 rotate for 90°
h = stepper 4 rotate for -90°
i = stepper 5 open steppers 1 and 3
j = stepper 5 close steppers 1 and 3
k = stepper 6 open steppers 2 and 4
l = stepper 6 close steppers 2 and 4
m = steppers 1 and 3 rotate to 90° together in the same way
n = steppers 1 and 3 rotate to -90° together in the same way
o = steppers 2 and 4 rotate to 90° together in the same way
p = steppers 2 and 4 rotate to -90° together in the same way
Step 12: ARS: Prizes!
ARS Arduino Rubik Solver won 1st prize in italian Olympics Problem Solving Games in 2018.
ARS Arduino Rubik Solver won a Maker of Merit at Maker Faire Rome in 2017.
Many thanks to my students Paolo Grosso and Alberto Vignolo who tenaciously this project, to Mihai Canea and Giorgio Spinoni who improved software, to Josef Costamagna who started an incoming web version, to Alberto Bertola and Edgard Kazimirowicz who perfected mechanics.
Step 13: ARS Arduino Rubik Solver: Next Steps
Next step: controlling ARS from wherever in the world, so that everyone can play with it.
We need to improve colors recognition while web server is on the go, as you can see in the video.
Stay tuned!

Participated in the
Arduino Contest 2019
22 Comments
2 years ago
Can you make the drawings available again? The link goes to a 404 error
2 years ago
Nice project, well done. But links are broken, please update. Thanks.
2 years ago
“It requires two magnetic sensor to works well. They are under the motor supports, one for each disections. ”
What does this sensor do? Can you describe exactly where I should put it
Question 3 years ago
Is this code written in Italian language, do I have to edit the code
3 years ago
Hi can you help I keep on getting this errors when I upload code to uno, what Baud rate should it be set,mine is at 9600pc recognises uno board I am using wihndows 10
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino Uno"
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino: In function 'void loop()':
Com_Seriale1302:54:23: error: 'class HardwareSerial' has no member named 'leggiString'; did you mean 'readString'?
leggiaus = Serial.leggiString();
^~~~~~~~~~~
readString
Com_Seriale1302:78:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(13);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:78:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(13);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:91:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(12);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:91:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(12);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:254:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(13);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:254:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(13);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:266:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(13);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:266:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(13);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:286:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(13);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:286:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(13);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:298:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(13);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:298:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(13);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:320:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(12);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:320:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(12);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:332:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(12);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:332:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(12);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:351:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(12);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:351:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(12);
^~~~~~~~~~~~
digitalRead
Com_Seriale1302:363:24: error: 'digitalleggi' was not declared in this scope
sensor = digitalleggi(12);
^~~~~~~~~~~~
C:\Users\pervez\Downloads\Com_Seriale1302\Com_Seriale1302.ino:363:24: note: suggested alternative: 'digitalRead'
sensor = digitalleggi(12);
^~~~~~~~~~~~
digitalRead
Multiple libraries were found for "Servo.h"
Used: C:\Users\pervez\Documents\Arduino\libraries\Servo
Not used: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\libraries\Servo
exit status 1
'class HardwareSerial' has no member named 'leggiString'; did you mean 'readString'?
3 years ago
This seems so much more complicated than the way I used to solve a Rubik’s Cube with a hammer and screwdriver.
Reply 3 years ago
Phillip's or straight blade ?
Reply 3 years ago
Whatever’s handy., same way I fix most things. Lol
3 years ago
Very cool robot! Seems a rather complicated one.
3 years ago
please send me its code
Question 3 years ago on Introduction
Does the cube have to be in a certain state and orientation when it is put into the machine in order for the machine to solve it? If the answer is no, is there a camera or multiple cameras that can view and determine the state of the cube? I did not see any camera's listed in the required materials list.
Answer 3 years ago
One of the makers.
Yes, the cube must be with the white face in the top and the green face in front of the second sterpper motor , near the arduino box, we are going to implement the orientation method in the next update.
Question 3 years ago on Step 13
What CAD/CAM software was used?
Answer 3 years ago
One of the makers.
We used Solidworks and Autocad 2D
3 years ago
MAKE MEH INTO A ROBOT. THEN I WILL BE ABLE TO SOLVE RUBIK’S CUBES. Wahh I can’t yet. :(
3 years ago
So cool!
3 years ago
VERY FUN!
3 years ago on Step 13
I made one a few years ago as a final project of my computer science degree.
I build an app to find the solution and send to Arduino by USB which solve the cube
https://www.youtube.com/watch?v=384Y49o5DWE
the Arduino is at the end
3 years ago
I've been thinking about making one of these for a good while now, not to solve cubes, but to scramble them so I can solve them myself.
3 years ago
Very cool & fun to watch