Skip to main content
Version: FILS English

Rusty Cube

A Rubik's cube solving robot

info

Author: Porojan Mihai-Iulian
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-PorojanMihai

Description

This project is a Rubik's cube solving robot using a 4 clamp servo powered system along with a color sensing module. My goal is to reduce the workload of the microcontroller by generating an optimal solution with Kociemba's algorithm on my laptop to allow for a much faster solve (< 20 moves).

Motivation

I chose this project because I was fascinated by the MIT robot that managed to solve a scrambled cube in 0.38 seconds and decided to create my own version using a more budget friendly approach with servomotors instead of stepper motors and a manual color sensing module instead of cameras.

Architecture

Architecture

Log

Week 5

Decided on the final project idea and ordered 2 servos and a color sensing module to allow for initial testing.

Week 6 - 8

Received the STM32U5 microcontroller from the lab. Tested the SG90 servo to make sure it can turn the face of the cube before ordering more. Tested the color sensor, encountered issues in detecting the orange and white face, the module is highly influenced by ambient lightning so i tried to find a solution without altering the cube itself. I plan on 3d printing a small box with a hole for the color sensing module on the bottom, this will allow me to place the cube on top of the sensor with no external interference, if this is unsuccessfull I will have to resort to using a sharpie on the orange and white face of the cube.

Week 9

Decided on using Kociemba's algorithm on my laptop to generate the solution because of memory constraints.

Hardware

My project is based around the STM32U5 provided at the lab to take the solution generated on my computer using Kociemba's algorithm and control the rotating clamps. The 4 clamps are designed with a pair of SG90 servos each, one servo moves the clamp away and towards the cube, while the other rotates the face of the cube 90 or 180 degrees. The color of each piece of the cube is detected using the TCS34725 color sensor seated in a small box separate from the main mechanism to ensure no external interference with the sensor.

Schematics

Todo

Bill of Materials

DeviceUsagePrice
STM32 Nucleo-U545REThe microcontrollerBorrowed
TCS34725 Color SensorColor detection49.82 RON
SG90 Servomotor (8x)Rotating the cube's faces and moving the clamps9.49 RON
Electronics KitBreadboard,wires,resistors etc.39.99 RON

Software

LibraryDescriptionUsage
embassy-stm32Hardware Abstraction LayerControls the pins, the USB/UART connection to the laptop, and the I2C bus
embassy-executorAsync ExecutorUsed for drawing to the display
kociembaAlgorithm crateUsed for generating the solution on the computer
embassy-timeTimerHandles the pause between servo movements
tcs3472Color sensor driverRead the colors from the detection module
defmtLogging frameworkDebugging
  1. MIT .38 second solve
  2. 1 axis solver ...