Rubiks Bot - Arduino based Cube Solver with Playstore App

Hi everybody,

I wanted to show you my cube solving robot and talk some major issues through which needed to be tackled along the way.

The thread which started it all can be found here:

Rubik's cube Robot solver - Projects Discussion and Showcase / Robotics - Arduino Forum

My thanks are going to Kas for this tremendous amount of work.

Here is the video:

Just another Rubik's Cube solving robot - YouTube

The App Rubiks Bot is for Android and written by myself in Kotlin. It is available in the Playstore.

Actually I did not intend to write this App but I was forced to do it because the original App by Kas, who inspired the whole project stopped working since the Canadian server providing the solution was suddenly offline. So the robot was at that point useless.

Meanwhile Kas references another solution which will work flawless but still requires the solving algorythm on another device. I wanted the solving engine being build into the App itself. The smartphone has more than enough calculation power and the App needed to be written anyway. So with this App there is no other server required to obtain the cube solution.

The App quite explains itself. The BT device must be known by the smartphone beforehand (via settings). The actual connection is than made within the App.

Screencast of Rubiks Bot app

The solving engine relies of course on the work of Herbert Kociemba. When ever I visit his site I’m awe-struck and have a great sense of humility in view of this achievement. To be honest I’m too stupid for solving a cube by myself.

Kociemba's Homepage

The actual Java-Library is called min2phase and can be found on Github. It is an optimized version of the Kociemba-Library. Many thanks to cs0x7f for providing it.

GitHub - cs0x7f/min2phase: Rubik's Cube Solver. An optimized implementation of Kociemba's two-phase algorithm.

This code was compiled into a Java library and included in the Android Kotlin project.


I use the Nano board with the servo breakout board as shown in the picture. This makes connecting the servos very easy. Power are 4 Eneloops which is power enough and the voltage remains within the limit of the board.

Bluetooth module is a HC-06, communication is only one way, so a HC-05 is not required.

Hint: I found the voltage spikes from servo operation can be to much for the HC-06 resulting in a broken BT connection. So just put a well dimensioned capacitor directly to the power terminals of the HC-06 module.

There is not much else required. The servos are plugged directly to the board and for comfortable charging I added a suitable jack.

The whole Arduino code uses 95% of the code from Kas. The major difference is that I use a softserial for the BT module to have the serial port free for debugging purposes. The softserial runs on 9600 Baud to be reliable. There is no speed issue since only a few characters are transmitted.

The Arduino project is attached here.


I use MG996R servos with 180° rotation which can be found quite easy and cheap on ebay in packs of four. They will turn a little more than 180°.

You will have to stretch the pulse width quite beyond the usual 1000-2000µs band. And each servo will require individual numbers.

To get all the numbers for correct position Left, Right and Middle I wrote a little Arduino programm just moving the servos from left to right and to the middle and editing the position constants as long as necessary to get the positions for each servo.


The grippers are also based on the KAS design but with minor changes. I did not like that the plastic parts rotating on the threads of the screws. I use 3mm pins with a smooth surface for this. I also was not comfortable with printing the 25teeth servo socket directly in the part. I preferred to use the delivered servo horn and bolt the gripper to it.

All the parts are printed in PETG. The files can be found here:

Rubiks Bot - A cube solving robot by richimoeller - Thingiverse

Servo gripper for cube solving robot by richimoeller - Thingiverse

The undriven gripper link is a 5 piece design and actually to complicated but I had no better idea.

The driven gear arm uses a Tamiya (RC-Car) special bolt. It is easy to obtain (Tamiya – 50582). But you can use anything else which is suitable.

I glued pieces of anti-slipping-matt to the grippers with double sided adhesive tape. The matt itself ha a checkboard pattern and when you put one piece over the other you can create an almost closed surface. Please see the pictures. The grippers worked right from the beginning and hold the cube really well.

The 2 half cubes do hold the downside and backside rotating servos. The smartphone is looking at the front side of the cube. The yellow base holds all the equipment.

For now this is all I can think of. Good luck if you plan to have a Go yourself. It is a very rewarding project.

i want to make Can you tell me the parts used and where they are connected?

Hello Kang,

I'm not sure what parts and which connection exactly you mean.

You need:

4 MG996R Servos (180°)
Arduino Nano Board
Servo Breakout Board
HC-06 Bluetooth Module
4 eneloop batteries for power

The plastic parts are 3D printed and screwed together with M3 countersunk screws. On the rotating connections 3mm pins are used. You can cut them youreself or by them on ebay. Details are given on the Thingiverse page.

I hope this helps.

It will be easier to give a helpful answer, if the question is a little more specific.

Thanks for your reply