This project designed a robotic system which can solve a randomly scrambled Rublik’s 3x3 cube. This robot uses Android OS as the computing platform and STM32 as the controller. Both communicate via Bluetooth and then control the robot arms to solve the Rubik’s Cube. Different from the way of color recognition based on RGB color model, here introduced k-nearest neighbors algorithm (k-NN) in color recognition, which eliminated the influence of light intensity on recognition, so that the rate of color recognition reached a very high precision. Kociemba algorithm has the least steps to solve the cube, with an average of only 21 rotations, and it can be figure out in milliseconds. The introduction of Kociemba algorithm greatly shorten the solution time. In addition, the binary tree model is used to optimize the solution steps, which significantly reduces the execution time of the servos. The ideas of the pulse increment interpolation in CNC system also applied to optimize servos control, which achieve a good balance between speed and stability.
Materials
Electronic
Amount
Type
Unit price
Total price
1
STM32F103RCT6/RBT6开发板
¥30.00
¥30.00
1
5A 大功率 75W DC-DC 可调 降压稳压电源模块
¥17.77
¥17.77
1
HC-05 主从机一体蓝牙模块板
¥23.90
¥23.90
1
4*6cm 洞洞板
¥1.10
¥1.10
4
MG995数码舵机
¥18.90
¥75.60
4
MG90D数码舵机
¥15.15
¥60.60
8
舵机延长线
¥1.30
¥10.40
1
母对母杜邦线 40P
¥1.80
¥1.80
1
KF301-2P 接线端子
¥0.20
¥0.20
1
1*40P 针排
¥0.10
¥0.10
1
船型开关
¥1.00
¥1.00
1
7.4V 15C 锂电池
¥51.00
¥51.00
1
B3 2S/3S锂电池 充电器
¥28.00
¥28.00
1
红色 22AWG 大电流镀锡铜芯硅胶线
¥1.10
¥1.10
1
黑色 22AWG 大电流镀锡铜芯硅胶线
¥1.10
¥1.10
-
-
-
¥303.67
Screws / Nuts
Amount
Type
Unit price
Total price
44
M3*16 螺丝钉
¥0.09
¥3.96
12
M3*25 螺丝钉
¥0.11
¥1.32
56
M3 不锈钢六角螺帽
¥0.05
¥2.80
40
M3*9 *0.8 不锈钢垫片
¥0.05
¥2.80
12
M3*6+6 单头六角铜柱
¥0.10
¥1.20
-
-
-
¥12.08
3D Printed Parts
Amount
Piece
Support
4
arm_left
no
4
arm_right
yes
4
grip_top
no
4
grip_bottom
no
4
grip_pad
no
4
grip_cylinder
no
4
holder_top
yes
4
holder_bottom
yes
4
servo_gear
no
4
grip_gear
no
8
foot
yes
You can print them all using a 15-20% infill and walls of 1mm. Layer height of up to 0.3mm is fine. It’s recommended to print parts one by one, especially the bigger ones, so you don’t have to start again more than one piece when one of them fails.